gaunt-sloth-assistant 0.8.2 → 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.
- package/.gsloth.backstory.md +0 -0
- package/.gsloth.chat.md +0 -0
- package/.gsloth.code.md +0 -0
- package/.gsloth.config_.json +0 -0
- package/.gsloth.config_.mjs +0 -0
- package/.gsloth.config_claude.mjs +0 -0
- package/.gsloth.config_vertex.json +0 -0
- package/.gsloth.guidelines.md +0 -0
- package/.gsloth.review.md +0 -0
- package/.gsloth.system.md +0 -0
- package/.prettierrc.json +0 -0
- package/LICENSE +0 -0
- package/README.md +1 -1
- package/assets/gaunt-sloth-logo.png +0 -0
- package/assets/release-notes/v0_4_0.md +0 -0
- package/assets/release-notes/v0_5_0.md +0 -0
- package/assets/release-notes/v0_5_1.md +0 -0
- package/assets/release-notes/v0_5_2.md +0 -0
- package/assets/release-notes/v0_5_3.md +0 -0
- package/assets/release-notes/v0_6_0.md +0 -0
- package/assets/release-notes/v0_6_2.md +0 -0
- package/assets/release-notes/v0_6_4.md +0 -0
- package/assets/release-notes/v0_6_5.md +0 -0
- package/assets/release-notes/v0_7_0.md +0 -0
- package/assets/release-notes/v0_7_2.md +0 -0
- package/assets/release-notes/v0_7_3.md +0 -0
- package/assets/release-notes/v0_8_0.md +0 -0
- package/assets/release-notes/v0_8_2.md +0 -0
- package/dist/builtInToolsConfig.d.ts +0 -0
- package/dist/builtInToolsConfig.js +0 -0
- package/dist/builtInToolsConfig.js.map +0 -0
- package/dist/commands/askCommand.d.ts +0 -0
- package/dist/commands/askCommand.js +0 -0
- package/dist/commands/askCommand.js.map +0 -0
- package/dist/commands/chatCommand.d.ts +0 -0
- package/dist/commands/chatCommand.js +0 -0
- package/dist/commands/chatCommand.js.map +0 -0
- package/dist/commands/codeCommand.d.ts +0 -0
- package/dist/commands/codeCommand.js +0 -0
- package/dist/commands/codeCommand.js.map +0 -0
- package/dist/commands/commandUtils.d.ts +0 -0
- package/dist/commands/commandUtils.js +0 -0
- package/dist/commands/commandUtils.js.map +0 -0
- package/dist/commands/initCommand.d.ts +0 -0
- package/dist/commands/initCommand.js +0 -0
- package/dist/commands/initCommand.js.map +0 -0
- package/dist/commands/prCommand.d.ts +0 -0
- package/dist/commands/prCommand.js +0 -0
- package/dist/commands/prCommand.js.map +0 -0
- package/dist/commands/reviewCommand.d.ts +0 -0
- package/dist/commands/reviewCommand.js +0 -0
- package/dist/commands/reviewCommand.js.map +0 -0
- package/dist/config.d.ts +0 -0
- package/dist/config.js +0 -0
- package/dist/config.js.map +0 -0
- package/dist/consoleUtils.d.ts +0 -0
- package/dist/consoleUtils.js +0 -0
- package/dist/consoleUtils.js.map +0 -0
- package/dist/constants.d.ts +0 -0
- package/dist/constants.js +0 -0
- package/dist/constants.js.map +0 -0
- package/dist/core/Invocation.d.ts +0 -0
- package/dist/core/Invocation.js +0 -0
- package/dist/core/Invocation.js.map +0 -0
- package/dist/core/types.d.ts +0 -0
- package/dist/core/types.js +0 -0
- package/dist/core/types.js.map +0 -0
- package/dist/filePathUtils.d.ts +0 -0
- package/dist/filePathUtils.js +0 -0
- package/dist/filePathUtils.js.map +0 -0
- package/dist/globalConfigUtils.d.ts +0 -0
- package/dist/globalConfigUtils.js +0 -0
- package/dist/globalConfigUtils.js.map +0 -0
- package/dist/helpers/jira/jiraClient.d.ts +0 -0
- package/dist/helpers/jira/jiraClient.js +0 -0
- package/dist/helpers/jira/jiraClient.js.map +0 -0
- package/dist/helpers/jira/jiraLogWork.d.ts +0 -0
- package/dist/helpers/jira/jiraLogWork.js +0 -0
- package/dist/helpers/jira/jiraLogWork.js.map +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js.map +0 -0
- package/dist/llmUtils.d.ts +0 -0
- package/dist/llmUtils.js +0 -0
- package/dist/llmUtils.js.map +0 -0
- package/dist/mcp/OAuthClientProviderImpl.d.ts +0 -0
- package/dist/mcp/OAuthClientProviderImpl.js +0 -0
- package/dist/mcp/OAuthClientProviderImpl.js.map +0 -0
- package/dist/modules/interactiveSessionModule.d.ts +0 -0
- package/dist/modules/interactiveSessionModule.js +0 -0
- package/dist/modules/interactiveSessionModule.js.map +0 -0
- package/dist/modules/questionAnsweringModule.d.ts +0 -0
- package/dist/modules/questionAnsweringModule.js +0 -0
- package/dist/modules/questionAnsweringModule.js.map +0 -0
- package/dist/modules/reviewModule.d.ts +0 -0
- package/dist/modules/reviewModule.js +0 -0
- package/dist/modules/reviewModule.js.map +0 -0
- package/dist/modules/types.d.ts +0 -0
- package/dist/modules/types.js +0 -0
- package/dist/modules/types.js.map +0 -0
- package/dist/presets/anthropic.d.ts +0 -0
- package/dist/presets/anthropic.js +2 -2
- package/dist/presets/anthropic.js.map +1 -1
- package/dist/presets/deepseek.d.ts +0 -0
- package/dist/presets/deepseek.js +2 -2
- package/dist/presets/deepseek.js.map +1 -1
- package/dist/presets/fake.d.ts +0 -0
- package/dist/presets/fake.js +0 -0
- package/dist/presets/fake.js.map +0 -0
- package/dist/presets/groq.d.ts +0 -0
- package/dist/presets/groq.js +2 -2
- package/dist/presets/groq.js.map +1 -1
- package/dist/presets/openai.d.ts +0 -0
- package/dist/presets/openai.js +1 -2
- package/dist/presets/openai.js.map +1 -1
- package/dist/presets/vertexai.d.ts +0 -0
- package/dist/presets/vertexai.js +0 -0
- package/dist/presets/vertexai.js.map +0 -0
- package/dist/prompt.d.ts +0 -0
- package/dist/prompt.js +0 -0
- package/dist/prompt.js.map +0 -0
- package/dist/providers/file.d.ts +0 -0
- package/dist/providers/file.js +0 -0
- package/dist/providers/file.js.map +0 -0
- package/dist/providers/ghIssueProvider.d.ts +0 -0
- package/dist/providers/ghIssueProvider.js +0 -0
- package/dist/providers/ghIssueProvider.js.map +0 -0
- package/dist/providers/ghPrDiffProvider.d.ts +0 -0
- package/dist/providers/ghPrDiffProvider.js +0 -0
- package/dist/providers/ghPrDiffProvider.js.map +0 -0
- package/dist/providers/jiraIssueLegacyProvider.d.ts +0 -0
- package/dist/providers/jiraIssueLegacyProvider.js +0 -0
- package/dist/providers/jiraIssueLegacyProvider.js.map +0 -0
- package/dist/providers/jiraIssueProvider.d.ts +0 -0
- package/dist/providers/jiraIssueProvider.js +0 -0
- package/dist/providers/jiraIssueProvider.js.map +0 -0
- package/dist/providers/text.d.ts +0 -0
- package/dist/providers/text.js +0 -0
- package/dist/providers/text.js.map +0 -0
- package/dist/providers/types.d.ts +0 -0
- package/dist/providers/types.js +0 -0
- package/dist/providers/types.js.map +0 -0
- package/dist/systemUtils.d.ts +0 -0
- package/dist/systemUtils.js +0 -0
- package/dist/systemUtils.js.map +0 -0
- package/dist/tools/GthFileSystemToolkit.d.ts +0 -0
- package/dist/tools/GthFileSystemToolkit.js +0 -0
- package/dist/tools/GthFileSystemToolkit.js.map +0 -0
- package/dist/tools/gthJiraLogWorkTool.d.ts +0 -0
- package/dist/tools/gthJiraLogWorkTool.js +0 -0
- package/dist/tools/gthJiraLogWorkTool.js.map +0 -0
- package/dist/tools/gthStatusUpdateTool.d.ts +0 -0
- package/dist/tools/gthStatusUpdateTool.js +0 -0
- package/dist/tools/gthStatusUpdateTool.js.map +0 -0
- package/dist/utils.d.ts +0 -0
- package/dist/utils.js +0 -0
- package/dist/utils.js.map +0 -0
- package/docs/COMMANDS.md +0 -0
- package/docs/CONFIGURATION.md +0 -0
- package/docs/DEVELOPMENT.md +0 -0
- package/docs/RELEASE-HOWTO.md +0 -0
- package/eslint.config.js +0 -0
- package/it.js +0 -0
- package/maintenance/doc-maintenance.md +0 -0
- package/package.json +3 -1
- package/src/builtInToolsConfig.ts +0 -0
- package/src/commands/askCommand.ts +0 -0
- package/src/commands/chatCommand.ts +0 -0
- package/src/commands/codeCommand.ts +0 -0
- package/src/commands/commandUtils.ts +0 -0
- package/src/commands/initCommand.ts +0 -0
- package/src/commands/prCommand.ts +0 -0
- package/src/commands/reviewCommand.ts +0 -0
- package/src/config.ts +0 -0
- package/src/consoleUtils.ts +0 -0
- package/src/constants.ts +0 -0
- package/src/core/Invocation.ts +0 -0
- package/src/core/types.ts +0 -0
- package/src/filePathUtils.ts +0 -0
- package/src/globalConfigUtils.ts +0 -0
- package/src/helpers/jira/jiraClient.ts +0 -0
- package/src/helpers/jira/jiraLogWork.ts +0 -0
- package/src/index.ts +0 -0
- package/src/llmUtils.ts +0 -0
- package/src/mcp/OAuthClientProviderImpl.ts +0 -0
- package/src/modules/interactiveSessionModule.ts +0 -0
- package/src/modules/questionAnsweringModule.ts +0 -0
- package/src/modules/reviewModule.ts +0 -0
- package/src/modules/types.ts +0 -0
- package/src/presets/anthropic.ts +2 -2
- package/src/presets/deepseek.ts +2 -2
- package/src/presets/fake.ts +0 -0
- package/src/presets/groq.ts +2 -2
- package/src/presets/openai.ts +1 -2
- package/src/presets/vertexai.ts +0 -0
- package/src/prompt.ts +0 -0
- package/src/providers/file.ts +0 -0
- package/src/providers/ghIssueProvider.ts +0 -0
- package/src/providers/ghPrDiffProvider.ts +0 -0
- package/src/providers/jiraIssueLegacyProvider.ts +0 -0
- package/src/providers/jiraIssueProvider.ts +0 -0
- package/src/providers/text.ts +0 -0
- package/src/providers/types.ts +0 -0
- package/src/systemUtils.ts +0 -0
- package/src/tools/GthFileSystemToolkit.ts +0 -0
- package/src/tools/gthJiraLogWorkTool.ts +0 -0
- package/src/tools/gthStatusUpdateTool.ts +0 -0
- package/src/utils.ts +0 -0
- package/tsconfig.json +0 -0
- package/vitest-it.config.ts +0 -0
- package/vitest.config.ts +0 -0
package/.gsloth.backstory.md
CHANGED
|
File without changes
|
package/.gsloth.chat.md
CHANGED
|
File without changes
|
package/.gsloth.code.md
CHANGED
|
File without changes
|
package/.gsloth.config_.json
CHANGED
|
File without changes
|
package/.gsloth.config_.mjs
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/.gsloth.guidelines.md
CHANGED
|
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
|
-
[](https://github.com/andruhon/gaunt-sloth-assistant/actions/workflows/unit-tests.yml) [](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
|
package/dist/config.js.map
CHANGED
|
File without changes
|
package/dist/consoleUtils.d.ts
CHANGED
|
File without changes
|
package/dist/consoleUtils.js
CHANGED
|
File without changes
|
package/dist/consoleUtils.js.map
CHANGED
|
File without changes
|
package/dist/constants.d.ts
CHANGED
|
File without changes
|
package/dist/constants.js
CHANGED
|
File without changes
|
package/dist/constants.js.map
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/core/Invocation.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/core/types.d.ts
CHANGED
|
File without changes
|
package/dist/core/types.js
CHANGED
|
File without changes
|
package/dist/core/types.js.map
CHANGED
|
File without changes
|
package/dist/filePathUtils.d.ts
CHANGED
|
File without changes
|
package/dist/filePathUtils.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
|
package/dist/index.d.ts
CHANGED
|
File without changes
|
package/dist/index.js.map
CHANGED
|
File without changes
|
package/dist/llmUtils.d.ts
CHANGED
|
File without changes
|
package/dist/llmUtils.js
CHANGED
|
File without changes
|
package/dist/llmUtils.js.map
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
|
package/dist/modules/types.d.ts
CHANGED
|
File without changes
|
package/dist/modules/types.js
CHANGED
|
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
|
|
9
|
-
const anthropicApiKey =
|
|
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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CACZ,2BAA2B,cAAc,kCAAkC;QACzE,mDAAmD,CACtD,CAAC;AACJ,CAAC"}
|
|
File without changes
|
package/dist/presets/deepseek.js
CHANGED
|
@@ -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
|
|
9
|
-
const deepseekApiKey =
|
|
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,gCAAgC,EAAE,MAAM,eAAe,CAAC;AAOjE,mEAAmE;AACnE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,SAAkD;IAElD,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,qBAAqB,CAAC,CAAC;IACrD,
|
|
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,gCAAgC,EAAE,MAAM,eAAe,CAAC;AAOjE,mEAAmE;AACnE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,SAAkD;IAElD,MAAM,QAAQ,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"}
|
package/dist/presets/fake.d.ts
CHANGED
|
File without changes
|
package/dist/presets/fake.js
CHANGED
|
File without changes
|
package/dist/presets/fake.js.map
CHANGED
|
File without changes
|
package/dist/presets/groq.d.ts
CHANGED
|
File without changes
|
package/dist/presets/groq.js
CHANGED
|
@@ -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
|
|
9
|
-
const groqApiKey =
|
|
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,
|
package/dist/presets/groq.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groq.js","sourceRoot":"","sources":["../../src/presets/groq.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;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,
|
|
1
|
+
{"version":3,"file":"groq.js","sourceRoot":"","sources":["../../src/presets/groq.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;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"}
|
package/dist/presets/openai.d.ts
CHANGED
|
File without changes
|
package/dist/presets/openai.js
CHANGED
|
@@ -15,7 +15,6 @@ export async function processJsonConfig(llmConfig) {
|
|
|
15
15
|
};
|
|
16
16
|
delete configFields.type;
|
|
17
17
|
delete configFields.apiKeyEnvironmentVariable;
|
|
18
|
-
console.log(configFields);
|
|
19
18
|
return new ChatOpenAI(configFields);
|
|
20
19
|
}
|
|
21
20
|
function getApiKey(llmConfig) {
|
|
@@ -25,7 +24,7 @@ function getApiKey(llmConfig) {
|
|
|
25
24
|
return env[conf.apiKeyEnvironmentVariable];
|
|
26
25
|
}
|
|
27
26
|
else {
|
|
28
|
-
return
|
|
27
|
+
return llmConfig.apiKey || env.OPENAI_API_KEY;
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
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;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,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Q,YAAoB,CAAC,yBAAyB,CAAC;IACvD,OAAO,IAAI,UAAU,CAAC,YAAY,CAAC,CAAC;AACtC,CAAC;AAED,SAAS,SAAS,CAAC,SAAmE;IACpF,8DAA8D;IAC9D,MAAM,IAAI,GAAG,SAA0C,CAAC;IACxD,IAAI,IAAI,CAAC,yBAAyB,IAAI,GAAG,CAAC,IAAI,CAAC,yBAAyB,CAAC,EAAE,CAAC;QAC1E,OAAO,GAAG,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;SAAM,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
|
package/dist/presets/vertexai.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/prompt.d.ts
CHANGED
|
File without changes
|
package/dist/prompt.js
CHANGED
|
File without changes
|
package/dist/prompt.js.map
CHANGED
|
File without changes
|
package/dist/providers/file.d.ts
CHANGED
|
File without changes
|
package/dist/providers/file.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
|
package/dist/providers/text.d.ts
CHANGED
|
File without changes
|
package/dist/providers/text.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/providers/types.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/systemUtils.d.ts
CHANGED
|
File without changes
|
package/dist/systemUtils.js
CHANGED
|
File without changes
|
package/dist/systemUtils.js.map
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
|
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
|
package/docs/CONFIGURATION.md
CHANGED
|
File without changes
|
package/docs/DEVELOPMENT.md
CHANGED
|
File without changes
|
package/docs/RELEASE-HOWTO.md
CHANGED
|
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
|
+
"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
|
package/src/consoleUtils.ts
CHANGED
|
File without changes
|
package/src/constants.ts
CHANGED
|
File without changes
|
package/src/core/Invocation.ts
CHANGED
|
File without changes
|
package/src/core/types.ts
CHANGED
|
File without changes
|
package/src/filePathUtils.ts
CHANGED
|
File without changes
|
package/src/globalConfigUtils.ts
CHANGED
|
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
|
package/src/modules/types.ts
CHANGED
|
File without changes
|
package/src/presets/anthropic.ts
CHANGED
|
@@ -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
|
|
17
|
-
const anthropicApiKey =
|
|
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,
|
package/src/presets/deepseek.ts
CHANGED
|
@@ -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
|
|
17
|
-
const deepseekApiKey =
|
|
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,
|
package/src/presets/fake.ts
CHANGED
|
File without changes
|
package/src/presets/groq.ts
CHANGED
|
@@ -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
|
|
12
|
-
const groqApiKey =
|
|
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,
|
package/src/presets/openai.ts
CHANGED
|
@@ -24,7 +24,6 @@ export async function processJsonConfig(
|
|
|
24
24
|
};
|
|
25
25
|
delete (configFields as any).type;
|
|
26
26
|
delete (configFields as any).apiKeyEnvironmentVariable;
|
|
27
|
-
console.log(configFields);
|
|
28
27
|
return new ChatOpenAI(configFields);
|
|
29
28
|
}
|
|
30
29
|
|
|
@@ -34,7 +33,7 @@ function getApiKey(llmConfig: OpenAIChatInput & ChatOpenAIFields & BaseChatModel
|
|
|
34
33
|
if (conf.apiKeyEnvironmentVariable && env[conf.apiKeyEnvironmentVariable]) {
|
|
35
34
|
return env[conf.apiKeyEnvironmentVariable];
|
|
36
35
|
} else {
|
|
37
|
-
return
|
|
36
|
+
return llmConfig.apiKey || env.OPENAI_API_KEY;
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
|
package/src/presets/vertexai.ts
CHANGED
|
File without changes
|
package/src/prompt.ts
CHANGED
|
File without changes
|
package/src/providers/file.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/providers/text.ts
CHANGED
|
File without changes
|
package/src/providers/types.ts
CHANGED
|
File without changes
|
package/src/systemUtils.ts
CHANGED
|
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
|
package/vitest-it.config.ts
CHANGED
|
File without changes
|
package/vitest.config.ts
CHANGED
|
File without changes
|