slackhive 0.1.41 → 0.1.43

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 (534) hide show
  1. package/cli/dist/index.js +15786 -52
  2. package/package.json +9 -3
  3. package/.dockerignore +0 -14
  4. package/.env.example +0 -44
  5. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -65
  6. package/.github/ISSUE_TEMPLATE/config.yml +0 -5
  7. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -38
  8. package/.github/PULL_REQUEST_TEMPLATE.md +0 -27
  9. package/.github/dependabot.yml +0 -20
  10. package/.github/workflows/audit.yml +0 -149
  11. package/.github/workflows/ci.yml +0 -135
  12. package/CHANGELOG.md +0 -52
  13. package/CODE_OF_CONDUCT.md +0 -37
  14. package/CONTRIBUTING.md +0 -204
  15. package/SECURITY.md +0 -47
  16. package/apps/runner/Dockerfile +0 -33
  17. package/apps/runner/dist/__tests__/channel-restrictions.test.d.ts +0 -8
  18. package/apps/runner/dist/__tests__/channel-restrictions.test.js +0 -63
  19. package/apps/runner/dist/__tests__/channel-restrictions.test.js.map +0 -1
  20. package/apps/runner/dist/__tests__/claude-handler-resolve.test.d.ts +0 -20
  21. package/apps/runner/dist/__tests__/claude-handler-resolve.test.js +0 -178
  22. package/apps/runner/dist/__tests__/claude-handler-resolve.test.js.map +0 -1
  23. package/apps/runner/dist/__tests__/compile-claude-md.test.d.ts +0 -13
  24. package/apps/runner/dist/__tests__/compile-claude-md.test.js +0 -144
  25. package/apps/runner/dist/__tests__/compile-claude-md.test.js.map +0 -1
  26. package/apps/runner/dist/__tests__/memory-sync.test.d.ts +0 -11
  27. package/apps/runner/dist/__tests__/memory-sync.test.js +0 -56
  28. package/apps/runner/dist/__tests__/memory-sync.test.js.map +0 -1
  29. package/apps/runner/dist/__tests__/slack-file-support.test.d.ts +0 -9
  30. package/apps/runner/dist/__tests__/slack-file-support.test.js +0 -271
  31. package/apps/runner/dist/__tests__/slack-file-support.test.js.map +0 -1
  32. package/apps/runner/dist/__tests__/slack-formatting.test.d.ts +0 -12
  33. package/apps/runner/dist/__tests__/slack-formatting.test.js +0 -400
  34. package/apps/runner/dist/__tests__/slack-formatting.test.js.map +0 -1
  35. package/apps/runner/dist/__tests__/thread-context.test.d.ts +0 -12
  36. package/apps/runner/dist/__tests__/thread-context.test.js +0 -182
  37. package/apps/runner/dist/__tests__/thread-context.test.js.map +0 -1
  38. package/apps/runner/dist/agent-runner.d.ts +0 -118
  39. package/apps/runner/dist/agent-runner.js +0 -352
  40. package/apps/runner/dist/agent-runner.js.map +0 -1
  41. package/apps/runner/dist/claude-handler.d.ts +0 -122
  42. package/apps/runner/dist/claude-handler.js +0 -402
  43. package/apps/runner/dist/claude-handler.js.map +0 -1
  44. package/apps/runner/dist/compile-claude-md.d.ts +0 -59
  45. package/apps/runner/dist/compile-claude-md.js +0 -291
  46. package/apps/runner/dist/compile-claude-md.js.map +0 -1
  47. package/apps/runner/dist/correction-handler.d.ts +0 -46
  48. package/apps/runner/dist/correction-handler.js +0 -162
  49. package/apps/runner/dist/correction-handler.js.map +0 -1
  50. package/apps/runner/dist/correction-manager.d.ts +0 -53
  51. package/apps/runner/dist/correction-manager.js +0 -241
  52. package/apps/runner/dist/correction-manager.js.map +0 -1
  53. package/apps/runner/dist/db.d.ts +0 -193
  54. package/apps/runner/dist/db.js +0 -492
  55. package/apps/runner/dist/db.js.map +0 -1
  56. package/apps/runner/dist/index.d.ts +0 -9
  57. package/apps/runner/dist/index.js +0 -43
  58. package/apps/runner/dist/index.js.map +0 -1
  59. package/apps/runner/dist/job-scheduler.d.ts +0 -57
  60. package/apps/runner/dist/job-scheduler.js +0 -150
  61. package/apps/runner/dist/job-scheduler.js.map +0 -1
  62. package/apps/runner/dist/logger.d.ts +0 -32
  63. package/apps/runner/dist/logger.js +0 -52
  64. package/apps/runner/dist/logger.js.map +0 -1
  65. package/apps/runner/dist/mcp-process-manager.d.ts +0 -38
  66. package/apps/runner/dist/mcp-process-manager.js +0 -189
  67. package/apps/runner/dist/mcp-process-manager.js.map +0 -1
  68. package/apps/runner/dist/memory-mcp.d.ts +0 -14
  69. package/apps/runner/dist/memory-mcp.js +0 -88
  70. package/apps/runner/dist/memory-mcp.js.map +0 -1
  71. package/apps/runner/dist/memory-watcher.d.ts +0 -78
  72. package/apps/runner/dist/memory-watcher.js +0 -220
  73. package/apps/runner/dist/memory-watcher.js.map +0 -1
  74. package/apps/runner/dist/slack-handler.d.ts +0 -120
  75. package/apps/runner/dist/slack-handler.js +0 -843
  76. package/apps/runner/dist/slack-handler.js.map +0 -1
  77. package/apps/runner/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  78. package/apps/runner/package.json +0 -42
  79. package/apps/runner/src/__tests__/channel-restrictions.test.ts +0 -75
  80. package/apps/runner/src/__tests__/claude-handler-resolve.test.ts +0 -160
  81. package/apps/runner/src/__tests__/compile-claude-md.test.ts +0 -139
  82. package/apps/runner/src/__tests__/memory-sync.test.ts +0 -59
  83. package/apps/runner/src/__tests__/slack-file-support.test.ts +0 -376
  84. package/apps/runner/src/__tests__/slack-formatting.test.ts +0 -495
  85. package/apps/runner/src/__tests__/thread-context.test.ts +0 -215
  86. package/apps/runner/src/agent-runner.ts +0 -397
  87. package/apps/runner/src/claude-handler.ts +0 -475
  88. package/apps/runner/src/compile-claude-md.ts +0 -283
  89. package/apps/runner/src/correction-handler.ts +0 -191
  90. package/apps/runner/src/correction-manager.ts +0 -285
  91. package/apps/runner/src/db.ts +0 -604
  92. package/apps/runner/src/index.ts +0 -46
  93. package/apps/runner/src/job-scheduler.ts +0 -165
  94. package/apps/runner/src/logger.ts +0 -49
  95. package/apps/runner/src/mcp-process-manager.ts +0 -195
  96. package/apps/runner/src/memory-mcp.ts +0 -85
  97. package/apps/runner/src/memory-watcher.ts +0 -215
  98. package/apps/runner/src/slack-handler.ts +0 -929
  99. package/apps/runner/tsconfig.json +0 -17
  100. package/apps/runner/vitest.config.mts +0 -17
  101. package/apps/web/.eslintrc.json +0 -3
  102. package/apps/web/.next/app-build-manifest.json +0 -323
  103. package/apps/web/.next/app-path-routes-manifest.json +0 -46
  104. package/apps/web/.next/build-manifest.json +0 -33
  105. package/apps/web/.next/cache/.previewinfo +0 -1
  106. package/apps/web/.next/cache/.rscinfo +0 -1
  107. package/apps/web/.next/cache/webpack/client-production/0.pack +0 -0
  108. package/apps/web/.next/cache/webpack/client-production/1.pack +0 -0
  109. package/apps/web/.next/cache/webpack/client-production/2.pack +0 -0
  110. package/apps/web/.next/cache/webpack/client-production/3.pack +0 -0
  111. package/apps/web/.next/cache/webpack/client-production/4.pack +0 -0
  112. package/apps/web/.next/cache/webpack/client-production/index.pack +0 -0
  113. package/apps/web/.next/cache/webpack/client-production/index.pack.old +0 -0
  114. package/apps/web/.next/cache/webpack/edge-server-production/0.pack +0 -0
  115. package/apps/web/.next/cache/webpack/edge-server-production/1.pack +0 -0
  116. package/apps/web/.next/cache/webpack/edge-server-production/index.pack +0 -0
  117. package/apps/web/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
  118. package/apps/web/.next/cache/webpack/server-production/0.pack +0 -0
  119. package/apps/web/.next/cache/webpack/server-production/1.pack +0 -0
  120. package/apps/web/.next/cache/webpack/server-production/2.pack +0 -0
  121. package/apps/web/.next/cache/webpack/server-production/index.pack +0 -0
  122. package/apps/web/.next/cache/webpack/server-production/index.pack.old +0 -0
  123. package/apps/web/.next/diagnostics/build-diagnostics.json +0 -6
  124. package/apps/web/.next/diagnostics/framework.json +0 -1
  125. package/apps/web/.next/package.json +0 -1
  126. package/apps/web/.next/react-loadable-manifest.json +0 -1
  127. package/apps/web/.next/server/app/_not-found/page.js +0 -2
  128. package/apps/web/.next/server/app/_not-found/page.js.nft.json +0 -1
  129. package/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +0 -1
  130. package/apps/web/.next/server/app/agents/[slug]/page.js +0 -4
  131. package/apps/web/.next/server/app/agents/[slug]/page.js.nft.json +0 -1
  132. package/apps/web/.next/server/app/agents/[slug]/page_client-reference-manifest.js +0 -1
  133. package/apps/web/.next/server/app/agents/new/page.js +0 -2
  134. package/apps/web/.next/server/app/agents/new/page.js.nft.json +0 -1
  135. package/apps/web/.next/server/app/agents/new/page_client-reference-manifest.js +0 -1
  136. package/apps/web/.next/server/app/api/agents/[id]/access/route.js +0 -1
  137. package/apps/web/.next/server/app/api/agents/[id]/access/route.js.nft.json +0 -1
  138. package/apps/web/.next/server/app/api/agents/[id]/access/route_client-reference-manifest.js +0 -1
  139. package/apps/web/.next/server/app/api/agents/[id]/claude-md/route.js +0 -6
  140. package/apps/web/.next/server/app/api/agents/[id]/claude-md/route.js.nft.json +0 -1
  141. package/apps/web/.next/server/app/api/agents/[id]/claude-md/route_client-reference-manifest.js +0 -1
  142. package/apps/web/.next/server/app/api/agents/[id]/logs/route.js +0 -3
  143. package/apps/web/.next/server/app/api/agents/[id]/logs/route.js.nft.json +0 -1
  144. package/apps/web/.next/server/app/api/agents/[id]/logs/route_client-reference-manifest.js +0 -1
  145. package/apps/web/.next/server/app/api/agents/[id]/manifest/route.js +0 -1
  146. package/apps/web/.next/server/app/api/agents/[id]/manifest/route.js.nft.json +0 -1
  147. package/apps/web/.next/server/app/api/agents/[id]/manifest/route_client-reference-manifest.js +0 -1
  148. package/apps/web/.next/server/app/api/agents/[id]/mcps/route.js +0 -1
  149. package/apps/web/.next/server/app/api/agents/[id]/mcps/route.js.nft.json +0 -1
  150. package/apps/web/.next/server/app/api/agents/[id]/mcps/route_client-reference-manifest.js +0 -1
  151. package/apps/web/.next/server/app/api/agents/[id]/memories/[memId]/route.js +0 -1
  152. package/apps/web/.next/server/app/api/agents/[id]/memories/[memId]/route.js.nft.json +0 -1
  153. package/apps/web/.next/server/app/api/agents/[id]/memories/[memId]/route_client-reference-manifest.js +0 -1
  154. package/apps/web/.next/server/app/api/agents/[id]/memories/route.js +0 -1
  155. package/apps/web/.next/server/app/api/agents/[id]/memories/route.js.nft.json +0 -1
  156. package/apps/web/.next/server/app/api/agents/[id]/memories/route_client-reference-manifest.js +0 -1
  157. package/apps/web/.next/server/app/api/agents/[id]/permissions/route.js +0 -1
  158. package/apps/web/.next/server/app/api/agents/[id]/permissions/route.js.nft.json +0 -1
  159. package/apps/web/.next/server/app/api/agents/[id]/permissions/route_client-reference-manifest.js +0 -1
  160. package/apps/web/.next/server/app/api/agents/[id]/reload/route.js +0 -1
  161. package/apps/web/.next/server/app/api/agents/[id]/reload/route.js.nft.json +0 -1
  162. package/apps/web/.next/server/app/api/agents/[id]/reload/route_client-reference-manifest.js +0 -1
  163. package/apps/web/.next/server/app/api/agents/[id]/restrictions/route.js +0 -1
  164. package/apps/web/.next/server/app/api/agents/[id]/restrictions/route.js.nft.json +0 -1
  165. package/apps/web/.next/server/app/api/agents/[id]/restrictions/route_client-reference-manifest.js +0 -1
  166. package/apps/web/.next/server/app/api/agents/[id]/route.js +0 -33
  167. package/apps/web/.next/server/app/api/agents/[id]/route.js.nft.json +0 -1
  168. package/apps/web/.next/server/app/api/agents/[id]/route_client-reference-manifest.js +0 -1
  169. package/apps/web/.next/server/app/api/agents/[id]/skills/[skillId]/route.js +0 -1
  170. package/apps/web/.next/server/app/api/agents/[id]/skills/[skillId]/route.js.nft.json +0 -1
  171. package/apps/web/.next/server/app/api/agents/[id]/skills/[skillId]/route_client-reference-manifest.js +0 -1
  172. package/apps/web/.next/server/app/api/agents/[id]/skills/route.js +0 -1
  173. package/apps/web/.next/server/app/api/agents/[id]/skills/route.js.nft.json +0 -1
  174. package/apps/web/.next/server/app/api/agents/[id]/skills/route_client-reference-manifest.js +0 -1
  175. package/apps/web/.next/server/app/api/agents/[id]/slack-info/route.js +0 -1
  176. package/apps/web/.next/server/app/api/agents/[id]/slack-info/route.js.nft.json +0 -1
  177. package/apps/web/.next/server/app/api/agents/[id]/slack-info/route_client-reference-manifest.js +0 -1
  178. package/apps/web/.next/server/app/api/agents/[id]/snapshots/[sid]/restore/route.js +0 -1
  179. package/apps/web/.next/server/app/api/agents/[id]/snapshots/[sid]/restore/route.js.nft.json +0 -1
  180. package/apps/web/.next/server/app/api/agents/[id]/snapshots/[sid]/restore/route_client-reference-manifest.js +0 -1
  181. package/apps/web/.next/server/app/api/agents/[id]/snapshots/[sid]/route.js +0 -1
  182. package/apps/web/.next/server/app/api/agents/[id]/snapshots/[sid]/route.js.nft.json +0 -1
  183. package/apps/web/.next/server/app/api/agents/[id]/snapshots/[sid]/route_client-reference-manifest.js +0 -1
  184. package/apps/web/.next/server/app/api/agents/[id]/snapshots/route.js +0 -1
  185. package/apps/web/.next/server/app/api/agents/[id]/snapshots/route.js.nft.json +0 -1
  186. package/apps/web/.next/server/app/api/agents/[id]/snapshots/route_client-reference-manifest.js +0 -1
  187. package/apps/web/.next/server/app/api/agents/[id]/start/route.js +0 -1
  188. package/apps/web/.next/server/app/api/agents/[id]/start/route.js.nft.json +0 -1
  189. package/apps/web/.next/server/app/api/agents/[id]/start/route_client-reference-manifest.js +0 -1
  190. package/apps/web/.next/server/app/api/agents/[id]/stop/route.js +0 -1
  191. package/apps/web/.next/server/app/api/agents/[id]/stop/route.js.nft.json +0 -1
  192. package/apps/web/.next/server/app/api/agents/[id]/stop/route_client-reference-manifest.js +0 -1
  193. package/apps/web/.next/server/app/api/agents/route.js +0 -91
  194. package/apps/web/.next/server/app/api/agents/route.js.nft.json +0 -1
  195. package/apps/web/.next/server/app/api/agents/route_client-reference-manifest.js +0 -1
  196. package/apps/web/.next/server/app/api/auth/login/route.js +0 -1
  197. package/apps/web/.next/server/app/api/auth/login/route.js.nft.json +0 -1
  198. package/apps/web/.next/server/app/api/auth/login/route_client-reference-manifest.js +0 -1
  199. package/apps/web/.next/server/app/api/auth/logout/route.js +0 -1
  200. package/apps/web/.next/server/app/api/auth/logout/route.js.nft.json +0 -1
  201. package/apps/web/.next/server/app/api/auth/logout/route_client-reference-manifest.js +0 -1
  202. package/apps/web/.next/server/app/api/auth/me/route.js +0 -1
  203. package/apps/web/.next/server/app/api/auth/me/route.js.nft.json +0 -1
  204. package/apps/web/.next/server/app/api/auth/me/route_client-reference-manifest.js +0 -1
  205. package/apps/web/.next/server/app/api/auth/users/[id]/route.js +0 -1
  206. package/apps/web/.next/server/app/api/auth/users/[id]/route.js.nft.json +0 -1
  207. package/apps/web/.next/server/app/api/auth/users/[id]/route_client-reference-manifest.js +0 -1
  208. package/apps/web/.next/server/app/api/auth/users/route.js +0 -1
  209. package/apps/web/.next/server/app/api/auth/users/route.js.nft.json +0 -1
  210. package/apps/web/.next/server/app/api/auth/users/route_client-reference-manifest.js +0 -1
  211. package/apps/web/.next/server/app/api/env-vars/[key]/route.js +0 -1
  212. package/apps/web/.next/server/app/api/env-vars/[key]/route.js.nft.json +0 -1
  213. package/apps/web/.next/server/app/api/env-vars/[key]/route_client-reference-manifest.js +0 -1
  214. package/apps/web/.next/server/app/api/env-vars/route.js +0 -1
  215. package/apps/web/.next/server/app/api/env-vars/route.js.nft.json +0 -1
  216. package/apps/web/.next/server/app/api/env-vars/route_client-reference-manifest.js +0 -1
  217. package/apps/web/.next/server/app/api/jobs/[id]/route.js +0 -1
  218. package/apps/web/.next/server/app/api/jobs/[id]/route.js.nft.json +0 -1
  219. package/apps/web/.next/server/app/api/jobs/[id]/route_client-reference-manifest.js +0 -1
  220. package/apps/web/.next/server/app/api/jobs/[id]/runs/route.js +0 -1
  221. package/apps/web/.next/server/app/api/jobs/[id]/runs/route.js.nft.json +0 -1
  222. package/apps/web/.next/server/app/api/jobs/[id]/runs/route_client-reference-manifest.js +0 -1
  223. package/apps/web/.next/server/app/api/jobs/route.js +0 -1
  224. package/apps/web/.next/server/app/api/jobs/route.js.nft.json +0 -1
  225. package/apps/web/.next/server/app/api/jobs/route_client-reference-manifest.js +0 -1
  226. package/apps/web/.next/server/app/api/mcps/[id]/route.js +0 -1
  227. package/apps/web/.next/server/app/api/mcps/[id]/route.js.nft.json +0 -1
  228. package/apps/web/.next/server/app/api/mcps/[id]/route_client-reference-manifest.js +0 -1
  229. package/apps/web/.next/server/app/api/mcps/[id]/test/route.js +0 -1
  230. package/apps/web/.next/server/app/api/mcps/[id]/test/route.js.nft.json +0 -1
  231. package/apps/web/.next/server/app/api/mcps/[id]/test/route_client-reference-manifest.js +0 -1
  232. package/apps/web/.next/server/app/api/mcps/route.js +0 -1
  233. package/apps/web/.next/server/app/api/mcps/route.js.nft.json +0 -1
  234. package/apps/web/.next/server/app/api/mcps/route_client-reference-manifest.js +0 -1
  235. package/apps/web/.next/server/app/api/settings/route.js +0 -1
  236. package/apps/web/.next/server/app/api/settings/route.js.nft.json +0 -1
  237. package/apps/web/.next/server/app/api/settings/route_client-reference-manifest.js +0 -1
  238. package/apps/web/.next/server/app/icon.svg/route.js +0 -1
  239. package/apps/web/.next/server/app/icon.svg/route.js.nft.json +0 -1
  240. package/apps/web/.next/server/app/jobs/page.js +0 -2
  241. package/apps/web/.next/server/app/jobs/page.js.nft.json +0 -1
  242. package/apps/web/.next/server/app/jobs/page_client-reference-manifest.js +0 -1
  243. package/apps/web/.next/server/app/login/page.js +0 -2
  244. package/apps/web/.next/server/app/login/page.js.nft.json +0 -1
  245. package/apps/web/.next/server/app/login/page_client-reference-manifest.js +0 -1
  246. package/apps/web/.next/server/app/page.js +0 -2
  247. package/apps/web/.next/server/app/page.js.nft.json +0 -1
  248. package/apps/web/.next/server/app/page_client-reference-manifest.js +0 -1
  249. package/apps/web/.next/server/app/settings/env-vars/page.js +0 -2
  250. package/apps/web/.next/server/app/settings/env-vars/page.js.nft.json +0 -1
  251. package/apps/web/.next/server/app/settings/env-vars/page_client-reference-manifest.js +0 -1
  252. package/apps/web/.next/server/app/settings/mcps/page.js +0 -2
  253. package/apps/web/.next/server/app/settings/mcps/page.js.nft.json +0 -1
  254. package/apps/web/.next/server/app/settings/mcps/page_client-reference-manifest.js +0 -1
  255. package/apps/web/.next/server/app/settings/page.js +0 -2
  256. package/apps/web/.next/server/app/settings/page.js.nft.json +0 -1
  257. package/apps/web/.next/server/app/settings/page_client-reference-manifest.js +0 -1
  258. package/apps/web/.next/server/app-paths-manifest.json +0 -46
  259. package/apps/web/.next/server/chunks/1157.js +0 -9
  260. package/apps/web/.next/server/chunks/2287.js +0 -1
  261. package/apps/web/.next/server/chunks/3444.js +0 -1
  262. package/apps/web/.next/server/chunks/383.js +0 -6
  263. package/apps/web/.next/server/chunks/4012.js +0 -58
  264. package/apps/web/.next/server/chunks/6791.js +0 -1
  265. package/apps/web/.next/server/chunks/7171.js +0 -1
  266. package/apps/web/.next/server/chunks/8819.js +0 -22
  267. package/apps/web/.next/server/edge-runtime-webpack.js +0 -2
  268. package/apps/web/.next/server/edge-runtime-webpack.js.map +0 -1
  269. package/apps/web/.next/server/interception-route-rewrite-manifest.js +0 -1
  270. package/apps/web/.next/server/middleware-build-manifest.js +0 -1
  271. package/apps/web/.next/server/middleware-manifest.json +0 -32
  272. package/apps/web/.next/server/middleware-react-loadable-manifest.js +0 -1
  273. package/apps/web/.next/server/next-font-manifest.js +0 -1
  274. package/apps/web/.next/server/next-font-manifest.json +0 -1
  275. package/apps/web/.next/server/pages/_app.js +0 -1
  276. package/apps/web/.next/server/pages/_app.js.nft.json +0 -1
  277. package/apps/web/.next/server/pages/_document.js +0 -1
  278. package/apps/web/.next/server/pages/_document.js.nft.json +0 -1
  279. package/apps/web/.next/server/pages/_error.js +0 -19
  280. package/apps/web/.next/server/pages/_error.js.nft.json +0 -1
  281. package/apps/web/.next/server/pages-manifest.json +0 -5
  282. package/apps/web/.next/server/server-reference-manifest.js +0 -1
  283. package/apps/web/.next/server/server-reference-manifest.json +0 -1
  284. package/apps/web/.next/server/src/middleware.js +0 -14
  285. package/apps/web/.next/server/src/middleware.js.map +0 -1
  286. package/apps/web/.next/server/webpack-runtime.js +0 -1
  287. package/apps/web/.next/static/chunks/18-90b700ea37b686a2.js +0 -1
  288. package/apps/web/.next/static/chunks/87c73c54-24122e7b92478d00.js +0 -1
  289. package/apps/web/.next/static/chunks/9664-af80478aa73ba424.js +0 -1
  290. package/apps/web/.next/static/chunks/app/_not-found/page-b9cee17ed89ca24a.js +0 -1
  291. package/apps/web/.next/static/chunks/app/agents/[slug]/page-18369fc3fe1a9a7b.js +0 -1
  292. package/apps/web/.next/static/chunks/app/agents/new/page-bf11cf8901c7e2cd.js +0 -1
  293. package/apps/web/.next/static/chunks/app/api/agents/[id]/access/route-07f0f73ac9839899.js +0 -1
  294. package/apps/web/.next/static/chunks/app/api/agents/[id]/claude-md/route-07f0f73ac9839899.js +0 -1
  295. package/apps/web/.next/static/chunks/app/api/agents/[id]/logs/route-07f0f73ac9839899.js +0 -1
  296. package/apps/web/.next/static/chunks/app/api/agents/[id]/manifest/route-07f0f73ac9839899.js +0 -1
  297. package/apps/web/.next/static/chunks/app/api/agents/[id]/mcps/route-07f0f73ac9839899.js +0 -1
  298. package/apps/web/.next/static/chunks/app/api/agents/[id]/memories/[memId]/route-07f0f73ac9839899.js +0 -1
  299. package/apps/web/.next/static/chunks/app/api/agents/[id]/memories/route-07f0f73ac9839899.js +0 -1
  300. package/apps/web/.next/static/chunks/app/api/agents/[id]/permissions/route-07f0f73ac9839899.js +0 -1
  301. package/apps/web/.next/static/chunks/app/api/agents/[id]/reload/route-07f0f73ac9839899.js +0 -1
  302. package/apps/web/.next/static/chunks/app/api/agents/[id]/restrictions/route-07f0f73ac9839899.js +0 -1
  303. package/apps/web/.next/static/chunks/app/api/agents/[id]/route-07f0f73ac9839899.js +0 -1
  304. package/apps/web/.next/static/chunks/app/api/agents/[id]/skills/[skillId]/route-07f0f73ac9839899.js +0 -1
  305. package/apps/web/.next/static/chunks/app/api/agents/[id]/skills/route-07f0f73ac9839899.js +0 -1
  306. package/apps/web/.next/static/chunks/app/api/agents/[id]/slack-info/route-07f0f73ac9839899.js +0 -1
  307. package/apps/web/.next/static/chunks/app/api/agents/[id]/snapshots/[sid]/restore/route-07f0f73ac9839899.js +0 -1
  308. package/apps/web/.next/static/chunks/app/api/agents/[id]/snapshots/[sid]/route-07f0f73ac9839899.js +0 -1
  309. package/apps/web/.next/static/chunks/app/api/agents/[id]/snapshots/route-07f0f73ac9839899.js +0 -1
  310. package/apps/web/.next/static/chunks/app/api/agents/[id]/start/route-07f0f73ac9839899.js +0 -1
  311. package/apps/web/.next/static/chunks/app/api/agents/[id]/stop/route-07f0f73ac9839899.js +0 -1
  312. package/apps/web/.next/static/chunks/app/api/agents/route-07f0f73ac9839899.js +0 -1
  313. package/apps/web/.next/static/chunks/app/api/auth/login/route-07f0f73ac9839899.js +0 -1
  314. package/apps/web/.next/static/chunks/app/api/auth/logout/route-07f0f73ac9839899.js +0 -1
  315. package/apps/web/.next/static/chunks/app/api/auth/me/route-07f0f73ac9839899.js +0 -1
  316. package/apps/web/.next/static/chunks/app/api/auth/users/[id]/route-07f0f73ac9839899.js +0 -1
  317. package/apps/web/.next/static/chunks/app/api/auth/users/route-07f0f73ac9839899.js +0 -1
  318. package/apps/web/.next/static/chunks/app/api/env-vars/[key]/route-07f0f73ac9839899.js +0 -1
  319. package/apps/web/.next/static/chunks/app/api/env-vars/route-07f0f73ac9839899.js +0 -1
  320. package/apps/web/.next/static/chunks/app/api/jobs/[id]/route-07f0f73ac9839899.js +0 -1
  321. package/apps/web/.next/static/chunks/app/api/jobs/[id]/runs/route-07f0f73ac9839899.js +0 -1
  322. package/apps/web/.next/static/chunks/app/api/jobs/route-07f0f73ac9839899.js +0 -1
  323. package/apps/web/.next/static/chunks/app/api/mcps/[id]/route-07f0f73ac9839899.js +0 -1
  324. package/apps/web/.next/static/chunks/app/api/mcps/[id]/test/route-07f0f73ac9839899.js +0 -1
  325. package/apps/web/.next/static/chunks/app/api/mcps/route-07f0f73ac9839899.js +0 -1
  326. package/apps/web/.next/static/chunks/app/api/settings/route-07f0f73ac9839899.js +0 -1
  327. package/apps/web/.next/static/chunks/app/jobs/page-f5aa89a47c50efd8.js +0 -1
  328. package/apps/web/.next/static/chunks/app/layout-2079f4964aa7314e.js +0 -1
  329. package/apps/web/.next/static/chunks/app/login/layout-07f0f73ac9839899.js +0 -1
  330. package/apps/web/.next/static/chunks/app/login/page-aa259283dc38e8f9.js +0 -1
  331. package/apps/web/.next/static/chunks/app/page-e83437b608104dff.js +0 -1
  332. package/apps/web/.next/static/chunks/app/settings/env-vars/page-06479dbdfb78b76b.js +0 -1
  333. package/apps/web/.next/static/chunks/app/settings/mcps/page-75650686ed6490c7.js +0 -1
  334. package/apps/web/.next/static/chunks/app/settings/page-e1e62fc41ff6cddd.js +0 -1
  335. package/apps/web/.next/static/chunks/framework-811407f832a33072.js +0 -1
  336. package/apps/web/.next/static/chunks/main-3f1cddbdd67b1546.js +0 -1
  337. package/apps/web/.next/static/chunks/main-app-cebd8a6a5ccbf72d.js +0 -1
  338. package/apps/web/.next/static/chunks/pages/_app-50fa07b56b2d29ac.js +0 -1
  339. package/apps/web/.next/static/chunks/pages/_error-fed8688bdd23f211.js +0 -1
  340. package/apps/web/.next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
  341. package/apps/web/.next/static/chunks/webpack-6c05566dba553c97.js +0 -1
  342. package/apps/web/.next/static/css/15371687405525e2.css +0 -5
  343. package/apps/web/.next/static/ikfNbLhuw7jntn35bz0lk/_buildManifest.js +0 -1
  344. package/apps/web/.next/static/ikfNbLhuw7jntn35bz0lk/_ssgManifest.js +0 -1
  345. package/apps/web/.next/trace +0 -5
  346. package/apps/web/.next/types/app/agents/[slug]/page.ts +0 -84
  347. package/apps/web/.next/types/app/agents/new/page.ts +0 -84
  348. package/apps/web/.next/types/app/api/agents/[id]/access/route.ts +0 -347
  349. package/apps/web/.next/types/app/api/agents/[id]/claude-md/route.ts +0 -347
  350. package/apps/web/.next/types/app/api/agents/[id]/logs/route.ts +0 -347
  351. package/apps/web/.next/types/app/api/agents/[id]/manifest/route.ts +0 -347
  352. package/apps/web/.next/types/app/api/agents/[id]/mcps/route.ts +0 -347
  353. package/apps/web/.next/types/app/api/agents/[id]/memories/[memId]/route.ts +0 -347
  354. package/apps/web/.next/types/app/api/agents/[id]/memories/route.ts +0 -347
  355. package/apps/web/.next/types/app/api/agents/[id]/permissions/route.ts +0 -347
  356. package/apps/web/.next/types/app/api/agents/[id]/reload/route.ts +0 -347
  357. package/apps/web/.next/types/app/api/agents/[id]/restrictions/route.ts +0 -347
  358. package/apps/web/.next/types/app/api/agents/[id]/route.ts +0 -347
  359. package/apps/web/.next/types/app/api/agents/[id]/skills/[skillId]/route.ts +0 -347
  360. package/apps/web/.next/types/app/api/agents/[id]/skills/route.ts +0 -347
  361. package/apps/web/.next/types/app/api/agents/[id]/slack-info/route.ts +0 -347
  362. package/apps/web/.next/types/app/api/agents/[id]/snapshots/[sid]/restore/route.ts +0 -347
  363. package/apps/web/.next/types/app/api/agents/[id]/snapshots/[sid]/route.ts +0 -347
  364. package/apps/web/.next/types/app/api/agents/[id]/snapshots/route.ts +0 -347
  365. package/apps/web/.next/types/app/api/agents/[id]/start/route.ts +0 -347
  366. package/apps/web/.next/types/app/api/agents/[id]/stop/route.ts +0 -347
  367. package/apps/web/.next/types/app/api/agents/route.ts +0 -347
  368. package/apps/web/.next/types/app/api/auth/login/route.ts +0 -347
  369. package/apps/web/.next/types/app/api/auth/logout/route.ts +0 -347
  370. package/apps/web/.next/types/app/api/auth/me/route.ts +0 -347
  371. package/apps/web/.next/types/app/api/auth/users/[id]/route.ts +0 -347
  372. package/apps/web/.next/types/app/api/auth/users/route.ts +0 -347
  373. package/apps/web/.next/types/app/api/env-vars/[key]/route.ts +0 -347
  374. package/apps/web/.next/types/app/api/env-vars/route.ts +0 -347
  375. package/apps/web/.next/types/app/api/jobs/[id]/route.ts +0 -347
  376. package/apps/web/.next/types/app/api/jobs/[id]/runs/route.ts +0 -347
  377. package/apps/web/.next/types/app/api/jobs/route.ts +0 -347
  378. package/apps/web/.next/types/app/api/mcps/[id]/route.ts +0 -347
  379. package/apps/web/.next/types/app/api/mcps/[id]/test/route.ts +0 -347
  380. package/apps/web/.next/types/app/api/mcps/route.ts +0 -347
  381. package/apps/web/.next/types/app/api/settings/route.ts +0 -347
  382. package/apps/web/.next/types/app/jobs/page.ts +0 -84
  383. package/apps/web/.next/types/app/login/layout.ts +0 -84
  384. package/apps/web/.next/types/app/login/page.ts +0 -84
  385. package/apps/web/.next/types/app/page.ts +0 -84
  386. package/apps/web/.next/types/app/settings/env-vars/page.ts +0 -84
  387. package/apps/web/.next/types/app/settings/mcps/page.ts +0 -84
  388. package/apps/web/.next/types/app/settings/page.ts +0 -84
  389. package/apps/web/.next/types/cache-life.d.ts +0 -141
  390. package/apps/web/.next/types/package.json +0 -1
  391. package/apps/web/.next/types/routes.d.ts +0 -114
  392. package/apps/web/.next/types/validator.ts +0 -448
  393. package/apps/web/Dockerfile +0 -37
  394. package/apps/web/next-env.d.ts +0 -6
  395. package/apps/web/next.config.js +0 -6
  396. package/apps/web/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  397. package/apps/web/package.json +0 -48
  398. package/apps/web/postcss.config.js +0 -3
  399. package/apps/web/public/logo.svg +0 -17
  400. package/apps/web/src/app/agents/[slug]/page.tsx +0 -2235
  401. package/apps/web/src/app/agents/new/page.tsx +0 -1161
  402. package/apps/web/src/app/api/agents/[id]/access/route.ts +0 -76
  403. package/apps/web/src/app/api/agents/[id]/claude-md/route.ts +0 -111
  404. package/apps/web/src/app/api/agents/[id]/logs/route.ts +0 -84
  405. package/apps/web/src/app/api/agents/[id]/manifest/route.ts +0 -32
  406. package/apps/web/src/app/api/agents/[id]/mcps/route.ts +0 -73
  407. package/apps/web/src/app/api/agents/[id]/memories/[memId]/route.ts +0 -31
  408. package/apps/web/src/app/api/agents/[id]/memories/route.ts +0 -56
  409. package/apps/web/src/app/api/agents/[id]/permissions/route.ts +0 -74
  410. package/apps/web/src/app/api/agents/[id]/reload/route.ts +0 -33
  411. package/apps/web/src/app/api/agents/[id]/restrictions/route.ts +0 -85
  412. package/apps/web/src/app/api/agents/[id]/route.ts +0 -81
  413. package/apps/web/src/app/api/agents/[id]/skills/[skillId]/route.ts +0 -52
  414. package/apps/web/src/app/api/agents/[id]/skills/route.ts +0 -80
  415. package/apps/web/src/app/api/agents/[id]/slack-info/route.ts +0 -38
  416. package/apps/web/src/app/api/agents/[id]/snapshots/[sid]/restore/route.ts +0 -61
  417. package/apps/web/src/app/api/agents/[id]/snapshots/[sid]/route.ts +0 -53
  418. package/apps/web/src/app/api/agents/[id]/snapshots/route.ts +0 -84
  419. package/apps/web/src/app/api/agents/[id]/start/route.ts +0 -35
  420. package/apps/web/src/app/api/agents/[id]/stop/route.ts +0 -35
  421. package/apps/web/src/app/api/agents/route.ts +0 -99
  422. package/apps/web/src/app/api/auth/login/route.ts +0 -39
  423. package/apps/web/src/app/api/auth/logout/route.ts +0 -21
  424. package/apps/web/src/app/api/auth/me/route.ts +0 -24
  425. package/apps/web/src/app/api/auth/users/[id]/route.ts +0 -48
  426. package/apps/web/src/app/api/auth/users/route.ts +0 -63
  427. package/apps/web/src/app/api/env-vars/[key]/route.ts +0 -66
  428. package/apps/web/src/app/api/env-vars/route.ts +0 -59
  429. package/apps/web/src/app/api/jobs/[id]/route.ts +0 -51
  430. package/apps/web/src/app/api/jobs/[id]/runs/route.ts +0 -24
  431. package/apps/web/src/app/api/jobs/route.ts +0 -42
  432. package/apps/web/src/app/api/mcps/[id]/route.ts +0 -60
  433. package/apps/web/src/app/api/mcps/[id]/test/route.ts +0 -195
  434. package/apps/web/src/app/api/mcps/route.ts +0 -72
  435. package/apps/web/src/app/api/settings/route.ts +0 -42
  436. package/apps/web/src/app/globals.css +0 -124
  437. package/apps/web/src/app/icon.svg +0 -17
  438. package/apps/web/src/app/jobs/page.tsx +0 -543
  439. package/apps/web/src/app/layout-shell.tsx +0 -89
  440. package/apps/web/src/app/layout.tsx +0 -18
  441. package/apps/web/src/app/login/layout.tsx +0 -9
  442. package/apps/web/src/app/login/page.tsx +0 -150
  443. package/apps/web/src/app/page.tsx +0 -573
  444. package/apps/web/src/app/settings/env-vars/page.tsx +0 -216
  445. package/apps/web/src/app/settings/mcps/page.tsx +0 -763
  446. package/apps/web/src/app/settings/page.tsx +0 -528
  447. package/apps/web/src/app/sidebar.tsx +0 -345
  448. package/apps/web/src/lib/__tests__/api-guard.test.ts +0 -189
  449. package/apps/web/src/lib/__tests__/auth.test.ts +0 -262
  450. package/apps/web/src/lib/__tests__/boss-registry.test.ts +0 -323
  451. package/apps/web/src/lib/__tests__/compile.test.ts +0 -161
  452. package/apps/web/src/lib/__tests__/db-agent-hierarchy.test.ts +0 -136
  453. package/apps/web/src/lib/__tests__/db-env-vars.test.ts +0 -216
  454. package/apps/web/src/lib/__tests__/db-restrictions.test.ts +0 -117
  455. package/apps/web/src/lib/__tests__/db.integration.test.ts +0 -271
  456. package/apps/web/src/lib/__tests__/diff.test.ts +0 -102
  457. package/apps/web/src/lib/__tests__/mcp-mask.test.ts +0 -274
  458. package/apps/web/src/lib/__tests__/skill-templates.test.ts +0 -237
  459. package/apps/web/src/lib/__tests__/slack-manifest.test.ts +0 -105
  460. package/apps/web/src/lib/api-guard.ts +0 -68
  461. package/apps/web/src/lib/auth-context.tsx +0 -71
  462. package/apps/web/src/lib/auth.ts +0 -128
  463. package/apps/web/src/lib/boss-registry.ts +0 -90
  464. package/apps/web/src/lib/compile.ts +0 -51
  465. package/apps/web/src/lib/db.ts +0 -1196
  466. package/apps/web/src/lib/diff.ts +0 -43
  467. package/apps/web/src/lib/mcp-mask.ts +0 -91
  468. package/apps/web/src/lib/portal.tsx +0 -23
  469. package/apps/web/src/lib/skill-templates.ts +0 -148
  470. package/apps/web/src/lib/slack-manifest.ts +0 -85
  471. package/apps/web/src/middleware.ts +0 -68
  472. package/apps/web/tailwind.config.js +0 -6
  473. package/apps/web/tsconfig.json +0 -23
  474. package/apps/web/vitest.config.mts +0 -21
  475. package/cli/.claude/settings.local.json +0 -6
  476. package/cli/node_modules/.package-lock.json +0 -427
  477. package/cli/node_modules/commander/LICENSE +0 -22
  478. package/cli/node_modules/commander/Readme.md +0 -1157
  479. package/cli/node_modules/commander/esm.mjs +0 -16
  480. package/cli/node_modules/commander/index.js +0 -24
  481. package/cli/node_modules/commander/lib/argument.js +0 -149
  482. package/cli/node_modules/commander/lib/command.js +0 -2509
  483. package/cli/node_modules/commander/lib/error.js +0 -39
  484. package/cli/node_modules/commander/lib/help.js +0 -520
  485. package/cli/node_modules/commander/lib/option.js +0 -330
  486. package/cli/node_modules/commander/lib/suggestSimilar.js +0 -101
  487. package/cli/node_modules/commander/package-support.json +0 -16
  488. package/cli/node_modules/commander/package.json +0 -84
  489. package/cli/node_modules/commander/typings/esm.d.mts +0 -3
  490. package/cli/node_modules/commander/typings/index.d.ts +0 -969
  491. package/cli/package-lock.json +0 -449
  492. package/cli/package.json +0 -44
  493. package/cli/src/commands/init.ts +0 -514
  494. package/cli/src/commands/manage.ts +0 -115
  495. package/cli/src/index.ts +0 -63
  496. package/cli/tsconfig.json +0 -14
  497. package/docker-compose.yml +0 -122
  498. package/docs/agents/boss-agents.mdx +0 -108
  499. package/docs/agents/creating-agents.mdx +0 -132
  500. package/docs/agents/memory.mdx +0 -113
  501. package/docs/agents/tools.mdx +0 -103
  502. package/docs/configuration/env-vars.mdx +0 -166
  503. package/docs/configuration/mcp-servers.mdx +0 -203
  504. package/docs/configuration/slack-app.mdx +0 -175
  505. package/docs/docs.json +0 -79
  506. package/docs/favicon.svg +0 -17
  507. package/docs/features/history.mdx +0 -60
  508. package/docs/features/import-export.mdx +0 -77
  509. package/docs/features/logs.mdx +0 -131
  510. package/docs/features/multi-workspace.mdx +0 -90
  511. package/docs/features/scheduled-jobs.mdx +0 -231
  512. package/docs/features/users.mdx +0 -92
  513. package/docs/introduction.mdx +0 -160
  514. package/docs/logo/dark.svg +0 -17
  515. package/docs/logo/light.svg +0 -17
  516. package/docs/logo/wide-dark.svg +0 -12
  517. package/docs/logo/wide-light.svg +0 -12
  518. package/docs/quickstart.mdx +0 -270
  519. package/docs/self-hosting/docker.mdx +0 -151
  520. package/docs/self-hosting/production.mdx +0 -176
  521. package/packages/shared/dist/index.d.ts +0 -8
  522. package/packages/shared/dist/index.d.ts.map +0 -1
  523. package/packages/shared/dist/index.js +0 -24
  524. package/packages/shared/dist/index.js.map +0 -1
  525. package/packages/shared/dist/types.d.ts +0 -584
  526. package/packages/shared/dist/types.d.ts.map +0 -1
  527. package/packages/shared/dist/types.js +0 -39
  528. package/packages/shared/dist/types.js.map +0 -1
  529. package/packages/shared/package.json +0 -15
  530. package/packages/shared/src/db/schema.sql +0 -354
  531. package/packages/shared/src/index.ts +0 -8
  532. package/packages/shared/src/types.ts +0 -683
  533. package/packages/shared/tsconfig.json +0 -17
  534. package/scripts/dev.sh +0 -45
