commandmate 0.2.3 → 0.2.5

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 (89) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-build-manifest.json +25 -25
  3. package/.next/app-path-routes-manifest.json +1 -1
  4. package/.next/build-manifest.json +7 -7
  5. package/.next/cache/.tsbuildinfo +1 -1
  6. package/.next/cache/config.json +3 -3
  7. package/.next/cache/fetch-cache/e7a5282a8c6f6e86940328b91498c8c8abc4b300cf449cb16e8ecd707767c12b +1 -0
  8. package/.next/cache/webpack/client-production/0.pack +0 -0
  9. package/.next/cache/webpack/client-production/1.pack +0 -0
  10. package/.next/cache/webpack/client-production/2.pack +0 -0
  11. package/.next/cache/webpack/client-production/index.pack +0 -0
  12. package/.next/cache/webpack/client-production/index.pack.old +0 -0
  13. package/.next/cache/webpack/edge-server-production/index.pack +0 -0
  14. package/.next/cache/webpack/server-production/0.pack +0 -0
  15. package/.next/cache/webpack/server-production/index.pack +0 -0
  16. package/.next/next-server.js.nft.json +1 -1
  17. package/.next/prerender-manifest.json +1 -1
  18. package/.next/required-server-files.json +1 -1
  19. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/api/app/update-check/route.js +1 -0
  21. package/.next/server/app/api/app/update-check/route.js.nft.json +1 -0
  22. package/.next/server/app/api/app/update-check.body +1 -0
  23. package/.next/server/app/api/app/update-check.meta +1 -0
  24. package/.next/server/app/api/repositories/restore/route.js +1 -1
  25. package/.next/server/app/api/repositories/scan/route.js +1 -1
  26. package/.next/server/app/api/repositories/sync/route.js +1 -1
  27. package/.next/server/app/api/worktrees/[id]/logs/[filename]/route.js +1 -1
  28. package/.next/server/app/api/worktrees/[id]/logs/route.js +2 -2
  29. package/.next/server/app/api/worktrees/[id]/search/route.js +1 -1
  30. package/.next/server/app/page_client-reference-manifest.js +1 -1
  31. package/.next/server/app/proxy/[...path]/route.js +1 -1
  32. package/.next/server/app/worktrees/[id]/files/[...path]/page_client-reference-manifest.js +1 -1
  33. package/.next/server/app/worktrees/[id]/page.js +3 -3
  34. package/.next/server/app/worktrees/[id]/page_client-reference-manifest.js +1 -1
  35. package/.next/server/app/worktrees/[id]/terminal/page_client-reference-manifest.js +1 -1
  36. package/.next/server/app-paths-manifest.json +10 -9
  37. package/.next/server/chunks/2683.js +1 -1
  38. package/.next/server/chunks/5488.js +1 -1
  39. package/.next/server/chunks/5823.js +1 -1
  40. package/.next/server/chunks/7425.js +3 -3
  41. package/.next/server/chunks/7536.js +1 -1
  42. package/.next/server/chunks/9367.js +2 -2
  43. package/.next/server/middleware-build-manifest.js +1 -1
  44. package/.next/server/pages/500.html +1 -1
  45. package/.next/server/server-reference-manifest.json +1 -1
  46. package/.next/static/chunks/{816-bb41b20a51ae924a.js → 816-af44cb865b0c980e.js} +1 -1
  47. package/.next/static/chunks/app/page-43b5de1a0a788b1f.js +1 -0
  48. package/.next/static/chunks/app/worktrees/[id]/{page-9d77c6f755d08086.js → page-66b59fb8c9ee90f4.js} +1 -1
  49. package/.next/static/chunks/{main-b6d727aa9248d4f2.js → main-f00f82f1cf18dd99.js} +1 -1
  50. package/.next/static/chunks/{webpack-e6531fcf859d9451.js → webpack-af8567a485ade35a.js} +1 -1
  51. package/.next/static/css/{4eca30cb81bc52b4.css → 6a92c8ad3c94d15a.css} +1 -1
  52. package/.next/trace +5 -5
  53. package/.next/types/app/api/app/update-check/route.ts +343 -0
  54. package/dist/cli/commands/docs.d.ts +22 -0
  55. package/dist/cli/commands/docs.d.ts.map +1 -0
  56. package/dist/cli/commands/docs.js +96 -0
  57. package/dist/cli/commands/init.d.ts.map +1 -1
  58. package/dist/cli/commands/init.js +3 -0
  59. package/dist/cli/commands/issue.d.ts +23 -0
  60. package/dist/cli/commands/issue.d.ts.map +1 -0
  61. package/dist/cli/commands/issue.js +143 -0
  62. package/dist/cli/config/ai-integration-messages.d.ts +6 -0
  63. package/dist/cli/config/ai-integration-messages.d.ts.map +1 -0
  64. package/dist/cli/config/ai-integration-messages.js +27 -0
  65. package/dist/cli/config/cli-dependencies.d.ts.map +1 -1
  66. package/dist/cli/config/cli-dependencies.js +6 -0
  67. package/dist/cli/config/security-messages.d.ts +3 -1
  68. package/dist/cli/config/security-messages.d.ts.map +1 -1
  69. package/dist/cli/config/security-messages.js +4 -1
  70. package/dist/cli/index.js +15 -2
  71. package/dist/cli/types/index.d.ts +23 -0
  72. package/dist/cli/types/index.d.ts.map +1 -1
  73. package/dist/cli/utils/docs-reader.d.ts +42 -0
  74. package/dist/cli/utils/docs-reader.d.ts.map +1 -0
  75. package/dist/cli/utils/docs-reader.js +155 -0
  76. package/dist/cli/utils/input-validators.d.ts +32 -0
  77. package/dist/cli/utils/input-validators.d.ts.map +1 -1
  78. package/dist/cli/utils/input-validators.js +51 -1
  79. package/dist/cli/utils/preflight.d.ts.map +1 -1
  80. package/dist/cli/utils/preflight.js +1 -0
  81. package/dist/config/github-links.d.ts +16 -0
  82. package/dist/config/github-links.d.ts.map +1 -0
  83. package/dist/config/github-links.js +22 -0
  84. package/dist/server/src/lib/prompt-detector.js +207 -67
  85. package/package.json +1 -1
  86. package/.next/static/chunks/app/page-792c0577dc44e5e5.js +0 -1
  87. /package/.next/static/chunks/{4733-db0112b08802aaa7.js → 4733-50bdfc169adb4881.js} +0 -0
  88. /package/.next/static/{rppRTm2sRWa4sZE7ili8A → zoVKZmyy2snskN1roYhHr}/_buildManifest.js +0 -0
  89. /package/.next/static/{rppRTm2sRWa4sZE7ili8A → zoVKZmyy2snskN1roYhHr}/_ssgManifest.js +0 -0
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /**
3
+ * AI Integration Guide Messages
4
+ * Issue #264: Display AI tool integration guide after init completion
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.AI_INTEGRATION_GUIDE = void 0;
8
+ exports.AI_INTEGRATION_GUIDE = `
9
+ \x1b[1m━━━ AI Tool Integration ━━━\x1b[0m
10
+ CommandMate commands can be used from Claude Code or Codex:
11
+
12
+ Issue management:
13
+ commandmate issue create --bug --title "Title" --body "Description"
14
+ commandmate issue create --feature --title "Title" --body "Description"
15
+ commandmate issue create --question --title "Question" --body "Details"
16
+ commandmate issue search "keyword"
17
+ commandmate issue list
18
+
19
+ Documentation (RAG):
20
+ commandmate docs # Show all documentation sections
21
+ commandmate docs --section <name> # Show specific section
22
+ commandmate docs --search <query> # Search documentation
23
+
24
+ Tip: Add to your CLAUDE.md or system prompt:
25
+ "Use \`commandmate --help\` to see available commands."
26
+ \x1b[1m━━━━━━━━━━━━━━━━━━━━━━━━━━━\x1b[0m
27
+ `;
@@ -1 +1 @@
1
- {"version":3,"file":"cli-dependencies.d.ts","sourceRoot":"","sources":["../../../src/cli/config/cli-dependencies.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,eAAe,EAgCzC,CAAC;AAEF;;GAEG;AACH,wBAAgB,eAAe,IAAI,eAAe,EAAE,CAEnD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,eAAe,EAAE,CAE3D;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,eAAe,EAAE,CAE3D"}
1
+ {"version":3,"file":"cli-dependencies.d.ts","sourceRoot":"","sources":["../../../src/cli/config/cli-dependencies.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,eAAe,EAsCzC,CAAC;AAEF;;GAEG;AACH,wBAAgB,eAAe,IAAI,eAAe,EAAE,CAEnD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,eAAe,EAAE,CAE3D;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,eAAe,EAAE,CAE3D"}
@@ -44,6 +44,12 @@ exports.DEPENDENCIES = [
44
44
  versionArg: '--version',
45
45
  required: false,
46
46
  },
47
+ {
48
+ name: 'gh CLI',
49
+ command: 'gh',
50
+ versionArg: '--version',
51
+ required: false,
52
+ },
47
53
  ];
48
54
  /**
49
55
  * Get all dependencies
@@ -2,10 +2,12 @@
2
2
  * Security Messages
3
3
  * Issue #179: Reverse proxy authentication recommendation
4
4
  * Shared warning constants for CLI commands (DRY principle)
5
+ *
6
+ * [SF-002] GitHub URLs imported from github-links.ts (DRY)
5
7
  */
