@agentjam/sdk 0.6.0 → 0.7.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 (79) hide show
  1. package/dist/events.d.ts.map +1 -1
  2. package/dist/events.js +27 -0
  3. package/dist/events.js.map +1 -1
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/managedWebhooks.d.ts +15 -0
  8. package/dist/managedWebhooks.d.ts.map +1 -0
  9. package/dist/managedWebhooks.js +115 -0
  10. package/dist/managedWebhooks.js.map +1 -0
  11. package/dist/platforms/atlassian.d.ts +18 -0
  12. package/dist/platforms/atlassian.d.ts.map +1 -0
  13. package/dist/platforms/atlassian.js +24 -0
  14. package/dist/platforms/atlassian.js.map +1 -0
  15. package/dist/platforms/datadog.d.ts +45 -1
  16. package/dist/platforms/datadog.d.ts.map +1 -1
  17. package/dist/platforms/datadog.js +207 -0
  18. package/dist/platforms/datadog.js.map +1 -1
  19. package/dist/platforms/discord.d.ts +64 -16
  20. package/dist/platforms/discord.d.ts.map +1 -1
  21. package/dist/platforms/discord.js +15 -48
  22. package/dist/platforms/discord.js.map +1 -1
  23. package/dist/platforms/discordEvents.d.ts +213 -0
  24. package/dist/platforms/discordEvents.d.ts.map +1 -0
  25. package/dist/platforms/discordEvents.js +270 -0
  26. package/dist/platforms/discordEvents.js.map +1 -0
  27. package/dist/platforms/discordGateway.d.ts +14 -14
  28. package/dist/platforms/discordGateway.d.ts.map +1 -1
  29. package/dist/platforms/discordGateway.js +29 -45
  30. package/dist/platforms/discordGateway.js.map +1 -1
  31. package/dist/platforms/discordInteractions.d.ts +35 -0
  32. package/dist/platforms/discordInteractions.d.ts.map +1 -0
  33. package/dist/platforms/discordInteractions.js +125 -0
  34. package/dist/platforms/discordInteractions.js.map +1 -0
  35. package/dist/platforms/github.d.ts +45 -13
  36. package/dist/platforms/github.d.ts.map +1 -1
  37. package/dist/platforms/github.js +20 -40
  38. package/dist/platforms/github.js.map +1 -1
  39. package/dist/platforms/githubApi.d.ts +2 -0
  40. package/dist/platforms/githubApi.d.ts.map +1 -0
  41. package/dist/platforms/githubApi.js +38 -0
  42. package/dist/platforms/githubApi.js.map +1 -0
  43. package/dist/platforms/githubEvents.d.ts +160 -0
  44. package/dist/platforms/githubEvents.d.ts.map +1 -0
  45. package/dist/platforms/githubEvents.js +446 -0
  46. package/dist/platforms/githubEvents.js.map +1 -0
  47. package/dist/platforms/grafana.d.ts +47 -1
  48. package/dist/platforms/grafana.d.ts.map +1 -1
  49. package/dist/platforms/grafana.js +187 -0
  50. package/dist/platforms/grafana.js.map +1 -1
  51. package/dist/platforms/pagerduty.d.ts +59 -0
  52. package/dist/platforms/pagerduty.d.ts.map +1 -0
  53. package/dist/platforms/pagerduty.js +175 -0
  54. package/dist/platforms/pagerduty.js.map +1 -0
  55. package/dist/platforms/sentry.d.ts +35 -17
  56. package/dist/platforms/sentry.d.ts.map +1 -1
  57. package/dist/platforms/sentry.js +48 -25
  58. package/dist/platforms/sentry.js.map +1 -1
  59. package/dist/platforms/sentryApi.d.ts +3 -0
  60. package/dist/platforms/sentryApi.d.ts.map +1 -0
  61. package/dist/platforms/sentryApi.js +29 -0
  62. package/dist/platforms/sentryApi.js.map +1 -0
  63. package/dist/platforms/sentryEvents.d.ts +64 -0
  64. package/dist/platforms/sentryEvents.d.ts.map +1 -0
  65. package/dist/platforms/sentryEvents.js +183 -0
  66. package/dist/platforms/sentryEvents.js.map +1 -0
  67. package/dist/platforms/slack.d.ts +69 -33
  68. package/dist/platforms/slack.d.ts.map +1 -1
  69. package/dist/platforms/slack.js +29 -36
  70. package/dist/platforms/slack.js.map +1 -1
  71. package/dist/platforms/slackEvents.d.ts +204 -0
  72. package/dist/platforms/slackEvents.d.ts.map +1 -0
  73. package/dist/platforms/slackEvents.js +241 -0
  74. package/dist/platforms/slackEvents.js.map +1 -0
  75. package/dist/platforms/slackInteractions.d.ts +79 -0
  76. package/dist/platforms/slackInteractions.d.ts.map +1 -0
  77. package/dist/platforms/slackInteractions.js +160 -0
  78. package/dist/platforms/slackInteractions.js.map +1 -0
  79. package/package.json +9 -1
