managed-deepagents 0.9.4-dev.9 → 0.10.0-dev.10

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 (157) hide show
  1. package/README.md +345 -19
  2. package/dist/agent-auth.d.ts +1 -1
  3. package/dist/agent-auth.d.ts.map +1 -1
  4. package/dist/agent-auth.js +36 -12
  5. package/dist/agent-auth.js.map +1 -1
  6. package/dist/channels/github/connections.d.ts +11 -0
  7. package/dist/channels/github/connections.d.ts.map +1 -0
  8. package/dist/channels/github/connections.js +14 -0
  9. package/dist/channels/github/connections.js.map +1 -0
  10. package/dist/channels/github/index.d.ts +8 -0
  11. package/dist/channels/github/index.d.ts.map +1 -0
  12. package/dist/channels/github/index.js +268 -0
  13. package/dist/channels/github/index.js.map +1 -0
  14. package/dist/channels/github/schema.d.ts +3894 -0
  15. package/dist/channels/github/schema.d.ts.map +1 -0
  16. package/dist/channels/github/schema.js +188 -0
  17. package/dist/channels/github/schema.js.map +1 -0
  18. package/dist/channels/github/types.d.ts +138 -0
  19. package/dist/channels/github/types.d.ts.map +1 -0
  20. package/dist/channels/github/types.js +2 -0
  21. package/dist/channels/github/types.js.map +1 -0
  22. package/dist/channels/http/endpoint.d.ts +41 -0
  23. package/dist/channels/http/endpoint.d.ts.map +1 -0
  24. package/dist/channels/http/endpoint.js +132 -0
  25. package/dist/channels/http/endpoint.js.map +1 -0
  26. package/dist/channels/http/http.d.ts.map +1 -1
  27. package/dist/channels/http/http.js +301 -49
  28. package/dist/channels/http/http.js.map +1 -1
  29. package/dist/channels/http/index.d.ts +2 -1
  30. package/dist/channels/http/index.d.ts.map +1 -1
  31. package/dist/channels/http/index.js +11 -1
  32. package/dist/channels/http/index.js.map +1 -1
  33. package/dist/channels/http/ingress.d.ts +61 -5
  34. package/dist/channels/http/ingress.d.ts.map +1 -1
  35. package/dist/channels/http/ingress.js +138 -29
  36. package/dist/channels/http/ingress.js.map +1 -1
  37. package/dist/channels/http/provider.d.ts +99 -0
  38. package/dist/channels/http/provider.d.ts.map +1 -0
  39. package/dist/channels/http/provider.js +188 -0
  40. package/dist/channels/http/provider.js.map +1 -0
  41. package/dist/channels/http/reply.d.ts +20 -0
  42. package/dist/channels/http/reply.d.ts.map +1 -0
  43. package/dist/channels/http/reply.js +116 -0
  44. package/dist/channels/http/reply.js.map +1 -0
  45. package/dist/channels/http/studio.d.ts +17 -0
  46. package/dist/channels/http/studio.d.ts.map +1 -0
  47. package/dist/channels/http/studio.js +82 -0
  48. package/dist/channels/http/studio.js.map +1 -0
  49. package/dist/channels/http/threads.d.ts +7 -0
  50. package/dist/channels/http/threads.d.ts.map +1 -0
  51. package/dist/channels/http/threads.js +10 -0
  52. package/dist/channels/http/threads.js.map +1 -0
  53. package/dist/channels/http/types.d.ts +113 -1
  54. package/dist/channels/http/types.d.ts.map +1 -1
  55. package/dist/channels/linear/connections.d.ts +11 -0
  56. package/dist/channels/linear/connections.d.ts.map +1 -0
  57. package/dist/channels/linear/connections.js +14 -0
  58. package/dist/channels/linear/connections.js.map +1 -0
  59. package/dist/channels/linear/graphql.d.ts +57 -0
  60. package/dist/channels/linear/graphql.d.ts.map +1 -0
  61. package/dist/channels/linear/graphql.js +167 -0
  62. package/dist/channels/linear/graphql.js.map +1 -0
  63. package/dist/channels/linear/index.d.ts +9 -0
  64. package/dist/channels/linear/index.d.ts.map +1 -0
  65. package/dist/channels/linear/index.js +477 -0
  66. package/dist/channels/linear/index.js.map +1 -0
  67. package/dist/channels/linear/schema.d.ts +1064 -0
  68. package/dist/channels/linear/schema.d.ts.map +1 -0
  69. package/dist/channels/linear/schema.js +249 -0
  70. package/dist/channels/linear/schema.js.map +1 -0
  71. package/dist/channels/linear/types.d.ts +150 -0
  72. package/dist/channels/linear/types.d.ts.map +1 -0
  73. package/dist/channels/linear/types.js +2 -0
  74. package/dist/channels/linear/types.js.map +1 -0
  75. package/dist/channels/message-schema.d.ts +2 -0
  76. package/dist/channels/message-schema.d.ts.map +1 -1
  77. package/dist/channels/message-schema.js +4 -0
  78. package/dist/channels/message-schema.js.map +1 -1
  79. package/dist/channels/reserved-connections.d.ts +12 -0
  80. package/dist/channels/reserved-connections.d.ts.map +1 -0
  81. package/dist/channels/reserved-connections.js +45 -0
  82. package/dist/channels/reserved-connections.js.map +1 -0
  83. package/dist/channels/run-input.d.ts +54 -0
  84. package/dist/channels/run-input.d.ts.map +1 -0
  85. package/dist/channels/run-input.js +129 -0
  86. package/dist/channels/run-input.js.map +1 -0
  87. package/dist/channels/source-providers.js +1 -1
  88. package/dist/channels/source-providers.js.map +1 -1
  89. package/dist/channels/trigger/client.js +2 -6
  90. package/dist/channels/trigger/client.js.map +1 -1
  91. package/dist/channels/trigger/http.js +1 -1
  92. package/dist/channels/trigger/http.js.map +1 -1
  93. package/dist/channels/trigger/identity-context.d.ts +1 -1
  94. package/dist/channels/trigger/identity-context.d.ts.map +1 -1
  95. package/dist/channels/trigger/identity-context.js +2 -3
  96. package/dist/channels/trigger/identity-context.js.map +1 -1
  97. package/dist/channels/trigger/ingress.d.ts.map +1 -1
  98. package/dist/channels/trigger/ingress.js +1 -19
  99. package/dist/channels/trigger/ingress.js.map +1 -1
  100. package/dist/connections.d.ts +31 -0
  101. package/dist/connections.d.ts.map +1 -1
  102. package/dist/connections.js +106 -9
  103. package/dist/connections.js.map +1 -1
  104. package/dist/credential-gate.d.ts +2 -0
  105. package/dist/credential-gate.d.ts.map +1 -1
  106. package/dist/credential-gate.js +37 -3
  107. package/dist/credential-gate.js.map +1 -1
  108. package/dist/identity/loopback.d.ts +1 -1
  109. package/dist/identity/loopback.d.ts.map +1 -1
  110. package/dist/identity/loopback.js +2 -3
  111. package/dist/identity/loopback.js.map +1 -1
  112. package/dist/index.d.ts +6 -1
  113. package/dist/index.d.ts.map +1 -1
  114. package/dist/index.js +1 -0
  115. package/dist/index.js.map +1 -1
  116. package/dist/ingress/runs.d.ts +50 -1
  117. package/dist/ingress/runs.d.ts.map +1 -1
  118. package/dist/ingress/runs.js +128 -2
  119. package/dist/ingress/runs.js.map +1 -1
  120. package/dist/memory/instructions-middleware.d.ts.map +1 -1
  121. package/dist/memory/instructions-middleware.js +5 -6
  122. package/dist/memory/instructions-middleware.js.map +1 -1
  123. package/dist/namespaces.d.ts +21 -0
  124. package/dist/namespaces.d.ts.map +1 -1
  125. package/dist/namespaces.js +4 -0
  126. package/dist/namespaces.js.map +1 -1
  127. package/dist/runtime/auth.d.ts +2 -1
  128. package/dist/runtime/auth.d.ts.map +1 -1
  129. package/dist/runtime/auth.js +115 -14
  130. package/dist/runtime/auth.js.map +1 -1
  131. package/dist/runtime/channel-icon.d.ts +22 -0
  132. package/dist/runtime/channel-icon.d.ts.map +1 -0
  133. package/dist/runtime/channel-icon.js +70 -0
  134. package/dist/runtime/channel-icon.js.map +1 -0
  135. package/dist/runtime/channel.d.ts +6 -0
  136. package/dist/runtime/channel.d.ts.map +1 -1
  137. package/dist/runtime/channel.js.map +1 -1
  138. package/dist/runtime/identity-http.d.ts +2 -0
  139. package/dist/runtime/identity-http.d.ts.map +1 -1
  140. package/dist/runtime/identity-http.js +36 -11
  141. package/dist/runtime/identity-http.js.map +1 -1
  142. package/dist/runtime/identity-runtime.d.ts +15 -0
  143. package/dist/runtime/identity-runtime.d.ts.map +1 -1
  144. package/dist/runtime/identity-runtime.js +35 -0
  145. package/dist/runtime/identity-runtime.js.map +1 -1
  146. package/dist/runtime/index.d.ts.map +1 -1
  147. package/dist/runtime/index.js +2 -0
  148. package/dist/runtime/index.js.map +1 -1
  149. package/dist/runtime/memory/mounts.d.ts +0 -42
  150. package/dist/runtime/memory/mounts.d.ts.map +1 -1
  151. package/dist/runtime/memory/mounts.js +7 -63
  152. package/dist/runtime/memory/mounts.js.map +1 -1
  153. package/dist/runtime/sandbox-manager.d.ts +1 -1
  154. package/dist/runtime/sandbox-manager.d.ts.map +1 -1
  155. package/dist/runtime/sandbox-manager.js +3 -3
  156. package/dist/runtime/sandbox-manager.js.map +1 -1
  157. package/package.json +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAEL,CAAC"}
