@opentabs-dev/opentabs-plugin-linear 0.0.74

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 (100) hide show
  1. package/dist/adapter.iife.js +15582 -0
  2. package/dist/adapter.iife.js.map +7 -0
  3. package/dist/index.d.ts +14 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +60 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/linear-api.d.ts +4 -0
  8. package/dist/linear-api.d.ts.map +1 -0
  9. package/dist/linear-api.js +144 -0
  10. package/dist/linear-api.js.map +1 -0
  11. package/dist/tools/archive-issue.d.ts +7 -0
  12. package/dist/tools/archive-issue.d.ts.map +1 -0
  13. package/dist/tools/archive-issue.js +28 -0
  14. package/dist/tools/archive-issue.js.map +1 -0
  15. package/dist/tools/create-comment.d.ts +15 -0
  16. package/dist/tools/create-comment.d.ts.map +1 -0
  17. package/dist/tools/create-comment.js +34 -0
  18. package/dist/tools/create-comment.js.map +1 -0
  19. package/dist/tools/create-issue.d.ts +38 -0
  20. package/dist/tools/create-issue.d.ts.map +1 -0
  21. package/dist/tools/create-issue.js +77 -0
  22. package/dist/tools/create-issue.js.map +1 -0
  23. package/dist/tools/create-label.d.ts +17 -0
  24. package/dist/tools/create-label.d.ts.map +1 -0
  25. package/dist/tools/create-label.js +47 -0
  26. package/dist/tools/create-label.js.map +1 -0
  27. package/dist/tools/create-project.d.ts +22 -0
  28. package/dist/tools/create-project.d.ts.map +1 -0
  29. package/dist/tools/create-project.js +52 -0
  30. package/dist/tools/create-project.js.map +1 -0
  31. package/dist/tools/delete-issue.d.ts +7 -0
  32. package/dist/tools/delete-issue.d.ts.map +1 -0
  33. package/dist/tools/delete-issue.js +28 -0
  34. package/dist/tools/delete-issue.js.map +1 -0
  35. package/dist/tools/get-issue.d.ts +27 -0
  36. package/dist/tools/get-issue.d.ts.map +1 -0
  37. package/dist/tools/get-issue.js +59 -0
  38. package/dist/tools/get-issue.js.map +1 -0
  39. package/dist/tools/get-project.d.ts +18 -0
  40. package/dist/tools/get-project.d.ts.map +1 -0
  41. package/dist/tools/get-project.js +30 -0
  42. package/dist/tools/get-project.js.map +1 -0
  43. package/dist/tools/get-viewer.d.ts +14 -0
  44. package/dist/tools/get-viewer.d.ts.map +1 -0
  45. package/dist/tools/get-viewer.js +32 -0
  46. package/dist/tools/get-viewer.js.map +1 -0
  47. package/dist/tools/list-comments.d.ts +20 -0
  48. package/dist/tools/list-comments.d.ts.map +1 -0
  49. package/dist/tools/list-comments.js +46 -0
  50. package/dist/tools/list-comments.js.map +1 -0
  51. package/dist/tools/list-cycles.d.ts +21 -0
  52. package/dist/tools/list-cycles.d.ts.map +1 -0
  53. package/dist/tools/list-cycles.js +45 -0
  54. package/dist/tools/list-cycles.js.map +1 -0
  55. package/dist/tools/list-issue-relations.d.ts +16 -0
  56. package/dist/tools/list-issue-relations.d.ts.map +1 -0
  57. package/dist/tools/list-issue-relations.js +77 -0
  58. package/dist/tools/list-issue-relations.js.map +1 -0
  59. package/dist/tools/list-labels.d.ts +12 -0
  60. package/dist/tools/list-labels.d.ts.map +1 -0
  61. package/dist/tools/list-labels.js +30 -0
  62. package/dist/tools/list-labels.js.map +1 -0
  63. package/dist/tools/list-projects.d.ts +23 -0
  64. package/dist/tools/list-projects.d.ts.map +1 -0
  65. package/dist/tools/list-projects.js +45 -0
  66. package/dist/tools/list-projects.js.map +1 -0
  67. package/dist/tools/list-teams.d.ts +10 -0
  68. package/dist/tools/list-teams.d.ts.map +1 -0
  69. package/dist/tools/list-teams.js +29 -0
  70. package/dist/tools/list-teams.js.map +1 -0
  71. package/dist/tools/list-users.d.ts +19 -0
  72. package/dist/tools/list-users.d.ts.map +1 -0
  73. package/dist/tools/list-users.js +42 -0
  74. package/dist/tools/list-users.js.map +1 -0
  75. package/dist/tools/list-workflow-states.d.ts +13 -0
  76. package/dist/tools/list-workflow-states.d.ts.map +1 -0
  77. package/dist/tools/list-workflow-states.js +36 -0
  78. package/dist/tools/list-workflow-states.js.map +1 -0
  79. package/dist/tools/schemas.d.ts +269 -0
  80. package/dist/tools/schemas.d.ts.map +1 -0
  81. package/dist/tools/schemas.js +165 -0
  82. package/dist/tools/schemas.js.map +1 -0
  83. package/dist/tools/search-issues.d.ts +40 -0
  84. package/dist/tools/search-issues.d.ts.map +1 -0
  85. package/dist/tools/search-issues.js +95 -0
  86. package/dist/tools/search-issues.js.map +1 -0
  87. package/dist/tools/update-comment.d.ts +15 -0
  88. package/dist/tools/update-comment.d.ts.map +1 -0
  89. package/dist/tools/update-comment.js +36 -0
  90. package/dist/tools/update-comment.js.map +1 -0
  91. package/dist/tools/update-issue.d.ts +39 -0
  92. package/dist/tools/update-issue.d.ts.map +1 -0
  93. package/dist/tools/update-issue.js +76 -0
  94. package/dist/tools/update-issue.js.map +1 -0
  95. package/dist/tools/update-project.d.ts +23 -0
  96. package/dist/tools/update-project.d.ts.map +1 -0
  97. package/dist/tools/update-project.js +53 -0
  98. package/dist/tools/update-project.js.map +1 -0
  99. package/dist/tools.json +2064 -0
  100. package/package.json +55 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-project.js","sourceRoot":"","sources":["../../src/tools/create-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAC;IACtC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,iCAAiC;IAC9C,OAAO,EAAE,sBAAsB;IAC/B,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,CAAC,CAAC,MA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;YAAE,MAAM,SAAS,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;QACtF,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO;YAAE,MAAM,SAAS,CAAC,QAAQ,CAAC,+CAA+C,CAAC,CAAC;QAE3G,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,OAA2C,CAAC,EAAE,CAAC;IACjG,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { z } from 'zod';
