managed-deepagents 0.10.0-dev.13 → 0.10.0-dev.14
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.
- package/README.md +79 -4
- package/dist/channels/github/index.d.ts.map +1 -1
- package/dist/channels/github/index.js +2 -1
- package/dist/channels/github/index.js.map +1 -1
- package/dist/channels/github/mentions.d.ts +7 -0
- package/dist/channels/github/mentions.d.ts.map +1 -0
- package/dist/channels/github/mentions.js +112 -0
- package/dist/channels/github/mentions.js.map +1 -0
- package/dist/channels/github/schema.d.ts +168 -0
- package/dist/channels/github/schema.d.ts.map +1 -1
- package/dist/channels/github/schema.js +8 -0
- package/dist/channels/github/schema.js.map +1 -1
- package/dist/channels/github/types.d.ts +17 -1
- package/dist/channels/github/types.d.ts.map +1 -1
- package/dist/channels/http/endpoint.d.ts +25 -11
- package/dist/channels/http/endpoint.d.ts.map +1 -1
- package/dist/channels/http/endpoint.js +107 -35
- package/dist/channels/http/endpoint.js.map +1 -1
- package/dist/channels/http/provider.d.ts +10 -0
- package/dist/channels/http/provider.d.ts.map +1 -1
- package/dist/channels/http/provider.js +17 -0
- package/dist/channels/http/provider.js.map +1 -1
- package/dist/channels/run-input.js +17 -6
- package/dist/channels/run-input.js.map +1 -1
- package/dist/channels/slack/index.d.ts +33 -1
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +54 -4
- package/dist/channels/slack/index.js.map +1 -1
- package/dist/define-deep-agent.d.ts.map +1 -1
- package/dist/define-deep-agent.js +6 -0
- package/dist/define-deep-agent.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -448,6 +448,28 @@ Supported keys:
|
|
|
448
448
|
the event name. A CI event continues a pull request's conversation when it
|
|
449
449
|
ran for exactly one pull request.
|
|
450
450
|
|
|
451
|
+
GitHub sends no event for a mention, so each event lists the handles its own
|
|
452
|
+
text mentions in `event.mentions`: the comment's or review's body, or an
|
|
453
|
+
issue's or pull request's title and body. Handles are lowercased, listed once,
|
|
454
|
+
in order, and read as GitHub links them: `@octocat` or `@octo-org/reviewers`,
|
|
455
|
+
not `team@octo.dev` or `@octocat` inside code. Any text tag counts, such as
|
|
456
|
+
`@openswe`, even one that is no GitHub account. Other events list none. A
|
|
457
|
+
handler that answers mentions checks the list:
|
|
458
|
+
|
|
459
|
+
```ts
|
|
460
|
+
channels.github({
|
|
461
|
+
onEvent: {
|
|
462
|
+
"issue_comment.created": (event) => {
|
|
463
|
+
if (!event.mentions.includes("@openswe")) return;
|
|
464
|
+
return `Answer the comment on #${event.payload.issue.number}.`;
|
|
465
|
+
},
|
|
466
|
+
},
|
|
467
|
+
});
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
An issue comment on a pull request has `issue.pull_request` set, and an edit
|
|
471
|
+
says what it changed in `payload.changes`.
|
|
472
|
+
|
|
451
473
|
While a conversation's run is still going, a new event that starts a run waits
|
|
452
474
|
for it by default. `multitaskStrategy` changes that, using LangGraph's names:
|
|
453
475
|
`"interrupt"` cancels the active run and keeps its progress, `"rollback"`
|
|
@@ -502,6 +524,36 @@ The resumed run uses no user connections, even though a person answered: the
|
|
|
502
524
|
conversation holds content from outside the workspace, which must not act with
|
|
503
525
|
the grants of whoever resumes it from Studio.
|
|
504
526
|
|
|
527
|
+
To acknowledge an event the moment it arrives, such as with a 👀 reaction,
|
|
528
|
+
pass `onReceived(event, thread)`. It hears each delivery of a handled event once,
|
|
529
|
+
with the parsed event and its thread, as soon as the delivery reaches its
|
|
530
|
+
thread: before MDA reads the thread or asks the handler, which under the
|
|
531
|
+
default `enqueue` waits until a busy conversation's run has finished. It
|
|
532
|
+
fires even when the thread then waits on an interrupt or the handler declines,
|
|
533
|
+
so apply your own filters there, such as a mention check. It runs in the
|
|
534
|
+
background, before `onFinish`; a failure is logged and doesn't stop the run.
|
|
535
|
+
|
|
536
|
+
```ts
|
|
537
|
+
import { Octokit } from "@octokit/rest";
|
|
538
|
+
import { channels, connections } from "managed-deepagents";
|
|
539
|
+
|
|
540
|
+
export const channel = channels.github({
|
|
541
|
+
onEvent: { "issue_comment.created": (event) => answerMentions(event) },
|
|
542
|
+
onReceived: async (event) => {
|
|
543
|
+
if (event.key !== "issue_comment.created") return;
|
|
544
|
+
if (!/(^|\s)@my-agent\b/i.test(event.payload.comment.body)) return;
|
|
545
|
+
const auth = await connections.get("mda/github-token", { type: "agent" });
|
|
546
|
+
await new Octokit({ auth }).rest.reactions.createForIssueComment({
|
|
547
|
+
owner: event.repository.owner,
|
|
548
|
+
repo: event.repository.name,
|
|
549
|
+
comment_id: event.payload.comment.id,
|
|
550
|
+
content: "eyes",
|
|
551
|
+
request: { signal: AbortSignal.timeout(10_000) },
|
|
552
|
+
});
|
|
553
|
+
},
|
|
554
|
+
});
|
|
555
|
+
```
|
|
556
|
+
|
|
505
557
|
Keep callbacks short: their work and run creation must fit within GitHub's webhook
|
|
506
558
|
response window. A handler for an event that waits for a busy conversation runs
|
|
507
559
|
once that run has finished, after the webhook was acknowledged. The request does not wait for agent completion. Run-start
|
|
@@ -749,19 +801,42 @@ An error status, a redirect, an answer that isn't one of these, more than
|
|
|
749
801
|
throws does: Linear tells the session. The URL must be http(s), without
|
|
750
802
|
credentials in it; a bad one throws when the channel is declared.
|
|
751
803
|
|
|
804
|
+
To let the service check that a request came from your deployment and wasn't
|
|
805
|
+
changed or replayed, set `MDA_SERVICE_SECRET` in the project's `.env`;
|
|
806
|
+
`mda deploy` forwards it to the deployment. MDA then signs every endpoint
|
|
807
|
+
request as [Standard Webhooks](https://www.standardwebhooks.com/) does:
|
|
808
|
+
`webhook-id`, `webhook-timestamp` and `webhook-signature`, an HMAC-SHA256 of the
|
|
809
|
+
id, the timestamp and the exact body. The secret is `whsec_` and padded base64
|
|
810
|
+
of 24 to 64 random bytes (`echo "whsec_$(openssl rand -base64 32)"`; an
|
|
811
|
+
`openssl rand -hex 32` value is valid too); several, separated by commas, each
|
|
812
|
+
sign the request, for rotation. A malformed secret fails the handler.
|
|
813
|
+
|
|
814
|
+
The service keeps the same secret and verifies with any Standard Webhooks
|
|
815
|
+
library, which also rejects timestamps older than five minutes:
|
|
816
|
+
|
|
817
|
+
```ts
|
|
818
|
+
import { Webhook } from "standardwebhooks";
|
|
819
|
+
|
|
820
|
+
const event = new Webhook(process.env.ENDPOINT_SECRET!).verify(
|
|
821
|
+
rawBody,
|
|
822
|
+
Object.fromEntries(request.headers)
|
|
823
|
+
);
|
|
824
|
+
```
|
|
825
|
+
|
|
752
826
|
On the service's side, `LinearEndpointRequest<K>` and
|
|
753
827
|
`GitHubEndpointRequest<K>` type what the channel sends, `{ event: { key,
|
|
754
828
|
deliveryId, payload }, thread }`, with the payload typed by the event key, and
|
|
755
|
-
`EndpointAnswer` types
|
|
756
|
-
|
|
757
|
-
`Request`
|
|
829
|
+
`EndpointAnswer` types an answer, all JSON; answer `null` to start nothing. The
|
|
830
|
+
request types are types only: validate the body as your service validates
|
|
831
|
+
input, after verifying its signature, or the credential your endpoint's `Request`
|
|
832
|
+
carries.
|
|
758
833
|
|
|
759
834
|
```ts
|
|
760
835
|
import type { EndpointAnswer, LinearEndpointRequest } from "managed-deepagents";
|
|
761
836
|
|
|
762
837
|
app.post("/linear/runs", (req, res) => {
|
|
763
838
|
const { event, thread } = req.body as LinearEndpointRequest;
|
|
764
|
-
const answer: EndpointAnswer =
|
|
839
|
+
const answer: EndpointAnswer | null =
|
|
765
840
|
event.key === "AgentSessionEvent.created"
|
|
766
841
|
? { input: `Plan ${event.payload.agentSession.issue?.title}` }
|
|
767
842
|
: null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/channels/github/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,WAAW,EAKjB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/channels/github/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,WAAW,EAKjB,MAAM,kBAAkB,CAAC;AA4B1B,OAAO,KAAK,EAEV,oBAAoB,EAKrB,MAAM,YAAY,CAAC;AAGpB,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAOpB,wEAAwE;AACxE,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,GAAG,WAAW,CAkD7E;AAoDD,qDAAqD;AACrD,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { channelThreadId, httpChannel, } from "../http/index.js";
|
|
2
|
-
import { channelName, checkEventKeys, definedFields, eventSnapshot, handledEventKeys, readDeploymentSecret, resetDeploymentSecrets, resolveEndpoints, runEventHandler, finishEvents, verifyHmacSha256, } from "../http/provider.js";
|
|
2
|
+
import { channelName, checkEventKeys, definedFields, eventSnapshot, handledEventKeys, readDeploymentSecret, resetDeploymentSecrets, resolveEndpoints, runEventHandler, finishEvents, receiveEvents, verifyHmacSha256, } from "../http/provider.js";
|
|
3
3
|
import { interruptedNotice, pendingDecision } from "../http/studio.js";
|
|
4
4
|
import { logger } from "../../runtime/log.js";
|
|
5
5
|
import { connections } from "../../connections.js";
|
|
@@ -35,6 +35,7 @@ export function githubChannel(options = {}) {
|
|
|
35
35
|
id: message.threadId,
|
|
36
36
|
channel: { name: channelName(channel) },
|
|
37
37
|
}),
|
|
38
|
+
onReceived: receiveEvents(options.onReceived, githubEvent, () => channelName(channel)),
|
|
38
39
|
onFinish: finishEvents((target, delivery) => notifyInterrupted(handlers, target, delivery, channelName(channel)), options.onFinish, githubEvent, () => channelName(channel)),
|
|
39
40
|
});
|
|
40
41
|
return channel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3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K,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9E,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,KAAgC,CAAC;IAChE,OAAO,CACL,OAAO,UAAU,KAAK,QAAQ;QAC9B,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC;QACnC,aAAa,CAAC,MAAM,CAAC,CACtB,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAClB,KAAK,EACL,UAAU,EACV,OAAO,GAC6B;IACpC,MAAM,OAAO,GAAoC;QAC/C,KAAK,EAAE,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;QAClC,UAAU,EAAE,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC;KAC7C,CAAC;IACF,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS;QAC9B,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAExD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI;QACzB,CAAC,YAAY,EAAE,IAAI,CAAC;QACpB,CAAC,OAAO,EAAE,QAAQ,CAAC;QACnB,CAAC,cAAc,EAAE,QAAQ,CAAC;KAClB,EAAE,CAAC;QACX,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;QACjC,IAAI,OAAO,EAAE,KAAK,QAAQ;YAAE,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;IAChD,CAAC;IACD,MAAM,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACzD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** The handles an event's text mentions: GitHub sends no event for a mention. */
|
|
2
|
+
/**
|
|
3
|
+
* The handles, such as `@octocat`, the event's own text mentions: lowercased,
|
|
4
|
+
* each once, in order. Code doesn't mention anyone, as on GitHub.
|
|
5
|
+
*/
|
|
6
|
+
export declare function eventMentions(name: string, payload: Record<string, unknown>): string[];
|
|
7
|
+
//# sourceMappingURL=mentions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentions.d.ts","sourceRoot":"","sources":["../../../src/channels/github/mentions.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAqBjF;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,MAAM,EAAE,CAiBV"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/** The handles an event's text mentions: GitHub sends no event for a mention. */
|
|
2
|
+
// A login (letters, digits, hyphens, at most 39 characters) or an
|
|
3
|
+
// organization's team, as GitHub links them. Not part of an email address,
|
|
4
|
+
// a longer word or a path, and without trailing punctuation.
|
|
5
|
+
const MENTION = /(?<![A-Za-z0-9_`@/.-])@([A-Za-z0-9][A-Za-z0-9-]{0,38}(?:\/[A-Za-z0-9_-](?:[A-Za-z0-9_.-]{0,98}[A-Za-z0-9_-])?)?)(?![A-Za-z0-9_-])/g;
|
|
6
|
+
/** A fence opens or closes a code block on a line of its own. */
|
|
7
|
+
const FENCE = /^ {0,3}(`{3,}|~{3,})/;
|
|
8
|
+
const PARAGRAPH_BREAK = /\n[ \t]*\n/;
|
|
9
|
+
const BACKTICKS = /`+/g;
|
|
10
|
+
const MAX_MENTIONS = 50;
|
|
11
|
+
/** Where an event's text is: the comment, review or subject that triggered it. */
|
|
12
|
+
const TEXT_FIELDS = {
|
|
13
|
+
issues: ["issue", ["title", "body"]],
|
|
14
|
+
pull_request: ["pull_request", ["title", "body"]],
|
|
15
|
+
issue_comment: ["comment", ["body"]],
|
|
16
|
+
pull_request_review: ["review", ["body"]],
|
|
17
|
+
pull_request_review_comment: ["comment", ["body"]],
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The handles, such as `@octocat`, the event's own text mentions: lowercased,
|
|
21
|
+
* each once, in order. Code doesn't mention anyone, as on GitHub.
|
|
22
|
+
*/
|
|
23
|
+
export function eventMentions(name, payload) {
|
|
24
|
+
if (!Object.hasOwn(TEXT_FIELDS, name))
|
|
25
|
+
return [];
|
|
26
|
+
const [subjectField, textFields] = TEXT_FIELDS[name];
|
|
27
|
+
const subject = payload[subjectField];
|
|
28
|
+
if (!subject || typeof subject !== "object")
|
|
29
|
+
return [];
|
|
30
|
+
const text = textFields
|
|
31
|
+
.map((field) => subject[field])
|
|
32
|
+
.filter((value) => typeof value === "string")
|
|
33
|
+
.join("\n\n");
|
|
34
|
+
const mentions = [];
|
|
35
|
+
for (const match of withoutCode(text).matchAll(MENTION)) {
|
|
36
|
+
const handle = `@${match[1].toLowerCase()}`;
|
|
37
|
+
if (mentions.includes(handle))
|
|
38
|
+
continue;
|
|
39
|
+
mentions.push(handle);
|
|
40
|
+
if (mentions.length === MAX_MENTIONS)
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
return mentions;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The text outside fenced code blocks and inline code spans, as Markdown
|
|
47
|
+
* reads them. A fence that is never closed runs to the end, as on GitHub.
|
|
48
|
+
*/
|
|
49
|
+
function withoutCode(text) {
|
|
50
|
+
const prose = [];
|
|
51
|
+
let fence = "";
|
|
52
|
+
for (const line of text.split("\n")) {
|
|
53
|
+
const marker = FENCE.exec(line);
|
|
54
|
+
const rest = marker ? line.slice(marker[0].length) : "";
|
|
55
|
+
if (!fence) {
|
|
56
|
+
// A backtick fence's info string can't hold a backtick.
|
|
57
|
+
if (marker && !(marker[1].startsWith("`") && rest.includes("`"))) {
|
|
58
|
+
fence = marker[1];
|
|
59
|
+
prose.push("");
|
|
60
|
+
}
|
|
61
|
+
else
|
|
62
|
+
prose.push(line);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
if (marker &&
|
|
66
|
+
marker[1][0] === fence[0] &&
|
|
67
|
+
marker[1].length >= fence.length &&
|
|
68
|
+
!rest.trim())
|
|
69
|
+
fence = "";
|
|
70
|
+
prose.push("");
|
|
71
|
+
}
|
|
72
|
+
return prose.join("\n").split(PARAGRAPH_BREAK).map(withoutSpans).join("\n\n");
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* A paragraph without its code spans. A span opens with a run of backticks
|
|
76
|
+
* and closes with the next run of the same length; a run that nothing
|
|
77
|
+
* closes is just backticks.
|
|
78
|
+
*/
|
|
79
|
+
function withoutSpans(paragraph) {
|
|
80
|
+
const runs = [...paragraph.matchAll(BACKTICKS)].map((match) => [match.index, match.index + match[0].length]);
|
|
81
|
+
const closers = new Map();
|
|
82
|
+
runs.forEach(([start, end], index) => {
|
|
83
|
+
const waiting = closers.get(end - start) ?? [];
|
|
84
|
+
waiting.push(index);
|
|
85
|
+
closers.set(end - start, waiting);
|
|
86
|
+
});
|
|
87
|
+
// How far each length's queue has been read.
|
|
88
|
+
const read = new Map();
|
|
89
|
+
const kept = [];
|
|
90
|
+
let cursor = 0;
|
|
91
|
+
let index = 0;
|
|
92
|
+
while (index < runs.length) {
|
|
93
|
+
const [start, end] = runs[index];
|
|
94
|
+
const waiting = closers.get(end - start);
|
|
95
|
+
let next = read.get(end - start) ?? 0;
|
|
96
|
+
while (next < waiting.length && waiting[next] <= index)
|
|
97
|
+
next += 1;
|
|
98
|
+
read.set(end - start, next);
|
|
99
|
+
if (next === waiting.length) {
|
|
100
|
+
index += 1;
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
const closer = waiting[next];
|
|
104
|
+
read.set(end - start, next + 1);
|
|
105
|
+
kept.push(`${paragraph.slice(cursor, start)} `);
|
|
106
|
+
cursor = runs[closer][1];
|
|
107
|
+
index = closer + 1;
|
|
108
|
+
}
|
|
109
|
+
kept.push(paragraph.slice(cursor));
|
|
110
|
+
return kept.join("");
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=mentions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mentions.js","sourceRoot":"","sources":["../../../src/channels/github/mentions.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAEjF,kEAAkE;AAClE,2EAA2E;AAC3E,6DAA6D;AAC7D,MAAM,OAAO,GACX,oIAAoI,CAAC;AACvI,iEAAiE;AACjE,MAAM,KAAK,GAAG,sBAAsB,CAAC;AACrC,MAAM,eAAe,GAAG,YAAY,CAAC;AACrC,MAAM,SAAS,GAAG,KAAK,CAAC;AACxB,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,kFAAkF;AAClF,MAAM,WAAW,GAAuC;IACtD,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACpC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACjD,aAAa,EAAE,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;IACpC,mBAAmB,EAAE,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,CAAC;IACzC,2BAA2B,EAAE,CAAC,SAAS,EAAE,CAAC,MAAM,CAAC,CAAC;CACnD,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,aAAa,CAC3B,IAAY,EACZ,OAAgC;IAEhC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACjD,MAAM,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG,WAAW,CAAC,IAAI,CAAE,CAAC;IACtD,MAAM,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACtC,IAAI,CAAC,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAC;IACvD,MAAM,IAAI,GAAG,UAAU;SACpB,GAAG,CAAC,CAAC,KAAK,EAAE,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ACnC,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -1770,6 +1770,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1770
1770
|
login: string;
|
|
1771
1771
|
type: "Bot" | "Organization" | "User";
|
|
1772
1772
|
};
|
|
1773
|
+
/**
|
|
1774
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
1775
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
1776
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
1777
|
+
* body; code doesn't count. Empty for other events.
|
|
1778
|
+
*/
|
|
1779
|
+
mentions: string[];
|
|
1773
1780
|
} | {
|
|
1774
1781
|
key: "issues.edited";
|
|
1775
1782
|
deliveryId: string;
|
|
@@ -1820,6 +1827,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1820
1827
|
login: string;
|
|
1821
1828
|
type: "Bot" | "Organization" | "User";
|
|
1822
1829
|
};
|
|
1830
|
+
/**
|
|
1831
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
1832
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
1833
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
1834
|
+
* body; code doesn't count. Empty for other events.
|
|
1835
|
+
*/
|
|
1836
|
+
mentions: string[];
|
|
1823
1837
|
} | {
|
|
1824
1838
|
key: "issues.reopened";
|
|
1825
1839
|
deliveryId: string;
|
|
@@ -1870,6 +1884,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1870
1884
|
login: string;
|
|
1871
1885
|
type: "Bot" | "Organization" | "User";
|
|
1872
1886
|
};
|
|
1887
|
+
/**
|
|
1888
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
1889
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
1890
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
1891
|
+
* body; code doesn't count. Empty for other events.
|
|
1892
|
+
*/
|
|
1893
|
+
mentions: string[];
|
|
1873
1894
|
} | {
|
|
1874
1895
|
key: "issues.labeled";
|
|
1875
1896
|
deliveryId: string;
|
|
@@ -1924,6 +1945,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1924
1945
|
login: string;
|
|
1925
1946
|
type: "Bot" | "Organization" | "User";
|
|
1926
1947
|
};
|
|
1948
|
+
/**
|
|
1949
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
1950
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
1951
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
1952
|
+
* body; code doesn't count. Empty for other events.
|
|
1953
|
+
*/
|
|
1954
|
+
mentions: string[];
|
|
1927
1955
|
} | {
|
|
1928
1956
|
key: "issue_comment.created";
|
|
1929
1957
|
deliveryId: string;
|
|
@@ -1979,6 +2007,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1979
2007
|
login: string;
|
|
1980
2008
|
type: "Bot" | "Organization" | "User";
|
|
1981
2009
|
};
|
|
2010
|
+
/**
|
|
2011
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2012
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2013
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2014
|
+
* body; code doesn't count. Empty for other events.
|
|
2015
|
+
*/
|
|
2016
|
+
mentions: string[];
|
|
1982
2017
|
} | {
|
|
1983
2018
|
key: "issue_comment.edited";
|
|
1984
2019
|
deliveryId: string;
|
|
@@ -2034,6 +2069,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2034
2069
|
login: string;
|
|
2035
2070
|
type: "Bot" | "Organization" | "User";
|
|
2036
2071
|
};
|
|
2072
|
+
/**
|
|
2073
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2074
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2075
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2076
|
+
* body; code doesn't count. Empty for other events.
|
|
2077
|
+
*/
|
|
2078
|
+
mentions: string[];
|
|
2037
2079
|
} | {
|
|
2038
2080
|
key: "pull_request.opened";
|
|
2039
2081
|
deliveryId: string;
|
|
@@ -2086,6 +2128,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2086
2128
|
login: string;
|
|
2087
2129
|
type: "Bot" | "Organization" | "User";
|
|
2088
2130
|
};
|
|
2131
|
+
/**
|
|
2132
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2133
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2134
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2135
|
+
* body; code doesn't count. Empty for other events.
|
|
2136
|
+
*/
|
|
2137
|
+
mentions: string[];
|
|
2089
2138
|
} | {
|
|
2090
2139
|
key: "pull_request.edited";
|
|
2091
2140
|
deliveryId: string;
|
|
@@ -2138,6 +2187,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2138
2187
|
login: string;
|
|
2139
2188
|
type: "Bot" | "Organization" | "User";
|
|
2140
2189
|
};
|
|
2190
|
+
/**
|
|
2191
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2192
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2193
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2194
|
+
* body; code doesn't count. Empty for other events.
|
|
2195
|
+
*/
|
|
2196
|
+
mentions: string[];
|
|
2141
2197
|
} | {
|
|
2142
2198
|
key: "pull_request.reopened";
|
|
2143
2199
|
deliveryId: string;
|
|
@@ -2190,6 +2246,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2190
2246
|
login: string;
|
|
2191
2247
|
type: "Bot" | "Organization" | "User";
|
|
2192
2248
|
};
|
|
2249
|
+
/**
|
|
2250
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2251
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2252
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2253
|
+
* body; code doesn't count. Empty for other events.
|
|
2254
|
+
*/
|
|
2255
|
+
mentions: string[];
|
|
2193
2256
|
} | {
|
|
2194
2257
|
key: "pull_request.ready_for_review";
|
|
2195
2258
|
deliveryId: string;
|
|
@@ -2242,6 +2305,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2242
2305
|
login: string;
|
|
2243
2306
|
type: "Bot" | "Organization" | "User";
|
|
2244
2307
|
};
|
|
2308
|
+
/**
|
|
2309
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2310
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2311
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2312
|
+
* body; code doesn't count. Empty for other events.
|
|
2313
|
+
*/
|
|
2314
|
+
mentions: string[];
|
|
2245
2315
|
} | {
|
|
2246
2316
|
key: "pull_request.converted_to_draft";
|
|
2247
2317
|
deliveryId: string;
|
|
@@ -2294,6 +2364,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2294
2364
|
login: string;
|
|
2295
2365
|
type: "Bot" | "Organization" | "User";
|
|
2296
2366
|
};
|
|
2367
|
+
/**
|
|
2368
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2369
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2370
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2371
|
+
* body; code doesn't count. Empty for other events.
|
|
2372
|
+
*/
|
|
2373
|
+
mentions: string[];
|
|
2297
2374
|
} | {
|
|
2298
2375
|
key: "pull_request.synchronize";
|
|
2299
2376
|
deliveryId: string;
|
|
@@ -2346,6 +2423,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2346
2423
|
login: string;
|
|
2347
2424
|
type: "Bot" | "Organization" | "User";
|
|
2348
2425
|
};
|
|
2426
|
+
/**
|
|
2427
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2428
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2429
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2430
|
+
* body; code doesn't count. Empty for other events.
|
|
2431
|
+
*/
|
|
2432
|
+
mentions: string[];
|
|
2349
2433
|
} | {
|
|
2350
2434
|
key: "pull_request.labeled";
|
|
2351
2435
|
deliveryId: string;
|
|
@@ -2402,6 +2486,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2402
2486
|
login: string;
|
|
2403
2487
|
type: "Bot" | "Organization" | "User";
|
|
2404
2488
|
};
|
|
2489
|
+
/**
|
|
2490
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2491
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2492
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2493
|
+
* body; code doesn't count. Empty for other events.
|
|
2494
|
+
*/
|
|
2495
|
+
mentions: string[];
|
|
2405
2496
|
} | {
|
|
2406
2497
|
key: "pull_request.closed";
|
|
2407
2498
|
deliveryId: string;
|
|
@@ -2454,6 +2545,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2454
2545
|
login: string;
|
|
2455
2546
|
type: "Bot" | "Organization" | "User";
|
|
2456
2547
|
};
|
|
2548
|
+
/**
|
|
2549
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2550
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2551
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2552
|
+
* body; code doesn't count. Empty for other events.
|
|
2553
|
+
*/
|
|
2554
|
+
mentions: string[];
|
|
2457
2555
|
} | {
|
|
2458
2556
|
key: "pull_request_review.submitted";
|
|
2459
2557
|
deliveryId: string;
|
|
@@ -2512,6 +2610,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2512
2610
|
login: string;
|
|
2513
2611
|
type: "Bot" | "Organization" | "User";
|
|
2514
2612
|
};
|
|
2613
|
+
/**
|
|
2614
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2615
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2616
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2617
|
+
* body; code doesn't count. Empty for other events.
|
|
2618
|
+
*/
|
|
2619
|
+
mentions: string[];
|
|
2515
2620
|
} | {
|
|
2516
2621
|
key: "pull_request_review.edited";
|
|
2517
2622
|
deliveryId: string;
|
|
@@ -2570,6 +2675,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2570
2675
|
login: string;
|
|
2571
2676
|
type: "Bot" | "Organization" | "User";
|
|
2572
2677
|
};
|
|
2678
|
+
/**
|
|
2679
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2680
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2681
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2682
|
+
* body; code doesn't count. Empty for other events.
|
|
2683
|
+
*/
|
|
2684
|
+
mentions: string[];
|
|
2573
2685
|
} | {
|
|
2574
2686
|
key: "pull_request_review.dismissed";
|
|
2575
2687
|
deliveryId: string;
|
|
@@ -2628,6 +2740,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2628
2740
|
login: string;
|
|
2629
2741
|
type: "Bot" | "Organization" | "User";
|
|
2630
2742
|
};
|
|
2743
|
+
/**
|
|
2744
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2745
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2746
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2747
|
+
* body; code doesn't count. Empty for other events.
|
|
2748
|
+
*/
|
|
2749
|
+
mentions: string[];
|
|
2631
2750
|
} | {
|
|
2632
2751
|
key: "pull_request_review_comment.created";
|
|
2633
2752
|
deliveryId: string;
|
|
@@ -2685,6 +2804,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2685
2804
|
login: string;
|
|
2686
2805
|
type: "Bot" | "Organization" | "User";
|
|
2687
2806
|
};
|
|
2807
|
+
/**
|
|
2808
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2809
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2810
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2811
|
+
* body; code doesn't count. Empty for other events.
|
|
2812
|
+
*/
|
|
2813
|
+
mentions: string[];
|
|
2688
2814
|
} | {
|
|
2689
2815
|
key: "pull_request_review_comment.edited";
|
|
2690
2816
|
deliveryId: string;
|
|
@@ -2742,6 +2868,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2742
2868
|
login: string;
|
|
2743
2869
|
type: "Bot" | "Organization" | "User";
|
|
2744
2870
|
};
|
|
2871
|
+
/**
|
|
2872
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2873
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2874
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2875
|
+
* body; code doesn't count. Empty for other events.
|
|
2876
|
+
*/
|
|
2877
|
+
mentions: string[];
|
|
2745
2878
|
} | {
|
|
2746
2879
|
key: "push";
|
|
2747
2880
|
deliveryId: string;
|
|
@@ -2788,6 +2921,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2788
2921
|
login: string;
|
|
2789
2922
|
type: "Bot" | "Organization" | "User";
|
|
2790
2923
|
};
|
|
2924
|
+
/**
|
|
2925
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2926
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2927
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2928
|
+
* body; code doesn't count. Empty for other events.
|
|
2929
|
+
*/
|
|
2930
|
+
mentions: string[];
|
|
2791
2931
|
} | {
|
|
2792
2932
|
key: "status";
|
|
2793
2933
|
deliveryId: string;
|
|
@@ -2835,6 +2975,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2835
2975
|
login: string;
|
|
2836
2976
|
type: "Bot" | "Organization" | "User";
|
|
2837
2977
|
};
|
|
2978
|
+
/**
|
|
2979
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
2980
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
2981
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
2982
|
+
* body; code doesn't count. Empty for other events.
|
|
2983
|
+
*/
|
|
2984
|
+
mentions: string[];
|
|
2838
2985
|
} | {
|
|
2839
2986
|
key: "check_run.completed";
|
|
2840
2987
|
deliveryId: string;
|
|
@@ -2886,6 +3033,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2886
3033
|
login: string;
|
|
2887
3034
|
type: "Bot" | "Organization" | "User";
|
|
2888
3035
|
};
|
|
3036
|
+
/**
|
|
3037
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
3038
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
3039
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
3040
|
+
* body; code doesn't count. Empty for other events.
|
|
3041
|
+
*/
|
|
3042
|
+
mentions: string[];
|
|
2889
3043
|
} | {
|
|
2890
3044
|
key: "check_suite.completed";
|
|
2891
3045
|
deliveryId: string;
|
|
@@ -2936,6 +3090,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2936
3090
|
login: string;
|
|
2937
3091
|
type: "Bot" | "Organization" | "User";
|
|
2938
3092
|
};
|
|
3093
|
+
/**
|
|
3094
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
3095
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
3096
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
3097
|
+
* body; code doesn't count. Empty for other events.
|
|
3098
|
+
*/
|
|
3099
|
+
mentions: string[];
|
|
2939
3100
|
} | {
|
|
2940
3101
|
key: "workflow_run.completed";
|
|
2941
3102
|
deliveryId: string;
|
|
@@ -2985,6 +3146,13 @@ export declare const githubEventSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.Zod
|
|
|
2985
3146
|
login: string;
|
|
2986
3147
|
type: "Bot" | "Organization" | "User";
|
|
2987
3148
|
};
|
|
3149
|
+
/**
|
|
3150
|
+
* The handles the event's own text mentions, such as `@octocat` or a text
|
|
3151
|
+
* tag like `@openswe`: lowercased, each once, in order. The text is the
|
|
3152
|
+
* comment's or review's body, or an issue's or pull request's title and
|
|
3153
|
+
* body; code doesn't count. Empty for other events.
|
|
3154
|
+
*/
|
|
3155
|
+
mentions: string[];
|
|
2988
3156
|
}, {
|
|
2989
3157
|
key: "issues.opened";
|
|
2990
3158
|
deliveryId: string;
|