runline 0.8.0 → 0.9.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 (34) hide show
  1. package/dist/commands/auth.js +4 -2
  2. package/dist/config/loader.d.ts +2 -4
  3. package/dist/config/loader.js +2 -1
  4. package/dist/core/engine.js +18 -13
  5. package/dist/index.d.ts +2 -2
  6. package/dist/plugin/api.d.ts +2 -9
  7. package/dist/plugin/api.js +1 -4
  8. package/dist/plugin/loader.js +41 -25
  9. package/dist/plugin/schema.d.ts +19 -0
  10. package/dist/plugin/schema.js +168 -0
  11. package/dist/plugin/types.d.ts +22 -8
  12. package/dist/plugins/gmail/src/index.js +14 -2
  13. package/dist/plugins/linear/src/attachments.js +87 -0
  14. package/dist/plugins/linear/src/comments.js +64 -0
  15. package/dist/plugins/linear/src/cycles.js +42 -0
  16. package/dist/plugins/linear/src/index.js +35 -1153
  17. package/dist/plugins/linear/src/initiatives.js +84 -0
  18. package/dist/plugins/linear/src/issues.js +267 -0
  19. package/dist/plugins/linear/src/labels.js +74 -0
  20. package/dist/plugins/linear/src/organization.js +13 -0
  21. package/dist/plugins/linear/src/projects.js +200 -0
  22. package/dist/plugins/linear/src/shared.js +234 -0
  23. package/dist/plugins/linear/src/states.js +41 -0
  24. package/dist/plugins/linear/src/teams.js +77 -0
  25. package/dist/plugins/linear/src/users.js +37 -0
  26. package/dist/plugins/linear/src/views.js +105 -0
  27. package/dist/plugins/linear/src/webhooks.js +61 -0
  28. package/dist/plugins/vercel/src/account.js +11 -0
  29. package/dist/plugins/vercel/src/deployments.js +79 -0
  30. package/dist/plugins/vercel/src/env.js +101 -0
  31. package/dist/plugins/vercel/src/index.js +27 -0
  32. package/dist/plugins/vercel/src/projects.js +29 -0
  33. package/dist/plugins/vercel/src/shared.js +73 -0
  34. package/package.json +3 -2
