@agentjam/sdk 0.6.0 → 0.8.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 (135) hide show
  1. package/README.md +15 -0
  2. package/dist/agent.d.ts +6 -2
  3. package/dist/agent.d.ts.map +1 -1
  4. package/dist/agent.js +42 -12
  5. package/dist/agent.js.map +1 -1
  6. package/dist/events.d.ts.map +1 -1
  7. package/dist/events.js +27 -0
  8. package/dist/events.js.map +1 -1
  9. package/dist/index.d.ts +3 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js.map +1 -1
  12. package/dist/inputs.d.ts +3 -1
  13. package/dist/inputs.d.ts.map +1 -1
  14. package/dist/inputs.js +6 -0
  15. package/dist/inputs.js.map +1 -1
  16. package/dist/managedWebhooks.d.ts +15 -0
  17. package/dist/managedWebhooks.d.ts.map +1 -0
  18. package/dist/managedWebhooks.js +115 -0
  19. package/dist/managedWebhooks.js.map +1 -0
  20. package/dist/platforms/atlassian.d.ts +18 -0
  21. package/dist/platforms/atlassian.d.ts.map +1 -0
  22. package/dist/platforms/atlassian.js +24 -0
  23. package/dist/platforms/atlassian.js.map +1 -0
  24. package/dist/platforms/datadog.d.ts +45 -1
  25. package/dist/platforms/datadog.d.ts.map +1 -1
  26. package/dist/platforms/datadog.js +207 -0
  27. package/dist/platforms/datadog.js.map +1 -1
  28. package/dist/platforms/discord.d.ts +64 -16
  29. package/dist/platforms/discord.d.ts.map +1 -1
  30. package/dist/platforms/discord.js +15 -48
  31. package/dist/platforms/discord.js.map +1 -1
  32. package/dist/platforms/discordEvents.d.ts +213 -0
  33. package/dist/platforms/discordEvents.d.ts.map +1 -0
  34. package/dist/platforms/discordEvents.js +270 -0
  35. package/dist/platforms/discordEvents.js.map +1 -0
  36. package/dist/platforms/discordGateway.d.ts +14 -14
  37. package/dist/platforms/discordGateway.d.ts.map +1 -1
  38. package/dist/platforms/discordGateway.js +29 -45
  39. package/dist/platforms/discordGateway.js.map +1 -1
  40. package/dist/platforms/discordInteractions.d.ts +35 -0
  41. package/dist/platforms/discordInteractions.d.ts.map +1 -0
  42. package/dist/platforms/discordInteractions.js +125 -0
  43. package/dist/platforms/discordInteractions.js.map +1 -0
  44. package/dist/platforms/github.d.ts +45 -13
  45. package/dist/platforms/github.d.ts.map +1 -1
  46. package/dist/platforms/github.js +20 -40
  47. package/dist/platforms/github.js.map +1 -1
  48. package/dist/platforms/githubApi.d.ts +2 -0
  49. package/dist/platforms/githubApi.d.ts.map +1 -0
  50. package/dist/platforms/githubApi.js +38 -0
  51. package/dist/platforms/githubApi.js.map +1 -0
  52. package/dist/platforms/githubEvents.d.ts +160 -0
  53. package/dist/platforms/githubEvents.d.ts.map +1 -0
  54. package/dist/platforms/githubEvents.js +446 -0
  55. package/dist/platforms/githubEvents.js.map +1 -0
  56. package/dist/platforms/grafana.d.ts +47 -1
  57. package/dist/platforms/grafana.d.ts.map +1 -1
  58. package/dist/platforms/grafana.js +187 -0
  59. package/dist/platforms/grafana.js.map +1 -1
  60. package/dist/platforms/pagerduty.d.ts +59 -0
  61. package/dist/platforms/pagerduty.d.ts.map +1 -0
  62. package/dist/platforms/pagerduty.js +175 -0
  63. package/dist/platforms/pagerduty.js.map +1 -0
  64. package/dist/platforms/sentry.d.ts +35 -17
  65. package/dist/platforms/sentry.d.ts.map +1 -1
  66. package/dist/platforms/sentry.js +48 -25
  67. package/dist/platforms/sentry.js.map +1 -1
  68. package/dist/platforms/sentryApi.d.ts +3 -0
  69. package/dist/platforms/sentryApi.d.ts.map +1 -0
  70. package/dist/platforms/sentryApi.js +29 -0
  71. package/dist/platforms/sentryApi.js.map +1 -0
  72. package/dist/platforms/sentryEvents.d.ts +64 -0
  73. package/dist/platforms/sentryEvents.d.ts.map +1 -0
  74. package/dist/platforms/sentryEvents.js +183 -0
  75. package/dist/platforms/sentryEvents.js.map +1 -0
  76. package/dist/platforms/slack.d.ts +69 -33
  77. package/dist/platforms/slack.d.ts.map +1 -1
  78. package/dist/platforms/slack.js +29 -36
  79. package/dist/platforms/slack.js.map +1 -1
  80. package/dist/platforms/slackEvents.d.ts +204 -0
  81. package/dist/platforms/slackEvents.d.ts.map +1 -0
  82. package/dist/platforms/slackEvents.js +241 -0
  83. package/dist/platforms/slackEvents.js.map +1 -0
  84. package/dist/platforms/slackInteractions.d.ts +79 -0
  85. package/dist/platforms/slackInteractions.d.ts.map +1 -0
  86. package/dist/platforms/slackInteractions.js +160 -0
  87. package/dist/platforms/slackInteractions.js.map +1 -0
  88. package/dist/profile.d.ts +2 -1
  89. package/dist/profile.d.ts.map +1 -1
  90. package/dist/profile.js +9 -6
  91. package/dist/profile.js.map +1 -1
  92. package/dist/protocol.d.ts +21 -0
  93. package/dist/protocol.d.ts.map +1 -1
  94. package/dist/relay/memory.d.ts +5 -1
  95. package/dist/relay/memory.d.ts.map +1 -1
  96. package/dist/relay/memory.js +27 -4
  97. package/dist/relay/memory.js.map +1 -1
  98. package/dist/relay/schedules.d.ts +32 -1
  99. package/dist/relay/schedules.d.ts.map +1 -1
  100. package/dist/relay/schedules.js +17 -0
  101. package/dist/relay/schedules.js.map +1 -1
  102. package/dist/relay/sessions.d.ts +2 -0
  103. package/dist/relay/sessions.d.ts.map +1 -1
  104. package/dist/relay/sessions.js +13 -0
  105. package/dist/relay/sessions.js.map +1 -1
  106. package/dist/relay/subscriptions.d.ts +35 -0
  107. package/dist/relay/subscriptions.d.ts.map +1 -0
  108. package/dist/relay/subscriptions.js +95 -0
  109. package/dist/relay/subscriptions.js.map +1 -0
  110. package/dist/subscriptions.d.ts +9 -0
  111. package/dist/subscriptions.d.ts.map +1 -0
  112. package/dist/subscriptions.js +39 -0
  113. package/dist/subscriptions.js.map +1 -0
  114. package/dist/tasks/incoming.d.ts +20 -2
  115. package/dist/tasks/incoming.d.ts.map +1 -1
  116. package/dist/tasks/incoming.js +35 -3
  117. package/dist/tasks/incoming.js.map +1 -1
  118. package/dist/tasks/outgoing.d.ts +15 -0
  119. package/dist/tasks/outgoing.d.ts.map +1 -1
  120. package/dist/tasks/outgoing.js +17 -2
  121. package/dist/tasks/outgoing.js.map +1 -1
  122. package/dist/tasks/scheduled.d.ts +30 -5
  123. package/dist/tasks/scheduled.d.ts.map +1 -1
  124. package/dist/tasks/scheduled.js +14 -3
  125. package/dist/tasks/scheduled.js.map +1 -1
  126. package/dist/tools/network.d.ts.map +1 -1
  127. package/dist/tools/network.js +20 -7
  128. package/dist/tools/network.js.map +1 -1
  129. package/dist/tools/schedules.d.ts +21 -4
  130. package/dist/tools/schedules.d.ts.map +1 -1
  131. package/dist/tools/schedules.js +39 -8
  132. package/dist/tools/schedules.js.map +1 -1
  133. package/dist/types.d.ts +27 -2
  134. package/dist/types.d.ts.map +1 -1
  135. package/package.json +9 -1