@@ -0,0 +1,79 @@
1
+ import type { JsonObject } from "../types.js";
2
+ declare const slackInteractions: {
3
+ command: {
4
+ description: string;
5
+ property: {
6
+ name: string;
7
+ description: string;
8
+ };
9
+ readNames: (form: JsonObject) => (string | undefined)[];
10
+ readChannel: (value: JsonObject) => string | undefined;
11
+ readAccount: (form: JsonObject) => string | undefined;
12
+ readUser: (value: JsonObject) => string | undefined;
13
+ };
14
+ block_actions: {
15
+ readAccount: (payload: JsonObject) => string | undefined;
16
+ readUser: (value: JsonObject) => string | undefined;
17
+ description: string;
18
+ property: {
19
+ name: string;
20
+ description: string;
21
+ };
22
+ readNames: ({ actions }: JsonObject) => (string | undefined)[];
23
+ readChannel: (payload: JsonObject) => string | undefined;
24
+ };
25
+ view_submission: {
26
+ readAccount: (payload: JsonObject) => string | undefined;
27
+ readUser: (value: JsonObject) => string | undefined;
28
+ description: string;
29
+ property: {
30
+ name: string;
31
+ description: string;
32
+ };
33
+ readNames: (payload: JsonObject) => (string | undefined)[];
34
+ };
35
+ shortcut: {
36
+ readAccount: (payload: JsonObject) => string | undefined;
37
+ readUser: (value: JsonObject) => string | undefined;
38
+ description: string;
39
+ property: {
40
+ name: string;
41
+ description: string;
42
+ };
43
+ readNames: (payload: JsonObject) => (string | undefined)[];
44
+ };
45
+ message_action: {
46
+ readAccount: (payload: JsonObject) => string | undefined;
47
+ readUser: (value: JsonObject) => string | undefined;
48
+ description: string;
49
+ property: {
50
+ name: string;
51
+ description: string;
52
+ };
53
+ readNames: (payload: JsonObject) => (string | undefined)[];
54
+ readChannel: (value: JsonObject) => string | undefined;
55
+ };
56
+ };
57
+ /** A Slack interaction `slackTriggers` has a trigger for, such as a slash `command`. */
58
+ export type SlackInteractionType = keyof typeof slackInteractions;
59
+ /** What a schedule's task gets as `task.event.data` when a Slack interaction's trigger runs it. */
60
+ export type SlackInteractionData = {
61
+ type: SlackInteractionType;
62
+ /** The slash command, action id or callback id the interaction is filed under, such as `/deploy`. */
63
+ name: string;
64
+ /** The workspace that installed the app, or its organization for an organization-wide install. */
65
+ account: string;
66
+ channel: string | null;
67
+ /** The user who interacted. */
68
+ user: string | null;
69
+ /** Opens a modal in reply with `views.open`, within 3 seconds of the interaction. */
70
+ triggerId: string;
71
+ /** Posts replies where the interaction happened for 30 minutes, when Slack gives one. */
72
+ responseUrl: string | null;
73
+ /** The interaction as Slack sent it, with a slash command's form fields as an object. */
74
+ payload: JsonObject;
75
+ /** The fields of `payload` left out, largest first, to fit an event's size limit. */
76
+ omitted?: string[];
77
+ };
78
+ export {};
79
+ //# sourceMappingURL=slackInteractions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slackInteractions.d.ts","sourceRoot":"","sources":["../../src/platforms/slackInteractions.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAA4B,MAAM,aAAa,CAAC;AAoCxE,QAAA,MAAM,iBAAiB;;;;YAKjB,IAAI;YACJ,WAAW;;;;;;;;+BAfQ,UAAU;;;;YA6B7B,IAAI;YACJ,WAAW;;;;;;+BA9BQ,UAAU;;;;;;;;;;+BAAV,UAAU;;;;;;;;;;+BAAV,UAAU;;;;;;;;;;CA4Da,CAAC;AAEjD,wFAAwF;AACxF,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAElE,mGAAmG;AACnG,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,qGAAqG;IACrG,IAAI,EAAE,MAAM,CAAC;IACb,kGAAkG;IAClG,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,qFAAqF;IACrF,SAAS,EAAE,MAAM,CAAC;IAClB,yFAAyF;IACzF,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,yFAAyF;IACzF,OAAO,EAAE,UAAU,CAAC;IACpB,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC"}
@@ -0,0 +1,160 @@
1
+ import { AgentJamError } from "../errors.js";
2
+ import { fitLargestFields, maxEventKeyLength, maxEventKeys, } from "../events.js";
3
+ import { truncateSummary } from "../polling.js";
4
+ import { channelProperty, constructSlackKey, readField, readId, readObject, readScheduleChannel, readSlackAccount, } from "./slackEvents.js";
5
+ const callbackProperty = {
6
+ name: "callbackId",
7
+ description: "The callback id the app gave it, such as feedback.",
8
+ };
9
+ const fromPayload = {
10
+ readAccount: (payload) => readId(payload.is_enterprise_install === true
11
+ ? payload.enterprise
12
+ : payload.team),
13
+ readUser: readField("user"),
14
+ };
15
+ const slackInteractions = {
16
+ command: {
17
+ description: "Someone runs one of the app's slash commands, in any channel or in one when `channel` is set",
18
+ property: {
19
+ name: "command",
20
+ description: "The slash command to watch, such as /deploy.",
21
+ },
22
+ readNames: (form) => [readField("command")(form)],
23
+ readChannel: readField("channel_id"),
24
+ readAccount: (form) => readField(form.is_enterprise_install === "true" ? "enterprise_id" : "team_id")(form),
25
+ readUser: readField("user_id"),
26
+ },
27
+ block_actions: {
28
+ description: "Someone clicks a button or picks an option in one of the app's messages or views",
29
+ property: {
30
+ name: "actionId",
31
+ description: "The action id of the element to watch, such as approve.",
32
+ },
33
+ readNames: ({ actions }) => (Array.isArray(actions) ? actions : []).map((action) => readField("action_id")(readObject(action))),
34
+ readChannel: (payload) => readField("channel", "id")(payload) ??
35
+ readField("container", "channel_id")(payload),
36
+ ...fromPayload,
37
+ },
38
+ view_submission: {
39
+ description: "Someone submits one of the app's modals",
40
+ property: callbackProperty,
41
+ readNames: (payload) => [readField("view", "callback_id")(payload)],
42
+ ...fromPayload,
43
+ },
44
+ shortcut: {
45
+ description: "Someone runs one of the app's global shortcuts",
46
+ property: callbackProperty,
47
+ readNames: (payload) => [readField("callback_id")(payload)],
48
+ ...fromPayload,
49
+ },
50
+ message_action: {
51
+ description: "Someone runs one of the app's message shortcuts on a message",
52
+ property: callbackProperty,
53
+ readNames: (payload) => [readField("callback_id")(payload)],
54
+ readChannel: readField("channel", "id"),
55
+ ...fromPayload,
56
+ },
57
+ };
58
+ const interactionTypes = Object.keys(slackInteractions);
59
+ const isInteractionType = (type) => typeof type === "string" && Object.hasOwn(slackInteractions, type);
60
+ const readWatchedName = ({ config, trigger }, property) => {
61
+ const name = config[property];
62
+ if (typeof name !== "string") {
63
+ throw new AgentJamError(`The ${trigger} trigger needs \`${property}\` to know what to watch`);
64
+ }
65
+ return name;
66
+ };
67
+ const constructInteractionTrigger = (type, connection) => {
68
+ const spec = slackInteractions[type];
69
+ const { name: property, description } = spec.property;
70
+ return {
71
+ description: spec.description,
72
+ config: {
73
+ type: "object",
74
+ properties: {
75
+ [property]: { type: "string", description },
76
+ ...(spec.readChannel && { channel: channelProperty }),
77
+ },
78
+ required: [property],
79
+ },
80
+ onScheduleActive: async (schedule, context) => {
81
+ const { id } = await readSlackAccount(context, connection);
82
+ const name = readWatchedName(schedule, property);
83
+ const channel = spec.readChannel && readScheduleChannel(schedule);
84
+ const scope = channel === undefined ? name : `${name}:${channel}`;
85
+ return { eventKeys: [constructSlackKey(id, type, scope)] };
86
+ },
87
+ };
88
+ };
89
+ /** @internal One trigger per Slack interaction, each running a schedule when someone uses what it names. */
90
+ export const constructInteractionTriggers = (connection) => Object.fromEntries(interactionTypes.map((type) => [
91
+ type,
92
+ constructInteractionTrigger(type, connection),
93
+ ]));
94
+ const summarizeInteraction = ({ type, name, user, channel, }) => truncateSummary([
95
+ `Slack ${type} ${name}`,
96
+ user && ` by ${user}`,
97
+ channel && ` in ${channel}`,
98
+ ]
99
+ .filter(Boolean)
100
+ .join(""));
101
+ const readInteraction = (type, payload) => {
102
+ const spec = slackInteractions[type];
103
+ const account = spec.readAccount(payload);
104
+ const triggerId = readField("trigger_id")(payload);
105
+ const names = spec.readNames(payload).filter((name) => name !== undefined);
106
+ const [name] = names;
107
+ if (account === undefined || triggerId === undefined || !name)
108
+ return [];
109
+ const channel = spec.readChannel?.(payload);
110
+ const data = {
111
+ type,
112
+ name,
113
+ account,
114
+ channel: channel ?? null,
115
+ user: spec.readUser(payload) ?? null,
116
+ triggerId,
117
+ responseUrl: readField("response_url")(payload) ?? null,
118
+ payload,
119
+ };
120
+ const eventKeys = names
121
+ .flatMap((watched) => [
122
+ constructSlackKey(account, type, watched),
123
+ ...(channel === undefined
124
+ ? []
125
+ : [constructSlackKey(account, type, `${watched}:${channel}`)]),
126
+ ])
127
+ .filter((key) => key.length <= maxEventKeyLength)
128
+ .slice(0, maxEventKeys);
129
+ return [
130
+ {
131
+ type: "event",
132
+ eventKeys,
133
+ event: {
134
+ id: triggerId,
135
+ summary: summarizeInteraction(data),
136
+ data: fitLargestFields(payload, (kept, omitted) => ({
137
+ ...data,
138
+ payload: kept,
139
+ ...(omitted.length > 0 && { omitted }),
140
+ })),
141
+ },
142
+ },
143
+ ];
144
+ };
145
+ /** @internal Reads the form Slack posts for a slash command or an interaction, such as a button click. */
146
+ export const readInteractions = (body) => {
147
+ const form = new URLSearchParams(body);
148
+ const payload = form.get("payload");
149
+ if (payload === null) {
150
+ return form.has("command")
151
+ ? readInteraction("command", Object.fromEntries(form))
152
+ : [];
153
+ }
154
+ const interaction = readObject(JSON.parse(payload));
155
+ const { type } = interaction;
156
+ return isInteractionType(type) && type !== "command"
157
+ ? readInteraction(type, interaction)
158
+ : [];
159
+ };
160
+ //# sourceMappingURL=slackInteractions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slackInteractions.js","sourceRoot":"","sources":["../../src/platforms/slackInteractions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,GACb,MA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vC,CAAC,CACH;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,0GAA0G;AAC1G,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAiB,EAAE;IAC9D,MAAM,IAAI,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;IACvC,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACpC,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC;YACxB,CAAC,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACtD,CAAC,CAAC,EAAE,CAAC;IACT,CAAC;IAED,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IACpD,MAAM,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC;IAE7B,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,IAAI,KAAK,SAAS;QAClD,CAAC,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC;QACpC,CAAC,CAAC,EAAE,CAAC;AACT,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentjam/sdk",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Allow your agents to discover, message, and delegate tasks to any other agent over AgentJam.",
5
5
  "homepage": "https://agentjam.com",
6
6
  "keywords": [
@@ -32,6 +32,10 @@
32
32
  "types": "./dist/adapters/anthropic.d.ts",
33
33
  "import": "./dist/adapters/anthropic.js"
34
34
  },
35
+ "./atlassian": {
36
+ "types": "./dist/platforms/atlassian.d.ts",
37
+ "import": "./dist/platforms/atlassian.js"
38
+ },
35
39
  "./datadog": {
36
40
  "types": "./dist/platforms/datadog.d.ts",
37
41
  "import": "./dist/platforms/datadog.js"
@@ -72,6 +76,10 @@
72
76
  "types": "./dist/adapters/openaiAgents.d.ts",
73
77
  "import": "./dist/adapters/openaiAgents.js"
74
78
  },
79
+ "./pagerduty": {
80
+ "types": "./dist/platforms/pagerduty.d.ts",
81
+ "import": "./dist/platforms/pagerduty.js"
82
+ },
75
83
  "./posthog": {
76
84
  "types": "./dist/platforms/posthog.d.ts",
77
85
  "import": "./dist/platforms/posthog.js"