@@ -0,0 +1,188 @@
1
+ import { z } from "zod";
2
+ import { nonblankStringSchema } from "../message-schema.js";
3
+ // Shared scalar constraints. Dispatch IDs are positive safe integers.
4
+ const nullableTextSchema = z.string().nullable();
5
+ export const githubIdentifierSchema = z.number().int().positive();
6
+ /** Receipt metadata only, not a complete GitHub event payload specification. */
7
+ export const githubReceiptSchema = z.object({
8
+ event: nonblankStringSchema,
9
+ deliveryId: nonblankStringSchema,
10
+ payload: z.looseObject({
11
+ action: z.string().optional(),
12
+ repository: z.looseObject({ id: z.number().int().optional() }).optional(),
13
+ issue: z.looseObject({ number: z.number().int().optional() }).optional(),
14
+ pull_request: z
15
+ .looseObject({ number: z.number().int().optional() })
16
+ .optional(),
17
+ }),
18
+ });
19
+ // Payload subjects. Loose objects retain unmodeled provider fields.
20
+ const issueSchema = z.looseObject({
21
+ number: githubIdentifierSchema,
22
+ title: nonblankStringSchema,
23
+ body: nullableTextSchema,
24
+ pull_request: z.record(z.string(), z.unknown()).optional(),
25
+ });
26
+ const pullRequestSchema = issueSchema.extend({
27
+ draft: z.boolean().optional(),
28
+ merged: z.boolean().optional(),
29
+ });
30
+ const commentSchema = z.looseObject({
31
+ id: githubIdentifierSchema,
32
+ body: z.string(),
33
+ });
34
+ const labelSchema = z.looseObject({ name: nonblankStringSchema });
35
+ const reviewSchema = z.looseObject({
36
+ id: githubIdentifierSchema,
37
+ body: nullableTextSchema,
38
+ state: nonblankStringSchema,
39
+ });
40
+ const workflowRunSchema = z.looseObject({
41
+ id: githubIdentifierSchema,
42
+ conclusion: nullableTextSchema,
43
+ pull_requests: z.array(z.record(z.string(), z.unknown())),
44
+ });
45
+ const checkRunSchema = z.looseObject({
46
+ id: githubIdentifierSchema,
47
+ name: nonblankStringSchema,
48
+ head_sha: nonblankStringSchema,
49
+ conclusion: nullableTextSchema,
50
+ pull_requests: z.array(z.record(z.string(), z.unknown())),
51
+ });
52
+ const checkSuiteSchema = z.looseObject({
53
+ id: githubIdentifierSchema,
54
+ head_sha: nonblankStringSchema,
55
+ conclusion: nullableTextSchema,
56
+ pull_requests: z.array(z.record(z.string(), z.unknown())),
57
+ });
58
+ // Common dispatch context and reusable payload families.
59
+ const senderSchema = z.looseObject({
60
+ id: githubIdentifierSchema,
61
+ login: nonblankStringSchema,
62
+ type: z.enum(["User", "Bot", "Organization"]),
63
+ });
64
+ const repositorySchema = z.looseObject({
65
+ id: githubIdentifierSchema,
66
+ owner: z.looseObject({ login: nonblankStringSchema }),
67
+ name: nonblankStringSchema,
68
+ full_name: nonblankStringSchema,
69
+ private: z.boolean(),
70
+ });
71
+ const dispatchPayloadSchema = z.looseObject({
72
+ repository: repositorySchema,
73
+ sender: senderSchema,
74
+ installation: z.looseObject({ id: githubIdentifierSchema }),
75
+ });
76
+ const issuePayloadSchema = dispatchPayloadSchema.extend({ issue: issueSchema });
77
+ const pullRequestPayloadSchema = dispatchPayloadSchema.extend({
78
+ pull_request: pullRequestSchema,
79
+ });
80
+ function dispatchEventSchema(key, payloadSchema) {
81
+ return z.object({
82
+ key: z.literal(key),
83
+ deliveryId: nonblankStringSchema,
84
+ payload: payloadSchema,
85
+ });
86
+ }
87
+ /** Each supported event key requires its exact payload action and subject. */
88
+ export const githubDispatchSchema = z.discriminatedUnion("key", [
89
+ dispatchEventSchema("issues.opened", issuePayloadSchema.extend({ action: z.literal("opened") })),
90
+ dispatchEventSchema("issues.edited", issuePayloadSchema.extend({ action: z.literal("edited") })),
91
+ dispatchEventSchema("issues.reopened", issuePayloadSchema.extend({ action: z.literal("reopened") })),
92
+ dispatchEventSchema("issues.labeled", issuePayloadSchema.extend({
93
+ action: z.literal("labeled"),
94
+ label: labelSchema,
95
+ })),
96
+ dispatchEventSchema("issue_comment.created", issuePayloadSchema.extend({
97
+ action: z.literal("created"),
98
+ comment: commentSchema,
99
+ })),
100
+ dispatchEventSchema("issue_comment.edited", issuePayloadSchema.extend({
101
+ action: z.literal("edited"),
102
+ comment: commentSchema,
103
+ })),
104
+ dispatchEventSchema("pull_request.opened", pullRequestPayloadSchema.extend({ action: z.literal("opened") })),
105
+ dispatchEventSchema("pull_request.edited", pullRequestPayloadSchema.extend({ action: z.literal("edited") })),
106
+ dispatchEventSchema("pull_request.reopened", pullRequestPayloadSchema.extend({ action: z.literal("reopened") })),
107
+ dispatchEventSchema("pull_request.ready_for_review", pullRequestPayloadSchema.extend({ action: z.literal("ready_for_review") })),
108
+ dispatchEventSchema("pull_request.converted_to_draft", pullRequestPayloadSchema.extend({
109
+ action: z.literal("converted_to_draft"),
110
+ })),
111
+ dispatchEventSchema("pull_request.synchronize", pullRequestPayloadSchema.extend({ action: z.literal("synchronize") })),
112
+ dispatchEventSchema("pull_request.labeled", pullRequestPayloadSchema.extend({
113
+ action: z.literal("labeled"),
114
+ label: labelSchema,
115
+ })),
116
+ dispatchEventSchema("pull_request.closed", pullRequestPayloadSchema.extend({ action: z.literal("closed") })),
117
+ dispatchEventSchema("pull_request_review.submitted", pullRequestPayloadSchema.extend({
118
+ action: z.literal("submitted"),
119
+ review: reviewSchema,
120
+ })),
121
+ dispatchEventSchema("pull_request_review.edited", pullRequestPayloadSchema.extend({
122
+ action: z.literal("edited"),
123
+ review: reviewSchema,
124
+ })),
125
+ dispatchEventSchema("pull_request_review.dismissed", pullRequestPayloadSchema.extend({
126
+ action: z.literal("dismissed"),
127
+ review: reviewSchema,
128
+ })),
129
+ dispatchEventSchema("pull_request_review_comment.created", pullRequestPayloadSchema.extend({
130
+ action: z.literal("created"),
131
+ comment: commentSchema,
132
+ })),
133
+ dispatchEventSchema("pull_request_review_comment.edited", pullRequestPayloadSchema.extend({
134
+ action: z.literal("edited"),
135
+ comment: commentSchema,
136
+ })),
137
+ // Events without an action are keyed by their name alone.
138
+ dispatchEventSchema("push", dispatchPayloadSchema.extend({
139
+ action: z.never().optional(),
140
+ ref: nonblankStringSchema,
141
+ before: nonblankStringSchema,
142
+ after: nonblankStringSchema,
143
+ })),
144
+ dispatchEventSchema("status", dispatchPayloadSchema.extend({
145
+ action: z.never().optional(),
146
+ id: githubIdentifierSchema,
147
+ sha: nonblankStringSchema,
148
+ state: nonblankStringSchema,
149
+ context: nonblankStringSchema,
150
+ })),
151
+ dispatchEventSchema("check_run.completed", dispatchPayloadSchema.extend({
152
+ action: z.literal("completed"),
153
+ check_run: checkRunSchema,
154
+ })),
155
+ dispatchEventSchema("check_suite.completed", dispatchPayloadSchema.extend({
156
+ action: z.literal("completed"),
157
+ check_suite: checkSuiteSchema,
158
+ })),
159
+ dispatchEventSchema("workflow_run.completed", dispatchPayloadSchema.extend({
160
+ action: z.literal("completed"),
161
+ workflow_run: workflowRunSchema,
162
+ })),
163
+ ]);
164
+ export const SUPPORTED_EVENT_KEYS = githubDispatchSchema.options.map((option) => option.shape.key.value);
165
+ // Expose common routing metadata while preserving the original payload.
166
+ export const githubEventSchema = githubDispatchSchema.transform((event) => ({
167
+ ...event,
168
+ name: event.key.split(".")[0],
169
+ // `push` and `status` have no action, and an absent field keeps the
170
+ // event JSON.
171
+ ...(event.payload.action !== undefined && {
172
+ action: event.payload.action,
173
+ }),
174
+ installationId: event.payload.installation.id,
175
+ repository: {
176
+ id: event.payload.repository.id,
177
+ owner: event.payload.repository.owner.login,
178
+ name: event.payload.repository.name,
179
+ fullName: event.payload.repository.full_name,
180
+ private: event.payload.repository.private,
181
+ },
182
+ sender: {
183
+ id: event.payload.sender.id,
184
+ login: event.payload.sender.login,
185
+ type: event.payload.sender.type,
186
+ },
187
+ }));
188
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/channels/github/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,sEAAsE;AACtE,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;AACjD,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC;AAElE,gFAAgF;AAChF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,oBAAoB;IAC3B,UAAU,EAAE,oBAAoB;IAChC,OAAO,EAAE,CAAC,CAAC,WAAW,CAAC;QACrB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC7B,UAAU,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,EAAE,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I,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE;IAC9B,oEAAoE;IACpE,cAAc;IACd,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,KAAK,SAAS,IAAI;QACxC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,MAAgB;KACvC,CAAC;IACF,cAAc,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;IAC7C,UAAU,EAAE;QACV,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC/B,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK;QAC3C,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI;QACnC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS;QAC5C,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO;KAC1C;IACD,MAAM,EAAE;QACN,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QAC3B,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK;QACjC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI;KAChC;CACF,CAAC,CAAC,CAAC"}
@@ -0,0 +1,138 @@
1
+ import type { z } from "zod";
2
+ import type { MultitaskStrategy } from "../../ingress/runs.js";
3
+ import type { githubEventSchema } from "./schema.js";
4
+ import type { ChannelRunResult } from "../run-input.js";
5
+ import type { EventSettled } from "../http/provider.js";
6
+ import type { EventEndpoint } from "../http/endpoint.js";
7
+ /** Handwritten schema subsets; unmodeled provider fields remain unknown. */
8
+ type EventUnion = z.output<typeof githubEventSchema>;
9
+ export type SupportedEventKey = EventUnion["key"];
10
+ export type GitHubEvent<K extends SupportedEventKey = SupportedEventKey> = Extract<EventUnion, {
11
+ key: K;
12
+ }>;
13
+ export type PayloadFor<K extends SupportedEventKey> = GitHubEvent<K>["payload"];
14
+ /**
15
+ * The conversation's thread an event belongs to. A handler runs before any
16
+ * run exists, so this is not a run's runtime.
17
+ */
18
+ export interface GitHubChannelThread {
19
+ /**
20
+ * The thread's ID: the one a run the handler starts runs on, or, when
21
+ * `interrupted`, the one that waits. Useful for run context that names the
22
+ * thread, such as a token a backend signs for it.
23
+ */
24
+ id: string;
25
+ channel: {
26
+ name: string;
27
+ };
28
+ /**
29
+ * Set when the thread waits on an interrupt. No run starts: what the
30
+ * handler returns only decides whether the App tells the issue or pull
31
+ * request that a decision is pending, so skip side effects such as
32
+ * reactions.
33
+ */
34
+ interrupted?: true;
35
+ }
36
+ /**
37
+ * What an event handler returns: a run's input, as `agent.invoke` takes it —
38
+ * a string, a message such as `new HumanMessage(...)`, state such as
39
+ * `{ messages: [...] }`, or `[input, { context, metadata }]`. `null` or `undefined`
40
+ * starts nothing.
41
+ */
42
+ export type GitHubEventResult = ChannelRunResult | null | undefined | void;
43
+ export type GitHubEventCallback<K extends SupportedEventKey> = (event: GitHubEvent<K>, thread: GitHubChannelThread) => GitHubEventResult | Promise<GitHubEventResult>;
44
+ /**
45
+ * What the agent may do with the GitHub App `mda deploy` sets up. Deploy
46
+ * applies changes to these on every run, except to the App's own
47
+ * permissions (see `permissions`).
48
+ */
49
+ export interface GitHubAppOptions {
50
+ /**
51
+ * Permissions the agent's GitHub token needs beyond those the handled
52
+ * events need, e.g. `{ contents: "read" }`. A new App asks for both.
53
+ *
54
+ * Handled events set their own level: read to receive an event, write to
55
+ * also reply where it happened. These can raise that level but not lower
56
+ * it.
57
+ *
58
+ * Deploy renews the agent's token with changed permissions, but it cannot
59
+ * change the App itself: GitHub reads an App's permissions from its
60
+ * manifest only when the App is created, and has no API to change them
61
+ * later. The App's owner grants added permissions, and removes dropped or
62
+ * lowered ones, in the App's settings on GitHub. Deploy names both and
63
+ * links there; until a dropped permission is removed, the App keeps it
64
+ * even though the agent's token no longer has it.
65
+ */
66
+ permissions?: Record<string, "read" | "write">;
67
+ /**
68
+ * Repositories (`owner/name`, one owner) the channel is limited to: events
69
+ * from other repositories start nothing, and deploy reports listed ones the
70
+ * App is not installed on. Defaults to every repository the App is
71
+ * installed on. The agent's token still reaches every repository of the
72
+ * installation, so install the App only on the ones the agent may change.
73
+ */
74
+ repositories?: string[];
75
+ }
76
+ /** Options for `channels.github(...)`: App scope and event handlers that start runs. */
77
+ export interface GitHubChannelOptions {
78
+ /** App `mda deploy` creates; permissions and repository allowlist. */
79
+ app?: GitHubAppOptions;
80
+ /**
81
+ * What an event that starts a run does while its conversation already
82
+ * runs: `enqueue` (the default) waits for the run and starts after it,
83
+ * `interrupt` cancels the run, keeping its progress, and starts at once,
84
+ * `rollback` cancels it and discards its progress, and `reject` starts
85
+ * nothing. Events on a conversation that waits on an interrupt start
86
+ * nothing either way.
87
+ *
88
+ * @example
89
+ * ```ts
90
+ * // A newer comment replaces the work on an older one.
91
+ * channels.github({ multitaskStrategy: "interrupt", onEvent })
92
+ * ```
93
+ */
94
+ multitaskStrategy?: MultitaskStrategy;
95
+ /**
96
+ * Event handlers that start runs. Return a prompt (string, message, or
97
+ * state), or nothing to skip. While a thread waits on an interrupt, events
98
+ * start nothing: the handler still runs, with `thread.interrupted` set, to
99
+ * decide whether the issue or pull request is told to continue it in
100
+ * LangSmith Studio.
101
+ *
102
+ * A handler may also be an endpoint, a URL or a `Request` carrying headers,
103
+ * to have a service of yours decide: MDA POSTs it the event and its thread,
104
+ * and starts the run it answers with. See the README's "Asking your service
105
+ * what to start".
106
+ *
107
+ * @example
108
+ * ```ts
109
+ * {
110
+ * "issues.opened": (e) => `Help with #${e.payload.issue.number}`,
111
+ * "issue_comment.created": new Request(`${BACKEND}/github/runs`, {
112
+ * headers: { "x-api-key": process.env.BACKEND_KEY! },
113
+ * }),
114
+ * }
115
+ * ```
116
+ */
117
+ onEvent?: {
118
+ [K in SupportedEventKey]?: GitHubEventCallback<K> | EventEndpoint;
119
+ };
120
+ /**
121
+ * How a delivery of a handled event ended, once: the run it started
122
+ * completed, stopped on interrupts, was cancelled, replaced, or failed, or
123
+ * why it started none, such as `declined` when its handler returned
124
+ * nothing. Called after the App's own notices, such as the comment that a
125
+ * decision is pending, in the background; failures are logged. See
126
+ * `channels.http`'s `onSettled` for its limits.
127
+ *
128
+ * @example
129
+ * ```ts
130
+ * onSettled: async (event, thread, outcome) => {
131
+ * if ("runId" in outcome) await reportRun(thread.id, outcome);
132
+ * }
133
+ * ```
134
+ */
135
+ onSettled?: EventSettled<GitHubEvent, GitHubChannelThread>;
136
+ }
137
+ export {};
138
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/channels/github/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,4EAA4E;AAC5E,KAAK,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACrD,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAClD,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,IACrE,OAAO,CAAC,UAAU,EAAE;IAAE,GAAG,EAAE,CAAC,CAAA;CAAE,CAAC,CAAC;AAClC,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,iBAAiB,IAAI,WAAW,CAAC,CAAC,CAAC,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sourceRoot":"","sources":["../../../src/channels/github/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Event endpoints: an `onEvent` value that is a URL or a `Request` rather than
3
+ * a function. MDA asks that service of yours what the event starts, for logic
4
+ * that lives outside the deployment.
5
+ */
6
+ import type { ChannelRunResult } from "../run-input.js";
7
+ /**
8
+ * Where an `onEvent` key's events go when a service of yours decides what
9
+ * they start: its URL, or a `Request` that also carries headers, such as a
10
+ * credential the service checks. See {@link endpointHandler}.
11
+ */
12
+ export type EventEndpoint = string | URL | Request;
13
+ /** The fields of a channel's event an endpoint is sent. */
14
+ interface EndpointEvent {
15
+ key: string;
16
+ deliveryId: string;
17
+ payload: unknown;
18
+ }
19
+ /** The fields of a channel's thread an endpoint is sent. */
20
+ interface EndpointThread {
21
+ id: string;
22
+ channel: {
23
+ name: string;
24
+ };
25
+ interrupted?: true;
26
+ }
27
+ /** Whether an `onEvent` value is an endpoint rather than a handler function. */
28
+ export declare function isEventEndpoint(value: unknown): value is EventEndpoint;
29
+ /**
30
+ * The handler an endpoint stands for. When the event's thread takes a turn,
31
+ * MDA POSTs `{ event: { key, deliveryId, payload }, thread: { id, channel,
32
+ * interrupted? } }` as JSON to the endpoint's URL, with a `Request`'s headers,
33
+ * and starts the run the service answers with: `{ input, context?, metadata?,
34
+ * webhook? }`.
35
+ * `null` or HTTP 204 starts nothing. Any other answer, a
36
+ * redirect, or no answer within 60 seconds fails the handler, as a handler
37
+ * that throws does. The URL is http(s), without credentials in it.
38
+ */
39
+ export declare function endpointHandler(endpoint: EventEndpoint, label: string): (event: EndpointEvent, thread: EndpointThread) => Promise<ChannelRunResult | null>;
40
+ export {};
41
+ //# sourceMappingURL=endpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoint.d.ts","sourceRoot":"","sources":["../../../src/channels/http/endpoint.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAcxD;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC;AAEnD,2DAA2D;AAC3D,UAAU,aAAa;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,4DAA4D;AAC5D,UAAU,cAAc;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,IAAI,CAAC;CACpB;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAMtE;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,aAAa,EACvB,KAAK,EAAE,MAAM,GACZ,CACD,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,cAAc,KACnB,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAmCpC"}
@@ -0,0 +1,132 @@
1
+ /** How long the service may take to answer. */
2
+ const TIMEOUT_MS = 60_000;
3
+ /** The largest answer read; run input may carry images. */
4
+ const MAX_RESPONSE_BYTES = 10 * 1024 * 1024;
5
+ const RUN_OPTION_KEYS = new Set([
6
+ "context",
7
+ "metadata",
8
+ "webhook",
9
+ ]);
10
+ const ANSWER_SHAPE = "event endpoint answer must be null or { input, context?, metadata?, webhook? }";
11
+ /** Whether an `onEvent` value is an endpoint rather than a handler function. */
12
+ export function isEventEndpoint(value) {
13
+ return (typeof value === "string" ||
14
+ value instanceof URL ||
15
+ value instanceof Request);
16
+ }
17
+ /**
18
+ * The handler an endpoint stands for. When the event's thread takes a turn,
19
+ * MDA POSTs `{ event: { key, deliveryId, payload }, thread: { id, channel,
20
+ * interrupted? } }` as JSON to the endpoint's URL, with a `Request`'s headers,
21
+ * and starts the run the service answers with: `{ input, context?, metadata?,
22
+ * webhook? }`.
23
+ * `null` or HTTP 204 starts nothing. Any other answer, a
24
+ * redirect, or no answer within 60 seconds fails the handler, as a handler
25
+ * that throws does. The URL is http(s), without credentials in it.
26
+ */
27
+ export function endpointHandler(endpoint, label) {
28
+ const template = endpoint instanceof Request ? endpoint : undefined;
29
+ const target = endpointUrl(template ? template.url : String(endpoint), label);
30
+ const headers = new Headers(template?.headers);
31
+ headers.set("content-type", "application/json");
32
+ headers.set("accept", "application/json");
33
+ return async (event, thread) => {
34
+ const response = await fetch(target, {
35
+ method: "POST",
36
+ headers,
37
+ body: JSON.stringify({
38
+ event: {
39
+ key: event.key,
40
+ deliveryId: event.deliveryId,
41
+ payload: event.payload,
42
+ },
43
+ thread: {
44
+ id: thread.id,
45
+ channel: { name: thread.channel.name },
46
+ ...(thread.interrupted && { interrupted: true }),
47
+ },
48
+ }),
49
+ redirect: "manual",
50
+ signal: AbortSignal.timeout(TIMEOUT_MS),
51
+ });
52
+ if (response.status === 204) {
53
+ await response.body?.cancel();
54
+ return null;
55
+ }
56
+ if (!response.ok) {
57
+ await response.body?.cancel();
58
+ throw new Error(`event endpoint answered HTTP ${response.status}`);
59
+ }
60
+ return runResult(await boundedJson(response));
61
+ };
62
+ }
63
+ function endpointUrl(url, label) {
64
+ let parsed;
65
+ try {
66
+ parsed = new URL(url);
67
+ }
68
+ catch {
69
+ parsed = undefined;
70
+ }
71
+ if (!parsed ||
72
+ (parsed.protocol !== "https:" && parsed.protocol !== "http:") ||
73
+ parsed.username ||
74
+ parsed.password)
75
+ throw new TypeError(`${label} must be an absolute http(s) URL, without credentials in it`);
76
+ return parsed.href;
77
+ }
78
+ /** The answer as JSON, read only up to `MAX_RESPONSE_BYTES`. */
79
+ async function boundedJson(response) {
80
+ const declared = Number(response.headers.get("content-length"));
81
+ if (declared > MAX_RESPONSE_BYTES) {
82
+ await response.body?.cancel();
83
+ throw new Error("event endpoint answer is too large");
84
+ }
85
+ const reader = response.body?.getReader();
86
+ const chunks = [];
87
+ let size = 0;
88
+ for (;;) {
89
+ const chunk = await reader?.read();
90
+ if (!chunk || chunk.done)
91
+ break;
92
+ size += chunk.value.byteLength;
93
+ if (size > MAX_RESPONSE_BYTES) {
94
+ await reader?.cancel();
95
+ throw new Error("event endpoint answer is too large");
96
+ }
97
+ chunks.push(chunk.value);
98
+ }
99
+ const text = new TextDecoder().decode(chunks.length === 1 ? chunks[0] : concat(chunks, size));
100
+ try {
101
+ return JSON.parse(text);
102
+ }
103
+ catch {
104
+ throw new Error("event endpoint answer is not JSON");
105
+ }
106
+ }
107
+ function concat(chunks, size) {
108
+ const joined = new Uint8Array(size);
109
+ let offset = 0;
110
+ for (const chunk of chunks) {
111
+ joined.set(chunk, offset);
112
+ offset += chunk.byteLength;
113
+ }
114
+ return joined;
115
+ }
116
+ /** The run the answer names; the channel checks the input and options as a handler's. */
117
+ function runResult(answer) {
118
+ if (answer === null)
119
+ return null;
120
+ if (typeof answer !== "object" ||
121
+ Array.isArray(answer) ||
122
+ !("input" in answer))
123
+ throw new Error(ANSWER_SHAPE);
124
+ const { input, ...options } = answer;
125
+ for (const key of Object.keys(options))
126
+ if (!RUN_OPTION_KEYS.has(key))
127
+ throw new Error(ANSWER_SHAPE);
128
+ return Object.keys(options).length
129
+ ? [input, options]
130
+ : input;
131
+ }
132
+ //# sourceMappingURL=endpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoint.js","sourceRoot":"","sources":["../../../src/channels/http/endpoint.ts"],"names":[],"mappings":"AAOA,+CAA+C;AAC/C,MAAM,UAAU,GAAG,MAAM,CAAC;AAC1B,2DAA2D;AAC3D,MAAM,kBAAkB,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAC5C,MAAM,eAAe,GAAwB,IAAI,GAAG,CAAC;IACnD,SAAS;IACT,UAAU;IACV,SAAS;CACV,CAAC,CAAC;AACH,MAAM,YAAY,GAChB,gFAAgF,CAAC;AAuBnF,gFAAgF;AAChF,MAAM,UA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AAC,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC;IAC7B,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,yFAAyF;AACzF,SAAS,SAAS,CAAC,MAAe;IAChC,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACjC,IACE,OAAO,MAAM,KAAK,QAAQ;QAC1B,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QACrB,CAAC,CAAC,OAAO,IAAI,MAAM,CAAC;QAEpB,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;IAChC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,GAAG,MAG7B,CAAC;IACF,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QACpC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;IAC/D,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM;QAChC,CAAC,CAAE,CAAC,KAAK,EAAE,OAAO,CAAiC;QACnD,CAAC,CAAE,KAA0B,CAAC;AAClC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/channels/http/http.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,kBAAkB,EAInB,MAAM,YAAY,CAAC;AAIpB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAKrE,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,oBAAoB,EACzB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,QAAQ,CAAC,CA8InB"}
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/channels/http/http.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,kBAAkB,EAOnB,MAAM,YAAY,CAAC;AAYpB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAwCrE,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,oBAAoB,EACzB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,QAAQ,CAAC,CA2UnB"}