6
8
  /**
7
9
  * Warning message displayed when CM_BIND=0.0.0.0
8
10
  * Used by: init.ts, start.ts, daemon.ts
9
11
  */
10
- export declare const REVERSE_PROXY_WARNING = "\n\u001B[1m\u001B[31mWARNING: Server is exposed to external networks without authentication\u001B[0m\n\nExposing the server without reverse proxy authentication\nis a serious security risk.\n\n\u001B[1mRisks:\u001B[0m\n File read/write/delete and command execution\n become accessible to third parties.\n\n\u001B[1mRecommended authentication methods:\u001B[0m\n - Nginx + Basic Auth\n - Cloudflare Access\n - Tailscale\n\nDetails: https://github.com/Kewton/CommandMate/blob/main/docs/security-guide.md\n";
12
+ export declare const REVERSE_PROXY_WARNING: string;
11
13
  //# sourceMappingURL=security-messages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"security-messages.d.ts","sourceRoot":"","sources":["../../../src/cli/config/security-messages.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;GAGG;AACH,eAAO,MAAM,qBAAqB,igBAgBjC,CAAC"}
1
+ {"version":3,"file":"security-messages.d.ts","sourceRoot":"","sources":["../../../src/cli/config/security-messages.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAgBjC,CAAC"}
@@ -3,9 +3,12 @@
3
3
  * Security Messages
4
4
  * Issue #179: Reverse proxy authentication recommendation
5
5
  * Shared warning constants for CLI commands (DRY principle)
6
+ *
7
+ * [SF-002] GitHub URLs imported from github-links.ts (DRY)
6
8
  */
7
9
  Object.defineProperty(exports, "__esModule", { value: true });
8
10
  exports.REVERSE_PROXY_WARNING = void 0;
11
+ const github_links_1 = require("../../config/github-links");
9
12
  /**
10
13
  * Warning message displayed when CM_BIND=0.0.0.0
11
14
  * Used by: init.ts, start.ts, daemon.ts
@@ -25,5 +28,5 @@ is a serious security risk.
25
28
  - Cloudflare Access
26
29
  - Tailscale
27
30
 
28
- Details: https://github.com/Kewton/CommandMate/blob/main/docs/security-guide.md
31
+ Details: ${github_links_1.GITHUB_SECURITY_GUIDE_URL}
29
32
  `;
package/dist/cli/index.js CHANGED
@@ -9,6 +9,8 @@ const init_1 = require("./commands/init");
9
9
  const start_1 = require("./commands/start");
10
10
  const stop_1 = require("./commands/stop");
11
11
  const status_1 = require("./commands/status");
12
+ const issue_1 = require("./commands/issue");
13
+ const docs_1 = require("./commands/docs");
12
14
  // Read version from package.json
13
15
  // eslint-disable-next-line @typescript-eslint/no-require-imports
14
16
  const pkg = require('../../package.json');
@@ -37,7 +39,7 @@ program
37
39
  .option('--dev', 'Start in development mode')
38
40
  .option('--daemon', 'Run in background')
39
41
  .option('-p, --port <number>', 'Override port number', parseInt)
40
- .option('-i, --issue <number>', 'Start worktree server for specific issue', parseInt)
42
+ .option('-i, --issue <number>', 'Start server for specific issue worktree', parseInt)
41
43
  .option('--auto-port', 'Automatically allocate port for worktree server')
42
44
  .action(async (options) => {
43
45
  await (0, start_1.startCommand)({
@@ -54,7 +56,7 @@ program
54
56
  .command('stop')
55
57
  .description('Stop the CommandMate server')
56
58
  .option('-f, --force', 'Force stop (SIGKILL)')
57
- .option('-i, --issue <number>', 'Stop worktree server for specific issue', parseInt)
59
+ .option('-i, --issue <number>', 'Stop server for specific issue worktree', parseInt)
58
60
  .action(async (options) => {
59
61
  await (0, stop_1.stopCommand)({
60
62
  force: options.force,
@@ -74,5 +76,16 @@ program
74
76
  all: options.all,
75
77
  });
76
78
  });
79
+ // Issue #264: issue/docs commands (addCommand pattern for subcommand support)
80
+ program.addCommand((0, issue_1.createIssueCommand)());
81
+ program.addCommand((0, docs_1.createDocsCommand)());
82
+ // Issue #264: AI Tool Integration help section
83
+ program.addHelpText('after', `
84
+ AI Tool Integration:
85
+ Use with Claude Code or Codex to manage issues:
86
+ commandmate issue create --bug --title "Title" --body "Description"
87
+ commandmate issue create --question --title "How to..." --body "Details"
88
+ commandmate docs --section quick-start
89
+ `);
77
90
  // Parse and execute
78
91
  program.parse();
@@ -158,6 +158,29 @@ export interface ConfirmOptions {
158
158
  /** Default value if user presses Enter (true = Y, false = N) */
159
159
  default?: boolean;
160
160
  }
