@agentteams/cli 0.1.97 → 0.1.99

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 (224) hide show
  1. package/.eslintcache +1 -1
  2. package/README.md +27 -11
  3. package/dist/api/sentry.d.ts +7 -0
  4. package/dist/api/sentry.d.ts.map +1 -0
  5. package/dist/api/sentry.js +18 -0
  6. package/dist/api/sentry.js.map +1 -0
  7. package/dist/commands/auth.d.ts +2 -0
  8. package/dist/commands/auth.d.ts.map +1 -1
  9. package/dist/commands/auth.js +15 -4
  10. package/dist/commands/auth.js.map +1 -1
  11. package/dist/commands/coaction.d.ts.map +1 -1
  12. package/dist/commands/coaction.js +6 -21
  13. package/dist/commands/coaction.js.map +1 -1
  14. package/dist/commands/codeReview.d.ts.map +1 -1
  15. package/dist/commands/codeReview.js +4 -5
  16. package/dist/commands/codeReview.js.map +1 -1
  17. package/dist/commands/document.d.ts +0 -1
  18. package/dist/commands/document.d.ts.map +1 -1
  19. package/dist/commands/document.js +1 -1
  20. package/dist/commands/document.js.map +1 -1
  21. package/dist/commands/index.d.ts.map +1 -1
  22. package/dist/commands/index.js +6 -0
  23. package/dist/commands/index.js.map +1 -1
  24. package/dist/commands/plan.d.ts.map +1 -1
  25. package/dist/commands/plan.js +42 -75
  26. package/dist/commands/plan.js.map +1 -1
  27. package/dist/commands/postmortem.d.ts.map +1 -1
  28. package/dist/commands/postmortem.js +1 -5
  29. package/dist/commands/postmortem.js.map +1 -1
  30. package/dist/commands/report.d.ts.map +1 -1
  31. package/dist/commands/report.js +7 -9
  32. package/dist/commands/report.js.map +1 -1
  33. package/dist/commands/sentry.d.ts +2 -0
  34. package/dist/commands/sentry.d.ts.map +1 -0
  35. package/dist/commands/sentry.js +26 -0
  36. package/dist/commands/sentry.js.map +1 -0
  37. package/dist/commands/task.js +2 -2
  38. package/dist/commands/task.js.map +1 -1
  39. package/dist/index.js +3 -1350
  40. package/dist/index.js.map +1 -1
  41. package/dist/mcp/context.js +1 -1
  42. package/dist/mcp/context.js.map +1 -1
  43. package/dist/mcp-registration/clients.d.ts.map +1 -1
  44. package/dist/mcp-registration/clients.js +92 -0
  45. package/dist/mcp-registration/clients.js.map +1 -1
  46. package/dist/mcp-registration/detect.d.ts +1 -0
  47. package/dist/mcp-registration/detect.d.ts.map +1 -1
  48. package/dist/mcp-registration/detect.js +25 -2
  49. package/dist/mcp-registration/detect.js.map +1 -1
  50. package/dist/mcp-registration/index.d.ts +2 -2
  51. package/dist/mcp-registration/index.d.ts.map +1 -1
  52. package/dist/mcp-registration/index.js +4 -0
  53. package/dist/mcp-registration/index.js.map +1 -1
  54. package/dist/mcp-registration/install.d.ts +2 -0
  55. package/dist/mcp-registration/install.d.ts.map +1 -1
  56. package/dist/mcp-registration/install.js +22 -2
  57. package/dist/mcp-registration/install.js.map +1 -1
  58. package/dist/mcp-registration/types.d.ts +8 -1
  59. package/dist/mcp-registration/types.d.ts.map +1 -1
  60. package/dist/mcp-registration/types.js +1 -0
  61. package/dist/mcp-registration/types.js.map +1 -1
  62. package/dist/program/agentConfig.d.ts +3 -0
  63. package/dist/program/agentConfig.d.ts.map +1 -0
  64. package/dist/program/agentConfig.js +14 -0
  65. package/dist/program/agentConfig.js.map +1 -0
  66. package/dist/program/attachment.d.ts +3 -0
  67. package/dist/program/attachment.d.ts.map +1 -0
  68. package/dist/program/attachment.js +17 -0
  69. package/dist/program/attachment.js.map +1 -0
  70. package/dist/program/auth.d.ts +3 -0
  71. package/dist/program/auth.d.ts.map +1 -0
  72. package/dist/program/auth.js +39 -0
  73. package/dist/program/auth.js.map +1 -0
  74. package/dist/program/changeSet.d.ts +4 -0
  75. package/dist/program/changeSet.d.ts.map +1 -0
  76. package/dist/program/changeSet.js +53 -0
  77. package/dist/program/changeSet.js.map +1 -0
  78. package/dist/program/coaction.d.ts +7 -0
  79. package/dist/program/coaction.d.ts.map +1 -0
  80. package/dist/program/coaction.js +81 -0
  81. package/dist/program/coaction.js.map +1 -0
  82. package/dist/program/codeReview.d.ts +4 -0
  83. package/dist/program/codeReview.d.ts.map +1 -0
  84. package/dist/program/codeReview.js +101 -0
  85. package/dist/program/codeReview.js.map +1 -0
  86. package/dist/program/comment.d.ts +4 -0
  87. package/dist/program/comment.d.ts.map +1 -0
  88. package/dist/program/comment.js +50 -0
  89. package/dist/program/comment.js.map +1 -0
  90. package/dist/program/config.d.ts +3 -0
  91. package/dist/program/config.d.ts.map +1 -0
  92. package/dist/program/config.js +9 -0
  93. package/dist/program/config.js.map +1 -0
  94. package/dist/program/convention.d.ts +4 -0
  95. package/dist/program/convention.d.ts.map +1 -0
  96. package/dist/program/convention.js +37 -0
  97. package/dist/program/convention.js.map +1 -0
  98. package/dist/program/dependency.d.ts +3 -0
  99. package/dist/program/dependency.d.ts.map +1 -0
  100. package/dist/program/dependency.js +15 -0
  101. package/dist/program/dependency.js.map +1 -0
  102. package/dist/program/doctor.d.ts +6 -0
  103. package/dist/program/doctor.d.ts.map +1 -0
  104. package/dist/program/doctor.js +31 -0
  105. package/dist/program/doctor.js.map +1 -0
  106. package/dist/program/document.d.ts +7 -0
  107. package/dist/program/document.d.ts.map +1 -0
  108. package/dist/program/document.js +87 -0
  109. package/dist/program/document.js.map +1 -0
  110. package/dist/program/feedback.d.ts +3 -0
  111. package/dist/program/feedback.d.ts.map +1 -0
  112. package/dist/program/feedback.js +10 -0
  113. package/dist/program/feedback.js.map +1 -0
  114. package/dist/program/index.d.ts +3 -0
  115. package/dist/program/index.d.ts.map +1 -0
  116. package/dist/program/index.js +68 -0
  117. package/dist/program/index.js.map +1 -0
  118. package/dist/program/init.d.ts +6 -0
  119. package/dist/program/init.d.ts.map +1 -0
  120. package/dist/program/init.js +50 -0
  121. package/dist/program/init.js.map +1 -0
  122. package/dist/program/linear.d.ts +3 -0
  123. package/dist/program/linear.d.ts.map +1 -0
  124. package/dist/program/linear.js +25 -0
  125. package/dist/program/linear.js.map +1 -0
  126. package/dist/program/mcp.d.ts +6 -0
  127. package/dist/program/mcp.d.ts.map +1 -0
  128. package/dist/program/mcp.js +95 -0
  129. package/dist/program/mcp.js.map +1 -0
  130. package/dist/program/options/completionReport.d.ts +5 -0
  131. package/dist/program/options/completionReport.d.ts.map +1 -0
  132. package/dist/program/options/completionReport.js +19 -0
  133. package/dist/program/options/completionReport.js.map +1 -0
  134. package/dist/program/options/connection.d.ts +3 -0
  135. package/dist/program/options/connection.d.ts.map +1 -0
  136. package/dist/program/options/connection.js +8 -0
  137. package/dist/program/options/connection.js.map +1 -0
  138. package/dist/program/options/output.d.ts +3 -0
  139. package/dist/program/options/output.d.ts.map +1 -0
  140. package/dist/program/options/output.js +6 -0
  141. package/dist/program/options/output.js.map +1 -0
  142. package/dist/program/options/pagination.d.ts +3 -0
  143. package/dist/program/options/pagination.d.ts.map +1 -0
  144. package/dist/program/options/pagination.js +6 -0
  145. package/dist/program/options/pagination.js.map +1 -0
  146. package/dist/program/options/resource.d.ts +6 -0
  147. package/dist/program/options/resource.d.ts.map +1 -0
  148. package/dist/program/options/resource.js +29 -0
  149. package/dist/program/options/resource.js.map +1 -0
  150. package/dist/program/plan.d.ts +7 -0
  151. package/dist/program/plan.d.ts.map +1 -0
  152. package/dist/program/plan.js +138 -0
  153. package/dist/program/plan.js.map +1 -0
  154. package/dist/program/postmortem.d.ts +4 -0
  155. package/dist/program/postmortem.d.ts.map +1 -0
  156. package/dist/program/postmortem.js +27 -0
  157. package/dist/program/postmortem.js.map +1 -0
  158. package/dist/program/report.d.ts +4 -0
  159. package/dist/program/report.d.ts.map +1 -0
  160. package/dist/program/report.js +39 -0
  161. package/dist/program/report.js.map +1 -0
  162. package/dist/program/resolve.d.ts +6 -0
  163. package/dist/program/resolve.d.ts.map +1 -0
  164. package/dist/program/resolve.js +30 -0
  165. package/dist/program/resolve.js.map +1 -0
  166. package/dist/program/search.d.ts +6 -0
  167. package/dist/program/search.d.ts.map +1 -0
  168. package/dist/program/search.js +43 -0
  169. package/dist/program/search.js.map +1 -0
  170. package/dist/program/sentry.d.ts +3 -0
  171. package/dist/program/sentry.d.ts.map +1 -0
  172. package/dist/program/sentry.js +19 -0
  173. package/dist/program/sentry.js.map +1 -0
  174. package/dist/program/shared.d.ts +32 -0
  175. package/dist/program/shared.d.ts.map +1 -0
  176. package/dist/program/shared.js +96 -0
  177. package/dist/program/shared.js.map +1 -0
  178. package/dist/program/sync.d.ts +6 -0
  179. package/dist/program/sync.d.ts.map +1 -0
  180. package/dist/program/sync.js +35 -0
  181. package/dist/program/sync.js.map +1 -0
  182. package/dist/program/task.d.ts +3 -0
  183. package/dist/program/task.d.ts.map +1 -0
  184. package/dist/program/task.js +13 -0
  185. package/dist/program/task.js.map +1 -0
  186. package/dist/program/worktree.d.ts +3 -0
  187. package/dist/program/worktree.d.ts.map +1 -0
  188. package/dist/program/worktree.js +30 -0
  189. package/dist/program/worktree.js.map +1 -0
  190. package/dist/utils/agentIdentity.d.ts +43 -0
  191. package/dist/utils/agentIdentity.d.ts.map +1 -1
  192. package/dist/utils/agentIdentity.js +45 -0
  193. package/dist/utils/agentIdentity.js.map +1 -1
  194. package/dist/utils/apiContext.d.ts.map +1 -1
  195. package/dist/utils/apiContext.js +6 -1
  196. package/dist/utils/apiContext.js.map +1 -1
  197. package/dist/utils/apiKeyInput.d.ts +1 -3
  198. package/dist/utils/apiKeyInput.d.ts.map +1 -1
  199. package/dist/utils/apiKeyInput.js +1 -9
  200. package/dist/utils/apiKeyInput.js.map +1 -1
  201. package/dist/utils/apiOrigin.d.ts +43 -0
  202. package/dist/utils/apiOrigin.d.ts.map +1 -0
  203. package/dist/utils/apiOrigin.js +78 -0
  204. package/dist/utils/apiOrigin.js.map +1 -0
  205. package/dist/utils/config.d.ts +9 -3
  206. package/dist/utils/config.d.ts.map +1 -1
  207. package/dist/utils/config.js +12 -4
  208. package/dist/utils/config.js.map +1 -1
  209. package/dist/utils/httpClient.d.ts.map +1 -1
  210. package/dist/utils/httpClient.js +50 -0
  211. package/dist/utils/httpClient.js.map +1 -1
  212. package/dist/utils/outputPolicy.d.ts +6 -7
  213. package/dist/utils/outputPolicy.d.ts.map +1 -1
  214. package/dist/utils/outputPolicy.js +0 -5
  215. package/dist/utils/outputPolicy.js.map +1 -1
  216. package/dist/utils/projectRootHash.d.ts +30 -0
  217. package/dist/utils/projectRootHash.d.ts.map +1 -0
  218. package/dist/utils/projectRootHash.js +43 -0
  219. package/dist/utils/projectRootHash.js.map +1 -0
  220. package/dist/utils/runnerTypes.d.ts +29 -0
  221. package/dist/utils/runnerTypes.d.ts.map +1 -0
  222. package/dist/utils/runnerTypes.js +40 -0
  223. package/dist/utils/runnerTypes.js.map +1 -0
  224. package/package.json +1 -1