@@ -1,969 +0,0 @@
1
- // Type definitions for commander
2
- // Original definitions by: Alan Agius <https://github.com/alan-agius4>, Marcelo Dezem <https://github.com/mdezem>, vvakame <https://github.com/vvakame>, Jules Randolph <https://github.com/sveinburne>
3
-
4
- // Using method rather than property for method-signature-style, to document method overloads separately. Allow either.
5
- /* eslint-disable @typescript-eslint/method-signature-style */
6
- /* eslint-disable @typescript-eslint/no-explicit-any */
7
-
8
- // This is a trick to encourage editor to suggest the known literals while still
9
- // allowing any BaseType value.
10
- // References:
11
- // - https://github.com/microsoft/TypeScript/issues/29729
12
- // - https://github.com/sindresorhus/type-fest/blob/main/source/literal-union.d.ts
13
- // - https://github.com/sindresorhus/type-fest/blob/main/source/primitive.d.ts
14
- type LiteralUnion<LiteralType, BaseType extends string | number> =
15
- | LiteralType
16
- | (BaseType & Record<never, never>);
17
-
18
- export class CommanderError extends Error {
19
- code: string;
20
- exitCode: number;
21
- message: string;
22
- nestedError?: string;
23
-
24
- /**
25
- * Constructs the CommanderError class
26
- * @param exitCode - suggested exit code which could be used with process.exit
27
- * @param code - an id string representing the error
28
- * @param message - human-readable description of the error
29
- */
30
- constructor(exitCode: number, code: string, message: string);
31
- }
32
-
33
- export class InvalidArgumentError extends CommanderError {
34
- /**
35
- * Constructs the InvalidArgumentError class
36
- * @param message - explanation of why argument is invalid
37
- */
38
- constructor(message: string);
39
- }
40
- export { InvalidArgumentError as InvalidOptionArgumentError }; // deprecated old name
41
-
42
- export interface ErrorOptions {
43
- // optional parameter for error()
44
- /** an id string representing the error */
45
- code?: string;
46
- /** suggested exit code which could be used with process.exit */
47
- exitCode?: number;
48
- }
49
-
50
- export class Argument {
51
- description: string;
52
- required: boolean;
53
- variadic: boolean;
54
- defaultValue?: any;
55
- defaultValueDescription?: string;
56
- argChoices?: string[];
57
-
58
- /**
59
- * Initialize a new command argument with the given name and description.
60
- * The default is that the argument is required, and you can explicitly
61
- * indicate this with <> around the name. Put [] around the name for an optional argument.
62
- */
63
- constructor(arg: string, description?: string);
64
-
65
- /**
66
- * Return argument name.
67
- */
68
- name(): string;
69
-
70
- /**
71
- * Set the default value, and optionally supply the description to be displayed in the help.
72
- */
73
- default(value: unknown, description?: string): this;
74
-
75
- /**
76
- * Set the custom handler for processing CLI command arguments into argument values.
77
- */
78
- argParser<T>(fn: (value: string, previous: T) => T): this;
79
-
80
- /**
81
- * Only allow argument value to be one of choices.
82
- */
83
- choices(values: readonly string[]): this;
84
-
85
- /**
86
- * Make argument required.
87
- */
88
- argRequired(): this;
89
-
90
- /**
91
- * Make argument optional.
92
- */
93
- argOptional(): this;
94
- }
95
-
96
- export class Option {
97
- flags: string;
98
- description: string;
99
-
100
- required: boolean; // A value must be supplied when the option is specified.
101
- optional: boolean; // A value is optional when the option is specified.
102
- variadic: boolean;
103
- mandatory: boolean; // The option must have a value after parsing, which usually means it must be specified on command line.
104
- short?: string;
105
- long?: string;
106
- negate: boolean;
107
- defaultValue?: any;
108
- defaultValueDescription?: string;
109
- presetArg?: unknown;
110
- envVar?: string;
111
- parseArg?: <T>(value: string, previous: T) => T;
112
- hidden: boolean;
113
- argChoices?: string[];
114
-
115
- constructor(flags: string, description?: string);
116
-
117
- /**
118
- * Set the default value, and optionally supply the description to be displayed in the help.
119
- */
120
- default(value: unknown, description?: string): this;
121
-
122
- /**
123
- * Preset to use when option used without option-argument, especially optional but also boolean and negated.
124
- * The custom processing (parseArg) is called.
125
- *
126
- * @example
127
- * ```ts
128
- * new Option('--color').default('GREYSCALE').preset('RGB');
129
- * new Option('--donate [amount]').preset('20').argParser(parseFloat);
130
- * ```
131
- */
132
- preset(arg: unknown): this;
133
-
134
- /**
135
- * Add option name(s) that conflict with this option.
136
- * An error will be displayed if conflicting options are found during parsing.
137
- *
138
- * @example
139
- * ```ts
140
- * new Option('--rgb').conflicts('cmyk');
141
- * new Option('--js').conflicts(['ts', 'jsx']);
142
- * ```
143
- */
144
- conflicts(names: string | string[]): this;
145
-
146
- /**
147
- * Specify implied option values for when this option is set and the implied options are not.
148
- *
149
- * The custom processing (parseArg) is not called on the implied values.
150
- *
151
- * @example
152
- * program
153
- * .addOption(new Option('--log', 'write logging information to file'))
154
- * .addOption(new Option('--trace', 'log extra details').implies({ log: 'trace.txt' }));
155
- */
156
- implies(optionValues: OptionValues): this;
157
-
158
- /**
159
- * Set environment variable to check for option value.
160
- *
161
- * An environment variables is only used if when processed the current option value is
162
- * undefined, or the source of the current value is 'default' or 'config' or 'env'.
163
- */
164
- env(name: string): this;
165
-
166
- /**
167
- * Set the custom handler for processing CLI option arguments into option values.
168
- */
169
- argParser<T>(fn: (value: string, previous: T) => T): this;
170
-
171
- /**
172
- * Whether the option is mandatory and must have a value after parsing.
173
- */
174
- makeOptionMandatory(mandatory?: boolean): this;
175
-
176
- /**
177
- * Hide option in help.
178
- */
179
- hideHelp(hide?: boolean): this;
180
-
181
- /**
182
- * Only allow option value to be one of choices.
183
- */
184
- choices(values: readonly string[]): this;
185
-
186
- /**
187
- * Return option name.
188
- */
189
- name(): string;
190
-
191
- /**
192
- * Return option name, in a camelcase format that can be used
193
- * as a object attribute key.
194
- */
195
- attributeName(): string;
196
-
197
- /**
198
- * Return whether a boolean option.
199
- *
200
- * Options are one of boolean, negated, required argument, or optional argument.
201
- */
202
- isBoolean(): boolean;
203
- }
204
-
205
- export class Help {
206
- /** output helpWidth, long lines are wrapped to fit */
207
- helpWidth?: number;
208
- sortSubcommands: boolean;
209
- sortOptions: boolean;
210
- showGlobalOptions: boolean;
211
-
212
- constructor();
213
-
214
- /** Get the command term to show in the list of subcommands. */
215
- subcommandTerm(cmd: Command): string;
216
- /** Get the command summary to show in the list of subcommands. */
217
- subcommandDescription(cmd: Command): string;
218
- /** Get the option term to show in the list of options. */
219
- optionTerm(option: Option): string;
220
- /** Get the option description to show in the list of options. */
221
- optionDescription(option: Option): string;
222
- /** Get the argument term to show in the list of arguments. */
223
- argumentTerm(argument: Argument): string;
224
- /** Get the argument description to show in the list of arguments. */
225
- argumentDescription(argument: Argument): string;
226
-
227
- /** Get the command usage to be displayed at the top of the built-in help. */
228
- commandUsage(cmd: Command): string;
229
- /** Get the description for the command. */
230
- commandDescription(cmd: Command): string;
231
-
232
- /** Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one. */
233
- visibleCommands(cmd: Command): Command[];
234
- /** Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one. */
235
- visibleOptions(cmd: Command): Option[];
236
- /** Get an array of the visible global options. (Not including help.) */
237
- visibleGlobalOptions(cmd: Command): Option[];
238
- /** Get an array of the arguments which have descriptions. */
239
- visibleArguments(cmd: Command): Argument[];
240
-
241
- /** Get the longest command term length. */
242
- longestSubcommandTermLength(cmd: Command, helper: Help): number;
243
- /** Get the longest option term length. */
244
- longestOptionTermLength(cmd: Command, helper: Help): number;
245
- /** Get the longest global option term length. */
246
- longestGlobalOptionTermLength(cmd: Command, helper: Help): number;
247
- /** Get the longest argument term length. */
248
- longestArgumentTermLength(cmd: Command, helper: Help): number;
249
- /** Calculate the pad width from the maximum term length. */
250
- padWidth(cmd: Command, helper: Help): number;
251
-
252
- /**
253
- * Wrap the given string to width characters per line, with lines after the first indented.
254
- * Do not wrap if insufficient room for wrapping (minColumnWidth), or string is manually formatted.
255
- */
256
- wrap(
257
- str: string,
258
- width: number,
259
- indent: number,
260
- minColumnWidth?: number,
261
- ): string;
262
-
263
- /** Generate the built-in help text. */
264
- formatHelp(cmd: Command, helper: Help): string;
265
- }
266
- export type HelpConfiguration = Partial<Help>;
267
-
268
- export interface ParseOptions {
269
- from: 'node' | 'electron' | 'user';
270
- }
271
- export interface HelpContext {
272
- // optional parameter for .help() and .outputHelp()
273
- error: boolean;
274
- }
275
- export interface AddHelpTextContext {
276
- // passed to text function used with .addHelpText()
277
- error: boolean;
278
- command: Command;
279
- }
280
- export interface OutputConfiguration {
281
- writeOut?(str: string): void;
282
- writeErr?(str: string): void;
283
- getOutHelpWidth?(): number;
284
- getErrHelpWidth?(): number;
285
- outputError?(str: string, write: (str: string) => void): void;
286
- }
287
-
288
- export type AddHelpTextPosition = 'beforeAll' | 'before' | 'after' | 'afterAll';
289
- export type HookEvent = 'preSubcommand' | 'preAction' | 'postAction';
290
- // The source is a string so author can define their own too.
291
- export type OptionValueSource =
292
- | LiteralUnion<'default' | 'config' | 'env' | 'cli' | 'implied', string>
293
- | undefined;
294
-
295
- export type OptionValues = Record<string, any>;
296
-
297
- export class Command {
298
- args: string[];
299
- processedArgs: any[];
300
- readonly commands: readonly Command[];
301
- readonly options: readonly Option[];
302
- readonly registeredArguments: readonly Argument[];
303
- parent: Command | null;
304
-
305
- constructor(name?: string);
306
-
307
- /**
308
- * Set the program version to `str`.
309
- *
310
- * This method auto-registers the "-V, --version" flag
311
- * which will print the version number when passed.
312
- *
313
- * You can optionally supply the flags and description to override the defaults.
314
- */
315
- version(str: string, flags?: string, description?: string): this;
316
- /**
317
- * Get the program version.
318
- */
319
- version(): string | undefined;
320
-
321
- /**
322
- * Define a command, implemented using an action handler.
323
- *
324
- * @remarks
325
- * The command description is supplied using `.description`, not as a parameter to `.command`.
326
- *
327
- * @example
328
- * ```ts
329
- * program
330
- * .command('clone <source> [destination]')
331
- * .description('clone a repository into a newly created directory')
332
- * .action((source, destination) => {
333
- * console.log('clone command called');
334
- * });
335
- * ```
336
- *
337
- * @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
338
- * @param opts - configuration options
339
- * @returns new command
340
- */
341
- command(
342
- nameAndArgs: string,
343
- opts?: CommandOptions,
344
- ): ReturnType<this['createCommand']>;
345
- /**
346
- * Define a command, implemented in a separate executable file.
347
- *
348
- * @remarks
349
- * The command description is supplied as the second parameter to `.command`.
350
- *
351
- * @example
352
- * ```ts
353
- * program
354
- * .command('start <service>', 'start named service')
355
- * .command('stop [service]', 'stop named service, or all if no name supplied');
356
- * ```
357
- *
358
- * @param nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`
359
- * @param description - description of executable command
360
- * @param opts - configuration options
361
- * @returns `this` command for chaining
362
- */
363
- command(
364
- nameAndArgs: string,
365
- description: string,
366
- opts?: ExecutableCommandOptions,
367
- ): this;
368
-
369
- /**
370
- * Factory routine to create a new unattached command.
371
- *
372
- * See .command() for creating an attached subcommand, which uses this routine to
373
- * create the command. You can override createCommand to customise subcommands.
374
- */
375
- createCommand(name?: string): Command;
376
-
377
- /**
378
- * Add a prepared subcommand.
379
- *
380
- * See .command() for creating an attached subcommand which inherits settings from its parent.
381
- *
382
- * @returns `this` command for chaining
383
- */
384
- addCommand(cmd: Command, opts?: CommandOptions): this;
385
-
386
- /**
387
- * Factory routine to create a new unattached argument.
388
- *
389
- * See .argument() for creating an attached argument, which uses this routine to
390
- * create the argument. You can override createArgument to return a custom argument.
391
- */
392
- createArgument(name: string, description?: string): Argument;
393
-
394
- /**
395
- * Define argument syntax for command.
396
- *
397
- * The default is that the argument is required, and you can explicitly
398
- * indicate this with <> around the name. Put [] around the name for an optional argument.
399
- *
400
- * @example
401
- * ```
402
- * program.argument('<input-file>');
403
- * program.argument('[output-file]');
404
- * ```
405
- *
406
- * @returns `this` command for chaining
407
- */
408
- argument<T>(
409
- flags: string,
410
- description: string,
411
- fn: (value: string, previous: T) => T,
412
- defaultValue?: T,
413
- ): this;
414
- argument(name: string, description?: string, defaultValue?: unknown): this;
415
-
416
- /**
417
- * Define argument syntax for command, adding a prepared argument.
418
- *
419
- * @returns `this` command for chaining
420
- */
421
- addArgument(arg: Argument): this;
422
-
423
- /**
424
- * Define argument syntax for command, adding multiple at once (without descriptions).
425
- *
426
- * See also .argument().
427
- *
428
- * @example
429
- * ```
430
- * program.arguments('<cmd> [env]');
431
- * ```
432
- *
433
- * @returns `this` command for chaining
434
- */
435
- arguments(names: string): this;
436
-
437
- /**
438
- * Customise or override default help command. By default a help command is automatically added if your command has subcommands.
439
- *
440
- * @example
441
- * ```ts
442
- * program.helpCommand('help [cmd]');
443
- * program.helpCommand('help [cmd]', 'show help');
444
- * program.helpCommand(false); // suppress default help command
445
- * program.helpCommand(true); // add help command even if no subcommands
446
- * ```
447
- */
448
- helpCommand(nameAndArgs: string, description?: string): this;
449
- helpCommand(enable: boolean): this;
450
-
451
- /**
452
- * Add prepared custom help command.
453
- */
454
- addHelpCommand(cmd: Command): this;
455
- /** @deprecated since v12, instead use helpCommand */
456
- addHelpCommand(nameAndArgs: string, description?: string): this;
457
- /** @deprecated since v12, instead use helpCommand */
458
- addHelpCommand(enable?: boolean): this;
459
-
460
- /**
461
- * Add hook for life cycle event.
462
- */
463
- hook(
464
- event: HookEvent,
465
- listener: (
466
- thisCommand: Command,
467
- actionCommand: Command,
468
- ) => void | Promise<void>,
469
- ): this;
470
-
471
- /**
472
- * Register callback to use as replacement for calling process.exit.
473
- */
474
- exitOverride(callback?: (err: CommanderError) => never | void): this;
475
-
476
- /**
477
- * Display error message and exit (or call exitOverride).
478
- */
479
- error(message: string, errorOptions?: ErrorOptions): never;
480
-
481
- /**
482
- * You can customise the help with a subclass of Help by overriding createHelp,
483
- * or by overriding Help properties using configureHelp().
484
- */
485
- createHelp(): Help;
486
-
487
- /**
488
- * You can customise the help by overriding Help properties using configureHelp(),
489
- * or with a subclass of Help by overriding createHelp().
490
- */
491
- configureHelp(configuration: HelpConfiguration): this;
492
- /** Get configuration */
493
- configureHelp(): HelpConfiguration;
494
-
495
- /**
496
- * The default output goes to stdout and stderr. You can customise this for special
497
- * applications. You can also customise the display of errors by overriding outputError.
498
- *
499
- * The configuration properties are all functions:
500
- * ```
501
- * // functions to change where being written, stdout and stderr
502
- * writeOut(str)
503
- * writeErr(str)
504
- * // matching functions to specify width for wrapping help
505
- * getOutHelpWidth()
506
- * getErrHelpWidth()
507
- * // functions based on what is being written out
508
- * outputError(str, write) // used for displaying errors, and not used for displaying help
509
- * ```
510
- */
511
- configureOutput(configuration: OutputConfiguration): this;
512
- /** Get configuration */
513
- configureOutput(): OutputConfiguration;
514
-
515
- /**
516
- * Copy settings that are useful to have in common across root command and subcommands.
517
- *
518
- * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.)
519
- */
520
- copyInheritedSettings(sourceCommand: Command): this;
521
-
522
- /**
523
- * Display the help or a custom message after an error occurs.
524
- */
525
- showHelpAfterError(displayHelp?: boolean | string): this;
526
-
527
- /**
528
- * Display suggestion of similar commands for unknown commands, or options for unknown options.
529
- */
530
- showSuggestionAfterError(displaySuggestion?: boolean): this;
531
-
532
- /**
533
- * Register callback `fn` for the command.
534
- *
535
- * @example
536
- * ```
537
- * program
538
- * .command('serve')
539
- * .description('start service')
540
- * .action(function() {
541
- * // do work here
542
- * });
543
- * ```
544
- *
545
- * @returns `this` command for chaining
546
- */
547
- action(fn: (...args: any[]) => void | Promise<void>): this;
548
-
549
- /**
550
- * Define option with `flags`, `description`, and optional argument parsing function or `defaultValue` or both.
551
- *
552
- * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space. A required
553
- * option-argument is indicated by `<>` and an optional option-argument by `[]`.
554
- *
555
- * See the README for more details, and see also addOption() and requiredOption().
556
- *
557
- * @example
558
- *
559
- * ```js
560
- * program
561
- * .option('-p, --pepper', 'add pepper')
562
- * .option('-p, --pizza-type <TYPE>', 'type of pizza') // required option-argument
563
- * .option('-c, --cheese [CHEESE]', 'add extra cheese', 'mozzarella') // optional option-argument with default
564
- * .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function
565
- * ```
566
- *
567
- * @returns `this` command for chaining
568
- */
569
- option(
570
- flags: string,
571
- description?: string,
572
- defaultValue?: string | boolean | string[],
573
- ): this;
574
- option<T>(
575
- flags: string,
576
- description: string,
577
- parseArg: (value: string, previous: T) => T,
578
- defaultValue?: T,
579
- ): this;
580
- /** @deprecated since v7, instead use choices or a custom function */
581
- option(
582
- flags: string,
583
- description: string,
584
- regexp: RegExp,
585
- defaultValue?: string | boolean | string[],
586
- ): this;
587
-
588
- /**
589
- * Define a required option, which must have a value after parsing. This usually means
590
- * the option must be specified on the command line. (Otherwise the same as .option().)
591
- *
592
- * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.
593
- */
594
- requiredOption(
595
- flags: string,
596
- description?: string,
597
- defaultValue?: string | boolean | string[],
598
- ): this;
599
- requiredOption<T>(
600
- flags: string,
601
- description: string,
602
- parseArg: (value: string, previous: T) => T,
603
- defaultValue?: T,
604
- ): this;
605
- /** @deprecated since v7, instead use choices or a custom function */
606
- requiredOption(
607
- flags: string,
608
- description: string,
609
- regexp: RegExp,
610
- defaultValue?: string | boolean | string[],
611
- ): this;
612
-
613
- /**
614
- * Factory routine to create a new unattached option.
615
- *
616
- * See .option() for creating an attached option, which uses this routine to
617
- * create the option. You can override createOption to return a custom option.
618
- */
619
-
620
- createOption(flags: string, description?: string): Option;
621
-
622
- /**
623
- * Add a prepared Option.
624
- *
625
- * See .option() and .requiredOption() for creating and attaching an option in a single call.
626
- */
627
- addOption(option: Option): this;
628
-
629
- /**
630
- * Whether to store option values as properties on command object,
631
- * or store separately (specify false). In both cases the option values can be accessed using .opts().
632
- *
633
- * @returns `this` command for chaining
634
- */
635
- storeOptionsAsProperties<T extends OptionValues>(): this & T;
636
- storeOptionsAsProperties<T extends OptionValues>(
637
- storeAsProperties: true,
638
- ): this & T;
639
- storeOptionsAsProperties(storeAsProperties?: boolean): this;
640
-
641
- /**
642
- * Retrieve option value.
643
- */
644
- getOptionValue(key: string): any;
645
-
646
- /**
647
- * Store option value.
648
- */
649
- setOptionValue(key: string, value: unknown): this;
650
-
651
- /**
652
- * Store option value and where the value came from.
653
- */
654
- setOptionValueWithSource(
655
- key: string,
656
- value: unknown,
657
- source: OptionValueSource,
658
- ): this;
659
-
660
- /**
661
- * Get source of option value.
662
- */
663
- getOptionValueSource(key: string): OptionValueSource | undefined;
664
-
665
- /**
666
- * Get source of option value. See also .optsWithGlobals().
667
- */
668
- getOptionValueSourceWithGlobals(key: string): OptionValueSource | undefined;
669
-
670
- /**
671
- * Alter parsing of short flags with optional values.
672
- *
673
- * @example
674
- * ```
675
- * // for `.option('-f,--flag [value]'):
676
- * .combineFlagAndOptionalValue(true) // `-f80` is treated like `--flag=80`, this is the default behaviour
677
- * .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`
678
- * ```
679
- *
680
- * @returns `this` command for chaining
681
- */
682
- combineFlagAndOptionalValue(combine?: boolean): this;
683
-
684
- /**
685
- * Allow unknown options on the command line.
686
- *
687
- * @returns `this` command for chaining
688
- */
689
- allowUnknownOption(allowUnknown?: boolean): this;
690
-
691
- /**
692
- * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.
693
- *
694
- * @returns `this` command for chaining
695
- */
696
- allowExcessArguments(allowExcess?: boolean): this;
697
-
698
- /**
699
- * Enable positional options. Positional means global options are specified before subcommands which lets
700
- * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.
701
- *
702
- * The default behaviour is non-positional and global options may appear anywhere on the command line.
703
- *
704
- * @returns `this` command for chaining
705
- */
706
- enablePositionalOptions(positional?: boolean): this;
707
-
708
- /**
709
- * Pass through options that come after command-arguments rather than treat them as command-options,
710
- * so actual command-options come before command-arguments. Turning this on for a subcommand requires
711
- * positional options to have been enabled on the program (parent commands).
712
- *
713
- * The default behaviour is non-positional and options may appear before or after command-arguments.
714
- *
715
- * @returns `this` command for chaining
716
- */
717
- passThroughOptions(passThrough?: boolean): this;
718
-
719
- /**
720
- * Parse `argv`, setting options and invoking commands when defined.
721
- *
722
- * Use parseAsync instead of parse if any of your action handlers are async.
723
- *
724
- * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!
725
- *
726
- * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:
727
- * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that
728
- * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged
729
- * - `'user'`: just user arguments
730
- *
731
- * @example
732
- * ```
733
- * program.parse(); // parse process.argv and auto-detect electron and special node flags
734
- * program.parse(process.argv); // assume argv[0] is app and argv[1] is script
735
- * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
736
- * ```
737
- *
738
- * @returns `this` command for chaining
739
- */
740
- parse(argv?: readonly string[], parseOptions?: ParseOptions): this;
741
-
742
- /**
743
- * Parse `argv`, setting options and invoking commands when defined.
744
- *
745
- * Call with no parameters to parse `process.argv`. Detects Electron and special node options like `node --eval`. Easy mode!
746
- *
747
- * Or call with an array of strings to parse, and optionally where the user arguments start by specifying where the arguments are `from`:
748
- * - `'node'`: default, `argv[0]` is the application and `argv[1]` is the script being run, with user arguments after that
749
- * - `'electron'`: `argv[0]` is the application and `argv[1]` varies depending on whether the electron application is packaged
750
- * - `'user'`: just user arguments
751
- *
752
- * @example
753
- * ```
754
- * await program.parseAsync(); // parse process.argv and auto-detect electron and special node flags
755
- * await program.parseAsync(process.argv); // assume argv[0] is app and argv[1] is script
756
- * await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0]
757
- * ```
758
- *
759
- * @returns Promise
760
- */
761
- parseAsync(
762
- argv?: readonly string[],
763
- parseOptions?: ParseOptions,
764
- ): Promise<this>;
765
-
766
- /**
767
- * Parse options from `argv` removing known options,
768
- * and return argv split into operands and unknown arguments.
769
- *
770
- * argv => operands, unknown
771
- * --known kkk op => [op], []
772
- * op --known kkk => [op], []
773
- * sub --unknown uuu op => [sub], [--unknown uuu op]
774
- * sub -- --unknown uuu op => [sub --unknown uuu op], []
775
- */
776
- parseOptions(argv: string[]): ParseOptionsResult;
777
-
778
- /**
779
- * Return an object containing local option values as key-value pairs
780
- */
781
- opts<T extends OptionValues>(): T;
782
-
783
- /**
784
- * Return an object containing merged local and global option values as key-value pairs.
785
- */
786
- optsWithGlobals<T extends OptionValues>(): T;
787
-
788
- /**
789
- * Set the description.
790
- *
791
- * @returns `this` command for chaining
792
- */
793
-
794
- description(str: string): this;
795
- /** @deprecated since v8, instead use .argument to add command argument with description */
796
- description(str: string, argsDescription: Record<string, string>): this;
797
- /**
798
- * Get the description.
799
- */
800
- description(): string;
801
-
802
- /**
803
- * Set the summary. Used when listed as subcommand of parent.
804
- *
805
- * @returns `this` command for chaining
806
- */
807
-
808
- summary(str: string): this;
809
- /**
810
- * Get the summary.
811
- */
812
- summary(): string;
813
-
814
- /**
815
- * Set an alias for the command.
816
- *
817
- * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.
818
- *
819
- * @returns `this` command for chaining
820
- */
821
- alias(alias: string): this;
822
- /**
823
- * Get alias for the command.
824
- */
825
- alias(): string;
826
-
827
- /**
828
- * Set aliases for the command.
829
- *
830
- * Only the first alias is shown in the auto-generated help.
831
- *
832
- * @returns `this` command for chaining
833
- */
834
- aliases(aliases: readonly string[]): this;
835
- /**
836
- * Get aliases for the command.
837
- */
838
- aliases(): string[];
839
-
840
- /**
841
- * Set the command usage.
842
- *
843
- * @returns `this` command for chaining
844
- */
845
- usage(str: string): this;
846
- /**
847
- * Get the command usage.
848
- */
849
- usage(): string;
850
-
851
- /**
852
- * Set the name of the command.
853
- *
854
- * @returns `this` command for chaining
855
- */
856
- name(str: string): this;
857
- /**
858
- * Get the name of the command.
859
- */
860
- name(): string;
861
-
862
- /**
863
- * Set the name of the command from script filename, such as process.argv[1],
864
- * or require.main.filename, or __filename.
865
- *
866
- * (Used internally and public although not documented in README.)
867
- *
868
- * @example
869
- * ```ts
870
- * program.nameFromFilename(require.main.filename);
871
- * ```
872
- *
873
- * @returns `this` command for chaining
874
- */
875
- nameFromFilename(filename: string): this;
876
-
877
- /**
878
- * Set the directory for searching for executable subcommands of this command.
879
- *
880
- * @example
881
- * ```ts
882
- * program.executableDir(__dirname);
883
- * // or
884
- * program.executableDir('subcommands');
885
- * ```
886
- *
887
- * @returns `this` command for chaining
888
- */
889
- executableDir(path: string): this;
890
- /**
891
- * Get the executable search directory.
892
- */
893
- executableDir(): string | null;
894
-
895
- /**
896
- * Output help information for this command.
897
- *
898
- * Outputs built-in help, and custom text added using `.addHelpText()`.
899
- *
900
- */
901
- outputHelp(context?: HelpContext): void;
902
- /** @deprecated since v7 */
903
- outputHelp(cb?: (str: string) => string): void;
904
-
905
- /**
906
- * Return command help documentation.
907
- */
908
- helpInformation(context?: HelpContext): string;
909
-
910
- /**
911
- * You can pass in flags and a description to override the help
912
- * flags and help description for your command. Pass in false
913
- * to disable the built-in help option.
914
- */
915
- helpOption(flags?: string | boolean, description?: string): this;
916
-
917
- /**
918
- * Supply your own option to use for the built-in help option.
919
- * This is an alternative to using helpOption() to customise the flags and description etc.
920
- */
921
- addHelpOption(option: Option): this;
922
-
923
- /**
924
- * Output help information and exit.
925
- *
926
- * Outputs built-in help, and custom text added using `.addHelpText()`.
927
- */
928
- help(context?: HelpContext): never;
929
- /** @deprecated since v7 */
930
- help(cb?: (str: string) => string): never;
931
-
932
- /**
933
- * Add additional text to be displayed with the built-in help.
934
- *
935
- * Position is 'before' or 'after' to affect just this command,
936
- * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.
937
- */
938
- addHelpText(position: AddHelpTextPosition, text: string): this;
939
- addHelpText(
940
- position: AddHelpTextPosition,
941
- text: (context: AddHelpTextContext) => string,
942
- ): this;
943
-
944
- /**
945
- * Add a listener (callback) for when events occur. (Implemented using EventEmitter.)
946
- */
947
- on(event: string | symbol, listener: (...args: any[]) => void): this;
948
- }
949
-
950
- export interface CommandOptions {
951
- hidden?: boolean;
952
- isDefault?: boolean;
953
- /** @deprecated since v7, replaced by hidden */
954
- noHelp?: boolean;
955
- }
956
- export interface ExecutableCommandOptions extends CommandOptions {
957
- executableFile?: string;
958
- }
959
-
960
- export interface ParseOptionsResult {
961
- operands: string[];
962
- unknown: string[];
963
- }
964
-
965
- export function createCommand(name?: string): Command;
966
- export function createOption(flags: string, description?: string): Option;
967
- export function createArgument(name: string, description?: string): Argument;
968
-
969
- export const program: Command;