161
+ /**
162
+ * Options for issue create subcommand
163
+ * Issue #264: gh CLI integration
164
+ * [MF-001 YAGNI] IssueOptions interface is NOT defined.
165
+ * Only IssueCreateOptions and DocsOptions are added.
166
+ */
167
+ export interface IssueCreateOptions {
168
+ bug?: boolean;
169
+ feature?: boolean;
170
+ question?: boolean;
171
+ title?: string;
172
+ body?: string;
173
+ labels?: string;
174
+ }
175
+ /**
176
+ * Options for docs command
177
+ * Issue #264: Documentation retrieval
178
+ */
179
+ export interface DocsOptions {
180
+ section?: string;
181
+ search?: string;
182
+ all?: boolean;
183
+ }
161
184
  /**
162
185
  * Extract error message from unknown error
163
186
  * Issue #125: DRY - centralized error message extraction
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,oBAAY,QAAQ;IAClB,OAAO,IAAI;IACX,gBAAgB,IAAI;IACpB,YAAY,IAAI;IAChB,YAAY,IAAI;IAChB,WAAW,IAAI;IACf,gBAAgB,KAAK;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC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AM,GAAG,IAAI,CAAC;CAC7C;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,gEAAgE;IAChE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAKtD"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * DocsReader Utility
3
+ * Issue #264: Documentation retrieval for docs command
4
+ *
5
+ * [SF-003] SRP: Separated from docs command handler.
6
+ * This utility manages section mapping, path resolution, file reading, and search logic.
7
+ * The command handler (docs.ts) only handles argument parsing and output formatting.
8
+ *
9
+ * Security:
10
+ * - [SEC-SF-002] Search query length limit (MAX_SEARCH_QUERY_LENGTH = 256)
11
+ * - Path traversal prevention via SECTION_MAP whitelist
12
+ * - [SF-004] package.json anchor-based path resolution
13
+ *
14
+ * @module docs-reader
15
+ */
16
+ /**
17
+ * Get list of available documentation section names.
18
+ */
19
+ export declare function getAvailableSections(): string[];
20
+ /**
21
+ * Check if a section name is valid (exists in the whitelist).
22
+ */
23
+ export declare function isValidSection(section: string): boolean;
24
+ /**
25
+ * Read the content of a documentation section.
26
+ *
27
+ * @param section - Section name (must be in SECTION_MAP whitelist)
28
+ * @throws Error if section is invalid or file cannot be read
29
+ */
30
+ export declare function readSection(section: string): string;
31
+ /**
32
+ * Search documentation for a query string.
33
+ * Uses String.prototype.includes() for case-insensitive matching (no regex).
34
+ *
35
+ * @param query - Search query (max 256 characters)
36
+ * @throws Error if query exceeds MAX_SEARCH_QUERY_LENGTH
37
+ */
38
+ export declare function searchDocs(query: string): Array<{
39
+ section: string;
40
+ matches: string[];
41
+ }>;
42
+ //# sourceMappingURL=docs-reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs-reader.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/docs-reader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAkDH;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAOnD;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CA0BvF"}
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ /**
3
+ * DocsReader Utility
4
+ * Issue #264: Documentation retrieval for docs command
5
+ *
6
+ * [SF-003] SRP: Separated from docs command handler.
7
+ * This utility manages section mapping, path resolution, file reading, and search logic.
8
+ * The command handler (docs.ts) only handles argument parsing and output formatting.
9
+ *
10
+ * Security:
11
+ * - [SEC-SF-002] Search query length limit (MAX_SEARCH_QUERY_LENGTH = 256)
12
+ * - Path traversal prevention via SECTION_MAP whitelist
13
+ * - [SF-004] package.json anchor-based path resolution
14
+ *
15
+ * @module docs-reader
16
+ */
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __importStar = (this && this.__importStar) || (function () {
34
+ var ownKeys = function(o) {
35
+ ownKeys = Object.getOwnPropertyNames || function (o) {
36
+ var ar = [];
37
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
38
+ return ar;
39
+ };
40
+ return ownKeys(o);
41
+ };
42
+ return function (mod) {
43
+ if (mod && mod.__esModule) return mod;
44
+ var result = {};
45
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
46
+ __setModuleDefault(result, mod);
47
+ return result;
48
+ };
49
+ })();
50
+ Object.defineProperty(exports, "__esModule", { value: true });
51
+ exports.getAvailableSections = getAvailableSections;
52
+ exports.isValidSection = isValidSection;
53
+ exports.readSection = readSection;
54
+ exports.searchDocs = searchDocs;
55
+ const fs = __importStar(require("fs"));
56
+ const path = __importStar(require("path"));
57
+ /**
58
+ * Whitelist of available documentation sections.
59
+ * [C-CONS-003] Only files listed here can be accessed via the docs command.
60
+ * Path traversal attempts are prevented by validating section names against this map.
61
+ */
62
+ const SECTION_MAP = {
63
+ 'quick-start': 'docs/user-guide/quick-start.md',
64
+ 'commands': 'docs/user-guide/commands-guide.md',
65
+ 'webapp': 'docs/user-guide/webapp-guide.md',
66
+ 'workflow-examples': 'docs/user-guide/workflow-examples.md',
67
+ 'cli-setup': 'docs/user-guide/cli-setup-guide.md',
68
+ 'agents': 'docs/user-guide/agents-guide.md',
69
+ 'architecture': 'docs/architecture.md',
70
+ 'readme': 'README.md',
71
+ };
72
+ /**
73
+ * [SEC-SF-002] Maximum search query length.
74
+ * String.prototype.includes() is used (no ReDoS risk), but this prevents
75
+ * performance degradation from extremely long queries.
76
+ */
77
+ const MAX_SEARCH_QUERY_LENGTH = 256;
78
+ /**
79
+ * Resolve the package root directory using package.json as anchor.
80
+ * [SF-004] Uses package.json location to determine root, resilient to
81
+ * compile output structure changes (instead of fragile __dirname relative paths).
82
+ */
83
+ function resolvePackageRoot() {
84
+ // From src/cli/utils/ -> 3 levels up to project root
85
+ // From dist/cli/utils/ -> 3 levels up to project root
86
+ let dir = __dirname;
87
+ for (let i = 0; i < 5; i++) {
88
+ const candidate = path.join(dir, 'package.json');
89
+ try {
90
+ fs.accessSync(candidate);
91
+ return dir;
92
+ }
93
+ catch {
94
+ dir = path.dirname(dir);
95
+ }
96
+ }
97
+ // Fallback: 3 levels up from __dirname
98
+ return path.resolve(__dirname, '..', '..', '..');
99
+ }
100
+ /**
101
+ * Get list of available documentation section names.
102
+ */
103
+ function getAvailableSections() {
104
+ return Object.keys(SECTION_MAP);
105
+ }
106
+ /**
107
+ * Check if a section name is valid (exists in the whitelist).
108
+ */
109
+ function isValidSection(section) {
110
+ return section in SECTION_MAP;
111
+ }
112
+ /**
113
+ * Read the content of a documentation section.
114
+ *
115
+ * @param section - Section name (must be in SECTION_MAP whitelist)
116
+ * @throws Error if section is invalid or file cannot be read
117
+ */
118
+ function readSection(section) {
119
+ if (!isValidSection(section)) {
120
+ throw new Error(`Invalid section: ${section}`);
121
+ }
122
+ const packageRoot = resolvePackageRoot();
123
+ const filePath = path.join(packageRoot, SECTION_MAP[section]);
124
+ return fs.readFileSync(filePath, 'utf-8');
125
+ }
126
+ /**
127
+ * Search documentation for a query string.
128
+ * Uses String.prototype.includes() for case-insensitive matching (no regex).
129
+ *
130
+ * @param query - Search query (max 256 characters)
131
+ * @throws Error if query exceeds MAX_SEARCH_QUERY_LENGTH
132
+ */
133
+ function searchDocs(query) {
134
+ if (query.length > MAX_SEARCH_QUERY_LENGTH) {
135
+ throw new Error(`Search query exceeds maximum length of ${MAX_SEARCH_QUERY_LENGTH} characters`);
136
+ }
137
+ const results = [];
138
+ const packageRoot = resolvePackageRoot();
139
+ const lowerQuery = query.toLowerCase();
140
+ for (const [section, relativePath] of Object.entries(SECTION_MAP)) {
141
+ const filePath = path.join(packageRoot, relativePath);
142
+ try {
143
+ const content = fs.readFileSync(filePath, 'utf-8');
144
+ const lines = content.split('\n');
145
+ const matches = lines.filter(line => line.toLowerCase().includes(lowerQuery));
146
+ if (matches.length > 0) {
147
+ results.push({ section, matches });
148
+ }
149
+ }
150
+ catch {
151
+ // File does not exist - skip
152
+ }
153
+ }
154
+ return results;
155
+ }
@@ -100,4 +100,36 @@ export declare function validateIssueNoResult(issueNo: unknown): IssueValidation
100
100
  * @returns true if value is a valid branch name