2
+ export declare const deleteIssue: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ issue_id: z.ZodString;
4
+ }, z.core.$strip>, z.ZodObject<{
5
+ success: z.ZodBoolean;
6
+ }, z.core.$strip>>;
7
+ //# sourceMappingURL=delete-issue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-issue.d.ts","sourceRoot":"","sources":["../../src/tools/delete-issue.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW;;;;kBA6BtB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { graphql } from '../linear-api.js';
2
+ import { ToolError, defineTool } from '@opentabs-dev/plugin-sdk';
3
+ import { z } from 'zod';
4
+ export const deleteIssue = defineTool({
5
+ name: 'delete_issue',
6
+ displayName: 'Delete Issue',
7
+ description: 'Move a Linear issue to the trash. Trashed issues can be restored within 30 days.',
8
+ summary: 'Move an issue to the trash',
9
+ icon: 'trash-2',
10
+ group: 'Issues',
11
+ input: z.object({
12
+ issue_id: z.string().describe('Issue UUID to delete'),
13
+ }),
14
+ output: z.object({
15
+ success: z.boolean().describe('Whether the issue was successfully deleted'),
16
+ }),
17
+ handle: async (params) => {
18
+ const data = await graphql(`mutation DeleteIssue($id: String!) {
19
+ issueDelete(id: $id) {
20
+ success
21
+ }
22
+ }`, { id: params.issue_id });
23
+ if (!data.issueDelete)
24
+ throw ToolError.internal('Issue deletion failed — no response');
25
+ return { success: data.issueDelete.success };
26
+ },
27
+ });
28
+ //# sourceMappingURL=delete-issue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete-issue.js","sourceRoot":"","sources":["../../src/tools/delete-issue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;IACpC,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,kFAAkF;IAC/F,OAAO,EAAE,4BAA4B;IACrC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sBAAsB,CAAC;KACtD,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;KAC5E,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,OAAO,CAGxB;;;;QAIE,EACF,EAAE,EAAE,EAAE,MAAM,CAAC,QAAQ,EAAE,CACxB,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,WAAW;YAAE,MAAM,SAAS,CAAC,QAAQ,CAAC,qCAAqC,CAAC,CAAC;QAEvF,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;IAC/C,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ export declare const getIssue: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ issue_id: z.ZodString;
4
+ }, z.core.$strip>, z.ZodObject<{
5
+ issue: z.ZodObject<{
6
+ id: z.ZodString;
7
+ identifier: z.ZodString;
8
+ title: z.ZodString;
9
+ description: z.ZodString;
10
+ priority: z.ZodNumber;
11
+ priority_label: z.ZodString;
12
+ state_name: z.ZodString;
13
+ state_type: z.ZodString;
14
+ assignee_name: z.ZodString;
15
+ team_key: z.ZodString;
16
+ team_name: z.ZodString;
17
+ label_names: z.ZodArray<z.ZodString>;
18
+ project_name: z.ZodString;
19
+ cycle_number: z.ZodNumber;
20
+ due_date: z.ZodString;
21
+ estimate: z.ZodNumber;
22
+ url: z.ZodString;
23
+ created_at: z.ZodString;
24
+ updated_at: z.ZodString;
25
+ }, z.core.$strip>;
26
+ }, z.core.$strip>>;
27
+ //# sourceMappingURL=get-issue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-issue.d.ts","sourceRoot":"","sources":["../../src/tools/get-issue.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;kBAkEnB,CAAC"}
@@ -0,0 +1,59 @@
1
+ import { graphql } from '../linear-api.js';
2
+ import { defineTool, ToolError } from '@opentabs-dev/plugin-sdk';
3
+ import { z } from 'zod';
4
+ import { issueSchema, mapIssue } from './schemas.js';
5
+ export const getIssue = defineTool({
6
+ name: 'get_issue',
7
+ displayName: 'Get Issue',
8
+ description: 'Get detailed information about a single Linear issue by its UUID or human-readable identifier (e.g. ENG-123).',
9
+ summary: 'Get details of a single issue',
10
+ icon: 'file-text',
11
+ group: 'Issues',
12
+ input: z.object({
13
+ issue_id: z.string().describe('Issue UUID or human-readable identifier (e.g. "ENG-123")'),
14
+ }),
15
+ output: z.object({
16
+ issue: issueSchema.describe('The requested issue'),
17
+ }),
18
+ handle: async (params) => {
19
+ // Determine whether input is a UUID or an identifier like ENG-123
20
+ const isIdentifier = /^[A-Z]+-\d+$/i.test(params.issue_id);
21
+ if (isIdentifier) {
22
+ // Use searchIssues to find by identifier
23
+ const data = await graphql(`query GetIssueByIdentifier($identifier: String!) {
24
+ searchIssues(term: $identifier, first: 1) {
25
+ nodes {
26
+ id identifier title description priority priorityLabel url
27
+ createdAt updatedAt dueDate estimate
28
+ state { name type }
29
+ assignee { name displayName }
30
+ team { key name }
31
+ labels { nodes { name } }
32
+ project { name }
33
+ cycle { number }
34
+ }
35
+ }
36
+ }`, { identifier: params.issue_id });
37
+ const node = data.searchIssues?.nodes?.[0];
38
+ if (!node) {
39
+ throw ToolError.notFound(`Issue not found: ${params.issue_id}`);
40
+ }
41
+ return { issue: mapIssue(node) };
42
+ }
43
+ // UUID lookup
44
+ const data = await graphql(`query GetIssue($id: String!) {
45
+ issue(id: $id) {
46
+ id identifier title description priority priorityLabel url
47
+ createdAt updatedAt dueDate estimate
48
+ state { name type }
49
+ assignee { name displayName }
50
+ team { key name }
51
+ labels { nodes { name } }
52
+ project { name }
53
+ cycle { number }
54
+ }
55
+ }`, { id: params.issue_id });
56
+ return { issue: mapIssue(data.issue) };
57
+ },
58
+ });
59
+ //# sourceMappingURL=get-issue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-issue.js","sourceRoot":"","sources":["../../src/tools/get-issue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;IACjC,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,WAAW;IACxB,WAAW,EACT,+GAA+G;IACjH,OAAO,EAAE,+B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ZodObject<{
3
+ project_id: z.ZodString;
4
+ }, z.core.$strip>, z.ZodObject<{
5
+ project: z.ZodObject<{
6
+ id: z.ZodString;
7
+ name: z.ZodString;
8
+ description: z.ZodString;
9
+ state: z.ZodString;
10
+ lead_name: z.ZodString;
11
+ target_date: z.ZodString;
12
+ start_date: z.ZodString;
13
+ url: z.ZodString;
14
+ created_at: z.ZodString;
15
+ updated_at: z.ZodString;
16
+ }, z.core.$strip>;
17
+ }, z.core.$strip>>;
18
+ //# sourceMappingURL=get-project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-project.d.ts","sourceRoot":"","sources":["../../src/tools/get-project.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;kBA4BrB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { graphql } from '../linear-api.js';
2
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
3
+ import { z } from 'zod';
4
+ import { mapProject, projectSchema } from './schemas.js';
5
+ export const getProject = defineTool({
6
+ name: 'get_project',
7
+ displayName: 'Get Project',
8
+ description: 'Get detailed information about a single Linear project by its UUID.',
9
+ summary: 'Get details of a project',
10
+ icon: 'folder-open',
11
+ group: 'Projects',
12
+ input: z.object({
13
+ project_id: z.string().describe('Project UUID'),
14
+ }),
15
+ output: z.object({
16
+ project: projectSchema.describe('The requested project'),
17
+ }),
18
+ handle: async (params) => {
19
+ const data = await graphql(`query GetProject($id: String!) {
20
+ project(id: $id) {
21
+ id name description url createdAt updatedAt
22
+ targetDate startDate
23
+ status { name }
24
+ lead { name displayName }
25
+ }
26
+ }`, { id: params.project_id });
27
+ return { project: mapProject(data.project) };
28
+ },
29
+ });
30
+ //# sourceMappingURL=get-project.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-project.js","sourceRoot":"","sources":["../../src/tools/get-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;IACnC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,qEAAqE;IAClF,OAAO,EAAE,0BAA0B;IACnC,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;KAChD,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,aAAa,CAAC,QAAQ,CAAC,uBAAuB,CAAC;KACzD,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,OAAO,CACxB;;;;;;;QAOE,EACF,EAAE,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE,CAC1B,CAAC;QAEF,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,OAA2C,CAAC,EAAE,CAAC;IACnF,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ export declare const getViewer: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
3
+ user: z.ZodObject<{
4
+ id: z.ZodString;
5
+ name: z.ZodString;
6
+ email: z.ZodString;
7
+ display_name: z.ZodString;
8
+ active: z.ZodBoolean;
9
+ admin: z.ZodBoolean;
10
+ }, z.core.$strip>;
11
+ organization_name: z.ZodString;
12
+ organization_url_key: z.ZodString;
13
+ }, z.core.$strip>>;
14
+ //# sourceMappingURL=get-viewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-viewer.d.ts","sourceRoot":"","sources":["../../src/tools/get-viewer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,SAAS;;;;;;;;;;;kBAiCpB,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { graphql } from '../linear-api.js';
2
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
3
+ import { z } from 'zod';
4
+ import { mapUser, userSchema } from './schemas.js';
5
+ export const getViewer = defineTool({
6
+ name: 'get_viewer',
7
+ displayName: 'Get Viewer',
8
+ description: "Get the authenticated user's profile information.",
9
+ summary: "Get the current user's profile",
10
+ icon: 'user',
11
+ group: 'Teams & Users',
12
+ input: z.object({}),
13
+ output: z.object({
14
+ user: userSchema.describe('The authenticated user'),
15
+ organization_name: z.string().describe('Name of the organization'),
16
+ organization_url_key: z.string().describe('URL key of the organization (used in linear.app URLs)'),
17
+ }),
18
+ handle: async () => {
19
+ const data = await graphql(`query GetViewer {
20
+ viewer {
21
+ id name email displayName active admin
22
+ organization { name urlKey }
23
+ }
24
+ }`);
25
+ return {
26
+ user: mapUser(data.viewer),
27
+ organization_name: data.viewer.organization?.name ?? '',
28
+ organization_url_key: data.viewer.organization?.urlKey ?? '',
29
+ };
30
+ },
31
+ });
32
+ //# sourceMappingURL=get-viewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-viewer.js","sourceRoot":"","sources":["../../src/tools/get-viewer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC;IAClC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,mDAAmD;IAChE,OAAO,EAAE,gCAAgC;IACzC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,eAAe;IACtB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACnD,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;QAClE,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;KACnG,CAAC;IACF,MAAM,EAAE,KAAK,IAAI,EAAE;QACjB,MAAM,IAAI,GAAG,MAAM,OAAO,CAKxB;;;;;QAKE,CACH,CAAC;QAEF,OAAO;YACL,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,MAAuC,CAAC;YAC3D,iBAAiB,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,IAAI,EAAE;YACvD,oBAAoB,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,IAAI,EAAE;SAC7D,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ export declare const listComments: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ issue_id: z.ZodString;
4
+ limit: z.ZodOptional<z.ZodNumber>;
5
+ after: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ comments: z.ZodArray<z.ZodObject<{
8
+ id: z.ZodString;
9
+ body: z.ZodString;
10
+ user_name: z.ZodString;
11
+ created_at: z.ZodString;
12
+ updated_at: z.ZodString;
13
+ edited_at: z.ZodString;
14
+ }, z.core.$strip>>;
15
+ pagination: z.ZodObject<{
16
+ has_next_page: z.ZodBoolean;
17
+ end_cursor: z.ZodString;
18
+ }, z.core.$strip>;
19
+ }, z.core.$strip>>;
20
+ //# sourceMappingURL=list-comments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-comments.d.ts","sourceRoot":"","sources":["../../src/tools/list-comments.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;kBAmDvB,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { graphql } from '../linear-api.js';
2
+ import { ToolError, defineTool } from '@opentabs-dev/plugin-sdk';
3
+ import { z } from 'zod';
4
+ import { commentSchema, mapComment, paginationSchema } from './schemas.js';
5
+ export const listComments = defineTool({
6
+ name: 'list_comments',
7
+ displayName: 'List Comments',
8
+ description: 'List comments on a Linear issue, ordered by creation date.',
9
+ summary: 'List comments on an issue',
10
+ icon: 'message-square',
11
+ group: 'Comments',
12
+ input: z.object({
13
+ issue_id: z.string().describe('Issue UUID to list comments for'),
14
+ limit: z.number().optional().describe('Maximum number of comments to return (default 25, max 50)'),
15
+ after: z.string().optional().describe('Pagination cursor from a previous response'),
16
+ }),
17
+ output: z.object({
18
+ comments: z.array(commentSchema).describe('List of comments on the issue'),
19
+ pagination: paginationSchema.describe('Pagination info for fetching more results'),
20
+ }),
21
+ handle: async (params) => {
22
+ const limit = Math.min(params.limit ?? 25, 50);
23
+ const data = await graphql(`query ListComments($id: String!, $first: Int, $after: String) {
24
+ issue(id: $id) {
25
+ comments(first: $first, after: $after) {
26
+ nodes {
27
+ id body createdAt updatedAt editedAt
28
+ user { name displayName }
29
+ }
30
+ pageInfo { hasNextPage endCursor }
31
+ }
32
+ }
33
+ }`, { id: params.issue_id, first: limit, after: params.after });
34
+ if (!data.issue)
35
+ throw ToolError.notFound('Issue not found');
36
+ const result = data.issue.comments;
37
+ return {
38
+ comments: result.nodes.map(n => mapComment(n)),
39
+ pagination: {
40
+ has_next_page: result.pageInfo?.hasNextPage ?? false,
41
+ end_cursor: result.pageInfo?.endCursor ?? '',
42
+ },
43
+ };
44
+ },
45
+ });
46
+ //# sourceMappingURL=list-comments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-comments.js","sourceRoot":"","sources":["../../src/tools/list-comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAE3E,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;IACrC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,4DAA4D;IACzE,OAAO,EAAE,2BAA2B;IACpC,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;QAChE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2DAA2D,CAAC;QAClG,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;KACpF,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,+BAA+B,CAAC;QAC1E,UAAU,EAAE,gBAAgB,CAAC,QAAQ,CAAC,2CAA2C,CAAC;KACnF,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QAE/C,MAAM,IAAI,GAAG,MAAM,OAAO,CAQxB;;;;;;;;;;QAUE,EACF,EAAE,EAAE,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAC3D,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,MAAM,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;QACnC,OAAO;YACL,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAqC,CAAC,CAAC;YAClF,UAAU,EAAE;gBACV,aAAa,EAAE,MAAM,CAAC,QAAQ,EAAE,WAAW,IAAI,KAAK;gBACpD,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,SAAS,IAAI,EAAE;aAC7C;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ export declare const listCycles: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ team_id: z.ZodString;
4
+ limit: z.ZodOptional<z.ZodNumber>;
5
+ after: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>, z.ZodObject<{
7
+ cycles: z.ZodArray<z.ZodObject<{
8
+ id: z.ZodString;
9
+ number: z.ZodNumber;
10
+ name: z.ZodString;
11
+ starts_at: z.ZodString;
12
+ ends_at: z.ZodString;
13
+ is_active: z.ZodBoolean;
14
+ completed_at: z.ZodString;
15
+ }, z.core.$strip>>;
16
+ pagination: z.ZodObject<{
17
+ has_next_page: z.ZodBoolean;
18
+ end_cursor: z.ZodString;
19
+ }, z.core.$strip>;
20
+ }, z.core.$strip>>;
21
+ //# sourceMappingURL=list-cycles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-cycles.d.ts","sourceRoot":"","sources":["../../src/tools/list-cycles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;kBAkDrB,CAAC"}
@@ -0,0 +1,45 @@
1
+ import { graphql } from '../linear-api.js';
2
+ import { ToolError, defineTool } from '@opentabs-dev/plugin-sdk';
3
+ import { z } from 'zod';
4
+ import { cycleSchema, mapCycle, paginationSchema } from './schemas.js';
5
+ export const listCycles = defineTool({
6
+ name: 'list_cycles',
7
+ displayName: 'List Cycles',
8
+ description: 'List cycles (sprints) for a team. Use this to find cycle IDs for creating or filtering issues.',
9
+ summary: 'List cycles for a team',
10
+ icon: 'rotate-cw',
11
+ group: 'Workflow',
12
+ input: z.object({
13
+ team_id: z.string().describe('Team UUID to list cycles for (use list_teams to find IDs)'),
14
+ limit: z.number().optional().describe('Maximum number of cycles to return (default 10, max 50)'),
15
+ after: z.string().optional().describe('Pagination cursor from a previous response'),
16
+ }),
17
+ output: z.object({
18
+ cycles: z.array(cycleSchema).describe('List of cycles ordered by start date'),
19
+ pagination: paginationSchema.describe('Pagination info for fetching more results'),
20
+ }),
21
+ handle: async (params) => {
22
+ const limit = Math.min(params.limit ?? 10, 50);
23
+ const data = await graphql(`query ListCycles($id: String!, $first: Int, $after: String) {
24
+ team(id: $id) {
25
+ cycles(first: $first, after: $after, orderBy: createdAt) {
26
+ nodes {
27
+ id number name startsAt endsAt isActive completedAt
28
+ }
29
+ pageInfo { hasNextPage endCursor }
30
+ }
31
+ }
32
+ }`, { id: params.team_id, first: limit, after: params.after });
33
+ if (!data.team)
34
+ throw ToolError.notFound('Team not found');
35
+ const result = data.team.cycles;
36
+ return {
37
+ cycles: result.nodes.map(n => mapCycle(n)),
38
+ pagination: {
39
+ has_next_page: result.pageInfo?.hasNextPage ?? false,
40
+ end_cursor: result.pageInfo?.endCursor ?? '',
41
+ },
42
+ };
43
+ },
44
+ });
45
+ //# sourceMappingURL=list-cycles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-cycles.js","sourceRoot":"","sources":["../../src/tools/list-cycles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEvE,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;IACnC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,gGAAgG;IAC7G,OAAO,EAAE,wBAAwB;IACjC,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2DAA2D,CAAC;QACzF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yDAAyD,CAAC;QAChG,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4CAA4C,CAAC;KACpF,CAAC;IACF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,sCAAsC,CAAC;QAC7E,UAAU,EAAE,gBAAgB,CAAC,QAAQ,CAAC,2CAA2C,CAAC;KACnF,CAAC;IACF,MAAM,EAAE,KAAK,EAAC,MAAM,EAAC,EAAE;QACrB,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QAE/C,MAAM,IAAI,GAAG,MAAM,OAAO,CAQxB;;;;;;;;;QASE,EACF,EAAE,EAAE,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAC1D,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,MAAM,SAAS,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;QAC3D,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;QAChC,OAAO;YACL,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAmC,CAAC,CAAC;YAC5E,UAAU,EAAE;gBACV,aAAa,EAAE,MAAM,CAAC,QAAQ,EAAE,WAAW,IAAI,KAAK;gBACpD,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,SAAS,IAAI,EAAE;aAC7C;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ export declare const listIssueRelations: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ issue_id: z.ZodString;
4
+ }, z.core.$strip>, z.ZodObject<{
5
+ relations: z.ZodArray<z.ZodObject<{
6
+ id: z.ZodString;
7
+ type: z.ZodString;
8
+ related_issue: z.ZodObject<{
9
+ id: z.ZodString;
10
+ identifier: z.ZodString;
11
+ title: z.ZodString;
12
+ state: z.ZodString;
13
+ }, z.core.$strip>;
14
+ }, z.core.$strip>>;
15
+ }, z.core.$strip>>;
16
+ //# sourceMappingURL=list-issue-relations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-issue-relations.d.ts","sourceRoot":"","sources":["../../src/tools/list-issue-relations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAyBxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;kBAiE7B,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { graphql } from '../linear-api.js';
2
+ import { ToolError, defineTool } from '@opentabs-dev/plugin-sdk';
3
+ import { z } from 'zod';
4
+ const relationSchema = z.object({
5
+ id: z.string().describe('Relation UUID'),
6
+ type: z.string().describe('Relation type (blocks, blocked_by, related, duplicate)'),
7
+ related_issue: z.object({
8
+ id: z.string().describe('Related issue UUID'),
9
+ identifier: z.string().describe('Human-readable identifier (e.g. ENG-123)'),
10
+ title: z.string().describe('Issue title'),
11
+ state: z.string().describe('Current workflow state name'),
12
+ }),
13
+ });
14
+ const RELATION_FIELDS = `
15
+ relations {
16
+ nodes {
17
+ id type
18
+ relatedIssue {
19
+ id identifier title
20
+ state { name }
21
+ }
22
+ }
23
+ }
24
+ `;
25
+ export const listIssueRelations = defineTool({
26
+ name: 'list_issue_relations',
27
+ displayName: 'List Issue Relations',
28
+ description: 'List relations (blocks, is blocked by, relates to, duplicate of) for a Linear issue.',
29
+ summary: 'List issue dependencies and relations',
30
+ icon: 'link',
31
+ group: 'Issues',
32
+ input: z.object({
33
+ issue_id: z.string().describe('Issue UUID or human-readable identifier (e.g. "ENG-123")'),
34
+ }),
35
+ output: z.object({
36
+ relations: z.array(relationSchema).describe('List of relations for the issue'),
37
+ }),
38
+ handle: async (params) => {
39
+ const isIdentifier = /^[A-Z]+-\d+$/i.test(params.issue_id);
40
+ if (isIdentifier) {
41
+ const data = await graphql(`query ListIssueRelationsByIdentifier($identifier: String!) {
42
+ searchIssues(term: $identifier, first: 1) {
43
+ nodes {
44
+ ${RELATION_FIELDS}
45
+ }
46
+ }
47
+ }`, { identifier: params.issue_id });
48
+ const node = data.searchIssues?.nodes?.[0];
49
+ if (!node)
50
+ throw ToolError.notFound(`Issue not found: ${params.issue_id}`);
51
+ return {
52
+ relations: (node.relations?.nodes ?? []).map(mapRelation),
53
+ };
54
+ }
55
+ const data = await graphql(`query ListIssueRelations($id: String!) {
56
+ issue(id: $id) {
57
+ ${RELATION_FIELDS}
58
+ }
59
+ }`, { id: params.issue_id });
60
+ if (!data.issue)
61
+ throw ToolError.notFound('Issue not found');
62
+ return {
63
+ relations: (data.issue.relations?.nodes ?? []).map(mapRelation),
64
+ };
65
+ },
66
+ });
67
+ const mapRelation = (r) => ({
68
+ id: r?.id ?? '',
69
+ type: r?.type ?? '',
70
+ related_issue: {
71
+ id: r?.relatedIssue?.id ?? '',
72
+ identifier: r?.relatedIssue?.identifier ?? '',
73
+ title: r?.relatedIssue?.title ?? '',
74
+ state: r?.relatedIssue?.state?.name ?? '',
75
+ },
76
+ });
77
+ //# sourceMappingURL=list-issue-relations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-issue-relations.js","sourceRoot":"","sources":["../../src/tools/list-issue-relations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9B,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;IACxC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;IACnF,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC;QACtB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oBAAoB,CAAC;QAC7C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;QAC3E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,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W,CAAC;aAC1D,CAAC;QACJ,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,OAAO,CAOxB;;YAEM,eAAe;;QAEnB,EACF,EAAE,EAAE,EAAE,MAAM,CAAC,QAAQ,EAAE,CACxB,CAAC;QAEF,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,MAAM,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;QAE7D,OAAO;YACL,SAAS,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC;SAChE,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAaH,MAAM,WAAW,GAAG,CAAC,CAAc,EAAE,EAAE,CAAC,CAAC;IACvC,EAAE,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE;IACf,IAAI,EAAE,CAAC,EAAE,IAAI,IAAI,EAAE;IACnB,aAAa,EAAE;QACb,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE;QAC7B,UAAU,EAAE,CAAC,EAAE,YAAY,EAAE,UAAU,IAAI,EAAE;QAC7C,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,KAAK,IAAI,EAAE;QACnC,KAAK,EAAE,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,IAAI,EAAE;KAC1C;CACF,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const listLabels: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
3
+ labels: z.ZodArray<z.ZodObject<{
4
+ id: z.ZodString;
5
+ name: z.ZodString;
6
+ color: z.ZodString;
7
+ description: z.ZodString;
8
+ is_group: z.ZodBoolean;
9
+ parent_name: z.ZodString;
10
+ }, z.core.$strip>>;
11
+ }, z.core.$strip>>;
12
+ //# sourceMappingURL=list-labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-labels.d.ts","sourceRoot":"","sources":["../../src/tools/list-labels.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,UAAU;;;;;;;;;kBA8BrB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { graphql } from '../linear-api.js';
2
+ import { defineTool } from '@opentabs-dev/plugin-sdk';
3
+ import { z } from 'zod';
4
+ import { labelSchema, mapLabel } from './schemas.js';
5
+ export const listLabels = defineTool({
6
+ name: 'list_labels',
7
+ displayName: 'List Labels',
8
+ description: 'List all issue labels in the Linear workspace. Use this to find label IDs for creating or filtering issues.',
9
+ summary: 'List all issue labels',
10
+ icon: 'tag',
11
+ group: 'Workflow',
12
+ input: z.object({}),
13
+ output: z.object({
14
+ labels: z.array(labelSchema).describe('List of issue labels'),
15
+ }),
16
+ handle: async () => {
17
+ const data = await graphql(`query ListLabels {
18
+ issueLabels {
19
+ nodes {
20
+ id name color description isGroup
21
+ parent { name }
22
+ }
23
+ }
24
+ }`);
25
+ return {
26
+ labels: data.issueLabels.nodes.map(n => mapLabel(n)),
27
+ };
28
+ },
29
+ });
30
+ //# sourceMappingURL=list-labels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-labels.js","sourceRoot":"","sources":["../../src/tools/list-labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAC;IACnC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EACT,6GAA6G;IAC/G,OAAO,EAAE,uBAAuB;IAChC,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC;KAC9D,CAAC;IACF,MAAM,EAAE,KAAK,IAAI,EAAE;QACjB,MAAM,IAAI,GAAG,MAAM,OAAO,CAGxB;;;;;;;QAOE,CACH,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAmC,CAAC,CAAC;SACvF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const listProjects: import("@opentabs-dev/plugin-sdk").ToolDefinition<z.ZodObject<{
3
+ limit: z.ZodOptional<z.ZodNumber>;
4
+ after: z.ZodOptional<z.ZodString>;
5
+ }, z.core.$strip>, z.ZodObject<{
6
+ projects: z.ZodArray<z.ZodObject<{
7
+ id: z.ZodString;
8
+ name: z.ZodString;
9
+ description: z.ZodString;
10
+ state: z.ZodString;
11
+ lead_name: z.ZodString;
12
+ target_date: z.ZodString;
13
+ start_date: z.ZodString;
14
+ url: z.ZodString;
15
+ created_at: z.ZodString;
16
+ updated_at: z.ZodString;
17
+ }, z.core.$strip>>;
18
+ pagination: z.ZodObject<{
19
+ has_next_page: z.ZodBoolean;
20
+ end_cursor: z.ZodString;
21
+ }, z.core.$strip>;
22
+ }, z.core.$strip>>;
23
+ //# sourceMappingURL=list-projects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-projects.d.ts","sourceRoot":"","sources":["../../src/tools/list-projects.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;kBAgDvB,CAAC"}