@@ -0,0 +1,160 @@
1
+ import type { CredentialSource } from "../connections.js";
2
+ import type { IncomingTask } from "../tasks/incoming.js";
3
+ import type { JsonObject } from "../types.js";
4
+ declare const constructComparePath: (payload: JsonObject) => string | undefined;
5
+ declare const githubEvents: {
6
+ readonly commit_comment: {
7
+ readonly description: "A commit or diff is commented on in a GitHub repository";
8
+ readonly actions: readonly ["created"];
9
+ };
10
+ readonly create: {
11
+ readonly description: "A branch or tag is created in a GitHub repository";
12
+ };
13
+ readonly delete: {
14
+ readonly description: "A branch or tag is deleted in a GitHub repository";
15
+ };
16
+ readonly fork: {
17
+ readonly description: "A GitHub repository is forked";
18
+ };
19
+ readonly gollum: {
20
+ readonly description: "A wiki page of a GitHub repository is created or updated";
21
+ };
22
+ readonly installation_target: {
23
+ readonly description: "The account a GitHub App is installed on is renamed";
24
+ readonly scope: "account";
25
+ readonly actions: readonly ["renamed"];
26
+ };
27
+ readonly issue_comment: {
28
+ readonly description: "A comment on an issue or pull request in a GitHub repository is created, edited, deleted, pinned, or unpinned";
29
+ readonly actions: readonly ["created", "deleted", "edited", "pinned", "unpinned"];
30
+ };
31
+ readonly issue_dependencies: {
32
+ readonly description: "An issue's dependency, such as blocked by or blocking, is added or removed in a GitHub repository";
33
+ readonly actions: readonly ["blocked_by_added", "blocked_by_removed", "blocking_added", "blocking_removed"];
34
+ };
35
+ readonly issue_relates_to: {
36
+ readonly description: "A related issue is added to or removed from an issue in a GitHub repository";
37
+ readonly actions: readonly ["relates_to_added", "relates_to_removed"];
38
+ };
39
+ readonly issues: {
40
+ readonly description: "An issue in a GitHub repository is opened, edited, closed, assigned, labeled, or otherwise changed";
41
+ readonly actions: readonly ["assigned", "closed", "deleted", "demilestoned", "edited", "field_added", "field_removed", "labeled", "locked", "milestoned", "opened", "pinned", "reopened", "status_changed", "transferred", "typed", "unassigned", "unlabeled", "unlocked", "unpinned", "untyped"];
42
+ };
43
+ readonly label: {
44
+ readonly description: "A label of a GitHub repository is created, edited, deleted, archived, or unarchived";
45
+ readonly actions: readonly ["archived", "created", "deleted", "edited", "unarchived"];
46
+ };
47
+ readonly merge_group: {
48
+ readonly description: "A pull request joins a GitHub repository's merge queue, which requests its checks, or its merge group is destroyed";
49
+ readonly actions: readonly ["checks_requested", "destroyed"];
50
+ };
51
+ readonly meta: {
52
+ readonly description: "The webhook of the agent's GitHub App or repository is deleted";
53
+ readonly scope: "global";
54
+ readonly actions: readonly ["deleted"];
55
+ };
56
+ readonly milestone: {
57
+ readonly description: "A milestone of a GitHub repository is created, opened, closed, edited, or deleted";
58
+ readonly actions: readonly ["closed", "created", "deleted", "edited", "opened"];
59
+ };
60
+ readonly public: {
61
+ readonly description: "A GitHub repository changes from private to public";
62
+ };
63
+ readonly pull_request: {
64
+ readonly description: "A pull request in a GitHub repository is opened, edited, closed, synchronized, labeled, or otherwise changed";
65
+ readonly actions: readonly ["assigned", "auto_merge_disabled", "auto_merge_enabled", "closed", "converted_to_draft", "demilestoned", "dequeued", "edited", "enqueued", "labeled", "locked", "milestoned", "opened", "ready_for_review", "reopened", "review_request_removed", "review_requested", "stacked", "synchronize", "unassigned", "unlabeled", "unlocked"];
66
+ };
67
+ readonly pull_request_review: {
68
+ readonly description: "A pull request review is submitted, edited, or dismissed in a GitHub repository";
69
+ readonly actions: readonly ["dismissed", "edited", "submitted"];
70
+ };
71
+ readonly pull_request_review_comment: {
72
+ readonly description: "A comment on a pull request's diff is created, edited, or deleted in a GitHub repository";
73
+ readonly actions: readonly ["created", "deleted", "edited"];
74
+ };
75
+ readonly pull_request_review_thread: {
76
+ readonly description: "A pull request review thread is resolved or unresolved in a GitHub repository";
77
+ readonly actions: readonly ["resolved", "unresolved"];
78
+ };
79
+ readonly push: {
80
+ readonly description: "Commits or tags are pushed to a GitHub repository";
81
+ readonly refetch: {
82
+ readonly commits: {
83
+ readonly path: typeof constructComparePath;
84
+ readonly pick: "commits";
85
+ };
86
+ };
87
+ };
88
+ readonly release: {
89
+ readonly description: "A release of a GitHub repository is created, edited, published, unpublished, or deleted";
90
+ readonly actions: readonly ["created", "deleted", "edited", "prereleased", "published", "released", "unpublished"];
91
+ };
92
+ readonly repository: {
93
+ readonly description: "A GitHub repository is created, deleted, archived, unarchived, publicized, privatized, edited, renamed, or transferred";
94
+ readonly actions: readonly ["archived", "created", "deleted", "edited", "privatized", "publicized", "renamed", "transferred", "unarchived"];
95
+ };
96
+ readonly repository_dispatch: {
97
+ readonly description: "A repository dispatch is sent to a GitHub repository";
98
+ readonly actions: "custom";
99
+ };
100
+ readonly security_advisory: {
101
+ readonly description: "A GitHub-reviewed global security advisory is published, updated, or withdrawn";
102
+ readonly scope: "global";
103
+ readonly actions: readonly ["published", "updated", "withdrawn"];
104
+ };
105
+ readonly star: {
106
+ readonly description: "A GitHub repository is starred or unstarred";
107
+ readonly actions: readonly ["created", "deleted"];
108
+ };
109
+ readonly sub_issues: {
110
+ readonly description: "A sub-issue or parent issue is added or removed in a GitHub repository";
111
+ readonly actions: readonly ["parent_issue_added", "parent_issue_removed", "sub_issue_added", "sub_issue_removed"];
112
+ };
113
+ readonly watch: {
114
+ readonly description: "Someone stars a GitHub repository";
115
+ readonly actions: readonly ["started"];
116
+ };
117
+ readonly workflow_dispatch: {
118
+ readonly description: "A GitHub Actions workflow is run manually in a GitHub repository";
119
+ };
120
+ readonly workflow_job: {
121
+ readonly description: "A GitHub Actions workflow job is queued, waiting, in progress, or completed in a GitHub repository";
122
+ readonly actions: readonly ["completed", "in_progress", "queued", "waiting"];
123
+ };
124
+ readonly workflow_run: {
125
+ readonly description: "A GitHub Actions workflow run is requested, in progress, or completed in a GitHub repository";
126
+ readonly actions: readonly ["completed", "in_progress", "requested"];
127
+ };
128
+ };
129
+ /** The name of a GitHub webhook event that `githubTriggers()` has a trigger for, such as `issue_comment`. */
130
+ export type GitHubEventName = keyof typeof githubEvents;
131
+ /** A GitHub webhook event, as the `task.event.data` of a run of one of the event triggers `githubTriggers()` returns. */
132
+ export type GitHubEventData<Payload extends object = JsonObject> = {
133
+ /** The webhook event's name, such as `issue_comment`. */
134
+ event: GitHubEventName;
135
+ /** What happened, such as `created`, for events that have actions. */
136
+ action: string | null;
137
+ /** The delivery's `X-GitHub-Delivery` id, which GitHub keeps when it redelivers. */
138
+ deliveryId: string;
139
+ /** The repository the event happened in, as `owner/name`. */
140
+ repository: string | null;
141
+ repositoryId: number | null;
142
+ /** The login of the user whose action caused the event. */
143
+ sender: string | null;
144
+ /** GitHub's webhook payload, without the fields `omitted` names. */
145
+ payload: Payload;
146
+ /** The fields left out of a payload over 64 KB, each with the API URL it's fetched again from, or null if GitHub has none. */
147
+ omitted?: Record<string, string | null>;
148
+ };
149
+ /**
150
+ * Reads the GitHub webhook event that started a run of one of `githubTriggers()`' event triggers. When its payload
151
+ * was too large to carry whole, it fetches the fields left out with the schedule's token through `connection`.
152
+ *
153
+ * @param task The run, as `onTask` receives it.
154
+ * @param connection The skill's GitHub connection.
155
+ * @returns The event, with every field GitHub still has back in its `payload`.
156
+ * @throws {AgentJamError} If the run didn't start on a GitHub webhook event, or GitHub refused a request.
157
+ */
158
+ export declare const readGitHubEvent: <Payload extends object = JsonObject>(task: Pick<IncomingTask, "event" | "credentials">, connection: CredentialSource) => Promise<GitHubEventData<Payload>>;
159
+ export {};
160
+ //# sourceMappingURL=githubEvents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"githubEvents.d.ts","sourceRoot":"","sources":["../../src/platforms/githubEvents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAS1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EACV,UAAU,EAIX,MAAM,aAAa,CAAC;AAgDrB,QAAA,MAAM,oBAAoB,YAAa,UAAU,uBAOhD,CAAC;AAEF,QAAA,MAAM,YAAY;;iBAEd,WAAW,EAAE,yDAAyD;iBACtE,OAAO;;;iBAEC,WAAW,EAAE,mDAAmD;;;iBAChE,WAAW,EAAE,mDAAmD;;;iBAClE,WAAW,EAAE,+BAA+B;;;iBAElD,WAAW,EAAE,0DAA0D;;;iBAGvE,WAAW,EAAE,qDAAqD;iBAClE,KAAK,EAAE,SAAS;iBAChB,OAAO;;;iBAGP,WAAW,EACT,+GAA+G;iBACjH,OAAO;;;iBAGP,WAAW,EACT,mGAAmG;iBACrG,OAAO;;;iBAQP,WAAW,EACT,6EAA6E;iBAC/E,OAAO;;;iBAGP,WAAW,EACT,oGAAoG;iBACtG,OAAO;;;iBAyBP,WAAW,EACT,qFAAqF;iBACvF,OAAO;;;iBAGP,WAAW,EACT,oHAAoH;iBACtH,OAAO;;;iBAGP,WAAW,EACT,gEAAgE;iBAClE,KAAK,EAAE,QAAQ;iBACf,OAAO;;;iBAGP,WAAW,EACT,mFAAmF;iBACrF,OAAO;;;iBAEC,WAAW,EAAE,oDAAoD;;;iBAEzE,WAAW,EACT,8GAA8G;iBAChH,OAAO;;;iBA0BP,WAAW,EACT,iFAAiF;iBACnF,OAAO;;;iBAGP,WAAW,EACT,0FAA0F;iBAC5F,OAAO;;;iBAGP,WAAW,EACT,+EAA+E;iBACjF,OAAO;;;iBAGP,WAAW,EAAE,mDAAmD;iBA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AAI,CAAC,YAAY,EAAE,OAAO,GAAG,aAAa,CAAC,cACrC,gBAAgB,KAC3B,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,CAwClC,CAAC"}
@@ -0,0 +1,446 @@
1
+ import { AgentJamError } from "../errors.js";
2
+ import { fitLargestFields, maxEventKeyLength, maxEventKeys, } from "../events.js";
3
+ import { truncateSummary } from "../polling.js";
4
+ import { constructGitHubError, fetchGitHub, getRepository, githubApi, repositoryProperty, } from "./githubApi.js";
5
+ const readObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value)
6
+ ? value
7
+ : undefined;
8
+ const readText = (object, key) => {
9
+ const value = object?.[key];
10
+ return typeof value === "string" ? value : undefined;
11
+ };
12
+ const readNumber = (object, key) => {
13
+ const value = object?.[key];
14
+ return typeof value === "number" ? value : undefined;
15
+ };
16
+ const constructComparePath = (payload) => {
17
+ const repository = readText(readObject(payload.repository), "full_name");
18
+ const before = readText(payload, "before");
19
+ const after = readText(payload, "after");
20
+ if (!repository || !before || !after)
21
+ return undefined;
22
+ return `/repos/${repository}/compare/${before}...${after}`;
23
+ };
24
+ const githubEvents = {
25
+ commit_comment: {
26
+ description: "A commit or diff is commented on in a GitHub repository",
27
+ actions: ["created"],
28
+ },
29
+ create: { description: "A branch or tag is created in a GitHub repository" },
30
+ delete: { description: "A branch or tag is deleted in a GitHub repository" },
31
+ fork: { description: "A GitHub repository is forked" },
32
+ gollum: {
33
+ description: "A wiki page of a GitHub repository is created or updated",
34
+ },
35
+ installation_target: {
36
+ description: "The account a GitHub App is installed on is renamed",
37
+ scope: "account",
38
+ actions: ["renamed"],
39
+ },
40
+ issue_comment: {
41
+ description: "A comment on an issue or pull request in a GitHub repository is created, edited, deleted, pinned, or unpinned",
42
+ actions: ["created", "deleted", "edited", "pinned", "unpinned"],
43
+ },
44
+ issue_dependencies: {
45
+ description: "An issue's dependency, such as blocked by or blocking, is added or removed in a GitHub repository",
46
+ actions: [
47
+ "blocked_by_added",
48
+ "blocked_by_removed",
49
+ "blocking_added",
50
+ "blocking_removed",
51
+ ],
52
+ },
53
+ issue_relates_to: {
54
+ description: "A related issue is added to or removed from an issue in a GitHub repository",
55
+ actions: ["relates_to_added", "relates_to_removed"],
56
+ },
57
+ issues: {
58
+ description: "An issue in a GitHub repository is opened, edited, closed, assigned, labeled, or otherwise changed",
59
+ actions: [
60
+ "assigned",
61
+ "closed",
62
+ "deleted",
63
+ "demilestoned",
64
+ "edited",
65
+ "field_added",
66
+ "field_removed",
67
+ "labeled",
68
+ "locked",
69
+ "milestoned",
70
+ "opened",
71
+ "pinned",
72
+ "reopened",
73
+ "status_changed",
74
+ "transferred",
75
+ "typed",
76
+ "unassigned",
77
+ "unlabeled",
78
+ "unlocked",
79
+ "unpinned",
80
+ "untyped",
81
+ ],
82
+ },
83
+ label: {
84
+ description: "A label of a GitHub repository is created, edited, deleted, archived, or unarchived",
85
+ actions: ["archived", "created", "deleted", "edited", "unarchived"],
86
+ },
87
+ merge_group: {
88
+ description: "A pull request joins a GitHub repository's merge queue, which requests its checks, or its merge group is destroyed",
89
+ actions: ["checks_requested", "destroyed"],
90
+ },
91
+ meta: {
92
+ description: "The webhook of the agent's GitHub App or repository is deleted",
93
+ scope: "global",
94
+ actions: ["deleted"],
95
+ },
96
+ milestone: {
97
+ description: "A milestone of a GitHub repository is created, opened, closed, edited, or deleted",
98
+ actions: ["closed", "created", "deleted", "edited", "opened"],
99
+ },
100
+ public: { description: "A GitHub repository changes from private to public" },
101
+ pull_request: {
102
+ description: "A pull request in a GitHub repository is opened, edited, closed, synchronized, labeled, or otherwise changed",
103
+ actions: [
104
+ "assigned",
105
+ "auto_merge_disabled",
106
+ "auto_merge_enabled",
107
+ "closed",
108
+ "converted_to_draft",
109
+ "demilestoned",
110
+ "dequeued",
111
+ "edited",
112
+ "enqueued",
113
+ "labeled",
114
+ "locked",
115
+ "milestoned",
116
+ "opened",
117
+ "ready_for_review",
118
+ "reopened",
119
+ "review_request_removed",
120
+ "review_requested",
121
+ "stacked",
122
+ "synchronize",
123
+ "unassigned",
124
+ "unlabeled",
125
+ "unlocked",
126
+ ],
127
+ },
128
+ pull_request_review: {
129
+ description: "A pull request review is submitted, edited, or dismissed in a GitHub repository",
130
+ actions: ["dismissed", "edited", "submitted"],
131
+ },
132
+ pull_request_review_comment: {
133
+ description: "A comment on a pull request's diff is created, edited, or deleted in a GitHub repository",
134
+ actions: ["created", "deleted", "edited"],
135
+ },
136
+ pull_request_review_thread: {
137
+ description: "A pull request review thread is resolved or unresolved in a GitHub repository",
138
+ actions: ["resolved", "unresolved"],
139
+ },
140
+ push: {
141
+ description: "Commits or tags are pushed to a GitHub repository",
142
+ refetch: { commits: { path: constructComparePath, pick: "commits" } },
143
+ },
144
+ release: {
145
+ description: "A release of a GitHub repository is created, edited, published, unpublished, or deleted",
146
+ actions: [
147
+ "created",
148
+ "deleted",
149
+ "edited",
150
+ "prereleased",
151
+ "published",
152
+ "released",
153
+ "unpublished",
154
+ ],
155
+ },
156
+ repository: {
157
+ description: "A GitHub repository is created, deleted, archived, unarchived, publicized, privatized, edited, renamed, or transferred",
158
+ actions: [
159
+ "archived",
160
+ "created",
161
+ "deleted",
162
+ "edited",
163
+ "privatized",
164
+ "publicized",
165
+ "renamed",
166
+ "transferred",
167
+ "unarchived",
168
+ ],
169
+ },
170
+ repository_dispatch: {
171
+ description: "A repository dispatch is sent to a GitHub repository",
172
+ actions: "custom",
173
+ },
174
+ security_advisory: {
175
+ description: "A GitHub-reviewed global security advisory is published, updated, or withdrawn",
176
+ scope: "global",
177
+ actions: ["published", "updated", "withdrawn"],
178
+ },
179
+ star: {
180
+ description: "A GitHub repository is starred or unstarred",
181
+ actions: ["created", "deleted"],
182
+ },
183
+ sub_issues: {
184
+ description: "A sub-issue or parent issue is added or removed in a GitHub repository",
185
+ actions: [
186
+ "parent_issue_added",
187
+ "parent_issue_removed",
188
+ "sub_issue_added",
189
+ "sub_issue_removed",
190
+ ],
191
+ },
192
+ watch: {
193
+ description: "Someone stars a GitHub repository",
194
+ actions: ["started"],
195
+ },
196
+ workflow_dispatch: {
197
+ description: "A GitHub Actions workflow is run manually in a GitHub repository",
198
+ },
199
+ workflow_job: {
200
+ description: "A GitHub Actions workflow job is queued, waiting, in progress, or completed in a GitHub repository",
201
+ actions: ["completed", "in_progress", "queued", "waiting"],
202
+ },
203
+ workflow_run: {
204
+ description: "A GitHub Actions workflow run is requested, in progress, or completed in a GitHub repository",
205
+ actions: ["completed", "in_progress", "requested"],
206
+ },
207
+ };
208
+ const eventNames = Object.keys(githubEvents);
209
+ const accountProperty = {
210
+ type: "string",
211
+ pattern: "^[A-Za-z0-9-]{1,39}$",
212
+ description: "The login of the GitHub user or organization the app is installed on",
213
+ };
214
+ const scopeConfigs = {
215
+ repository: {
216
+ properties: { repository: repositoryProperty },
217
+ required: ["repository"],
218
+ },
219
+ account: { properties: { account: accountProperty }, required: ["account"] },
220
+ global: { properties: {} },
221
+ };
222
+ const goneStatuses = new Set([404, 410]);
223
+ const isGitHubEventName = (name) => Object.hasOwn(githubEvents, name);
224
+ const findSpec = (name) => githubEvents[name];
225
+ const isGitHubApiUrl = (url) => URL.canParse(url) && new URL(url).origin === githubApi;
226
+ const constructScopePrefix = (scope) => {
227
+ switch (scope.kind) {
228
+ case "repository":
229
+ return `github:${scope.id}`;
230
+ case "account":
231
+ return `github:account:${scope.id}`;
232
+ case "global":
233
+ return "github";
234
+ default: {
235
+ const unknown = scope;
236
+ throw new AgentJamError(`Unknown GitHub event scope: ${JSON.stringify(unknown)}`);
237
+ }
238
+ }
239
+ };
240
+ const constructEventKey = (name, scope, action) => `${constructScopePrefix(scope)}:${name}${action === undefined ? "" : `.${action}`}`;
241
+ const constructActionsProperty = (actions) => ({
242
+ type: "array",
243
+ items: actions === "custom"
244
+ ? { type: "string", minLength: 1, maxLength: 100 }
245
+ : { type: "string", enum: [...actions] },
246
+ minItems: 1,
247
+ maxItems: maxEventKeys,
248
+ uniqueItems: true,
249
+ description: actions === "custom"
250
+ ? "The event types of the dispatches to run on. Leave it out to run on every dispatch"
251
+ : "The actions to run on. Leave it out to run on every action",
252
+ });
253
+ const constructEventConfig = ({ scope = "repository", actions, }) => {
254
+ const { properties, required } = scopeConfigs[scope];
255
+ return {
256
+ type: "object",
257
+ properties: {
258
+ ...properties,
259
+ ...(actions && { actions: constructActionsProperty(actions) }),
260
+ },
261
+ ...(required && { required }),
262
+ };
263
+ };
264
+ const getAccountId = async (token, account) => {
265
+ const path = `/users/${encodeURIComponent(account)}`;
266
+ const response = await fetchGitHub(token, path);
267
+ if (goneStatuses.has(response.status)) {
268
+ throw new AgentJamError(`GitHub has no account named ${account}, so it can't be watched`);
269
+ }
270
+ if (!response.ok)
271
+ throw await constructGitHubError(response, path);
272
+ const { id } = (await response.json());
273
+ return id;
274
+ };
275
+ const resolveScheduleScope = async (scope, { config }, readToken) => {
276
+ switch (scope) {
277
+ case "repository": {
278
+ const { id } = await getRepository(await readToken(), String(config.repository));
279
+ return { kind: "repository", id };
280
+ }
281
+ case "account": {
282
+ const id = await getAccountId(await readToken(), String(config.account));
283
+ return { kind: "account", id };
284
+ }
285
+ case "global":
286
+ return { kind: "global" };
287
+ default: {
288
+ const unknown = scope;
289
+ throw new AgentJamError(`Unknown GitHub event scope: ${String(unknown)}`);
290
+ }
291
+ }
292
+ };
293
+ const constructEventTrigger = (name, connection) => {
294
+ const spec = findSpec(name);
295
+ return {
296
+ description: spec.description,
297
+ config: constructEventConfig(spec),
298
+ onScheduleActive: async (schedule, { credentials }) => {
299
+ const scope = await resolveScheduleScope(spec.scope ?? "repository", schedule, () => credentials(connection));
300
+ const actions = schedule.config.actions;
301
+ const eventKeys = actions === undefined
302
+ ? [constructEventKey(name, scope)]
303
+ : actions.map((action) => constructEventKey(name, scope, action));
304
+ return { eventKeys };
305
+ },
306
+ };
307
+ };
308
+ /** @internal One trigger per GitHub webhook event, named after it. */
309
+ export const constructEventTriggers = (connection) => Object.fromEntries(eventNames.map((name) => [name, constructEventTrigger(name, connection)]));
310
+ const readDeliveryScope = (scope, payload) => {
311
+ if (scope === "global")
312
+ return { kind: "global" };
313
+ const id = readNumber(readObject(payload[scope]), "id");
314
+ return id === undefined ? undefined : { kind: scope, id };
315
+ };
316
+ const readSubject = (payload) => {
317
+ const item = readObject(payload.pull_request) ?? readObject(payload.issue);
318
+ if (item)
319
+ return `#${String(item.number)} ${String(item.title)}`;
320
+ return (readText(readObject(payload.release), "tag_name") ??
321
+ readText(readObject(payload.workflow_run), "name") ??
322
+ readText(readObject(payload.workflow_job), "name") ??
323
+ readText(readObject(payload.security_advisory), "summary") ??
324
+ readText(payload, "ref"));
325
+ };
326
+ const summarizeEvent = ({ event, action, repository, sender, payload, }) => {
327
+ const subject = readSubject(payload);
328
+ const parts = [
329
+ event,
330
+ action && ` ${action}`,
331
+ repository && ` in ${repository}`,
332
+ sender && ` by ${sender}`,
333
+ subject && `: ${subject}`,
334
+ ];
335
+ return truncateSummary(parts.filter(Boolean).join(""));
336
+ };
337
+ const findRefetchUrl = (spec, field, payload) => {
338
+ const url = readText(readObject(payload[field]), "url");
339
+ if (url !== undefined && isGitHubApiUrl(url))
340
+ return url;
341
+ const path = spec.refetch?.[field]?.path(payload);
342
+ return path === undefined ? null : new URL(path, githubApi).href;
343
+ };
344
+ /** Leaves the largest fields out of a payload too large for an event's data, until the data fits. */
345
+ const fitEventData = (data, spec) => fitLargestFields(data.payload, (payload, omitted) => ({
346
+ ...data,
347
+ payload,
348
+ ...(omitted.length > 0 && {
349
+ omitted: Object.fromEntries(omitted.map((field) => [
350
+ field,
351
+ findRefetchUrl(spec, field, data.payload),
352
+ ])),
353
+ }),
354
+ }));
355
+ /** @internal Reads a delivery of the webhook event `name` under the keys its trigger subscribes schedules to. */
356
+ export const readEventDelivery = (name, deliveryId, payload) => {
357
+ if (!isGitHubEventName(name))
358
+ return [];
359
+ const spec = findSpec(name);
360
+ const scope = readDeliveryScope(spec.scope ?? "repository", payload);
361
+ if (!scope)
362
+ return [];
363
+ const action = readText(payload, "action") ?? null;
364
+ const repository = readObject(payload.repository);
365
+ const data = {
366
+ event: name,
367
+ action,
368
+ deliveryId,
369
+ repository: readText(repository, "full_name") ?? null,
370
+ repositoryId: readNumber(repository, "id") ?? null,
371
+ sender: readText(readObject(payload.sender), "login") ?? null,
372
+ payload,
373
+ };
374
+ const eventKeys = [
375
+ constructEventKey(name, scope),
376
+ ...(action === null ? [] : [constructEventKey(name, scope, action)]),
377
+ ].filter((key) => key.length <= maxEventKeyLength);
378
+ return [
379
+ {
380
+ type: "event",
381
+ eventKeys,
382
+ event: {
383
+ id: `github:delivery:${deliveryId}`,
384
+ summary: summarizeEvent(data),
385
+ data: fitEventData(data, spec),
386
+ },
387
+ },
388
+ ];
389
+ };
390
+ const isGitHubEventData = (data) => typeof data?.event === "string" &&
391
+ isGitHubEventName(data.event) &&
392
+ typeof data.deliveryId === "string" &&
393
+ readObject(data.payload) !== undefined;
394
+ const isRefetchable = (entry) => entry[1] !== null;
395
+ /** Fetches a field left out of a payload, or resolves to undefined once GitHub no longer has it. */
396
+ const fetchOmitted = async (token, url, pick) => {
397
+ const response = await fetchGitHub(token, url);
398
+ if (goneStatuses.has(response.status))
399
+ return undefined;
400
+ if (!response.ok)
401
+ throw await constructGitHubError(response, url);
402
+ const body = await response.json();
403
+ return pick === undefined ? body : readObject(body)?.[pick];
404
+ };
405
+ /**
406
+ * Reads the GitHub webhook event that started a run of one of `githubTriggers()`' event triggers. When its payload
407
+ * was too large to carry whole, it fetches the fields left out with the schedule's token through `connection`.
408
+ *
409
+ * @param task The run, as `onTask` receives it.
410
+ * @param connection The skill's GitHub connection.
411
+ * @returns The event, with every field GitHub still has back in its `payload`.
412
+ * @throws {AgentJamError} If the run didn't start on a GitHub webhook event, or GitHub refused a request.
413
+ */
414
+ export const readGitHubEvent = async (task, connection) => {
415
+ const data = task.event?.data;
416
+ if (!isGitHubEventData(data)) {
417
+ throw new AgentJamError("The task's event isn't a GitHub webhook event");
418
+ }
419
+ const { omitted: left = {}, ...event } = data;
420
+ const omitted = Object.entries(left);
421
+ const refetchable = omitted.filter(isRefetchable);
422
+ if (refetchable.length === 0)
423
+ return data;
424
+ const foreign = refetchable.find(([, url]) => !isGitHubApiUrl(url));
425
+ if (foreign) {
426
+ throw new AgentJamError(`Refusing to send a GitHub token to ${foreign[1]}`);
427
+ }
428
+ const token = await task.credentials(connection);
429
+ const { refetch } = findSpec(data.event);
430
+ const restored = await Promise.all(refetchable.map(async ([field, url]) => ({
431
+ field,
432
+ value: await fetchOmitted(token, url, refetch?.[field]?.pick),
433
+ })));
434
+ const found = restored.filter(({ value }) => value !== undefined);
435
+ const missing = omitted.filter(([field]) => found.every((entry) => entry.field !== field));
436
+ const payload = {
437
+ ...data.payload,
438
+ ...Object.fromEntries(found.map(({ field, value }) => [field, value])),
439
+ };
440
+ return {
441
+ ...event,
442
+ payload,
443
+ ...(missing.length > 0 && { omitted: Object.fromEntries(missing) }),
444
+ };
445
+ };
446
+ //# sourceMappingURL=githubEvents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"githubEvents.js","sourceRoot":"","sources":["../../src/platforms/githubEvents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAQhD,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,aAAa,EACb,SAAS,EACT,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAwBxB,MAAM,UAAU,GAAG,CAAC,KAAc,EAA0B,EAAE,CAC5D,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;IAClE,CAAC,CAAE,KAAoB;IACvB,CAAC,CAAC,SAAS,CAAC;AAEhB,MAAM,QAAQ,GAAG,CAAC,MAA8B,EAAE,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