101
101
  */
102
102
  export declare function isValidBranchName(value: unknown): value is string;
103
+ /**
104
+ * [SEC-MF-001] Maximum issue title length (DoS prevention)
105
+ */
106
+ export declare const MAX_TITLE_LENGTH = 256;
107
+ /**
108
+ * [SEC-MF-001] Maximum issue body length (64KB, DoS prevention)
109
+ */
110
+ export declare const MAX_BODY_LENGTH = 65536;
111
+ /**
112
+ * Validate issue title length.
113
+ * [SEC-MF-001] Prevents DoS via extremely long input to gh CLI.
114
+ *
115
+ * @param title - Issue title to validate
116
+ * @returns Validation result with error message if invalid
117
+ */
118
+ export declare function validateIssueTitle(title: string): IssueValidationResult;
119
+ /**
120
+ * Validate issue body length.
121
+ * [SEC-MF-001] Prevents DoS via extremely long input to gh CLI.
122
+ *
123
+ * @param body - Issue body to validate
124
+ * @returns Validation result with error message if invalid
125
+ */
126
+ export declare function validateIssueBody(body: string): IssueValidationResult;
127
+ /**
128
+ * Sanitize a label string by removing control characters and zero-width characters.
129
+ * [SEC-SF-001] Follows env-setup.ts sanitizeInput() pattern.
130
+ *
131
+ * @param label - Label string to sanitize
132
+ * @returns Sanitized label string
133
+ */
134
+ export declare function sanitizeLabel(label: string): string;
103
135
  //# sourceMappingURL=input-validators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-validators.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/input-validators.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG;AACH,eAAO,MAAM,YAAY,aAAa,CAAC;AAEvC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAAsB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,MAAM,CAY3E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAQ3D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,MAAa,EACtB,OAAO,GAAE,MAAc,GACtB,OAAO,CAAC,IAAI,IAAI,MAAM,CAYxB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAO9D;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,qBAAqB,CAe7E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAUjE"}