@@ -0,0 +1,64 @@
1
+ import * as t from "typebox";
2
+ import { COMMENT_FIELDS, assertCommentInScope, assertIssueInScope, gql, key, requireUnscoped } from "./shared.js";
3
+ export function registerCommentActions(rl) {
4
+ rl.registerAction("issue.addComment", {
5
+ description: "Add a comment to an issue. Pass parentId to nest as a reply.",
6
+ inputSchema: t.Object({
7
+ issueId: t.String({ description: "The issue to associate the comment with. UUID or issue identifier (e.g., 'LIN-123')" }),
8
+ body: t.String({ description: "The comment content in markdown format" }),
9
+ parentId: t.Optional(t.String({ description: "The parent comment under which to nest as a reply" })),
10
+ doNotSubscribeToIssue: t.Optional(t.Boolean({ description: "Prevent auto-subscription to the issue the comment is created on" })),
11
+ quotedText: t.Optional(t.String({ description: "The text that this comment references (inline comments)" })),
12
+ }),
13
+ async execute(input, ctx) {
14
+ const fields = input;
15
+ await assertIssueInScope(ctx, String(fields.issueId));
16
+ const data = await gql(key(ctx), `mutation($input: CommentCreateInput!) { commentCreate(input: $input) { success comment { ${COMMENT_FIELDS} } } }`, { input: fields });
17
+ return data.commentCreate?.comment;
18
+ },
19
+ });
20
+ rl.registerAction("comment.list", {
21
+ description: "List comments across the workspace. Disabled for scoped Linear connections; use issue.listComments instead.",
22
+ inputSchema: t.Object({ limit: t.Optional(t.Number()) }),
23
+ async execute(input, ctx) {
24
+ requireUnscoped(ctx, "comment.list");
25
+ const limit = input?.limit ?? 50;
26
+ const data = await gql(key(ctx), `query($first: Int) { comments(first: $first) { nodes { ${COMMENT_FIELDS} } pageInfo { hasNextPage endCursor } } }`, { first: limit });
27
+ return data.comments;
28
+ },
29
+ });
30
+ rl.registerAction("comment.get", {
31
+ description: "Get a comment by ID.",
32
+ inputSchema: t.Object({ id: t.String() }),
33
+ async execute(input, ctx) {
34
+ const id = input.id;
35
+ await assertCommentInScope(ctx, id);
36
+ const data = await gql(key(ctx), `query($id: String!) { comment(id: $id) { ${COMMENT_FIELDS} } }`, { id });
37
+ return data.comment;
38
+ },
39
+ });
40
+ rl.registerAction("comment.update", {
41
+ description: "Update a comment.",
42
+ inputSchema: t.Object({
43
+ id: t.String({ description: "The identifier of the comment to update" }),
44
+ body: t.Optional(t.String({ description: "The comment content in markdown format" })),
45
+ quotedText: t.Optional(t.String({ description: "The text that this comment references (inline comments)" })),
46
+ }),
47
+ async execute(input, ctx) {
48
+ const { id, ...fields } = input;
49
+ await assertCommentInScope(ctx, String(id));
50
+ const data = await gql(key(ctx), `mutation($id: String!, $input: CommentUpdateInput!) { commentUpdate(id: $id, input: $input) { success comment { ${COMMENT_FIELDS} } } }`, { id, input: fields });
51
+ return data.commentUpdate?.comment;
52
+ },
53
+ });
54
+ rl.registerAction("comment.delete", {
55
+ description: "Delete a comment.",
56
+ inputSchema: t.Object({ id: t.String() }),
57
+ async execute(input, ctx) {
58
+ const id = input.id;
59
+ await assertCommentInScope(ctx, id);
60
+ const data = await gql(key(ctx), `mutation($id: String!) { commentDelete(id: $id) { success } }`, { id });
61
+ return data.commentDelete;
62
+ },
63
+ });
64
+ }
@@ -0,0 +1,42 @@
1
+ import * as t from "typebox";
2
+ import { CYCLE_FIELDS, bindGetAction, bindListAction, gql, key, requireUnscoped } from "./shared.js";
3
+ export function registerCycleActions(rl) {
4
+ const listAction = bindListAction(rl);
5
+ const getAction = bindGetAction(rl);
6
+ listAction("cycle.list", "List cycles. Use filter for isActive/isNext/isPrevious.", "cycles", "CycleFilter", CYCLE_FIELDS);
7
+ getAction("cycle.get", "Get a cycle by ID.", "cycle", CYCLE_FIELDS);
8
+ rl.registerAction("cycle.create", {
9
+ description: "Create a cycle for a team.",
10
+ inputSchema: t.Object({
11
+ teamId: t.String({ description: "The team to associate the cycle with" }),
12
+ startsAt: t.String({ description: "The start time of the cycle (DateTime, ISO 8601)" }),
13
+ endsAt: t.String({ description: "The end time of the cycle (DateTime, ISO 8601)" }),
14
+ name: t.Optional(t.String({ description: "The custom name of the cycle" })),
15
+ description: t.Optional(t.String({ description: "The description of the cycle" })),
16
+ completedAt: t.Optional(t.String({ description: "The completion time of the cycle (DateTime). If null, the cycle hasn't been completed" })),
17
+ id: t.Optional(t.String({ description: "The identifier in UUID v4 format. If none is provided, the backend will generate one" })),
18
+ }),
19
+ async execute(input, ctx) {
20
+ requireUnscoped(ctx, "cycles.*");
21
+ const data = await gql(key(ctx), `mutation($input: CycleCreateInput!) { cycleCreate(input: $input) { success cycle { ${CYCLE_FIELDS} } } }`, { input: input });
22
+ return data.cycleCreate?.cycle;
23
+ },
24
+ });
25
+ rl.registerAction("cycle.update", {
26
+ description: "Update a cycle.",
27
+ inputSchema: t.Object({
28
+ id: t.String({ description: "The identifier of the cycle to update" }),
29
+ name: t.Optional(t.String({ description: "The custom name of the cycle" })),
30
+ description: t.Optional(t.String({ description: "The description of the cycle" })),
31
+ startsAt: t.Optional(t.String({ description: "The start time of the cycle (DateTime, ISO 8601)" })),
32
+ endsAt: t.Optional(t.String({ description: "The end time of the cycle (DateTime, ISO 8601)" })),
33
+ completedAt: t.Optional(t.String({ description: "The completion time of the cycle (DateTime). If null, the cycle hasn't been completed" })),
34
+ }),
35
+ async execute(input, ctx) {
36
+ requireUnscoped(ctx, "cycles.*");
37
+ const { id, ...fields } = input;
38
+ const data = await gql(key(ctx), `mutation($id: String!, $input: CycleUpdateInput!) { cycleUpdate(id: $id, input: $input) { success cycle { ${CYCLE_FIELDS} } } }`, { id, input: fields });
39
+ return data.cycleUpdate?.cycle;
40
+ },
41
+ });
42
+ }