runline 0.11.2 → 0.11.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 (31) hide show
  1. package/dist/plugin/loader.js +5 -0
  2. package/dist/plugins/googleDocs/src/documents.js +91 -0
  3. package/dist/plugins/googleDocs/src/formatting.js +126 -0
  4. package/dist/plugins/googleDocs/src/images.js +66 -0
  5. package/dist/plugins/googleDocs/src/index.js +45 -1008
  6. package/dist/plugins/googleDocs/src/shared.js +110 -0
  7. package/dist/plugins/googleDocs/src/structure.js +392 -0
  8. package/dist/plugins/googleDocs/src/tables.js +390 -0
  9. package/dist/plugins/googleDocs/src/tabs.js +77 -0
  10. package/dist/plugins/googleDocs/src/text.js +313 -0
  11. package/dist/plugins/linear/src/attachments.js +36 -12
  12. package/dist/plugins/linear/src/comments.js +20 -8
  13. package/dist/plugins/linear/src/cycles.js +22 -8
  14. package/dist/plugins/linear/src/initiatives.js +59 -19
  15. package/dist/plugins/linear/src/issues.js +123 -41
  16. package/dist/plugins/linear/src/labels.js +31 -11
  17. package/dist/plugins/linear/src/organization.js +1 -1
  18. package/dist/plugins/linear/src/projects.js +171 -57
  19. package/dist/plugins/linear/src/shared.js +16 -5
  20. package/dist/plugins/linear/src/states.js +14 -6
  21. package/dist/plugins/linear/src/teams.js +35 -12
  22. package/dist/plugins/linear/src/users.js +7 -3
  23. package/dist/plugins/linear/src/views.js +29 -10
  24. package/dist/plugins/linear/src/webhooks.js +39 -13
  25. package/dist/plugins/salesforce/src/index.js +33 -219
  26. package/dist/plugins/salesforce/src/metadata.js +50 -0
  27. package/dist/plugins/salesforce/src/query.js +52 -0
  28. package/dist/plugins/salesforce/src/queryResult.js +4 -0
  29. package/dist/plugins/salesforce/src/shared.js +122 -0
  30. package/dist/plugins/salesforce/src/sobjects.js +152 -0
  31. package/package.json +1 -1
@@ -1,29 +1,59 @@
1
1
  import * as t from "typebox";