1
+ {"version":3,"file":"input-validators.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/input-validators.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;GAGG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,CAEnD"}
@@ -9,13 +9,16 @@
9
9
  * @module input-validators
10
10
  */
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.MAX_BRANCH_NAME_LENGTH = exports.BRANCH_NAME_PATTERN = exports.MAX_ISSUE_NO = void 0;
12
+ exports.MAX_BODY_LENGTH = exports.MAX_TITLE_LENGTH = exports.MAX_BRANCH_NAME_LENGTH = exports.BRANCH_NAME_PATTERN = exports.MAX_ISSUE_NO = void 0;
13
13
  exports.validateIssueNo = validateIssueNo;
14
14
  exports.validateBranchName = validateBranchName;
15
15
  exports.validatePortNumber = validatePortNumber;
16
16
  exports.isValidIssueNo = isValidIssueNo;
17
17
  exports.validateIssueNoResult = validateIssueNoResult;
18
18
  exports.isValidBranchName = isValidBranchName;
19
+ exports.validateIssueTitle = validateIssueTitle;
20
+ exports.validateIssueBody = validateIssueBody;
21
+ exports.sanitizeLabel = sanitizeLabel;
19
22
  /**
20
23
  * Maximum allowed issue number (2^31 - 1)
21
24
  * NTH-SEC-002: Prevent integer overflow
@@ -161,3 +164,50 @@ function isValidBranchName(value) {
161
164
  return false;
162
165
  }
163
166
  }
167
+ // =============================================================================
168
+ // Issue #264: Issue command input validators
169
+ // =============================================================================
170
+ /**
171
+ * [SEC-MF-001] Maximum issue title length (DoS prevention)
172
+ */
173
+ exports.MAX_TITLE_LENGTH = 256;
174
+ /**
175
+ * [SEC-MF-001] Maximum issue body length (64KB, DoS prevention)
176
+ */
177
+ exports.MAX_BODY_LENGTH = 65536;
178
+ /**
179
+ * Validate issue title length.
180
+ * [SEC-MF-001] Prevents DoS via extremely long input to gh CLI.
181
+ *
182
+ * @param title - Issue title to validate
183
+ * @returns Validation result with error message if invalid
184
+ */
185
+ function validateIssueTitle(title) {
186
+ if (title.length > exports.MAX_TITLE_LENGTH) {
187
+ return { valid: false, error: `Title exceeds maximum length of ${exports.MAX_TITLE_LENGTH} characters` };
188
+ }
189
+ return { valid: true };
190
+ }
191
+ /**
192
+ * Validate issue body length.
193
+ * [SEC-MF-001] Prevents DoS via extremely long input to gh CLI.
194
+ *
195
+ * @param body - Issue body to validate
196
+ * @returns Validation result with error message if invalid
197
+ */
198
+ function validateIssueBody(body) {
199
+ if (body.length > exports.MAX_BODY_LENGTH) {
200
+ return { valid: false, error: `Body exceeds maximum length of ${exports.MAX_BODY_LENGTH} characters` };
201
+ }
202
+ return { valid: true };
203
+ }
204
+ /**
205
+ * Sanitize a label string by removing control characters and zero-width characters.
206
+ * [SEC-SF-001] Follows env-setup.ts sanitizeInput() pattern.
207
+ *
208
+ * @param label - Label string to sanitize
209
+ * @returns Sanitized label string
210
+ */
211
+ function sanitizeLabel(label) {
212
+ return label.replace(/[\u0000-\u001F\u007F-\u009F\u200B-\u200F\uFEFF]/g, '').trim();
213
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/preflight.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,EAChB,MAAM,UAAU,CAAC;AAGlB;;GAEG;AACH,qBAAa,gBAAgB;IAC3B;;;OAGG;IACG,eAAe,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA6CtE;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,eAAe,CAAC;IAoB1C;;OAEG;IACH,OAAO,CAAC,cAAc;IAmBtB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAevB;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAW5C"}
1
+ {"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../../../src/cli/utils/preflight.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,EAChB,MAAM,UAAU,CAAC;AAGlB;;GAEG;AACH,qBAAa,gBAAgB;IAC3B;;;OAGG;IACG,eAAe,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA6CtE;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,eAAe,CAAC;IAoB1C;;OAEG;IACH,OAAO,CAAC,cAAc;IAmBtB;;;OAGG;IACH,OAAO,CAAC,eAAe;IAevB;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAY5C"}
@@ -122,6 +122,7 @@ class PreflightChecker {
122
122
  tmux: 'Install with: brew install tmux (macOS) or apt install tmux (Linux)',
123
123
  git: 'Install with: brew install git (macOS) or apt install git (Linux)',
124
124
  'Claude CLI': 'Install with: npm install -g @anthropic-ai/claude-cli',
125
+ 'gh CLI': 'Install GitHub CLI: https://cli.github.com/ or brew install gh',
125
126
  };
126
127
  return hints[name] || `Please install ${name}`;
127
128
  }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * GitHub URL Constants (Centralized)
