gaunt-sloth-assistant 0.8.3 → 0.8.4

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 (210) hide show
  1. package/.gsloth.backstory.md +0 -0
  2. package/.gsloth.chat.md +0 -0
  3. package/.gsloth.code.md +0 -0
  4. package/.gsloth.config_.json +0 -0
  5. package/.gsloth.config_.mjs +0 -0
  6. package/.gsloth.config_claude.mjs +0 -0
  7. package/.gsloth.config_vertex.json +0 -0
  8. package/.gsloth.guidelines.md +0 -0
  9. package/.gsloth.review.md +0 -0
  10. package/.gsloth.system.md +0 -0
  11. package/.prettierrc.json +0 -0
  12. package/LICENSE +0 -0
  13. package/README.md +1 -1
  14. package/assets/gaunt-sloth-logo.png +0 -0
  15. package/assets/release-notes/v0_4_0.md +0 -0
  16. package/assets/release-notes/v0_5_0.md +0 -0
  17. package/assets/release-notes/v0_5_1.md +0 -0
  18. package/assets/release-notes/v0_5_2.md +0 -0
  19. package/assets/release-notes/v0_5_3.md +0 -0
  20. package/assets/release-notes/v0_6_0.md +0 -0
  21. package/assets/release-notes/v0_6_2.md +0 -0
  22. package/assets/release-notes/v0_6_4.md +0 -0
  23. package/assets/release-notes/v0_6_5.md +0 -0
  24. package/assets/release-notes/v0_7_0.md +0 -0
  25. package/assets/release-notes/v0_7_2.md +0 -0
  26. package/assets/release-notes/v0_7_3.md +0 -0
  27. package/assets/release-notes/v0_8_0.md +0 -0
  28. package/assets/release-notes/v0_8_2.md +0 -0
  29. package/dist/builtInToolsConfig.d.ts +0 -0
  30. package/dist/builtInToolsConfig.js +0 -0
  31. package/dist/builtInToolsConfig.js.map +0 -0
  32. package/dist/commands/askCommand.d.ts +0 -0
  33. package/dist/commands/askCommand.js +0 -0
  34. package/dist/commands/askCommand.js.map +0 -0
  35. package/dist/commands/chatCommand.d.ts +0 -0
  36. package/dist/commands/chatCommand.js +0 -0
  37. package/dist/commands/chatCommand.js.map +0 -0
  38. package/dist/commands/codeCommand.d.ts +0 -0
  39. package/dist/commands/codeCommand.js +0 -0
  40. package/dist/commands/codeCommand.js.map +0 -0
  41. package/dist/commands/commandUtils.d.ts +0 -0
  42. package/dist/commands/commandUtils.js +0 -0
  43. package/dist/commands/commandUtils.js.map +0 -0
  44. package/dist/commands/initCommand.d.ts +0 -0
  45. package/dist/commands/initCommand.js +0 -0
  46. package/dist/commands/initCommand.js.map +0 -0
  47. package/dist/commands/prCommand.d.ts +0 -0
  48. package/dist/commands/prCommand.js +0 -0
  49. package/dist/commands/prCommand.js.map +0 -0
  50. package/dist/commands/reviewCommand.d.ts +0 -0
  51. package/dist/commands/reviewCommand.js +0 -0
  52. package/dist/commands/reviewCommand.js.map +0 -0
  53. package/dist/config.d.ts +0 -0
  54. package/dist/config.js +0 -0
  55. package/dist/config.js.map +0 -0
  56. package/dist/consoleUtils.d.ts +0 -0
  57. package/dist/consoleUtils.js +0 -0
  58. package/dist/consoleUtils.js.map +0 -0
  59. package/dist/constants.d.ts +0 -0
  60. package/dist/constants.js +0 -0
  61. package/dist/constants.js.map +0 -0
  62. package/dist/core/Invocation.d.ts +0 -0
  63. package/dist/core/Invocation.js +0 -0
  64. package/dist/core/Invocation.js.map +0 -0
  65. package/dist/core/types.d.ts +0 -0
  66. package/dist/core/types.js +0 -0
  67. package/dist/core/types.js.map +0 -0
  68. package/dist/filePathUtils.d.ts +0 -0
  69. package/dist/filePathUtils.js +0 -0
  70. package/dist/filePathUtils.js.map +0 -0
  71. package/dist/globalConfigUtils.d.ts +0 -0
  72. package/dist/globalConfigUtils.js +0 -0
  73. package/dist/globalConfigUtils.js.map +0 -0
  74. package/dist/helpers/jira/jiraClient.d.ts +0 -0
  75. package/dist/helpers/jira/jiraClient.js +0 -0
  76. package/dist/helpers/jira/jiraClient.js.map +0 -0
  77. package/dist/helpers/jira/jiraLogWork.d.ts +0 -0
  78. package/dist/helpers/jira/jiraLogWork.js +0 -0
  79. package/dist/helpers/jira/jiraLogWork.js.map +0 -0
  80. package/dist/index.d.ts +0 -0
  81. package/dist/index.js.map +0 -0
  82. package/dist/llmUtils.d.ts +0 -0
  83. package/dist/llmUtils.js +0 -0
  84. package/dist/llmUtils.js.map +0 -0
  85. package/dist/mcp/OAuthClientProviderImpl.d.ts +0 -0
  86. package/dist/mcp/OAuthClientProviderImpl.js +0 -0
  87. package/dist/mcp/OAuthClientProviderImpl.js.map +0 -0
  88. package/dist/modules/interactiveSessionModule.d.ts +0 -0
  89. package/dist/modules/interactiveSessionModule.js +0 -0
  90. package/dist/modules/interactiveSessionModule.js.map +0 -0
  91. package/dist/modules/questionAnsweringModule.d.ts +0 -0
  92. package/dist/modules/questionAnsweringModule.js +0 -0
  93. package/dist/modules/questionAnsweringModule.js.map +0 -0
  94. package/dist/modules/reviewModule.d.ts +0 -0
  95. package/dist/modules/reviewModule.js +0 -0
  96. package/dist/modules/reviewModule.js.map +0 -0
  97. package/dist/modules/types.d.ts +0 -0
  98. package/dist/modules/types.js +0 -0
  99. package/dist/modules/types.js.map +0 -0
  100. package/dist/presets/anthropic.d.ts +0 -0
  101. package/dist/presets/anthropic.js +2 -2
  102. package/dist/presets/anthropic.js.map +1 -1
  103. package/dist/presets/deepseek.d.ts +0 -0
  104. package/dist/presets/deepseek.js +2 -2
  105. package/dist/presets/deepseek.js.map +1 -1
  106. package/dist/presets/fake.d.ts +0 -0
  107. package/dist/presets/fake.js +0 -0
  108. package/dist/presets/fake.js.map +0 -0
  109. package/dist/presets/groq.d.ts +0 -0
  110. package/dist/presets/groq.js +2 -2
  111. package/dist/presets/groq.js.map +1 -1
  112. package/dist/presets/openai.d.ts +0 -0
  113. package/dist/presets/openai.js +1 -1
  114. package/dist/presets/openai.js.map +1 -1
  115. package/dist/presets/vertexai.d.ts +0 -0
  116. package/dist/presets/vertexai.js +0 -0
  117. package/dist/presets/vertexai.js.map +0 -0
  118. package/dist/prompt.d.ts +0 -0
  119. package/dist/prompt.js +0 -0
  120. package/dist/prompt.js.map +0 -0
  121. package/dist/providers/file.d.ts +0 -0
  122. package/dist/providers/file.js +0 -0
  123. package/dist/providers/file.js.map +0 -0
  124. package/dist/providers/ghIssueProvider.d.ts +0 -0
  125. package/dist/providers/ghIssueProvider.js +0 -0
  126. package/dist/providers/ghIssueProvider.js.map +0 -0
  127. package/dist/providers/ghPrDiffProvider.d.ts +0 -0
  128. package/dist/providers/ghPrDiffProvider.js +0 -0
  129. package/dist/providers/ghPrDiffProvider.js.map +0 -0
  130. package/dist/providers/jiraIssueLegacyProvider.d.ts +0 -0
  131. package/dist/providers/jiraIssueLegacyProvider.js +0 -0
  132. package/dist/providers/jiraIssueLegacyProvider.js.map +0 -0
  133. package/dist/providers/jiraIssueProvider.d.ts +0 -0
  134. package/dist/providers/jiraIssueProvider.js +0 -0
  135. package/dist/providers/jiraIssueProvider.js.map +0 -0
  136. package/dist/providers/text.d.ts +0 -0
  137. package/dist/providers/text.js +0 -0
  138. package/dist/providers/text.js.map +0 -0
  139. package/dist/providers/types.d.ts +0 -0
  140. package/dist/providers/types.js +0 -0
  141. package/dist/providers/types.js.map +0 -0
  142. package/dist/systemUtils.d.ts +0 -0
  143. package/dist/systemUtils.js +0 -0
  144. package/dist/systemUtils.js.map +0 -0
  145. package/dist/tools/GthFileSystemToolkit.d.ts +0 -0
  146. package/dist/tools/GthFileSystemToolkit.js +0 -0
  147. package/dist/tools/GthFileSystemToolkit.js.map +0 -0
  148. package/dist/tools/gthJiraLogWorkTool.d.ts +0 -0
  149. package/dist/tools/gthJiraLogWorkTool.js +0 -0
  150. package/dist/tools/gthJiraLogWorkTool.js.map +0 -0
  151. package/dist/tools/gthStatusUpdateTool.d.ts +0 -0
  152. package/dist/tools/gthStatusUpdateTool.js +0 -0
  153. package/dist/tools/gthStatusUpdateTool.js.map +0 -0
  154. package/dist/utils.d.ts +0 -0
  155. package/dist/utils.js +0 -0
  156. package/dist/utils.js.map +0 -0
  157. package/docs/COMMANDS.md +0 -0
  158. package/docs/CONFIGURATION.md +0 -0
  159. package/docs/DEVELOPMENT.md +0 -0
  160. package/docs/RELEASE-HOWTO.md +0 -0
  161. package/eslint.config.js +0 -0
  162. package/it.js +0 -0
  163. package/maintenance/doc-maintenance.md +0 -0
  164. package/package.json +3 -1
  165. package/src/builtInToolsConfig.ts +0 -0
  166. package/src/commands/askCommand.ts +0 -0
  167. package/src/commands/chatCommand.ts +0 -0
  168. package/src/commands/codeCommand.ts +0 -0
  169. package/src/commands/commandUtils.ts +0 -0
  170. package/src/commands/initCommand.ts +0 -0
  171. package/src/commands/prCommand.ts +0 -0
  172. package/src/commands/reviewCommand.ts +0 -0
  173. package/src/config.ts +0 -0
  174. package/src/consoleUtils.ts +0 -0
  175. package/src/constants.ts +0 -0
  176. package/src/core/Invocation.ts +0 -0
  177. package/src/core/types.ts +0 -0
  178. package/src/filePathUtils.ts +0 -0
  179. package/src/globalConfigUtils.ts +0 -0
  180. package/src/helpers/jira/jiraClient.ts +0 -0
  181. package/src/helpers/jira/jiraLogWork.ts +0 -0
  182. package/src/index.ts +0 -0
  183. package/src/llmUtils.ts +0 -0
  184. package/src/mcp/OAuthClientProviderImpl.ts +0 -0
  185. package/src/modules/interactiveSessionModule.ts +0 -0
  186. package/src/modules/questionAnsweringModule.ts +0 -0
  187. package/src/modules/reviewModule.ts +0 -0
  188. package/src/modules/types.ts +0 -0
  189. package/src/presets/anthropic.ts +2 -2
  190. package/src/presets/deepseek.ts +2 -2
  191. package/src/presets/fake.ts +0 -0
  192. package/src/presets/groq.ts +2 -2
  193. package/src/presets/openai.ts +1 -1
  194. package/src/presets/vertexai.ts +0 -0
  195. package/src/prompt.ts +0 -0
  196. package/src/providers/file.ts +0 -0
  197. package/src/providers/ghIssueProvider.ts +0 -0
  198. package/src/providers/ghPrDiffProvider.ts +0 -0
  199. package/src/providers/jiraIssueLegacyProvider.ts +0 -0
  200. package/src/providers/jiraIssueProvider.ts +0 -0
  201. package/src/providers/text.ts +0 -0
  202. package/src/providers/types.ts +0 -0
  203. package/src/systemUtils.ts +0 -0
  204. package/src/tools/GthFileSystemToolkit.ts +0 -0
  205. package/src/tools/gthJiraLogWorkTool.ts +0 -0
  206. package/src/tools/gthStatusUpdateTool.ts +0 -0
  207. package/src/utils.ts +0 -0
  208. package/tsconfig.json +0 -0
  209. package/vitest-it.config.ts +0 -0
  210. package/vitest.config.ts +0 -0
