@kana-ai/edgar-ext-linear 0.1.2 → 0.1.3

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.
@@ -1,15 +1,41 @@
1
- import { defineTool, done } from "@kana-ai/edgar-sdk";
2
- import { apiAccess } from "#api/client";
3
- import { assignTool, batchCardsTool, closeTool, commentTool, countSightingTool, createCardTool, descriptionTool, findCardsTool, handBackTool, moveTool, releaseFollowUpsTool, restoreTool, } from "#schemas/tools";
1
+ import { defineTool, done, permanentFailure, readBlock, retitled, skipped, } from "@kana-ai/edgar-sdk";
2
+ import { z } from "zod";
3
+ import { apiAccess, linear } from "#api/client";
4
+ import { assignTool, batchCardsTool, closeTool, commentTool, countSightingTool, createCardTool, descriptionTool, findCardsTool, handBackTool, markSeenTool, moveTool, parkTool, releaseFollowUpsTool, restoreTool, retitleTool, setPriorityTool, } from "#schemas/tools";
4
5
  import { assign, findAssignee, restoreAssignee } from "#tracker/assignee";
5
- import { batchCards, countSightingOn, createCard, findCards } from "#tracker/cards";
6
- import { postComment } from "#tracker/comments";
6
+ import { batchCards, countSightingOn, createCard, findCards, setPriority } from "#tracker/cards";
7
+ import { markSeen, postComment } from "#tracker/comments";
7
8
  import { findDescription, restoreDescription, updateDescription } from "#tracker/description";
8
9
  import { handBack } from "#tracker/hand-back";
9
- import { releaseFollowUps, transition } from "#tracker/transitions";
10
+ import { settingsOf } from "#tracker/states";
11
+ import { park, releaseFollowUps, transition, update } from "#tracker/transitions";
12
+ /** Gives a card that a feeder filed the title `retitled` makes of `text`, after `title_prefix` so the card stays in scope. Only the title changes: the block already keeps the feeder's title in `decided.filed_as`, and a new title alone starts no run again. A card a person wrote, or one already titled so, is `skipped`. */
13
+ async function retitle(ctx, card, text) {
14
+ const settings = settingsOf(ctx);
15
+ if (!settings.ok)
16
+ return settings.error;
17
+ const read = await linear(ctx, "query Title($id: String!) { issue(id: $id) { id title description } }", { id: card }, z.object({
18
+ issue: z
19
+ .object({ id: z.string(), title: z.string(), description: z.string().nullable() })
20
+ .nullable(),
21
+ }));
22
+ if (!read.ok)
23
+ return read.error;
24
+ const issue = read.value.issue;
25
+ if (issue === null)
26
+ return permanentFailure("not_found", `linear: no card ${card}`);
27
+ const block = readBlock(issue.description ?? "");
28
+ const prefix = settings.value.title_prefix;
29
+ const title = block.ok ? retitled(block.value, issue.title, text, prefix) : undefined;
30
+ if (title === undefined)
31
+ return skipped();
32
+ const written = await update(ctx, issue.id, { title });
33
+ return written.ok ? done({ id: card, title }) : written.error;
34
+ }
10
35
  /** Every tool of the Linear extension, by the name the manifest gives it. */