3
+ * Issue #264: DRY - All GitHub URLs derived from GITHUB_REPO_BASE_URL
4
+ *
5
+ * [SEC-001] SSRF Prevention: GITHUB_API_URL is NOT included here.
6
+ * It remains hardcoded in version-checker.ts for security reasons.
7
+ */
8
+ export declare const GITHUB_REPO_BASE_URL: "https://github.com/Kewton/CommandMate";
9
+ export declare const GITHUB_ISSUES_URL: "https://github.com/Kewton/CommandMate/issues";
10
+ export declare const GITHUB_NEW_ISSUE_URL: "https://github.com/Kewton/CommandMate/issues/new";
11
+ export declare const GITHUB_BUG_REPORT_URL: "https://github.com/Kewton/CommandMate/issues/new?template=bug_report.md";
12
+ export declare const GITHUB_FEATURE_REQUEST_URL: "https://github.com/Kewton/CommandMate/issues/new?template=feature_request.md";
13
+ export declare const GITHUB_QUESTION_URL: "https://github.com/Kewton/CommandMate/issues/new?template=question.md";
14
+ export declare const GITHUB_RELEASE_URL_PREFIX: "https://github.com/Kewton/CommandMate/releases/";
15
+ export declare const GITHUB_SECURITY_GUIDE_URL: "https://github.com/Kewton/CommandMate/blob/main/docs/security-guide.md";
16
+ //# sourceMappingURL=github-links.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-links.d.ts","sourceRoot":"","sources":["../../src/config/github-links.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,oBAAoB,EAAG,uCAAgD,CAAC;AAGrF,eAAO,MAAM,iBAAiB,gDAA4C,CAAC;AAC3E,eAAO,MAAM,oBAAoB,oDAAgD,CAAC;AAGlF,eAAO,MAAM,qBAAqB,2EAA4D,CAAC;AAC/F,eAAO,MAAM,0BAA0B,gFAAiE,CAAC;AACzG,eAAO,MAAM,mBAAmB,yEAA0D,CAAC;AAG3F,eAAO,MAAM,yBAAyB,mDAA+C,CAAC;AAGtF,eAAO,MAAM,yBAAyB,0EAAsE,CAAC"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * GitHub URL Constants (Centralized)
4
+ * Issue #264: DRY - All GitHub URLs derived from GITHUB_REPO_BASE_URL
5
+ *
6
+ * [SEC-001] SSRF Prevention: GITHUB_API_URL is NOT included here.
7
+ * It remains hardcoded in version-checker.ts for security reasons.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.GITHUB_SECURITY_GUIDE_URL = exports.GITHUB_RELEASE_URL_PREFIX = exports.GITHUB_QUESTION_URL = exports.GITHUB_FEATURE_REQUEST_URL = exports.GITHUB_BUG_REPORT_URL = exports.GITHUB_NEW_ISSUE_URL = exports.GITHUB_ISSUES_URL = exports.GITHUB_REPO_BASE_URL = void 0;
11
+ exports.GITHUB_REPO_BASE_URL = 'https://github.com/Kewton/CommandMate';
12
+ // Issue URLs
13
+ exports.GITHUB_ISSUES_URL = `${exports.GITHUB_REPO_BASE_URL}/issues`;
14
+ exports.GITHUB_NEW_ISSUE_URL = `${exports.GITHUB_REPO_BASE_URL}/issues/new`;
15
+ // Template URLs (UI: uses filename in query parameter)
16
+ exports.GITHUB_BUG_REPORT_URL = `${exports.GITHUB_NEW_ISSUE_URL}?template=bug_report.md`;
17
+ exports.GITHUB_FEATURE_REQUEST_URL = `${exports.GITHUB_NEW_ISSUE_URL}?template=feature_request.md`;
18
+ exports.GITHUB_QUESTION_URL = `${exports.GITHUB_NEW_ISSUE_URL}?template=question.md`;
19
+ // Release URL (moved from version-checker.ts, re-exported there for backward compatibility)
20
+ exports.GITHUB_RELEASE_URL_PREFIX = `${exports.GITHUB_REPO_BASE_URL}/releases/`;
21
+ // Security Guide URL (moved from security-messages.ts)
22
+ exports.GITHUB_SECURITY_GUIDE_URL = `${exports.GITHUB_REPO_BASE_URL}/blob/main/docs/security-guide.md`;