@@ -0,0 +1,37 @@
1
+ import { Option, CONVENTION_HINT, executeCommand, handleError, printCommandResult } from './shared.js';
2
+ import { addOutputOptions } from './options/output.js';
3
+ /** 액션 인벤토리: list/show/download/status/create/update/delete. */
4
+ export function registerConventionCommand(program) {
5
+ const root = program
6
+ .command('convention')
7
+ .description('Manage project conventions')
8
+ .addHelpText('after', CONVENTION_HINT);
9
+ const addLeaf = (name, description, configure = (command) => command) => {
10
+ const command = addOutputOptions(configure(root.command(name).description(description))).addHelpText('after', CONVENTION_HINT);
11
+ command.action(async (options) => {
12
+ try {
13
+ const { outputFile, verbose, ...actionOptions } = options;
14
+ const result = await executeCommand('convention', name, {
15
+ ...actionOptions,
16
+ cwd: actionOptions.cwd ?? process.cwd(),
17
+ });
18
+ printCommandResult({ result, outputFile, verbose });
19
+ }
20
+ catch (error) {
21
+ console.error(handleError(error));
22
+ process.exit(1);
23
+ }
24
+ });
25
+ return command;
26
+ };
27
+ const addCwd = (command) => command.option('--cwd <path>', 'Working directory (defaults to current)');
28
+ const addFiles = (command) => addCwd(command).option('-f, --file <path>', 'Target convention markdown file (repeatable)', (value, previous = []) => previous.concat([value]), []);
29
+ addLeaf('list', 'List project conventions');
30
+ addLeaf('show', 'Show the effective convention');
31
+ addLeaf('download', 'Download project conventions', addCwd);
32
+ addLeaf('status', 'Show convention freshness status', addCwd);
33
+ addLeaf('create', 'Create project conventions', (command) => addFiles(command).addOption(new Option('--scope <scope>', 'Convention scope (defaults to PROJECT)').choices(['PROJECT', 'PERSONAL'])));
34
+ addLeaf('update', 'Update project conventions', (command) => addFiles(command).option('--apply', 'Apply changes to server (default: dry-run)', false));
35
+ addLeaf('delete', 'Delete project conventions', (command) => addFiles(command).option('--apply', 'Apply changes to server (default: dry-run)', false));
36
+ }
37
+ //# sourceMappingURL=convention.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convention.js","sourceRoot":"","sources":["../../src/program/convention.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAChH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,+DAA+D;AAC/D,MAAM,UAAU,yBAAyB,CAAC,OAAgB;IACxD,MAAM,IAAI,GAAG,OAAO;SACjB,OAAO,CAAC,YAAY,CAAC;SACrB,WAAW,CAAC,4BAA4B,CAAC;SACzC,WAAW,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,CACd,IAAY,EACZ,WAAmB,EACnB,YAA2C,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,EACtD,EAAE;QACX,MAAM,OAAO,GAAG,gBAAgB,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAClG,OAAO,EACP,eAAe,CAChB,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;YAC/B,IAAI,CAAC;gBACH,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,aAAa,EAAE,GAAG,OAAO,CAAC;gBAC1D,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,YAAY,EAA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CAAC,CAAC,CACzG,CACF,CAAC;IACF,OAAO,CAAC,QAAQ,EAAE,4BAA4B,EAAE,CAAC,OAAO,EAAE,EAAE,CAC1D,QAAQ,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,4CAA4C,EAAE,KAAK,CAAC,CACzF,CAAC;IACF,OAAO,CAAC,QAAQ,EAAE,4BAA4B,EAAE,CAAC,OAAO,EAAE,EAAE,CAC1D,QAAQ,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,4CAA4C,EAAE,KAAK,CAAC,CACzF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from './shared.js';
2
+ export declare function registerDependencyCommand(program: Command): void;
3
+ //# sourceMappingURL=dependency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependency.d.ts","sourceRoot":"","sources":["../../src/program/dependency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAmB,MAAM,aAAa,CAAC;AAGvD,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgBhE"}
@@ -0,0 +1,15 @@
1
+ import { CONVENTION_HINT } from './shared.js';
2
+ import { addJsonResourceLeaf } from './options/resource.js';
3
+ export function registerDependencyCommand(program) {
4
+ const root = program
5
+ .command('dependency')
6
+ .description('Manage plan dependencies')
7
+ .addHelpText('after', CONVENTION_HINT);
8
+ const addLeaf = (action, description, configure) => addJsonResourceLeaf(root, 'dependency', action, description, configure, {
9
+ connection: false,
10
+ });
11
+ addLeaf('list', 'List plan dependencies', (command) => command.option('--plan-id <id>', 'Plan ID'));
12
+ addLeaf('create', 'Create a plan dependency', (command) => command.option('--plan-id <id>', 'Plan ID').option('--blocking-plan-id <id>', 'Blocking plan ID'));
13
+ addLeaf('delete', 'Delete a plan dependency', (command) => command.option('--plan-id <id>', 'Plan ID').option('--dep-id <id>', 'Dependency ID to delete'));
14
+ }
15
+ //# sourceMappingURL=dependency.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dependency.js","sourceRoot":"","sources":["../../src/program/dependency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,eAAe,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,yBAAyB,CAAC,OAAgB;IACxD,MAAM,IAAI,GAAG,OAAO;SACjB,OAAO,CAAC,YAAY,CAAC;SACrB,WAAW,CAAC,0BAA0B,CAAC;SACvC,WAAW,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACzC,MAAM,OAAO,GAAG,CAAC,MAAc,EAAE,WAAmB,EAAE,SAAwC,EAAE,EAAE,CAChG,mBAAmB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE;QACtE,UAAU,EAAE,KAAK;KAClB,CAAC,CAAC;IACL,OAAO,CAAC,MAAM,EAAE,wBAAwB,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC,CAAC;IACpG,OAAO,CAAC,QAAQ,EAAE,0BAA0B,EAAE,CAAC,OAAO,EAAE,EAAE,CACxD,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,yBAAyB,EAAE,kBAAkB,CAAC,CAClG,CAAC;IACF,OAAO,CAAC,QAAQ,EAAE,0BAA0B,EAAE,CAAC,OAAO,EAAE,EAAE,CACxD,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAC/F,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from './shared.js';
2
+ /**
3
+ * 액션 인벤토리: 액션: run. 실사용 옵션: cwd, installWorktreeHook. 별칭/도움말 불일치: 없음.
4
+ */
5
+ export declare function registerDoctorCommand(program: Command): void;
6
+ //# sourceMappingURL=doctor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/program/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAOR,MAAM,aAAa,CAAC;AAGrB;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA+B5D"}
@@ -0,0 +1,31 @@
1
+ import { CONVENTION_HINT, executeCommand, executeValidatedInteractiveCommand, handleError, printDoctorResult, resolveDoctorExitCode, } from './shared.js';
2
+ /**
3
+ * 액션 인벤토리: 액션: run. 실사용 옵션: cwd, installWorktreeHook. 별칭/도움말 불일치: 없음.
4
+ */
5
+ export function registerDoctorCommand(program) {
6
+ program
7
+ .command('doctor')
8
+ .description('Diagnose convention reachability and install the worktree bootstrap hook')
9
+ .option('--format <format>', 'Output format (json; defaults to human-readable view)')
10
+ // The doctor honors the same gate `init` does — a repository with no linked
11
+ // worktree keeps its shared .git/hooks untouched — so opting in needs a flag
12
+ // on this command too, not just on `init`.
13
+ .option('--install-worktree-hook', 'Install the managed git post-checkout hook even if this repository has no linked worktrees yet.', false)
14
+ .addHelpText('after', CONVENTION_HINT)
15
+ .action(async (options) => {
16
+ try {
17
+ const { result, format } = await executeValidatedInteractiveCommand(options.format, async () => executeCommand('doctor', 'run', {
18
+ cwd: process.cwd(),
19
+ installWorktreeHook: options.installWorktreeHook === true,
20
+ }));
21
+ printDoctorResult(result, format);
22
+ // exitCode (not process.exit) lets stdout flush before termination.
23
+ process.exitCode = resolveDoctorExitCode(result);
24
+ }
25
+ catch (error) {
26
+ console.error(handleError(error));
27
+ process.exit(1);
28
+ }
29
+ });
30
+ }
31
+ //# sourceMappingURL=doctor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/program/doctor.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,cAAc,EACd,kCAAkC,EAClC,WAAW,EACX,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAGrB;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,0EAA0E,CAAC;SACvF,MAAM,CAAC,mBAAmB,EAAE,uDAAuD,CAAC;QACrF,4EAA4E;QAC5E,6EAA6E;QAC7E,2CAA2C;SAC1C,MAAM,CACL,yBAAyB,EACzB,iGAAiG,EACjG,KAAK,CACN;SACA,WAAW,CAAC,OAAO,EAAE,eAAe,CAAC;SACrC,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACxB,IAAI,CAAC;YACH,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,kCAAkC,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,IAAI,EAAE,CAC7F,cAAc,CAAC,QAAQ,EAAE,KAAK,EAAE;gBAC9B,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE;gBAClB,mBAAmB,EAAE,OAAO,CAAC,mBAAmB,KAAK,IAAI;aAC1D,CAAC,CACH,CAAC;YAEF,iBAAiB,CAAC,MAAsB,EAAE,MAAM,CAAC,CAAC;YAClD,oEAAoE;YACpE,OAAO,CAAC,QAAQ,GAAG,qBAAqB,CAAC,MAAsB,CAAC,CAAC;QACnE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YAClC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Command } from './shared.js';
2
+ /**
3
+ * 액션 인벤토리: create/update/download/list/tags/delete/archive/unarchive/revisions/revision-get/revision-restore/comment-list/comment-create/comment-update/comment-delete.
4
+ * archive/unarchive는 반대 동작의 별개 액션이며 --limit 별칭은 제거합니다.
5
+ */
6
+ export declare function registerDocumentCommand(program: Command): void;
7
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/program/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAoE,MAAM,aAAa,CAAC;AAKxG;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyH9D"}
@@ -0,0 +1,87 @@
1
+ import { CONVENTION_HINT, executeCommand, handleError, printCommandResult } from './shared.js';
2
+ import { addConnectionOptions } from './options/connection.js';
3
+ import { addOutputOptions } from './options/output.js';
4
+ import { addPaginationOptions } from './options/pagination.js';
5
+ /**
6
+ * 액션 인벤토리: create/update/download/list/tags/delete/archive/unarchive/revisions/revision-get/revision-restore/comment-list/comment-create/comment-update/comment-delete.
7
+ * archive/unarchive는 반대 동작의 별개 액션이며 --limit 별칭은 제거합니다.
8
+ */
9
+ export function registerDocumentCommand(program) {
10
+ const parent = program
11
+ .command('document')
12
+ .description('Manage project documents')
13
+ .addHelpText('after', CONVENTION_HINT);
14
+ const addLeaf = (name, description, configure = (command) => command) => {
15
+ const command = addOutputOptions(addConnectionOptions(configure(parent.command(name).description(description)))).addHelpText('after', CONVENTION_HINT);
16
+ command.action(async (options) => {
17
+ try {
18
+ const { outputFile, verbose, ...actionOptions } = options;
19
+ const result = await executeCommand('document', name, actionOptions);
20
+ printCommandResult({
21
+ result,
22
+ outputFile,
23
+ verbose,
24
+ resource: 'document',
25
+ action: name,
26
+ });
27
+ }
28
+ catch (error) {
29
+ console.error(handleError(error));
30
+ process.exit(1);
31
+ }
32
+ });
33
+ return command;
34
+ };
35
+ const addWriteContractOptions = (command, includeExpectedUpdatedAt = false) => {
36
+ const configured = command
37
+ .option('--guide-hash <hash>', 'Hash of the document guide you followed. Stale hash is rejected with GUIDE_OUTDATED.')
38
+ .option('--idempotency-key <key>', 'Retry-safe key. Repeating the same key with the same request replays the first result.');
39
+ return includeExpectedUpdatedAt
40
+ ? configured.option('--expected-updated-at <iso>', "The document's updatedAt as you last read it. Rejects the write if it changed meanwhile.")
41
+ : configured;
42
+ };
43
+ addLeaf('create', 'Create a document', (command) => addWriteContractOptions(command)
44
+ .option('--title <title>', 'Document title')
45
+ .option('--file <path>', 'Read markdown body from a local file')
46
+ .option('--tags <tags>', 'Comma-separated tag suggestions')
47
+ .option('--suggested-tags <tags>', 'Comma-separated AI-suggested tags')
48
+ .option('--visibility <visibility>', 'Document visibility: PRIVATE or PROJECT'));
49
+ addLeaf('update', 'Update a document', (command) => addWriteContractOptions(command, true)
50
+ .option('--id <id>', 'Document ID')
51
+ .option('--title <title>', 'Document title')
52
+ .option('--file <path>', 'Read markdown body from a local file')
53
+ .option('--tags <tags>', 'Comma-separated tag suggestions')
54
+ .option('--suggested-tags <tags>', 'Comma-separated AI-suggested tags')
55
+ .option('--visibility <visibility>', 'Document visibility: PRIVATE or PROJECT'));
56
+ addLeaf('download', 'Download a document', (command) => command.option('--id <id>', 'Document ID'));
57
+ addLeaf('list', 'List documents', (command) => addPaginationOptions(command)
58
+ .option('--query <q>', 'Search query')
59
+ .option('--tags <tags>', 'Comma-separated tag filter')
60
+ .option('--visibility <visibility>', 'Document visibility: PRIVATE or PROJECT')
61
+ .option('--archived <state>', 'Archive filter (ACTIVE, ARCHIVED, ALL)'));
62
+ addLeaf('tags', 'List confirmed document tags', (command) => command
63
+ .option('--visibility <visibility>', 'Document visibility: PRIVATE or PROJECT')
64
+ .option('--archived <state>', 'Archive filter (ACTIVE, ARCHIVED, ALL)'));
65
+ addLeaf('delete', 'Delete a document', (command) => addWriteContractOptions(command, true).option('--id <id>', 'Document ID'));
66
+ addLeaf('archive', 'Archive a document', (command) => command.option('--id <id>', 'Document ID'));
67
+ addLeaf('unarchive', 'Unarchive a document', (command) => command.option('--id <id>', 'Document ID'));
68
+ addLeaf('revisions', 'List document revisions', (command) => addPaginationOptions(command).option('--id <id>', 'Document ID'));
69
+ addLeaf('revision-get', 'Get a document revision', (command) => command.option('--id <id>', 'Document ID').option('--revision-id <id>', 'Document revision ID'));
70
+ addLeaf('revision-restore', 'Restore a document revision', (command) => command.option('--id <id>', 'Document ID').option('--revision-id <id>', 'Document revision ID'));
71
+ addLeaf('comment-list', 'List document comments', (command) => addPaginationOptions(command)
72
+ .option('--id <id>', 'Document ID')
73
+ .option('--order <order>', 'Comment order (asc or desc)'));
74
+ addLeaf('comment-create', 'Create a document comment', (command) => addWriteContractOptions(command)
75
+ .option('--id <id>', 'Document ID')
76
+ .option('--content <text>', 'Markdown comment content')
77
+ .option('--file <path>', 'Read markdown comment content from a local file'));
78
+ addLeaf('comment-update', 'Update a document comment', (command) => addWriteContractOptions(command, true)
79
+ .option('--id <id>', 'Document ID')
80
+ .option('--comment-id <id>', 'Document comment ID')
81
+ .option('--content <text>', 'Markdown comment content')
82
+ .option('--file <path>', 'Read markdown comment content from a local file'));
83
+ addLeaf('comment-delete', 'Delete a document comment', (command) => addWriteContractOptions(command, true)
84
+ .option('--id <id>', 'Document ID')
85
+ .option('--comment-id <id>', 'Document comment ID'));
86
+ }
87
+ //# sourceMappingURL=document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../src/program/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACxG,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,MAAM,MAAM,GAAG,OAAO;SACnB,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,0BAA0B,CAAC;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E,EAAE,CAC5D,oBAAoB,CAAC,OAAO,CAAC;SAC1B,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC;SAClC,MAAM,CAAC,iBAAiB,EAAE,6BAA6B,CAAC,CAC5D,CAAC;IACF,OAAO,CAAC,gBAAgB,EAAE,2BAA2B,EAAE,CAAC,OAAO,EAAE,EAAE,CACjE,uBAAuB,CAAC,OAAO,CAAC;SAC7B,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC;SAClC,MAAM,CAAC,kBAAkB,EAAE,0BAA0B,CAAC;SACtD,MAAM,CAAC,eAAe,EAAE,iDAAiD,CAAC,CAC9E,CAAC;IACF,OAAO,CAAC,gBAAgB,EAAE,2BAA2B,EAAE,CAAC,OAAO,EAAE,EAAE,CACjE,uBAAuB,CAAC,OAAO,EAAE,IAAI,CAAC;SACnC,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC;SAClC,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;SAClD,MAAM,CAAC,kBAAkB,EAAE,0BAA0B,CAAC;SACtD,MAAM,CAAC,eAAe,EAAE,iDAAiD,CAAC,CAC9E,CAAC;IACF,OAAO,CAAC,gBAAgB,EAAE,2BAA2B,EAAE,CAAC,OAAO,EAAE,EAAE,CACjE,uBAAuB,CAAC,OAAO,EAAE,IAAI,CAAC;SACnC,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC;SAClC,MAAM,CAAC,mBAAmB,EAAE,qBAAqB,CAAC,CACtD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from './shared.js';
2
+ export declare function registerFeedbackCommand(program: Command): void;
3
+ //# sourceMappingURL=feedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../src/program/feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAmB,MAAM,aAAa,CAAC;AAGvD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAQ9D"}
@@ -0,0 +1,10 @@
1
+ import { CONVENTION_HINT } from './shared.js';
2
+ import { addJsonResourceLeaf } from './options/resource.js';
3
+ export function registerFeedbackCommand(program) {
4
+ const root = program.command('feedback').description('Send product feedback').addHelpText('after', CONVENTION_HINT);
5
+ addJsonResourceLeaf(root, 'feedback', 'create', 'Create feedback', (command) => command
6
+ .option('--category <category>', 'Feedback category (BUG, SUGGESTION, CONVENTION, UX)')
7
+ .option('--title <title>', 'Feedback title')
8
+ .option('--content <content>', 'Feedback content'));
9
+ }
10
+ //# sourceMappingURL=feedback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"feedback.js","sourceRoot":"","sources":["../../src/program/feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,eAAe,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,uBAAuB,CAAC,OAAgB;IACtD,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC,uBAAuB,CAAC,CAAC,WAAW,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACpH,mBAAmB,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC,OAAO,EAAE,EAAE,CAC7E,OAAO;SACJ,MAAM,CAAC,uBAAuB,EAAE,qDAAqD,CAAC;SACtF,MAAM,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;SAC3C,MAAM,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CACrD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function createProgram(version: string): Command;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/program/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4BpC,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CA0CtD"}
@@ -0,0 +1,68 @@
1
+ import { Command } from 'commander';
2
+ import { registerAgentConfigCommand } from './agentConfig.js';
3
+ import { registerAttachmentCommand } from './attachment.js';
4
+ import { registerAuthCommand } from './auth.js';
5
+ import { registerChangeSetCommand } from './changeSet.js';
6
+ import { registerCoactionCommand } from './coaction.js';
7
+ import { registerCodeReviewCommand } from './codeReview.js';
8
+ import { registerCommentCommand } from './comment.js';
9
+ import { registerConfigCommand } from './config.js';
10
+ import { registerConventionCommand } from './convention.js';
11
+ import { registerDependencyCommand } from './dependency.js';
12
+ import { registerDoctorCommand } from './doctor.js';
13
+ import { registerDocumentCommand } from './document.js';
14
+ import { registerFeedbackCommand } from './feedback.js';
15
+ import { registerInitCommand } from './init.js';
16
+ import { registerLinearCommand } from './linear.js';
17
+ import { registerMcpCommand } from './mcp.js';
18
+ import { registerPlanCommand } from './plan.js';
19
+ import { registerPostmortemCommand } from './postmortem.js';
20
+ import { registerReportCommand } from './report.js';
21
+ import { registerResolveCommand } from './resolve.js';
22
+ import { registerSearchCommand } from './search.js';
23
+ import { registerSentryCommand } from './sentry.js';
24
+ import { registerSyncCommand } from './sync.js';
25
+ import { registerTaskCommand } from './task.js';
26
+ import { registerWorktreeCommand } from './worktree.js';
27
+ import { registerApiKeyHook, removedContractHint } from './shared.js';
28
+ export function createProgram(version) {
29
+ const program = new Command();
30
+ // 서브커맨드는 생성 시점에 outputConfiguration을 상속하므로 등록보다 먼저 설정합니다.
31
+ program.configureOutput({
32
+ writeErr: (text) => {
33
+ process.stderr.write(text);
34
+ const hint = removedContractHint(text);
35
+ if (hint)
36
+ process.stderr.write(`hint: ${hint}\n`);
37
+ },
38
+ });
39
+ registerApiKeyHook(program);
40
+ program.name('agentteams').description('CLI tool for AgentTeams API').version(version);
41
+ registerInitCommand(program);
42
+ registerAuthCommand(program);
43
+ registerDoctorCommand(program);
44
+ registerSyncCommand(program);
45
+ registerWorktreeCommand(program);
46
+ registerPlanCommand(program);
47
+ registerResolveCommand(program);
48
+ registerTaskCommand(program);
49
+ registerCommentCommand(program);
50
+ registerAttachmentCommand(program);
51
+ registerReportCommand(program);
52
+ registerCodeReviewCommand(program);
53
+ registerChangeSetCommand(program);
54
+ registerPostmortemCommand(program);
55
+ registerCoactionCommand(program);
56
+ registerFeedbackCommand(program);
57
+ registerConventionCommand(program);
58
+ registerDocumentCommand(program);
59
+ registerDependencyCommand(program);
60
+ registerAgentConfigCommand(program);
61
+ registerConfigCommand(program);
62
+ registerSearchCommand(program);
63
+ registerMcpCommand(program);
64
+ registerLinearCommand(program);
65
+ registerSentryCommand(program);
66
+ return program;
67
+ }
68
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/program/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,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AC,CAAC,WAAW,CAAC,6BAA6B,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAEvF,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7B,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7B,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC/B,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7B,uBAAuB,CAAC,OAAO,CAAC,CAAC;IACjC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7B,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAChC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC7B,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAChC,yBAAyB,CAAC,OAAO,CAAC,CAAC;IACnC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC/B,yBAAyB,CAAC,OAAO,CAAC,CAAC;IACnC,wBAAwB,CAAC,OAAO,CAAC,CAAC;IAClC,yBAAyB,CAAC,OAAO,CAAC,CAAC;IACnC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IACjC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IACjC,yBAAyB,CAAC,OAAO,CAAC,CAAC;IACnC,uBAAuB,CAAC,OAAO,CAAC,CAAC;IACjC,yBAAyB,CAAC,OAAO,CAAC,CAAC;IACnC,0BAA0B,CAAC,OAAO,CAAC,CAAC;IACpC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC/B,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC/B,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAC5B,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAC/B,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAE/B,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from './shared.js';
2
+ /**
3
+ * 액션 인벤토리: 액션: start. 실사용 옵션: authMode, agentFiles, agentFilesExample, installWorktreeHook, deviceAuth, setDefault. 별칭/도움말 불일치: 없음.
4
+ */
5
+ export declare function registerInitCommand(program: Command): void;
6
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/program/init.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EASR,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA4D1D"}
@@ -0,0 +1,50 @@
1
+ import { Option, CONVENTION_HINT, DEVICE_AUTH_OPTION_DESCRIPTION, DEVICE_AUTH_SET_DEFAULT_DESCRIPTION, executeCommand, handleError, normalizeInteractiveFormat, printInitResult, } from './shared.js';
2
+ /**
3
+ * 액션 인벤토리: 액션: start. 실사용 옵션: authMode, agentFiles, agentFilesExample, installWorktreeHook, deviceAuth, setDefault. 별칭/도움말 불일치: 없음.
4
+ */
5
+ export function registerInitCommand(program) {
6
+ program
7
+ .command('init')
8
+ .description('Initialize AgentTeams CLI via OAuth')
9
+ // No commander `.default()` on purpose: init has to tell "the user asked for
10
+ // this credential" apart from "nothing was typed". A default would fill
11
+ // `options.auth` on every run, and `detectInitExecutionContext` reads a
12
+ // present value as an explicit relink request — which would make the
13
+ // configured-project fast path unreachable from the real CLI. The absent case
14
+ // is defaulted in `executeInitCommandWithContext`.
15
+ .addOption(new Option('--auth <mode>', 'Credential to configure. `personal-token` (default) stores a rotating personal login outside the repository — in the OS credential store, or in a permission-protected file when that store is unavailable — and refreshes itself; `api-key` writes a legacy agent key into .agentteams/config.json, which expires 30 days after issue and must be reissued by hand.').choices(['api-key', 'personal-token']))
16
+ // Entry point files are no longer written for every AI client on every run.
17
+ // Without a TTY the selection now comes from what is actually configured in
18
+ // the folder (.claude/, .cursor/, …), and this option is how an automated
19
+ // caller states the set explicitly instead.
20
+ .option('--agent-files <list>', "Comma-separated agent entry point files to create (CLAUDE.md, AGENTS.md, GEMINI.md, .cursor/rules/agentteams.mdc), or 'none'. Defaults to the AI clients detected in this folder.")
21
+ .option('--agent-files-example', 'When a selected entry point file already exists, write a <name>-example file next to it instead of leaving it alone.', false)
22
+ .option('--install-worktree-hook', "Install the managed git post-checkout hook even if this repository has no linked worktrees yet. By default the hook is installed only when linked worktrees exist; 'agentteams doctor' can install it later.", false)
23
+ // Explicit opt-in only. There is deliberately no `--no-device-auth`: the default
24
+ // already is the browser callback, so the way to turn this off is not to pass it.
25
+ .option('--device-auth', DEVICE_AUTH_OPTION_DESCRIPTION, false)
26
+ .option('--set-default', DEVICE_AUTH_SET_DEFAULT_DESCRIPTION, false)
27
+ .option('--format <format>', 'Output format (json; defaults to human-readable view)')
28
+ .option('--output-file <path>', 'Write full output to a file (stdout prints a short summary)')
29
+ .option('--verbose', 'Print full raw output to stdout; with --output-file, also echo it', false)
30
+ .addHelpText('after', CONVENTION_HINT)
31
+ .action(async (options) => {
32
+ try {
33
+ const result = await executeCommand('init', 'start', {
34
+ authMode: options.auth,
35
+ agentFiles: options.agentFiles,
36
+ agentFilesExample: options.agentFilesExample === true,
37
+ installWorktreeHook: options.installWorktreeHook === true,
38
+ deviceAuth: options.deviceAuth === true,
39
+ setDefault: options.setDefault === true,
40
+ });
41
+ const format = normalizeInteractiveFormat(options.format);
42
+ printInitResult(result, format);
43
+ }
44
+ catch (error) {
45
+ console.error(handleError(error));
46
+ process.exit(1);
47
+ }
48
+ });
49
+ }
50
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/program/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,eAAe,EACf,8BAA8B,EAC9B,mCAAmC,EACnC,cAAc,EACd,WAAW,EACX,0BAA0B,EAC1B,eAAe,GAChB,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,qCAAqC,CAA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,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAE1D,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YAClC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from './shared.js';
2
+ export declare function registerLinearCommand(program: Command): void;
3
+ //# sourceMappingURL=linear.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linear.d.ts","sourceRoot":"","sources":["../../src/program/linear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA2C,MAAM,aAAa,CAAC;AAG/E,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA4D5D"}
@@ -0,0 +1,25 @@
1
+ import { CONVENTION_HINT, createApiKeyFileOption } from './shared.js';
2
+ import { addJsonResourceLeaf } from './options/resource.js';
3
+ export function registerLinearCommand(program) {
4
+ const root = program
5
+ .command('linear')
6
+ .description('Read Linear issues and add comments through the AgentTeams API')
7
+ .addHelpText('after', CONVENTION_HINT);
8
+ const issue = root.command('issue').description('Read, create, or update a Linear issue');
9
+ const comment = root.command('comment').description('Manage comments on a Linear issue');
10
+ const addConnection = (command) => command
11
+ .option('--api-url <url>', 'Override API URL (optional)')
12
+ .addOption(createApiKeyFileOption())
13
+ .option('--project-id <id>', 'Override AgentTeams project ID (optional)');
14
+ addJsonResourceLeaf(issue, 'linear', 'get', 'Get a Linear issue', (command) => addConnection(command).option('--issue-id <id>', 'Linear issue ID'), { connection: false, commandAction: 'issue-get' });
15
+ addJsonResourceLeaf(issue, 'linear', 'create', 'Create a Linear issue', (command) => addConnection(command)
16
+ .option('--team-id <id>', 'Linear team ID (not an AgentTeams team ID)')
17
+ .option('--title <text>', 'Issue title')
18
+ .option('--description <text>', 'Issue description')
19
+ .option('--state <name>', 'Issue state name')
20
+ .option('--parent-id <id>', 'Linear parent issue UUID'), { connection: false, commandAction: 'issue-create' });
21
+ addJsonResourceLeaf(issue, 'linear', 'update', 'Update a Linear issue', (command) => addConnection(command).option('--issue-id <id>', 'Linear issue ID').option('--state <name>', 'Issue state name'), { connection: false, commandAction: 'issue-update' });
22
+ addJsonResourceLeaf(comment, 'linear', 'list', 'List Linear issue comments', (command) => addConnection(command).option('--issue-id <id>', 'Linear issue ID'), { connection: false, commandAction: 'comment-list' });
23
+ addJsonResourceLeaf(comment, 'linear', 'create', 'Create a Linear issue comment', (command) => addConnection(command).option('--issue-id <id>', 'Linear issue ID').option('--body <text>', 'Comment body'), { connection: false, commandAction: 'comment-create' });
24
+ }
25
+ //# sourceMappingURL=linear.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"linear.js","sourceRoot":"","sources":["../../src/program/linear.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,eAAe,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,MAAM,IAAI,GAAG,OAAO;SACjB,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,gEAAgE,CAAC;SAC7E,WAAW,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;IACzC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,wCAAwC,CAAC,CAAC;IAC1F,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,mCAAmC,CAAC,CAAC;IACzF,MAAM,aAAa,GAAG,CAAC,OAAgB,EAAE,EAAE,CACzC,OAAO;SACJ,MAAM,CAAC,iBAAiB,EAAE,6BAA6B,CAAC;SACxD,SAAS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,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,CACrD,CAAC;IACF,mBAAmB,CACjB,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,+BAA+B,EAC/B,CAAC,OAAO,EAAE,EAAE,CACV,aAAa,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC,MAAM,CAAC,eAAe,EAAE,cAAc,CAAC,EAC7G,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,CACvD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Command } from './shared.js';
2
+ /**
3
+ * 액션 인벤토리: 액션: server(부모), config/install/doctor. 등록 액션은 client/scope/toolProfile/serverEntry/json 및 접속 옵션, install만 yes, doctor는 yes/json. 별칭 없음.
4
+ */
5
+ export declare function registerMcpCommand(program: Command): void;
6
+ //# sourceMappingURL=mcp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/program/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAMR,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAkHzD"}
@@ -0,0 +1,95 @@
1
+ import { CONVENTION_HINT, MCP_CLIENT_IDS, createApiKeyFileOption, formatOutput, handleError, } from './shared.js';
2
+ /**
3
+ * 액션 인벤토리: 액션: server(부모), config/install/doctor. 등록 액션은 client/scope/toolProfile/serverEntry/json 및 접속 옵션, install만 yes, doctor는 yes/json. 별칭 없음.
4
+ */
5
+ export function registerMcpCommand(program) {
6
+ const mcpCommand = program
7
+ .command('mcp')
8
+ .description('Run an MCP server over stdio, exposing AgentTeams reads to MCP-capable coding agents')
9
+ .option('--tool-profile <profile>', 'Tool catalog profile (full, read, documents, comments, minimal); full is the compatibility default, limited profiles reduce upfront schemas', 'full')
10
+ .option('--api-url <url>', 'Override API URL (optional)')
11
+ .addOption(createApiKeyFileOption())
12
+ .option('--project-id <id>', 'Override project ID (optional)')
13
+ .addHelpText('after', CONVENTION_HINT)
14
+ .action(async (options) => {
15
+ try {
16
+ // Loaded lazily so the MCP SDK — which requires a newer Node than some of
17
+ // the CLI's other commands need — never enters the other command paths.
18
+ const { startMcpServer } = await import('../commands/mcp.js');
19
+ // stdout carries JSON-RPC frames only: this action deliberately bypasses
20
+ // executeCommand()/printCommandResult() and never writes to stdout.
21
+ await startMcpServer({
22
+ apiUrl: options.apiUrl,
23
+ apiKey: options.apiKey,
24
+ projectId: options.projectId,
25
+ toolProfile: options.toolProfile,
26
+ });
27
+ }
28
+ catch (error) {
29
+ // Staying alive without credentials would make the client retry forever.
30
+ console.error(handleError(error));
31
+ process.exit(1);
32
+ }
33
+ });
34
+ const MCP_CLIENT_CHOICES = MCP_CLIENT_IDS.join(', ');
35
+ function addMcpRegistrationOptions(command) {
36
+ return command
37
+ .option('--client <id>', `Target client (${MCP_CLIENT_CHOICES})`)
38
+ .option('--scope <scope>', 'Configuration scope (user, project)', 'project')
39
+ .option('--tool-profile <profile>', 'Tool catalog profile (full, read, documents, comments, minimal); full is the compatibility default, limited profiles reduce upfront schemas. A client whose backend rejects part of the catalog is narrowed automatically unless you name a profile here')
40
+ .option('--server-entry <path>', 'Use a local `cli/dist/index.js` instead of the published package (for pre-release testing)')
41
+ .option('--json', 'Print the machine-readable result instead of the human-readable report', false)
42
+ .option('--api-url <url>', 'Override API URL (optional)')
43
+ .addOption(createApiKeyFileOption())
44
+ .option('--project-id <id>', 'Override project ID (optional)');
45
+ }
46
+ /**
47
+ * The registration surface is loaded lazily for the same reason the server is:
48
+ * `agentteams mcp` must stay a thin stdio entry point, and no other command
49
+ * should pay for the client registry.
50
+ */
51
+ async function runMcpRegistration(action, options, command) {
52
+ try {
53
+ const parentOptions = command.parent?.opts() ?? {};
54
+ const merged = { ...parentOptions, ...options };
55
+ const { runMcpConfigCommand, runMcpInstallCommand } = await import('../mcp-registration/index.js');
56
+ const output = action === 'config' ? runMcpConfigCommand(merged) : runMcpInstallCommand(merged);
57
+ console.log(options.json ? formatOutput(output.json) : output.text);
58
+ process.exitCode = output.exitCode;
59
+ }
60
+ catch (error) {
61
+ console.error(handleError(error));
62
+ process.exit(1);
63
+ }
64
+ }
65
+ addMcpRegistrationOptions(mcpCommand
66
+ .command('config')
67
+ .description('Print the MCP configuration snippet for a coding agent. Never writes files or credentials.'))
68
+ .addHelpText('after', CONVENTION_HINT)
69
+ .action((options, command) => runMcpRegistration('config', options, command));
70
+ addMcpRegistrationOptions(mcpCommand
71
+ .command('install')
72
+ .description('Register AgentTeams with local MCP clients. Without --client it only prints a detection plan; batch apply requires --scope user --yes.'))
73
+ .option('--yes', 'Apply an explicitly selected user-scope batch plan instead of only printing it', false)
74
+ .addHelpText('after', CONVENTION_HINT)
75
+ .action((options, command) => runMcpRegistration('install', options, command));
76
+ mcpCommand
77
+ .command('doctor')
78
+ .description('Find legacy plaintext MCP key copies; cleanup is applied only with explicit --yes confirmation.')
79
+ .option('--yes', 'Confirm safe cleanup after the audit', false)
80
+ .option('--json', 'Print the machine-readable result instead of the human-readable report', false)
81
+ .addHelpText('after', CONVENTION_HINT)
82
+ .action(async (options) => {
83
+ try {
84
+ const { runMcpDoctorCommand } = await import('../mcp-registration/doctor.js');
85
+ const output = await runMcpDoctorCommand({ yes: options.yes === true });
86
+ console.log(options.json ? formatOutput(output.json) : output.text);
87
+ process.exitCode = output.exitCode;
88
+ }
89
+ catch (error) {
90
+ console.error(handleError(error));
91
+ process.exit(1);
92
+ }
93
+ });
94
+ }
95
+ //# sourceMappingURL=mcp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/program/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,cAAc,EACd,sBAAsB,EACtB,YAAY,EACZ,WAAW,GACZ,MAAM,aAAa,CAAC;AAErB;;GAEG;AACH,M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,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;YAClC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { Command } from 'commander';
2
+ export declare function addGitToggleOption(command: Command): Command;
3
+ export declare function addCompletionReportMetricsOptions(command: Command): Command;
4
+ export declare function addCompletionReportMetricValueOptions(command: Command): Command;
5
+ //# sourceMappingURL=completionReport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completionReport.d.ts","sourceRoot":"","sources":["../../../src/program/options/completionReport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE5D;AAED,wBAAgB,iCAAiC,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAE3E;AAED,wBAAgB,qCAAqC,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAW/E"}