11
36
  export const tools = {
12
37
  comment: defineTool({
38
+ publishes: true,
13
39
  description: "Post a comment on a card, with an optional link on its own line",
14
40
  input: commentTool.input,
15
41
  output: commentTool.output,
@@ -34,20 +60,35 @@ export const tools = {
34
60
  },
35
61
  }),
36
62
  create_card: defineTool({
63
+ publishes: true,
37
64
  description: "File a card, or return the open card that holds its fingerprint",
38
65
  input: createCardTool.input,
39
66
  output: createCardTool.output,
40
67
  ...apiAccess,
41
68
  execute: async ({ spec, parent }, ctx) => await createCard(ctx, spec, parent),
42
69
  }),
70
+ park: defineTool({
71
+ description: "Park a card until another card's pull request merges: move it to intake and write waits_for into its block",
72
+ input: parkTool.input,
73
+ output: parkTool.output,
74
+ ...apiAccess,
75
+ execute: async ({ card, waits_for }, ctx) => await park(ctx, card, waits_for),
76
+ }),
43
77
  release_follow_ups: defineTool({
44
- description: "Move the cards that wait for a card's merged pull request to ready",
78
+ description: "Move the cards that wait for a card's pull request to ready once it merged, or with column waiting_on_person to a person once it closed with no merge",
45
79
  input: releaseFollowUpsTool.input,
46
80
  output: releaseFollowUpsTool.output,
47
81
  ...apiAccess,
48
- execute: async ({ card }, ctx) => await releaseFollowUps(ctx, card),
82
+ execute: async ({ card, column }, ctx) => await releaseFollowUps(ctx, card, column ?? "ready"),
49
83
  }),
50
84
  /** A retry with the same `seen_at` finds the sighting counted and writes nothing; with no `seen_at`, a retry whose first answer was lost counts it twice. */
85
+ set_priority: defineTool({
86
+ description: "Give a card the priority from EDGAR's analysis; skipped when the card has a priority already",
87
+ input: setPriorityTool.input,
88
+ output: setPriorityTool.output,
89
+ ...apiAccess,
90
+ execute: async ({ card, priority }, ctx) => await setPriority(ctx, card, priority),
91
+ }),
51
92
  count_sighting: defineTool({
52
93
  description: "Count one more sighting of the fault that an open card holds: raise occurrences and last_seen in its block; a card with no block is not written",
53
94
  input: countSightingTool.input,
@@ -77,8 +118,17 @@ export const tools = {
77
118
  ...apiAccess,
78
119
  execute: async ({ card }, ctx) => await handBack(ctx, card),
79
120
  }),
121
+ /** Linear keeps one reaction of a kind per user, so a retry adds none. */
122
+ mark_seen: defineTool({
123
+ description: "Mark a card seen with an eyes reaction, so the person who filed it knows EDGAR picked it up",
124
+ input: markSeenTool.input,
125
+ output: markSeenTool.output,
126
+ ...apiAccess,
127
+ execute: async ({ card }, ctx) => await markSeen(ctx, card),
128
+ }),
80
129
  /** A retry writes the same text again, which changes nothing; the lookup tells boot whether a call that did not end wrote it. */
81
130
  update_description: defineTool({
131
+ publishes: true,
82
132
  description: "Replace a card's description, keeping its edgar:v0 block",
83
133
  input: descriptionTool.input,
84
134
  output: descriptionTool.output,
@@ -88,6 +138,16 @@ export const tools = {
88
138
  lookup: "find_description",
89
139
  execute: async ({ card, description }, ctx) => await updateDescription(ctx, card, description),
90
140
  }),
141
+ retitle: defineTool({
142
+ description: "Give a card that a feeder filed a title in plain words, from the first sentence of a summary; skipped for a card a person wrote. The block keeps the feeder's title in decided.filed_as",
143
+ input: retitleTool.input,
144
+ output: retitleTool.output,
145
+ ...apiAccess,
146
+ side_effect: true,
147
+ undo: "none",
148
+ undo_reason: "The plain title names the same fault, and the block keeps the title the feeder gave, so it stays true when a later stage is undone.",
149
+ execute: async ({ card, text }, ctx) => await retitle(ctx, card, text),
150
+ }),
91
151
  restore_description: defineTool({
92
152
  description: "Put back the description a card had before update_description",
93
153
  input: restoreTool.input,
@@ -1,13 +1,18 @@
1
1
  import { type Failure, type Outcome, type Result } from "@kana-ai/edgar-sdk";
2
2
  import { type LinearCtx } from "#api/client";
3
3
  import type { State } from "#schemas/config";
4
- /** Moves a card to the column of `target`: forward only unless `force`, and `skipped` for a move the mapping does not cover. A move to any column but `waiting_on_person`, and a close, take `edgar:waiting` off, so the card no longer waits on a person. */
4
+ import type { FollowUpColumn } from "#schemas/tools";
5
+ /** Moves a card to the column of `target`: forward only unless `force`, and `skipped` for a move the mapping does not cover or a card out of the table's scope, even with `force`, so a merged pull request on another project's `edgar/` branch never moves its card. A move to any column but `waiting_on_person`, and a close, take `edgar:waiting` off, so the card no longer waits on a person. */
5
6
  export declare function transition(ctx: LinearCtx, card: string, target: string, force?: boolean): Promise<Outcome<{
6
7
  column: State;
7
8
  }>>;
8
9
  /** Applies `input` to the issue `id`; Linear answering `success: false` is `tool_error`. */
9
10
  export declare function update(ctx: LinearCtx, id: string, input: Readonly<Record<string, unknown>>): Promise<Result<null, Failure>>;
10
- /** Moves each card in `intake` whose block waits for `card` to `ready`, and returns the ids it moved. */
11
- export declare function releaseFollowUps(ctx: LinearCtx, card: string): Promise<Outcome<{
11
+ /** Parks a card until `waitsFor` merges: a forced move to `intake`, then `waits_for` in its block, a `request` block when it has none, so `release_follow_ups` finds it. The move goes first, so a card out of the table's scope is `skipped` with nothing written; a retry after a failed write moves nothing and writes the block. */
12
+ export declare function park(ctx: LinearCtx, card: string, waitsFor: string): Promise<Outcome<{
13
+ id: string;
14
+ }>>;
15
+ /** Moves each card in `intake` whose block waits for `card` to `column`, and returns the ids it moved. */
16
+ export declare function releaseFollowUps(ctx: LinearCtx, card: string, column: FollowUpColumn): Promise<Outcome<{
12
17
  released: string[];
13
18
  }>>;
@@ -1,19 +1,21 @@
1
- import { blockLine, done, err, ok, permanentFailure, readBlock, skipped, } from "@kana-ai/edgar-sdk";
1
+ import { blockLine, done, err, ok, permanentFailure, readBlock, skipped, withBlock, } from "@kana-ai/edgar-sdk";
2
2
  import { z } from "zod";
3
3
  import { linear } from "#api/client";
4
4
  import { idNames } from "#schemas/linear";
5
- import { WAITING, assigneeOf, columnOf, forward, isState, settingsOf } from "#tracker/states";
6
- /** Moves a card to the column of `target`: forward only unless `force`, and `skipped` for a move the mapping does not cover. A move to any column but `waiting_on_person`, and a close, take `edgar:waiting` off, so the card no longer waits on a person. */
5
+ import { WAITING, assigneeOf, columnOf, forward, inScope, isState, settingsOf, } from "#tracker/states";
6
+ /** Moves a card to the column of `target`: forward only unless `force`, and `skipped` for a move the mapping does not cover or a card out of the table's scope, even with `force`, so a merged pull request on another project's `edgar/` branch never moves its card. A move to any column but `waiting_on_person`, and a close, take `edgar:waiting` off, so the card no longer waits on a person. */
7
7
  export async function transition(ctx, card, target, force = false) {
8
8
  const settings = settingsOf(ctx);
9
9
  if (!settings.ok)
10
10
  return settings.error;
11
11
  if (!isState(target))
12
12
  return skipped();
13
- const read = await linear(ctx, "query Move($id: String!) { issue(id: $id) { id state { name } assignee { id } labels { nodes { id name } } team { states { nodes { id name } } } } }", { id: card }, z.object({
13
+ const read = await linear(ctx, "query Move($id: String!) { issue(id: $id) { id title project { name slugId } state { name } assignee { id } labels { nodes { id name } } team { states { nodes { id name } } } } }", { id: card }, z.object({
14
14
  issue: z
15
15
  .object({
16
16
  id: z.string(),
17
+ title: z.string(),
18
+ project: z.object({ name: z.string(), slugId: z.string() }).nullish(),
17
19
  state: z.object({ name: z.string() }),
18
20
  assignee: z.object({ id: z.string() }).nullish(),
19
21
  labels: idNames,
@@ -29,6 +31,8 @@ export async function transition(ctx, card, target, force = false) {
29
31
  const assignee = await assigneeOf(ctx, settings.value);
30
32
  if (!assignee.ok)
31
33
  return assignee.error;
34
+ if (!inScope(settings.value, found, assignee.value))
35
+ return skipped();
32
36
  const from = columnOf(settings.value, found.state.name, assignee.value, found.assignee?.id);
33
37
  const kept = found.labels.nodes.filter((label) => label.name !== WAITING);
34
38
  const labelIds = target === "waiting_on_person" || kept.length === found.labels.nodes.length
@@ -63,8 +67,31 @@ export async function update(ctx, id, input) {
63
67
  cause: "success: false",
64
68
  }));
65
69
  }
66
- /** Moves each card in `intake` whose block waits for `card` to `ready`, and returns the ids it moved. */
67
- export async function releaseFollowUps(ctx, card) {
70
+ /** Parks a card until `waitsFor` merges: a forced move to `intake`, then `waits_for` in its block, a `request` block when it has none, so `release_follow_ups` finds it. The move goes first, so a card out of the table's scope is `skipped` with nothing written; a retry after a failed write moves nothing and writes the block. */
71
+ export async function park(ctx, card, waitsFor) {
72
+ const moved = await transition(ctx, card, "intake", true);
73
+ if (moved.outcome !== "done")
74
+ return moved;
75
+ const read = await linear(ctx, "query Description($id: String!) { issue(id: $id) { id description } }", { id: card }, z.object({
76
+ issue: z.object({ id: z.string(), description: z.string().nullable() }).nullable(),
77
+ }));
78
+ if (!read.ok)
79
+ return read.error;
80
+ const found = read.value.issue;
81
+ if (found === null)
82
+ return permanentFailure("not_found", `linear: no card ${card}`);
83
+ const current = found.description ?? "";
84
+ const block = readBlock(current);
85
+ if (!block.ok)
86
+ return block.error;
87
+ const next = withBlock(current, { ...(block.value ?? { kind: "request" }), waits_for: waitsFor });
88
+ if (next === current)
89
+ return done({ id: card });
90
+ const written = await update(ctx, found.id, { description: next });
91
+ return written.ok ? done({ id: card }) : written.error;
92
+ }
93
+ /** Moves each card in `intake` whose block waits for `card` to `column`, and returns the ids it moved. */
94
+ export async function releaseFollowUps(ctx, card, column) {
68
95
  const settings = settingsOf(ctx);
69
96
  if (!settings.ok)
70
97
  return settings.error;
@@ -84,7 +111,7 @@ export async function releaseFollowUps(ctx, card) {
84
111
  const block = readBlock(node.description ?? "");
85
112
  if (!block.ok || block.value?.waits_for !== card)
86
113
  continue;
87
- const moved = await transition(ctx, node.identifier, "ready");
114
+ const moved = await transition(ctx, node.identifier, column);
88
115
  if (moved.outcome === "done")
89
116
  released.push(node.identifier);
90
117
  else if (moved.outcome !== "skipped")
@@ -1,13 +1,18 @@
1
1
  {
2
2
  "contract": 1,
3
3
  "name": "linear",
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "config_schema": "schemas/config.json",
6
6
  "secrets": [
7
7
  {
8
8
  "name": "LINEAR_TOKEN",
9
9
  "hosts": ["api.linear.app"],
10
10
  "help": "Make a personal API key in Linear, Settings, Security & access, with the Write permission (comments, moves, closes and descriptions need it) and access to the team in [extensions.linear] team."
11
+ },
12
+ {
13
+ "name": "LINEAR_WEBHOOK_SECRET",
14
+ "hosts": [],
15
+ "help": "Optional. The signing secret of a Linear webhook that posts to /hooks/linear/events, so a change on the board wakes the next sweep. Without it, EDGAR finds each change at its next sweep."
11
16
  }
12
17
  ],
13
18
  "capabilities": ["network:api.linear.app"],
@@ -20,6 +25,7 @@
20
25
  "secrets": ["LINEAR_TOKEN"],
21
26
  "capabilities": ["network:api.linear.app"],
22
27
  "side_effect": false,
28
+ "publishes": true,
23
29
  "approval": "never",
24
30
  "disabled": false
25
31
  },
@@ -53,12 +59,24 @@
53
59
  "secrets": ["LINEAR_TOKEN"],
54
60
  "capabilities": ["network:api.linear.app"],
55
61
  "side_effect": false,
62
+ "publishes": true,
63
+ "approval": "never",
64
+ "disabled": false
65
+ },
66
+ {
67
+ "name": "park",
68
+ "description": "Park a card until another card's pull request merges: move it to intake and write waits_for into its block",
69
+ "input_schema": "schemas/park.in.json",
70
+ "output_schema": "schemas/park.out.json",
71
+ "secrets": ["LINEAR_TOKEN"],
72
+ "capabilities": ["network:api.linear.app"],
73
+ "side_effect": false,
56
74
  "approval": "never",
57
75
  "disabled": false
58
76
  },
59
77
  {
60
78
  "name": "release_follow_ups",
61
- "description": "Move the cards that wait for a card's merged pull request to ready",
79
+ "description": "Move the cards that wait for a card's pull request to ready once it merged, or with column waiting_on_person to a person once it closed with no merge",
62
80
  "input_schema": "schemas/release_follow_ups.in.json",
63
81
  "output_schema": "schemas/release_follow_ups.out.json",
64
82
  "secrets": ["LINEAR_TOKEN"],
@@ -67,6 +85,17 @@
67
85
  "approval": "never",
68
86
  "disabled": false
69
87
  },
88
+ {
89
+ "name": "set_priority",
90
+ "description": "Give a card the priority from EDGAR's analysis; skipped when the card has a priority already",
91
+ "input_schema": "schemas/set_priority.in.json",
92
+ "output_schema": "schemas/set_priority.out.json",
93
+ "secrets": ["LINEAR_TOKEN"],
94
+ "capabilities": ["network:api.linear.app"],
95
+ "side_effect": false,
96
+ "approval": "never",
97
+ "disabled": false
98
+ },
70
99
  {
71
100
  "name": "count_sighting",
72
101
  "description": "Count one more sighting of the fault that an open card holds: raise occurrences and last_seen in its block; a card with no block is not written",
@@ -111,6 +140,17 @@
111
140
  "approval": "never",
112
141
  "disabled": false
113
142
  },
143
+ {
144
+ "name": "mark_seen",
145
+ "description": "Mark a card seen with an eyes reaction, so the person who filed it knows EDGAR picked it up",
146
+ "input_schema": "schemas/mark_seen.in.json",
147
+ "output_schema": "schemas/mark_seen.out.json",
148
+ "secrets": ["LINEAR_TOKEN"],
149
+ "capabilities": ["network:api.linear.app"],
150
+ "side_effect": false,
151
+ "approval": "never",
152
+ "disabled": false
153
+ },
114
154
  {
115
155
  "name": "update_description",
116
156
  "description": "Replace a card's description, keeping its edgar:v0 block",
@@ -119,11 +159,25 @@
119
159
  "secrets": ["LINEAR_TOKEN"],
120
160
  "capabilities": ["network:api.linear.app"],
121
161
  "side_effect": true,
162
+ "publishes": true,
122
163
  "compensate": "restore_description",
123
164
  "lookup": "find_description",
124
165
  "approval": "never",
125
166
  "disabled": false
126
167
  },
168
+ {
169
+ "name": "retitle",
170
+ "description": "Give a card that a feeder filed a title in plain words, from the first sentence of a summary; skipped for a card a person wrote. The block keeps the feeder's title in decided.filed_as",
171
+ "input_schema": "schemas/retitle.in.json",
172
+ "output_schema": "schemas/retitle.out.json",
173
+ "secrets": ["LINEAR_TOKEN"],
174
+ "capabilities": ["network:api.linear.app"],
175
+ "side_effect": true,
176
+ "undo": "none",
177
+ "undo_reason": "The plain title names the same fault, and the block keeps the title the feeder gave, so it stays true when a later stage is undone.",
178
+ "approval": "never",
179
+ "disabled": false
180
+ },
127
181
  {
128
182
  "name": "restore_description",
129
183
  "description": "Put back the description a card had before update_description",
@@ -182,7 +236,15 @@
182
236
  "disabled": false
183
237
  }
184
238
  ],
185
- "webhooks": [],
239
+ "webhooks": [
240
+ {
241
+ "route": "events",
242
+ "signature": "hmac-sha256",
243
+ "secret": "LINEAR_WEBHOOK_SECRET",
244
+ "delivery_id_header": "Linear-Delivery",
245
+ "signature_header": "Linear-Signature"
246
+ }
247
+ ],
186
248
  "workflows": [],
187
249
  "roles": [],
188
250
  "skills": [],
@@ -191,6 +253,7 @@
191
253
  "list_cards",
192
254
  "card",
193
255
  "comments",
256
+ "mentions",
194
257
  "attachments",
195
258
  "comment",
196
259
  "move",
@@ -204,5 +267,10 @@
204
267
  "capabilities": ["network:api.linear.app"]
205
268
  },
206
269
  "environments": [],
207
- "hooks": []
270
+ "hooks": [],
271
+ "read_link": {
272
+ "hosts": ["linear.app"],
273
+ "secrets": ["LINEAR_TOKEN"],
274
+ "capabilities": ["network:api.linear.app"]
275
+ }
208
276
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kana-ai/edgar-ext-linear",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "EDGAR extension for Linear: the tracker port, comments, column moves, cards and follow-ups.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -21,8 +21,8 @@
21
21
  ".": "./dist/src/index.js"
22
22
  },
23
23
  "dependencies": {
24
- "@kana-ai/edgar-contracts": "0.1.2",
25
- "@kana-ai/edgar-sdk": "0.1.2",
24
+ "@kana-ai/edgar-contracts": "0.1.3",
25
+ "@kana-ai/edgar-sdk": "0.1.3",
26
26
  "zod": "4.6.7"
27
27
  },
28
28
  "devDependencies": {
@@ -4,17 +4,21 @@
4
4
  "properties": {
5
5
  "team": {
6
6
  "type": "string",
7
- "minLength": 1
7
+ "minLength": 1,
8
+ "description": "The key of the Linear team whose cards EDGAR works, such as ENG."
8
9
  },
9
10
  "project": {
11
+ "description": "Only the cards in this Linear project, by name or URL key, are in scope, and EDGAR files its own cards there. Not set: every project.",
10
12
  "type": "string",
11
13
  "minLength": 1
12
14
  },
13
15
  "title_prefix": {
16
+ "description": "Only the cards whose title starts with this text are in scope, and EDGAR adds it to the cards it files. Not set: any title.",
14
17
  "type": "string",
15
18
  "minLength": 1
16
19
  },
17
20
  "labels": {
21
+ "description": "Only the cards that carry every one of these labels are in scope, and EDGAR adds them to the cards it files. Not set: any labels.",
18
22
  "type": "array",
19
23
  "items": {
20
24
  "type": "string",
@@ -26,35 +30,43 @@
26
30
  "properties": {
27
31
  "intake": {
28
32
  "type": "string",
29
- "minLength": 1
33
+ "minLength": 1,
34
+ "description": "The Linear column of new cards, such as Triage."
30
35
  },
31
36
  "ready": {
32
37
  "type": "string",
33
- "minLength": 1
38
+ "minLength": 1,
39
+ "description": "The Linear column of cards ready to work on, such as Todo."
34
40
  },
35
41
  "working": {
36
42
  "type": "string",
37
- "minLength": 1
43
+ "minLength": 1,
44
+ "description": "The Linear column of cards EDGAR works on, such as In Progress."
38
45
  },
39
46
  "in_review": {
40
47
  "type": "string",
41
- "minLength": 1
48
+ "minLength": 1,
49
+ "description": "The Linear column of cards in review, such as In Review."
42
50
  },
43
51
  "waiting_on_person": {
44
52
  "type": "string",
45
- "minLength": 1
53
+ "minLength": 1,
54
+ "description": "The Linear column of cards that wait for a person, such as Waiting."
46
55
  },
47
56
  "in_testing": {
48
57
  "type": "string",
49
- "minLength": 1
58
+ "minLength": 1,
59
+ "description": "The Linear column of cards in testing, such as Testing."
50
60
  },
51
61
  "done": {
52
62
  "type": "string",
53
- "minLength": 1
63
+ "minLength": 1,
64
+ "description": "The Linear column of finished cards, such as Done."
54
65
  },
55
66
  "cancelled": {
56
67
  "type": "string",
57
- "minLength": 1
68
+ "minLength": 1,
69
+ "description": "The Linear column of cancelled cards, such as Canceled."
58
70
  }
59
71
  },
60
72
  "required": [
@@ -67,21 +79,22 @@
67
79
  "done",
68
80
  "cancelled"
69
81
  ],
70
- "additionalProperties": false
82
+ "additionalProperties": false,
83
+ "description": "The Linear column of each engine state; write every one."
71
84
  },
72
85
  "assignee": {
73
- "description": "the Linear user, by id or email, or `me` for the user of LINEAR_TOKEN, which is the default: the user whose cards in `assigned` count as intake, and the one user of `assignee_only`",
86
+ "description": "The Linear user, by id or email, or `me` for the user of LINEAR_TOKEN, which is the default: the user whose cards in `assigned` count as intake, and the one user of `assignee_only`.",
74
87
  "type": "string",
75
88
  "minLength": 1
76
89
  },
77
90
  "assignee_only": {
78
91
  "default": false,
79
- "description": "true: a card is in scope only while it is assigned to `assignee`, in every column, and EDGAR assigns each card it files to that user",
92
+ "description": "True: a card is in scope only while it is assigned to `assignee`, in every column, and EDGAR assigns each card it files to that user. Default false.",
80
93
  "type": "boolean"
81
94
  },
82
95
  "assigned": {
83
96
  "default": [],
84
- "description": "the Linear columns where a card assigned to `assignee` counts as intake",
97
+ "description": "The Linear columns where a card assigned to `assignee` counts as intake. Default none.",
85
98
  "type": "array",
86
99
  "items": {
87
100
  "type": "string",
@@ -90,6 +90,10 @@
90
90
  },
91
91
  "required": ["extension", "channel", "thread"],
92
92
  "additionalProperties": false
93
+ },
94
+ "trust": {
95
+ "type": "string",
96
+ "enum": ["team", "outside"]
93
97
  }
94
98
  },
95
99
  "required": ["kind"],
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "card": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ }
9
+ },
10
+ "required": ["card"]
11
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string"
7
+ }
8
+ },
9
+ "required": ["id"]
10
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "card": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "waits_for": {
10
+ "type": "string",
11
+ "minLength": 1
12
+ }
13
+ },
14
+ "required": ["card", "waits_for"]
15
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string"
7
+ }
8
+ },
9
+ "required": ["id"]
10
+ }
@@ -9,6 +9,11 @@
9
9
  "pull_request": {
10
10
  "type": "string",
11
11
  "minLength": 1
12
+ },
13
+ "column": {
14
+ "description": "where the waiting cards move: ready, the default, after a merge; waiting_on_person after a close with no merge",
15
+ "type": "string",
16
+ "enum": ["ready", "waiting_on_person"]
12
17
  }
13
18
  },
14
19
  "required": ["card", "pull_request"]
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "card": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "text": {
10
+ "type": "string",
11
+ "minLength": 1,
12
+ "description": "a stage's summary of the card; its first sentence becomes the title"
13
+ }
14
+ },
15
+ "required": ["card", "text"]
16
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string"
7
+ },
8
+ "title": {
9
+ "type": "string"
10
+ }
11
+ },
12
+ "required": ["id", "title"]
13
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "card": {
6
+ "type": "string",
7
+ "minLength": 1
8
+ },
9
+ "priority": {
10
+ "type": "string",
11
+ "enum": ["urgent", "high", "medium", "low"],
12
+ "description": "the priority from EDGAR's analysis; a card that has one already keeps it"
13
+ }
14
+ },
15
+ "required": ["card", "priority"]
16
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "id": {
6
+ "type": "string"
7
+ }
8
+ },
9
+ "required": ["id"]
10
+ }