gaunt-sloth-assistant 0.4.0 → 0.4.1

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.
@@ -45,6 +45,7 @@ export async function get(config, issueId) {
45
45
  }
46
46
  const summary = issue.fields.summary;
47
47
  const description = issue.fields.description;
48
+ console.log(JSON.stringify(issue, null, 2));
48
49
  return `Jira Issue: ${issueId}\nSummary: ${summary}\n\nDescription:\n${description}`;
49
50
  }
50
51
  catch (error) {
@@ -53,7 +54,11 @@ export async function get(config, issueId) {
53
54
  }
54
55
  }
55
56
  /**
56
- * Helper function to get Jira issue details using Atlassian REST API v3
57
+ * Helper function to get Jira issue details using Atlassian REST API v2.
58
+ *
59
+ * The feature was initially developed to use Atlassian REST API v3, which by
60
+ * default returns the ADF JSON format for description, which is not very useful for us.
61
+ *
57
62
  * @param config Jira configuration
58
63
  * @param jiraKey Jira issue ID
59
64
  * @returns Jira issue response
@@ -61,13 +66,16 @@ export async function get(config, issueId) {
61
66
  async function getJiraIssue(config, jiraKey) {
62
67
  // Jira Cloud ID can be found by authenticated user at https://company.atlassian.net/_edge/tenant_info
63
68
  // According to doc https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get permissions to read this resource:
69
+ // https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-get
64
70
  // either Classic (RECOMMENDED) read:jira-work
65
71
  // or Granular read:issue-meta:jira, read:issue-security-level:jira, read:issue.vote:jira, read:issue.changelog:jira, read:avatar:jira, read:issue:jira, read:status:jira, read:user:jira, read:field-configuration:jira
66
- const apiUrl = `https://api.atlassian.com/ex/jira/${config.cloudId}/rest/api/3/issue/${jiraKey}`;
72
+ const apiUrl = `https://api.atlassian.com/ex/jira/${config.cloudId}/rest/api/2/issue/${jiraKey}`;
67
73
  if (config.displayUrl) {
68
74
  display(`Loading Jira issue ${config.displayUrl}${jiraKey}`);
69
75
  }
70
76
  display(`Retrieving jira from api ${apiUrl.replace(/^https?:\/\//, '')}`);
77
+ // This filter will be necessary for V3: `&expand=renderedFields` to convert ADF to HTML
78
+ const filters = '?fields=summary,description'; // Limit JSON to summary and description
71
79
  // Encode credentials for Basic Authentication header
72
80
  const credentials = `${config.username}:${config.token}`;
73
81
  const encodedCredentials = Buffer.from(credentials).toString('base64');
@@ -78,7 +86,7 @@ async function getJiraIssue(config, jiraKey) {
78
86
  Accept: 'application/json; charset=utf-8',
79
87
  'Accept-Language': 'en-US,en;q=0.9', // Prevents errors in other languages
80
88
  };
81
- const response = await fetch(apiUrl, {
89
+ const response = await fetch(apiUrl + filters, {
82
90
  method: 'GET',
83
91
  headers: headers,
84
92
  });
@@ -1 +1 @@
1
- {"version":3,"file":"jiraIssueProvider.js","sourceRoot":"","sources":["../../src/providers/jiraIssueProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAY1C;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,GAAG,CACvB,MAAkC,EAClC,OAA2B;IAE3B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,cAAc,CAAC,yBAAyB,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,cAAc,CAAC,sBAAsB,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,mDAAmD;IACnD,MAAM,QAAQ,GAAG,GAAG,CAAC,aAAa,IAAI,MAAM,CAAC,QAAQ,CAAC;IACtD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CACb,sHAAsH,CACvH,CAAC;IACJ,CAAC;IAED,gDAAgD;IAChD,MAAM,KAAK,GAAG,GAAG,CAAC,kBAAkB,IAAI,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AiC;QACzC,iBAAiB,EAAE,gBAAgB,EAAE,qCAAqC;KAC3E,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,MAAM,GAAG,OAAO,EAAE;QAC7C,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,OAAO;KACjB,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC;QAClB,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CACb,+BAA+B,QAAQ,CAAC,UAAU,MAAM,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CACpF,CAAC;QACJ,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,+BAA+B,QAAQ,EAAE,UAAU,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,EAAE,CAAC;AACzB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaunt-sloth-assistant",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "author": "Andrew Kondratev",
@@ -30,7 +30,7 @@
30
30
  "@langchain/groq": "^0.2.2",
31
31
  "@langchain/langgraph": "^0.2.71",
32
32
  "chalk": "^5.4.1",
33
- "commander": "^13.1.0",
33
+ "commander": "^14.0.0",
34
34
  "uuid": "^11.1.0"
35
35
  },
36
36
  "devDependencies": {
package/report.txt ADDED
@@ -0,0 +1,43 @@
1
+ Summary of package.json:
2
+
3
+ * **Name**: `gaunt-sloth-assistant`
4
+ * **Version**: `0.4.0`
5
+ * **Description**: Not specified.
6
+ * **Author**: Andrew Kondratev
7
+ * **License**: MIT
8
+ * **Main entry point**: `dist/index.js`
9
+ * **Type**: `module`
10
+ * **Binaries/Commands**: `gsloth` and `gth` (both point to `index.js`)
11
+ * **Repository**: `github:andruhon/gaunt-sloth-assistant`
12
+ * **Node Engine Requirement**: `>=22.0.0`
13
+ * **NPM Engine Requirement**: `>=10.9.0`
14
+ * **Imports alias**: `#src/*.js` maps to `./dist/*.js`
15
+
16
+ **Key Dependencies**:
17
+ * `@langchain/anthropic`
18
+ * `@langchain/core`
19
+ * `@langchain/google-vertexai`
20
+ * `@langchain/groq`
21
+ * `@langchain/langgraph`
22
+ * `@langchain/mcp-adapters`
23
+ * `@modelcontextprotocol/server-filesystem`
24
+ * `chalk`
25
+ * `commander`
26
+ * `uuid`
27
+
28
+ **Key Dev Dependencies**:
29
+ * `eslint` and related plugins (for linting)
30
+ * `prettier` (for code formatting)
31
+ * `typescript`
32
+ * `vitest` (for testing)
33
+ * `@types/node`, `@types/uuid`
34
+
35
+ **Scripts**:
36
+ * `build`: `tsc` (compiles TypeScript)
37
+ * `format`: `prettier --write 'src/**/*.{js,ts}'` (formats code)
38
+ * `it`: `npm run build && vitest run --config vitest-it.config.ts` (runs integration tests)
39
+ * `lint`: `eslint . --ext .js,.ts` (lints code)
40
+ * `prepare`: `npm run build` (runs build on prepare, e.g., before publishing)
41
+ * `test`: `npm run build && vitest run` (runs tests)
42
+
43
+ This `package.json` defines a Node.js module written in TypeScript, utilizing LangChain and various other libraries for its functionality. It includes scripts for building, testing, linting, and formatting the code. It also specifies engine requirements and defines custom import paths.
@@ -8,6 +8,7 @@ interface JiraIssueResponse {
8
8
  description: string;
9
9
  [key: string]: unknown;
10
10
  };
