@alasano/pi-linear 0.1.1 → 0.2.0

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 (35) hide show
  1. package/README.md +14 -2
  2. package/assets/linear_list_issues.png +0 -0
  3. package/assets/screenshot.png +0 -0
  4. package/extensions/renderers/comments.ts +323 -0
  5. package/extensions/renderers/common.ts +305 -0
  6. package/extensions/renderers/documents.ts +326 -0
  7. package/extensions/renderers/initiatives.ts +344 -0
  8. package/extensions/renderers/issue-labels.ts +294 -0
  9. package/extensions/renderers/issue-relations.ts +318 -0
  10. package/extensions/renderers/issue-statuses.ts +199 -0
  11. package/extensions/renderers/issues.ts +373 -0
  12. package/extensions/renderers/milestones.ts +294 -0
  13. package/extensions/renderers/project-labels.ts +279 -0
  14. package/extensions/renderers/project-relations.ts +344 -0
  15. package/extensions/renderers/projects.ts +430 -0
  16. package/extensions/renderers/state.ts +35 -0
  17. package/extensions/renderers/teams.ts +246 -0
  18. package/extensions/renderers/users.ts +242 -0
  19. package/extensions/renderers/workspaces.ts +44 -0
  20. package/extensions/settings.ts +40 -7
  21. package/extensions/tools/comments.ts +17 -0
  22. package/extensions/tools/documents.ts +23 -0
  23. package/extensions/tools/initiatives.ts +24 -0
  24. package/extensions/tools/issue-labels.ts +17 -0
  25. package/extensions/tools/issue-relations.ts +17 -0
  26. package/extensions/tools/issue-statuses.ts +6 -0
  27. package/extensions/tools/issues.ts +29 -0
  28. package/extensions/tools/milestones.ts +18 -0
  29. package/extensions/tools/project-labels.ts +17 -0
  30. package/extensions/tools/project-relations.ts +17 -0
  31. package/extensions/tools/projects.ts +24 -0
  32. package/extensions/tools/teams.ts +10 -0
  33. package/extensions/tools/users.ts +10 -0
  34. package/extensions/tools/workspaces.ts +6 -0
  35. package/package.json +1 -1
@@ -5,6 +5,12 @@ import { PaginationParams, FilterParam } from '../params';
5
5
  import { TEAM_SELECTION } from '../selections';
6
6
  import type { LinearTeam, JsonObject } from '../types';
7
7
  import { compactObject, asObject } from '../util';
8
+ import {
9
+ renderLinearGetTeamCall,
10
+ renderLinearTeamListCall,
11
+ renderLinearTeamListResult,
12
+ renderLinearTeamResult,
13
+ } from '../renderers/teams';
8
14
 
9
15
  export function teamTools() {
10
16
  return [
@@ -17,6 +23,7 @@ export function teamTools() {
17
23
  ...PaginationParams,
18
24
  ...FilterParam,
19
25
  }),
26
+ renderCall: renderLinearTeamListCall,
20
27
  async execute(_toolCallId, params, signal, _onUpdate, ctx) {
21
28
  return withLinearAuth(ctx, signal, async (apiKey) => {
22
29
  const variables = compactObject({
@@ -72,6 +79,7 @@ export function teamTools() {
72
79
  };
73
80
  });
74
81
  },
82
+ renderResult: renderLinearTeamListResult,
75
83
  }),
76
84
  defineTool({
77
85
  name: 'linear_get_team',
@@ -80,6 +88,7 @@ export function teamTools() {
80
88
  parameters: Type.Object({
81
89
  teamId: Type.String(),
82
90
  }),
91
+ renderCall: renderLinearGetTeamCall,
83
92
  async execute(_toolCallId, params, signal, _onUpdate, ctx) {
84
93
  return withLinearAuth(ctx, signal, async (apiKey) => {
85
94
  const data = await linearGraphQL<{ team: JsonObject | null }>(
@@ -100,6 +109,7 @@ export function teamTools() {
100
109
  };
101
110
  });
102
111
  },
112
+ renderResult: renderLinearTeamResult('Team'),
103
113
  }),
104
114
  ];
105
115
  }
@@ -5,6 +5,12 @@ import { PaginationParams, FilterParam, SortParam } from '../params';
5
5
  import { USER_SELECTION } from '../selections';
6
6
  import type { JsonObject } from '../types';
7
7
  import { compactObject, asObject, asObjectArray } from '../util';
8
+ import {
9
+ renderLinearGetUserCall,
10
+ renderLinearUserListCall,
11
+ renderLinearUserListResult,
12
+ renderLinearUserResult,
13
+ } from '../renderers/users';
8
14
 
9
15
  export function userTools() {
10
16
  return [
@@ -18,6 +24,7 @@ export function userTools() {
18
24
  ...SortParam,
19
25
  includeDisabled: Type.Optional(Type.Boolean()),
20
26
  }),
27
+ renderCall: renderLinearUserListCall,
21
28
  async execute(_toolCallId, params, signal, _onUpdate, ctx) {
22
29
  return withLinearAuth(ctx, signal, async (apiKey) => {
23
30
  const variables = compactObject({
@@ -74,6 +81,7 @@ export function userTools() {
74
81
  };
75
82
  });
76
83
  },
84
+ renderResult: renderLinearUserListResult,
77
85
  }),
78
86
  defineTool({
79
87
  name: 'linear_get_user',
@@ -82,6 +90,7 @@ export function userTools() {
82
90
  parameters: Type.Object({
83
91
  userId: Type.String(),
84
92
  }),
93
+ renderCall: renderLinearGetUserCall,
85
94
  async execute(_toolCallId, params, signal, _onUpdate, ctx) {
86
95
  return withLinearAuth(ctx, signal, async (apiKey) => {
87
96
  const data = await linearGraphQL<{ user: JsonObject | null }>(
@@ -102,6 +111,7 @@ export function userTools() {
102
111
  };
103
112
  });
104
113
  },
114
+ renderResult: renderLinearUserResult,
105
115
  }),
106
116
  ];
107
117
  }
@@ -1,6 +1,10 @@
1
1
  import { defineTool } from '@mariozechner/pi-coding-agent';
2
2
  import { Type } from '@sinclair/typebox';
3
3
  import { switchWorkspace, type WorkspaceCredentials } from '../client';
4
+ import {
5
+ renderLinearSwitchWorkspaceCall,
6
+ renderLinearSwitchWorkspaceResult,
7
+ } from '../renderers/workspaces';
4
8
 
5
9
  export function workspaceTools(creds: WorkspaceCredentials) {
6
10
  const names = Object.keys(creds.workspaces);
@@ -16,6 +20,7 @@ export function workspaceTools(creds: WorkspaceCredentials) {
16
20
  description: `Workspace name to switch to. One of: ${names.join(', ')}`,
17
21
  }),
18
22
  }),
23
+ renderCall: renderLinearSwitchWorkspaceCall,
19
24
  async execute(_toolCallId, params, _signal, _onUpdate, _ctx) {
20
25
  const updated = await switchWorkspace(params.name);
21
26
  return {
@@ -28,6 +33,7 @@ export function workspaceTools(creds: WorkspaceCredentials) {
28
33
  details: { active: updated.activeWorkspace },
29
34
  };
30
35
  },
36
+ renderResult: renderLinearSwitchWorkspaceResult,
31
37
  }),
32
38
  ];
33
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alasano/pi-linear",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Linear integration for pi with 55+ tools, multi-workspace auth, and per-tool settings",
5
5
  "keywords": [
6
6
  "pi-package"