2
- import { COMMENT_FIELDS, ISSUE_FIELDS, ISSUE_LITE, LIST_INPUT_SCHEMA, assertIssueInScope, buildConnArgs, ensureScopeLabelsOnCreateOrReplace, forbidScopeLabelRemoval, gql, issueHasScope, key, mergeIssueScopeFilter, } from "./shared.js";
2
+ import { assertIssueInScope, buildConnArgs, COMMENT_FIELDS, ensureScopeLabelsOnCreateOrReplace, forbidScopeLabelRemoval, gql, ISSUE_FIELDS, ISSUE_LITE, issueHasScope, key, LIST_INPUT_SCHEMA, mergeIssueScopeFilter, } from "./shared.js";
3
3
  export function registerIssueActions(rl) {
4
4
  rl.registerAction("issue.create", {
5
5
  description: "Create an issue. teamId is required; title is required unless a template is applied.",
6
6
  inputSchema: t.Object({
7
- teamId: t.String({ description: "The identifier of the team associated with the issue" }),
7
+ teamId: t.String({
8
+ description: "The identifier of the team associated with the issue",
9
+ }),
8
10
  title: t.String({ description: "The title of the issue" }),
9
11
  description: t.Optional(t.String({ description: "The issue description in markdown format" })),
10
- assigneeId: t.Optional(t.String({ description: "The identifier of the user to assign the issue to" })),
11
- priority: t.Optional(t.Number({ description: "Priority. 0=No priority, 1=Urgent, 2=High, 3=Medium, 4=Low" })),
12
+ assigneeId: t.Optional(t.String({
13
+ description: "The identifier of the user to assign the issue to",
14
+ })),
15
+ priority: t.Optional(t.Number({
16
+ description: "Priority. 0=No priority, 1=Urgent, 2=High, 3=Medium, 4=Low",
17
+ })),
12
18
  stateId: t.Optional(t.String({ description: "The team workflow state of the issue" })),
13
- labelIds: t.Optional(t.Array(t.Unknown(), { description: "The identifiers of the issue labels associated with this ticket" })),
14
- parentId: t.Optional(t.String({ description: "The identifier of the parent issue. UUID or issue identifier (e.g., 'LIN-123')" })),
19
+ labelIds: t.Optional(t.Array(t.Unknown(), {
20
+ description: "The identifiers of the issue labels associated with this ticket",
21
+ })),
22
+ parentId: t.Optional(t.String({
23
+ description: "The identifier of the parent issue. UUID or issue identifier (e.g., 'LIN-123')",
24
+ })),
15
25
  projectId: t.Optional(t.String({ description: "The project associated with the issue" })),
16
- projectMilestoneId: t.Optional(t.String({ description: "The project milestone associated with the issue" })),
26
+ projectMilestoneId: t.Optional(t.String({
27
+ description: "The project milestone associated with the issue",
28
+ })),
17
29
  cycleId: t.Optional(t.String({ description: "The cycle associated with the issue" })),
18
- estimate: t.Optional(t.Number({ description: "The estimated complexity of the issue (Int)" })),
19
- dueDate: t.Optional(t.String({ description: "The date at which the issue is due (TimelessDate, YYYY-MM-DD)" })),
20
- subscriberIds: t.Optional(t.Array(t.Unknown(), { description: "The identifiers of the users subscribing to this ticket" })),
21
- templateId: t.Optional(t.String({ description: "The identifier of a template the issue should be created from" })),
22
- useDefaultTemplate: t.Optional(t.Boolean({ description: "Apply the team's default template based on the user's membership" })),
23
- sortOrder: t.Optional(t.Number({ description: "The position of the issue related to other issues (Float)" })),
24
- subIssueSortOrder: t.Optional(t.Number({ description: "The position of the issue in its parent's sub-issue list (Float)" })),
25
- releaseIds: t.Optional(t.Array(t.Unknown(), { description: "The identifiers of the releases to associate with this issue" })),
26
- id: t.Optional(t.String({ description: "The identifier in UUID v4 format. If none is provided, the backend will generate one" })),
30
+ estimate: t.Optional(t.Number({
31
+ description: "The estimated complexity of the issue (Int)",
32
+ })),
33
+ dueDate: t.Optional(t.String({
34
+ description: "The date at which the issue is due (TimelessDate, YYYY-MM-DD)",
35
+ })),
36
+ subscriberIds: t.Optional(t.Array(t.Unknown(), {
37
+ description: "The identifiers of the users subscribing to this ticket",
38
+ })),
39
+ templateId: t.Optional(t.String({
40
+ description: "The identifier of a template the issue should be created from",
41
+ })),
42
+ useDefaultTemplate: t.Optional(t.Boolean({
43
+ description: "Apply the team's default template based on the user's membership",
44
+ })),
45
+ sortOrder: t.Optional(t.Number({
46
+ description: "The position of the issue related to other issues (Float)",
47
+ })),
48
+ subIssueSortOrder: t.Optional(t.Number({
49
+ description: "The position of the issue in its parent's sub-issue list (Float)",
50
+ })),
51
+ releaseIds: t.Optional(t.Array(t.Unknown(), {
52
+ description: "The identifiers of the releases to associate with this issue",
53
+ })),
54
+ id: t.Optional(t.String({
55
+ description: "The identifier in UUID v4 format. If none is provided, the backend will generate one",
56
+ })),
27
57
  }),
28
58
  async execute(input, ctx) {
29
59
  const fields = { ...input };
@@ -34,7 +64,11 @@ export function registerIssueActions(rl) {
34
64
  });
35
65
  rl.registerAction("issue.get", {
36
66
  description: "Get an issue by ID or identifier (e.g. 'THE-154')",
37
- inputSchema: t.Object({ issueId: t.String() }),
67
+ inputSchema: t.Object({
68
+ issueId: t.String({
69
+ description: "Required parameter name. Pass either the Linear issue UUID or issue identifier, e.g. 'THE-154'.",
70
+ }),
71
+ }),
38
72
  async execute(input, ctx) {
39
73
  const data = await gql(key(ctx), `query($id: String!) { issue(id: $id) { ${ISSUE_FIELDS} } }`, { id: input.issueId });
40
74
  const issue = data.issue;
@@ -68,29 +102,65 @@ export function registerIssueActions(rl) {
68
102
  rl.registerAction("issue.update", {
69
103
  description: "Update an issue. All fields optional; only provided fields are updated.",
70
104
  inputSchema: t.Object({
71
- issueId: t.String({ description: "The identifier of the issue to update" }),
105
+ issueId: t.String({
106
+ description: "The identifier of the issue to update",
107
+ }),
72
108
  title: t.Optional(t.String({ description: "The issue title" })),
73
109
  description: t.Optional(t.String({ description: "The issue description in markdown format" })),
74
- assigneeId: t.Optional(t.String({ description: "The identifier of the user to assign the issue to" })),
110
+ assigneeId: t.Optional(t.String({
111
+ description: "The identifier of the user to assign the issue to",
112
+ })),
75
113
  stateId: t.Optional(t.String({ description: "The team workflow state of the issue" })),
76
- priority: t.Optional(t.Number({ description: "Priority. 0=No priority, 1=Urgent, 2=High, 3=Medium, 4=Low" })),
77
- labelIds: t.Optional(t.Array(t.Unknown(), { description: "The identifiers of the issue labels associated with this ticket (replaces all)" })),
78
- addedLabelIds: t.Optional(t.Array(t.Unknown(), { description: "The identifiers of issue labels to be added to this issue" })),
79
- removedLabelIds: t.Optional(t.Array(t.Unknown(), { description: "The identifiers of issue labels to be removed from this issue" })),
114
+ priority: t.Optional(t.Number({
115
+ description: "Priority. 0=No priority, 1=Urgent, 2=High, 3=Medium, 4=Low",
116
+ })),
117
+ labelIds: t.Optional(t.Array(t.Unknown(), {
118
+ description: "The identifiers of the issue labels associated with this ticket (replaces all)",
119
+ })),
120
+ addedLabelIds: t.Optional(t.Array(t.Unknown(), {
121
+ description: "The identifiers of issue labels to be added to this issue",
122
+ })),
123
+ removedLabelIds: t.Optional(t.Array(t.Unknown(), {
124
+ description: "The identifiers of issue labels to be removed from this issue",
125
+ })),
80
126
  projectId: t.Optional(t.String({ description: "The project associated with the issue" })),
81
- projectMilestoneId: t.Optional(t.String({ description: "The project milestone associated with the issue" })),
127
+ projectMilestoneId: t.Optional(t.String({
128
+ description: "The project milestone associated with the issue",
129
+ })),
82
130
  cycleId: t.Optional(t.String({ description: "The cycle associated with the issue" })),
83
- parentId: t.Optional(t.String({ description: "The identifier of the parent issue. UUID or issue identifier (e.g., 'LIN-123')" })),
84
- teamId: t.Optional(t.String({ description: "The identifier of the team associated with the issue (move issue to a different team)" })),
85
- estimate: t.Optional(t.Number({ description: "The estimated complexity of the issue (Int)" })),
86
- dueDate: t.Optional(t.String({ description: "The date at which the issue is due (TimelessDate, YYYY-MM-DD)" })),
87
- subscriberIds: t.Optional(t.Array(t.Unknown(), { description: "The identifiers of the users subscribing to this ticket" })),
88
- sortOrder: t.Optional(t.Number({ description: "The position of the issue related to other issues (Float)" })),
89
- subIssueSortOrder: t.Optional(t.Number({ description: "The position of the issue in its parent's sub-issue list (Float)" })),
90
- snoozedUntilAt: t.Optional(t.String({ description: "The time until which the issue will be snoozed in Triage view (DateTime)" })),
91
- releaseIds: t.Optional(t.Array(t.Unknown(), { description: "The identifiers of the releases associated with this issue (replaces all)" })),
92
- addedReleaseIds: t.Optional(t.Array(t.Unknown(), { description: "The identifiers of releases to be added to this issue" })),
93
- removedReleaseIds: t.Optional(t.Array(t.Unknown(), { description: "The identifiers of releases to be removed from this issue" })),
131
+ parentId: t.Optional(t.String({
132
+ description: "The identifier of the parent issue. UUID or issue identifier (e.g., 'LIN-123')",
133
+ })),
134
+ teamId: t.Optional(t.String({
135
+ description: "The identifier of the team associated with the issue (move issue to a different team)",
136
+ })),
137
+ estimate: t.Optional(t.Number({
138
+ description: "The estimated complexity of the issue (Int)",
139
+ })),
140
+ dueDate: t.Optional(t.String({
141
+ description: "The date at which the issue is due (TimelessDate, YYYY-MM-DD)",
142
+ })),
143
+ subscriberIds: t.Optional(t.Array(t.Unknown(), {
144
+ description: "The identifiers of the users subscribing to this ticket",
145
+ })),
146
+ sortOrder: t.Optional(t.Number({
147
+ description: "The position of the issue related to other issues (Float)",
148
+ })),
149
+ subIssueSortOrder: t.Optional(t.Number({
150
+ description: "The position of the issue in its parent's sub-issue list (Float)",
151
+ })),
152
+ snoozedUntilAt: t.Optional(t.String({
153
+ description: "The time until which the issue will be snoozed in Triage view (DateTime)",
154
+ })),
155
+ releaseIds: t.Optional(t.Array(t.Unknown(), {
156
+ description: "The identifiers of the releases associated with this issue (replaces all)",
157
+ })),
158
+ addedReleaseIds: t.Optional(t.Array(t.Unknown(), {
159
+ description: "The identifiers of releases to be added to this issue",
160
+ })),
161
+ removedReleaseIds: t.Optional(t.Array(t.Unknown(), {
162
+ description: "The identifiers of releases to be removed from this issue",
163
+ })),
94
164
  trashed: t.Optional(t.Boolean({ description: "Whether the issue has been trashed" })),
95
165
  }),
96
166
  async execute(input, ctx) {
@@ -144,10 +214,16 @@ export function registerIssueActions(rl) {
144
214
  description: "Search issues by text query using full-text and vector search. Rate-limited to 30 req/min.",
145
215
  inputSchema: t.Object({
146
216
  term: t.String({ description: "Search string to look for" }),
147
- limit: t.Optional(t.Number({ description: "Max results (forward pagination, default 50)" })),
217
+ limit: t.Optional(t.Number({
218
+ description: "Max results (forward pagination, default 50)",
219
+ })),
148
220
  filter: t.Optional(t.Object({}, { description: "Optional IssueFilter" })),
149
- includeComments: t.Optional(t.Boolean({ description: "Should associated comments be searched (default false)" })),
150
- includeArchived: t.Optional(t.Boolean({ description: "Should archived resources be included (default false)" })),
221
+ includeComments: t.Optional(t.Boolean({
222
+ description: "Should associated comments be searched (default false)",
223
+ })),
224
+ includeArchived: t.Optional(t.Boolean({
225
+ description: "Should archived resources be included (default false)",
226
+ })),
151
227
  teamId: t.Optional(t.String({ description: "UUID of a team to boost in search results" })),
152
228
  orderBy: t.Optional(t.String({ description: "PaginationOrderBy: createdAt | updatedAt" })),
153
229
  after: t.Optional(t.String({ description: "Cursor for forward pagination" })),
@@ -237,9 +313,15 @@ export function registerIssueActions(rl) {
237
313
  rl.registerAction("issue.addLink", {
238
314
  description: "Create a relation between two issues.",
239
315
  inputSchema: t.Object({
240
- issueId: t.String({ description: "The identifier of the issue that is related to another issue. UUID or issue identifier (e.g., 'LIN-123')" }),
241
- relatedIssueId: t.String({ description: "The identifier of the related issue. UUID or issue identifier (e.g., 'LIN-123')" }),
242
- type: t.String({ description: "IssueRelationType: blocks | duplicate | related | similar" }),
316
+ issueId: t.String({
317
+ description: "The identifier of the issue that is related to another issue. UUID or issue identifier (e.g., 'LIN-123')",
318
+ }),
319
+ relatedIssueId: t.String({
320
+ description: "The identifier of the related issue. UUID or issue identifier (e.g., 'LIN-123')",
321
+ }),
322
+ type: t.String({
323
+ description: "IssueRelationType: blocks | duplicate | related | similar",
324
+ }),
243
325
  }),
244
326
  async execute(input, ctx) {
245
327
  const fields = input;
@@ -1,5 +1,5 @@
1
1
  import * as t from "typebox";
2
- import { LABEL_FIELDS, bindGetAction, bindListAction, gql, key, requireUnscoped } from "./shared.js";
2
+ import { bindGetAction, bindListAction, gql, key, LABEL_FIELDS, requireUnscoped, } from "./shared.js";
3
3
  export function registerLabelActions(rl) {
4
4
  const listAction = bindListAction(rl);
5
5
  const getAction = bindGetAction(rl);
@@ -9,14 +9,24 @@ export function registerLabelActions(rl) {
9
9
  description: "Create a label. Omit teamId for a workspace-level label.",
10
10
  inputSchema: t.Object({
11
11
  name: t.String({ description: "The name of the label" }),
12
- teamId: t.Optional(t.String({ description: "The team associated with the label. If omitted, the label is workspace-scoped" })),
12
+ teamId: t.Optional(t.String({
13
+ description: "The team associated with the label. If omitted, the label is workspace-scoped",
14
+ })),
13
15
  color: t.Optional(t.String({ description: "The color of the label (hex)" })),
14
16
  description: t.Optional(t.String({ description: "The description of the label" })),
15
- parentId: t.Optional(t.String({ description: "The identifier of the parent label (group label)" })),
17
+ parentId: t.Optional(t.String({
18
+ description: "The identifier of the parent label (group label)",
19
+ })),
16
20
  isGroup: t.Optional(t.Boolean({ description: "Whether the label is a group" })),
17
- retiredAt: t.Optional(t.String({ description: "The time at which the label was retired (DateTime). Set to null to restore a retired label" })),
18
- id: t.Optional(t.String({ description: "The identifier in UUID v4 format. If none is provided, the backend will generate one" })),
19
- replaceTeamLabels: t.Optional(t.Boolean({ description: "Replace all team-specific labels with the same name with this newly created workspace label (default false)" })),
21
+ retiredAt: t.Optional(t.String({
22
+ description: "The time at which the label was retired (DateTime). Set to null to restore a retired label",
23
+ })),
24
+ id: t.Optional(t.String({
25
+ description: "The identifier in UUID v4 format. If none is provided, the backend will generate one",
26
+ })),
27
+ replaceTeamLabels: t.Optional(t.Boolean({
28
+ description: "Replace all team-specific labels with the same name with this newly created workspace label (default false)",
29
+ })),
20
30
  }),
21
31
  async execute(input, ctx) {
22
32
  requireUnscoped(ctx, "label.create");
@@ -34,8 +44,12 @@ export function registerLabelActions(rl) {
34
44
  description: t.Optional(t.String({ description: "The description of the label" })),
35
45
  parentId: t.Optional(t.String({ description: "The identifier of the parent label" })),
36
46
  isGroup: t.Optional(t.Boolean({ description: "Whether the label is a group" })),
37
- retiredAt: t.Optional(t.String({ description: "The time at which the label was retired (DateTime). Set to null to restore a retired label" })),
38
- replaceTeamLabels: t.Optional(t.Boolean({ description: "Replace all team-specific labels with the same name with this updated workspace label (default false)" })),
47
+ retiredAt: t.Optional(t.String({
48
+ description: "The time at which the label was retired (DateTime). Set to null to restore a retired label",
49
+ })),
50
+ replaceTeamLabels: t.Optional(t.Boolean({
51
+ description: "Replace all team-specific labels with the same name with this updated workspace label (default false)",
52
+ })),
39
53
  }),
40
54
  async execute(input, ctx) {
41
55
  requireUnscoped(ctx, "label.update");
@@ -46,7 +60,9 @@ export function registerLabelActions(rl) {
46
60
  });
47
61
  rl.registerAction("label.delete", {
48
62
  description: "Delete a label.",
49
- inputSchema: t.Object({ id: t.String({ description: "The identifier of the label to delete" }) }),
63
+ inputSchema: t.Object({
64
+ id: t.String({ description: "The identifier of the label to delete" }),
65
+ }),
50
66
  async execute(input, ctx) {
51
67
  requireUnscoped(ctx, "label.delete");
52
68
  const data = await gql(key(ctx), `mutation($id: String!) { issueLabelDelete(id: $id) { success } }`, { id: input.id });
@@ -55,7 +71,9 @@ export function registerLabelActions(rl) {
55
71
  });
56
72
  rl.registerAction("label.retire", {
57
73
  description: "Retire a label. Retired labels remain visible but cannot be applied to new issues.",
58
- inputSchema: t.Object({ id: t.String({ description: "The identifier of the label to retire" }) }),
74
+ inputSchema: t.Object({
75
+ id: t.String({ description: "The identifier of the label to retire" }),
76
+ }),
59
77
  async execute(input, ctx) {
60
78
  requireUnscoped(ctx, "label.retire");
61
79
  const data = await gql(key(ctx), `mutation($id: String!) { issueLabelRetire(id: $id) { success issueLabel { ${LABEL_FIELDS} } } }`, { id: input.id });
@@ -64,7 +82,9 @@ export function registerLabelActions(rl) {
64
82
  });
65
83
  rl.registerAction("label.restore", {
66
84
  description: "Restore a previously retired label.",
67
- inputSchema: t.Object({ id: t.String({ description: "The identifier of the label to restore" }) }),
85
+ inputSchema: t.Object({
86
+ id: t.String({ description: "The identifier of the label to restore" }),
87
+ }),
68
88
  async execute(input, ctx) {
69
89
  requireUnscoped(ctx, "label.restore");
70
90
  const data = await gql(key(ctx), `mutation($id: String!) { issueLabelRestore(id: $id) { success issueLabel { ${LABEL_FIELDS} } } }`, { id: input.id });
@@ -1,5 +1,5 @@
1
1
  import * as t from "typebox";
2
- import { ORG_FIELDS, gql, key, requireUnscoped } from "./shared.js";
2
+ import { gql, key, ORG_FIELDS, requireUnscoped } from "./shared.js";
3
3
  export function registerOrganizationActions(rl) {
4
4
  rl.registerAction("org.get", {
5
5
  description: "Get the authenticated workspace.",