11
+
11
12
  [key: string]: unknown;
12
13
  }
13
14
 
@@ -74,6 +75,8 @@ export async function get(
74
75
  const summary = issue.fields.summary;
75
76
  const description = issue.fields.description;
76
77
 
78
+ console.log(JSON.stringify(issue, null, 2));
79
+
77
80
  return `Jira Issue: ${issueId}\nSummary: ${summary}\n\nDescription:\n${description}`;
78
81
  } catch (error) {
79
82
  displayError(
@@ -84,7 +87,11 @@ export async function get(
84
87
  }
85
88
 
86
89
  /**
87
- * Helper function to get Jira issue details using Atlassian REST API v3
90
+ * Helper function to get Jira issue details using Atlassian REST API v2.
91
+ *
92
+ * The feature was initially developed to use Atlassian REST API v3, which by
93
+ * default returns the ADF JSON format for description, which is not very useful for us.
94
+ *
88
95
  * @param config Jira configuration
89
96
  * @param jiraKey Jira issue ID
90
97
  * @returns Jira issue response
@@ -93,14 +100,18 @@ async function getJiraIssue(config: JiraConfig, jiraKey: string): Promise<JiraIs
93
100
  // Jira Cloud ID can be found by authenticated user at https://company.atlassian.net/_edge/tenant_info
94
101
 
95
102
  // According to doc https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-get permissions to read this resource:
103
+ // https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-rest-api-2-issue-issueidorkey-get
96
104
  // either Classic (RECOMMENDED) read:jira-work
97
105
  // or Granular read:issue-meta:jira, read:issue-security-level:jira, read:issue.vote:jira, read:issue.changelog:jira, read:avatar:jira, read:issue:jira, read:status:jira, read:user:jira, read:field-configuration:jira
98
- const apiUrl = `https://api.atlassian.com/ex/jira/${config.cloudId}/rest/api/3/issue/${jiraKey}`;
106
+ const apiUrl = `https://api.atlassian.com/ex/jira/${config.cloudId}/rest/api/2/issue/${jiraKey}`;
99
107
  if (config.displayUrl) {
100
108
  display(`Loading Jira issue ${config.displayUrl}${jiraKey}`);
101
109
  }
102
110
  display(`Retrieving jira from api ${apiUrl.replace(/^https?:\/\//, '')}`);
103
111
 
112
+ // This filter will be necessary for V3: `&expand=renderedFields` to convert ADF to HTML
113
+ const filters = '?fields=summary,description'; // Limit JSON to summary and description
114
+
104
115
  // Encode credentials for Basic Authentication header
105
116
  const credentials = `${config.username}:${config.token}`;
106
117
  const encodedCredentials = Buffer.from(credentials).toString('base64');
@@ -113,7 +124,7 @@ async function getJiraIssue(config: JiraConfig, jiraKey: string): Promise<JiraIs
113
124
  'Accept-Language': 'en-US,en;q=0.9', // Prevents errors in other languages
114
125
  };
115
126
 
116
- const response = await fetch(apiUrl, {
127
+ const response = await fetch(apiUrl + filters, {
117
128
  method: 'GET',
118
129
  headers: headers,
119
130
  });
@@ -1,14 +0,0 @@
1
- import type { SlothContext } from '#src/config.js';
2
- import { BaseChatModel } from '@langchain/core/language_models/chat_models';
3
- export interface LLMConfig {
4
- type: string;
5
- model?: string;
6
- apiKey?: string;
7
- temperature?: number;
8
- responses?: string[];
9
- [key: string]: unknown;
10
- }
11
- export interface ConfigModule {
12
- init: (configFileName: string, context: SlothContext) => void;
13
- processJsonConfig: (llmConfig: LLMConfig) => Promise<BaseChatModel | null>;
14
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/configs/types.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import type { JiraConfig } from "./types.js";
2
- /**
3
- * Gets Jira issue using Atlassian REST API v2
4
- * @param config Jira configuration
5
- * @param issueId Jira issue ID
6
- * @returns Jira issue content
7
- */
8
- export declare function get(config: JiraConfig | null, issueId: string | undefined): Promise<string | null>;
@@ -1,62 +0,0 @@
1
- import { displayError, displayWarning } from "#src/consoleUtils.js";
2
- /**
3
- * Gets Jira issue using Atlassian REST API v2
4
- * @param config Jira configuration
5
- * @param issueId Jira issue ID
6
- * @returns Jira issue content
7
- */
8
- export async function get(config, issueId) {
9
- if (!config) {
10
- displayWarning("No Jira config provided");
11
- return null;
12
- }
13
- if (!issueId) {
14
- displayWarning("No issue ID provided");
15
- return null;
16
- }
17
- if (!config.username) {
18
- displayWarning("No Jira username provided");
19
- return null;
20
- }
21
- if (!config.baseUrl) {
22
- displayWarning("No Jira base URL provided");
23
- return null;
24
- }
25
- if (!config.token) {
26
- displayWarning("No Jira token provided");
27
- return null;
28
- }
29
- try {
30
- const issue = await getJiraIssue(config, issueId);
31
- if (!issue) {
32
- return null;
33
- }
34
- const summary = issue.fields.summary;
35
- const description = issue.fields.description;
36
- return `Jira Issue: ${issueId}\nSummary: ${summary}\n\nDescription:\n${description}`;
37
- }
38
- catch (error) {
39
- displayError(`Failed to get Jira issue: ${error instanceof Error ? error.message : String(error)}`);
40
- return null;
41
- }
42
- }
43
- /**
44
- * Helper function to get Jira issue details
45
- * @param config Jira configuration
46
- * @param issueId Jira issue ID
47
- * @returns Jira issue response
48
- */
49
- async function getJiraIssue(config, issueId) {
50
- const auth = Buffer.from(`${config.username}:${config.token}`).toString('base64');
51
- const response = await fetch(`${config.baseUrl}/rest/api/2/issue/${issueId}`, {
52
- headers: {
53
- 'Authorization': `Basic ${auth}`,
54
- 'Accept': 'application/json'
55
- }
56
- });
57
- if (!response.ok) {
58
- throw new Error(`Failed to fetch Jira issue: ${response.statusText}`);
59
- }
60
- return response.json();
61
- }
62
- //# sourceMappingURL=jiraIssueLegacyAccessTokenProvider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jiraIssueLegacyAccessTokenProvider.js","sourceRoot":"","sources":["../../src/providers/jiraIssueLegacyAccessTokenProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAYpE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,GAAG,CAAC,MAAyB,EAAE,OAA2B;IAC5E,IAAI,CAAC,MAAM,EAAE,CAAC;QACV,cAAc,CAAC,yBAAyB,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,cAAc,CAAC,sBAAsB,CAAC,CAAC;QACvC,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACnB,cAAc,CAAC,2BAA2B,CAAC,CAAC;QAC5C,OAAO,IAAI,CAAC;IAChB,CAAC;IACD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,cAAc,CAAC,2BAA2B,CAAC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