File without changes
package/.gsloth.chat.md CHANGED
File without changes
package/.gsloth.code.md CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/.gsloth.review.md CHANGED
File without changes
package/.gsloth.system.md CHANGED
File without changes
package/.prettierrc.json CHANGED
File without changes
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Gaunt Sloth Assistant
2
- [![Tests and Lint](https://github.com/andruhon/gaunt-sloth-assistant/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/andruhon/gaunt-sloth-assistant/actions/workflows/ci.yml) [![Integration Tests (Anthropic)](https://github.com/andruhon/gaunt-sloth-assistant/actions/workflows/it.yml/badge.svg?event=push)](https://github.com/andruhon/gaunt-sloth-assistant/actions/workflows/it.yml)
2
+ [![Tests and Lint](https://github.com/andruhon/gaunt-sloth-assistant/actions/workflows/unit-tests.yml/badge.svg?event=push)](https://github.com/andruhon/gaunt-sloth-assistant/actions/workflows/unit-tests.yml) [![Integration Tests (Anthropic)](https://github.com/andruhon/gaunt-sloth-assistant/actions/workflows/integration-tests.yml/badge.svg?event=push)](https://github.com/andruhon/gaunt-sloth-assistant/actions/workflows/integration-tests.yml)
3
3
 
4
4
  Gaunt GSloth Assistant is a lightweight **command line AI assistant**
5
5
  built with TypeScript (JavaScript) and distributed via NPM with minimum dependencies.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/config.d.ts CHANGED
File without changes
package/dist/config.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/constants.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/index.d.ts CHANGED
File without changes
package/dist/index.js.map CHANGED
File without changes
File without changes
package/dist/llmUtils.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -5,8 +5,8 @@ import { writeFileIfNotExistsWithMessages } from '#src/utils.js';
5
5
  // Function to process JSON config and create Anthropic LLM instance
6
6
  export async function processJsonConfig(llmConfig) {
7
7
  const anthropic = await import('@langchain/anthropic');
8
- // Use environment variable if available, otherwise use the config value
9
- const anthropicApiKey = env.ANTHROPIC_API_KEY || llmConfig.apiKey;
8
+ // Use config value if available, otherwise use the environment variable
9
+ const anthropicApiKey = llmConfig.apiKey || env.ANTHROPIC_API_KEY;
10
10
  return new anthropic.ChatAnthropic({
11
11
  ...llmConfig,
12
12
  apiKey: anthropicApiKey,
@@ -1 +1 @@
1
- {"version":3,"file":"anthropic.js","sourceRoot":"","sources":["../../src/presets/anthropic.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAC;AAOjE,oEAAoE;AACpE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,SAA+C;IAE/C,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,CAAC;IAC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,aAAa,CAAC;QACjC,GAAG,SAAS;QACZ,MAAM,EAAE,eAAe;QACvB,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,0BAA0B;KACrD,CAAC,CAAC;AACL,CAAC;AAED,MAAM,WAAW,GAAG;;;;;EAKlB,CAAC;AAEH,MAAM,UAAU,IAAI,CAAC,cAAsB;IACzC,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAEtC,yDAAyD;IACzD,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IAED,gCAAgC,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IAC9D,cAAc,CACZ,2BAA2B,cAAc,kCAAkC;QACzE,mDAAmD,CACtD,CAAC;AACJ,CAAC"}
File without changes
@@ -5,8 +5,8 @@ import { writeFileIfNotExistsWithMessages } from '#src/utils.js';
5
5
  // Function to process JSON config and create DeepSeek LLM instance
6
6
  export async function processJsonConfig(llmConfig) {
7
7
  const deepseek = await import('@langchain/deepseek');
8
- // Use environment variable if available, otherwise use the config value
9
- const deepseekApiKey = env.DEEPSEEK_API_KEY || llmConfig.apiKey;
8
+ // Use config apiKey if available, otherwise use the environment variable
9
+ const deepseekApiKey = llmConfig.apiKey || env.DEEPSEEK_API_KEY;
10
10
  return new deepseek.ChatDeepSeek({
11
11
  ...llmConfig,
12
12
  apiKey: deepseekApiKey,
@@ -1 +1 @@
1
- {"version":3,"file":"deepseek.js","sourceRoot":"","sources":["../../src/presets/deepseek.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,g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AAQ,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACrD,yEAAyE;IACzE,MAAM,cAAc,GAAG,SAAS,CAAC,MAAM,IAAI,GAAG,CAAC,gBAAgB,CAAC;IAChE,OAAO,IAAI,QAAQ,CAAC,YAAY,CAAC;QAC/B,GAAG,SAAS;QACZ,MAAM,EAAE,cAAc;QACtB,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,mBAAmB;KAC9C,CAAC,CAAC;AACL,CAAC;AAED,MAAM,WAAW,GAAG;;;;;EAKlB,CAAC;AAEH,MAAM,UAAU,IAAI,CAAC,cAAsB;IACzC,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAEtC,yDAAyD;IACzD,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IAED,gCAAgC,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IAC9D,cAAc,CACZ,2BAA2B,cAAc,iCAAiC;QACxE,kDAAkD,CACrD,CAAC;AACJ,CAAC"}
File without changes
File without changes
File without changes
File without changes
@@ -5,8 +5,8 @@ import { writeFileIfNotExistsWithMessages } from '#src/utils.js';
5
5
  // Function to process JSON config and create Groq LLM instance
6
6
  export async function processJsonConfig(llmConfig) {
7
7
  const groq = await import('@langchain/groq');
8
- // Use environment variable if available, otherwise use the config value
9
- const groqApiKey = env.GROQ_API_KEY || llmConfig.apiKey;
8
+ // Use config value if available, otherwise use the environment variable
9
+ const groqApiKey = llmConfig.apiKey || env.GROQ_API_KEY;
10
10
  return new groq.ChatGroq({
11
11
  ...llmConfig,
12
12
  apiKey: groqApiKey,
@@ -1 +1 @@
1
- {"version":3,"file":"groq.js","sourceRoot":"","sources":["../../src/presets/groq.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,M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qBAAqB,CAAC;AACzD,OAAO,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAC;AAIjE,+DAA+D;AAC/D,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,SAAwB;IAC9D,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC7C,wEAAwE;IACxE,MAAM,UAAU,GAAG,SAAS,CAAC,MAAM,IAAI,GAAG,CAAC,YAAY,CAAC;IACxD,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC;QACvB,GAAG,SAAS;QACZ,MAAM,EAAE,UAAU;QAClB,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,+BAA+B;KAC1D,CAAC,CAAC;AACL,CAAC;AAED,MAAM,WAAW,GAAG;;;;;EAKlB,CAAC;AAEH,MAAM,UAAU,IAAI,CAAC,cAAsB;IACzC,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAEtC,yDAAyD;IACzD,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IAED,gCAAgC,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IAC9D,cAAc,CACZ,yBAAyB,cAAc,uBAAuB;QAC5D,8CAA8C,CACjD,CAAC;AACJ,CAAC"}
File without changes
@@ -24,7 +24,7 @@ function getApiKey(llmConfig) {
24
24
  return env[conf.apiKeyEnvironmentVariable];
25
25
  }
26
26
  else {
27
- return env.OPENAI_API_KEY || llmConfig.apiKey;
27
+ return llmConfig.apiKey || env.OPENAI_API_KEY;
28
28
  }
29
29
  }
30
30
  const jsonContent = `{
@@ -1 +1 @@
1
- {"version":3,"file":"openai.js","sourceRoot":"","sources":["../../src/presets/openai.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;A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,CAAC;QACN,OAAO,SAAS,CAAC,MAAM,IAAI,GAAG,CAAC,cAAc,CAAC;IAChD,CAAC;AACH,CAAC;AAED,MAAM,WAAW,GAAG;;;;;EAKlB,CAAC;AAEH,MAAM,UAAU,IAAI,CAAC,cAAsB;IACzC,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAEtC,yDAAyD;IACzD,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACpD,CAAC;IAED,gCAAgC,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IAC9D,cAAc,CACZ,yBAAyB,cAAc,uBAAuB;QAC5D,gDAAgD,CACnD,CAAC;AACJ,CAAC"}
File without changes
File without changes
File without changes
package/dist/prompt.d.ts CHANGED
File without changes
package/dist/prompt.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/utils.d.ts CHANGED
File without changes
package/dist/utils.js CHANGED
File without changes
package/dist/utils.js.map CHANGED
File without changes
package/docs/COMMANDS.md CHANGED
File without changes
File without changes
File without changes
File without changes
package/eslint.config.js CHANGED
File without changes
package/it.js CHANGED
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaunt-sloth-assistant",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": "Andrew Kondratev",
@@ -20,6 +20,8 @@
20
20
  "prepare": "npm run build"
21
21
  },
22
22
  "bin": {
23
+ "gaunt-sloth-assistant": "index.js",
24
+ "gaunt-sloth": "index.js",
23
25
  "gsloth": "index.js",
24
26
  "gth": "index.js"
25
27
  },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/config.ts CHANGED
File without changes
File without changes
package/src/constants.ts CHANGED
File without changes
File without changes
package/src/core/types.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/index.ts CHANGED
File without changes
package/src/llmUtils.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -13,8 +13,8 @@ export async function processJsonConfig(
13
13
  llmConfig: AnthropicInput & BaseChatModelParams
14
14
  ): Promise<BaseChatModel> {
15
15
  const anthropic = await import('@langchain/anthropic');
16
- // Use environment variable if available, otherwise use the config value
17
- const anthropicApiKey = env.ANTHROPIC_API_KEY || llmConfig.apiKey;
16
+ // Use config value if available, otherwise use the environment variable
17
+ const anthropicApiKey = llmConfig.apiKey || env.ANTHROPIC_API_KEY;
18
18
  return new anthropic.ChatAnthropic({
19
19
  ...llmConfig,
20
20
  apiKey: anthropicApiKey,
@@ -13,8 +13,8 @@ export async function processJsonConfig(
13
13
  llmConfig: ChatDeepSeekInput & BaseChatModelParams
14
14
  ): Promise<BaseChatModel> {
15
15
  const deepseek = await import('@langchain/deepseek');
16
- // Use environment variable if available, otherwise use the config value
17
- const deepseekApiKey = env.DEEPSEEK_API_KEY || llmConfig.apiKey;
16
+ // Use config apiKey if available, otherwise use the environment variable
17
+ const deepseekApiKey = llmConfig.apiKey || env.DEEPSEEK_API_KEY;
18
18
  return new deepseek.ChatDeepSeek({
19
19
  ...llmConfig,
20
20
  apiKey: deepseekApiKey,
File without changes
@@ -8,8 +8,8 @@ import { ChatGroqInput } from '@langchain/groq';
8
8
  // Function to process JSON config and create Groq LLM instance
9
9
  export async function processJsonConfig(llmConfig: ChatGroqInput): Promise<BaseChatModel> {
10
10
  const groq = await import('@langchain/groq');
11
- // Use environment variable if available, otherwise use the config value
12
- const groqApiKey = env.GROQ_API_KEY || llmConfig.apiKey;
11
+ // Use config value if available, otherwise use the environment variable
12
+ const groqApiKey = llmConfig.apiKey || env.GROQ_API_KEY;
13
13
  return new groq.ChatGroq({
14
14
  ...llmConfig,
15
15
  apiKey: groqApiKey,
@@ -33,7 +33,7 @@ function getApiKey(llmConfig: OpenAIChatInput & ChatOpenAIFields & BaseChatModel
33
33
  if (conf.apiKeyEnvironmentVariable && env[conf.apiKeyEnvironmentVariable]) {
34
34
  return env[conf.apiKeyEnvironmentVariable];
35
35
  } else {
36
- return env.OPENAI_API_KEY || llmConfig.apiKey;
36
+ return llmConfig.apiKey || env.OPENAI_API_KEY;
37
37
  }
38
38
  }
39
39
 
File without changes
package/src/prompt.ts CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/utils.ts CHANGED
File without changes
package/tsconfig.json CHANGED
File without changes
File without changes
package/vitest.config.ts CHANGED
File without changes