managed-deepagents 0.9.6-dev.2 → 0.9.6-dev.21
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 +1075 -37
- package/dist/agent-auth.d.ts +1 -1
- package/dist/agent-auth.d.ts.map +1 -1
- package/dist/agent-auth.js +36 -12
- package/dist/agent-auth.js.map +1 -1
- package/dist/browser.d.ts +37 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +31 -0
- package/dist/browser.js.map +1 -0
- package/dist/channels/actor.d.ts +57 -0
- package/dist/channels/actor.d.ts.map +1 -0
- package/dist/channels/actor.js +24 -0
- package/dist/channels/actor.js.map +1 -0
- package/dist/channels/assistant-text.d.ts +29 -0
- package/dist/channels/assistant-text.d.ts.map +1 -1
- package/dist/channels/assistant-text.js +72 -1
- package/dist/channels/assistant-text.js.map +1 -1
- package/dist/channels/binding.d.ts +20 -1
- package/dist/channels/binding.d.ts.map +1 -1
- package/dist/channels/binding.js +44 -11
- package/dist/channels/binding.js.map +1 -1
- package/dist/channels/delivery.d.ts +51 -0
- package/dist/channels/delivery.d.ts.map +1 -0
- package/dist/channels/delivery.js +424 -0
- package/dist/channels/delivery.js.map +1 -0
- package/dist/channels/github/app-setup.d.ts +32 -0
- package/dist/channels/github/app-setup.d.ts.map +1 -0
- package/dist/channels/github/app-setup.js +146 -0
- package/dist/channels/github/app-setup.js.map +1 -0
- package/dist/channels/github/connections.d.ts +11 -0
- package/dist/channels/github/connections.d.ts.map +1 -0
- package/dist/channels/github/connections.js +14 -0
- package/dist/channels/github/connections.js.map +1 -0
- package/dist/channels/github/index.d.ts +12 -0
- package/dist/channels/github/index.d.ts.map +1 -0
- package/dist/channels/github/index.js +266 -0
- package/dist/channels/github/index.js.map +1 -0
- package/dist/channels/github/mentions.d.ts +12 -0
- package/dist/channels/github/mentions.d.ts.map +1 -0
- package/dist/channels/github/mentions.js +185 -0
- package/dist/channels/github/mentions.js.map +1 -0
- package/dist/channels/github/schema.d.ts +4165 -0
- package/dist/channels/github/schema.d.ts.map +1 -0
- package/dist/channels/github/schema.js +221 -0
- package/dist/channels/github/schema.js.map +1 -0
- package/dist/channels/github/types.d.ts +170 -0
- package/dist/channels/github/types.d.ts.map +1 -0
- package/dist/channels/github/types.js +2 -0
- package/dist/channels/github/types.js.map +1 -0
- package/dist/channels/http/endpoint.d.ts +137 -0
- package/dist/channels/http/endpoint.d.ts.map +1 -0
- package/dist/channels/http/endpoint.js +286 -0
- package/dist/channels/http/endpoint.js.map +1 -0
- package/dist/channels/http/http.d.ts.map +1 -1
- package/dist/channels/http/http.js +439 -65
- package/dist/channels/http/http.js.map +1 -1
- package/dist/channels/http/index.d.ts +8 -1
- package/dist/channels/http/index.d.ts.map +1 -1
- package/dist/channels/http/index.js +35 -16
- package/dist/channels/http/index.js.map +1 -1
- package/dist/channels/http/ingress.d.ts +67 -5
- package/dist/channels/http/ingress.d.ts.map +1 -1
- package/dist/channels/http/ingress.js +155 -43
- package/dist/channels/http/ingress.js.map +1 -1
- package/dist/channels/http/provider.d.ts +125 -0
- package/dist/channels/http/provider.d.ts.map +1 -0
- package/dist/channels/http/provider.js +227 -0
- package/dist/channels/http/provider.js.map +1 -0
- package/dist/channels/http/studio.d.ts +24 -0
- package/dist/channels/http/studio.d.ts.map +1 -0
- package/dist/channels/http/studio.js +95 -0
- package/dist/channels/http/studio.js.map +1 -0
- package/dist/channels/http/threads.d.ts +7 -0
- package/dist/channels/http/threads.d.ts.map +1 -0
- package/dist/channels/http/threads.js +10 -0
- package/dist/channels/http/threads.js.map +1 -0
- package/dist/channels/http/types.d.ts +166 -2
- package/dist/channels/http/types.d.ts.map +1 -1
- package/dist/channels/linear/app-setup.d.ts +29 -0
- package/dist/channels/linear/app-setup.d.ts.map +1 -0
- package/dist/channels/linear/app-setup.js +102 -0
- package/dist/channels/linear/app-setup.js.map +1 -0
- package/dist/channels/linear/connections.d.ts +11 -0
- package/dist/channels/linear/connections.d.ts.map +1 -0
- package/dist/channels/linear/connections.js +14 -0
- package/dist/channels/linear/connections.js.map +1 -0
- package/dist/channels/linear/graphql.d.ts +57 -0
- package/dist/channels/linear/graphql.d.ts.map +1 -0
- package/dist/channels/linear/graphql.js +167 -0
- package/dist/channels/linear/graphql.js.map +1 -0
- package/dist/channels/linear/index.d.ts +13 -0
- package/dist/channels/linear/index.d.ts.map +1 -0
- package/dist/channels/linear/index.js +457 -0
- package/dist/channels/linear/index.js.map +1 -0
- package/dist/channels/linear/schema.d.ts +1050 -0
- package/dist/channels/linear/schema.d.ts.map +1 -0
- package/dist/channels/linear/schema.js +255 -0
- package/dist/channels/linear/schema.js.map +1 -0
- package/dist/channels/linear/types.d.ts +169 -0
- package/dist/channels/linear/types.d.ts.map +1 -0
- package/dist/channels/linear/types.js +2 -0
- package/dist/channels/linear/types.js.map +1 -0
- package/dist/channels/message-schema.d.ts +2 -0
- package/dist/channels/message-schema.d.ts.map +1 -1
- package/dist/channels/message-schema.js +4 -0
- package/dist/channels/message-schema.js.map +1 -1
- package/dist/channels/messaging-registry.d.ts +16 -0
- package/dist/channels/messaging-registry.d.ts.map +1 -1
- package/dist/channels/messaging-registry.js +29 -0
- package/dist/channels/messaging-registry.js.map +1 -1
- package/dist/channels/reserved-connections.d.ts +12 -0
- package/dist/channels/reserved-connections.d.ts.map +1 -0
- package/dist/channels/reserved-connections.js +55 -0
- package/dist/channels/reserved-connections.js.map +1 -0
- package/dist/channels/resolve-user-endpoint.d.ts +34 -0
- package/dist/channels/resolve-user-endpoint.d.ts.map +1 -0
- package/dist/channels/resolve-user-endpoint.js +51 -0
- package/dist/channels/resolve-user-endpoint.js.map +1 -0
- package/dist/channels/resolve-user.d.ts +95 -0
- package/dist/channels/resolve-user.d.ts.map +1 -0
- package/dist/channels/resolve-user.js +143 -0
- package/dist/channels/resolve-user.js.map +1 -0
- package/dist/channels/run-input.d.ts +88 -0
- package/dist/channels/run-input.d.ts.map +1 -0
- package/dist/channels/run-input.js +177 -0
- package/dist/channels/run-input.js.map +1 -0
- package/dist/channels/runtime.d.ts +5 -2
- package/dist/channels/runtime.d.ts.map +1 -1
- package/dist/channels/runtime.js +19 -10
- package/dist/channels/runtime.js.map +1 -1
- package/dist/channels/schedule-delivery.d.ts +2 -13
- package/dist/channels/schedule-delivery.d.ts.map +1 -1
- package/dist/channels/schedule-delivery.js +6 -73
- package/dist/channels/schedule-delivery.js.map +1 -1
- package/dist/channels/slack/api.d.ts +2 -0
- package/dist/channels/slack/api.d.ts.map +1 -1
- package/dist/channels/slack/api.js +6 -0
- package/dist/channels/slack/api.js.map +1 -1
- package/dist/channels/slack/connections.d.ts +6 -0
- package/dist/channels/slack/connections.d.ts.map +1 -0
- package/dist/channels/slack/connections.js +6 -0
- package/dist/channels/slack/connections.js.map +1 -0
- package/dist/channels/slack/events.d.ts +278 -0
- package/dist/channels/slack/events.d.ts.map +1 -0
- package/dist/channels/slack/events.js +235 -0
- package/dist/channels/slack/events.js.map +1 -0
- package/dist/channels/slack/files.d.ts.map +1 -1
- package/dist/channels/slack/files.js +2 -3
- package/dist/channels/slack/files.js.map +1 -1
- package/dist/channels/slack/index.d.ts +90 -2
- package/dist/channels/slack/index.d.ts.map +1 -1
- package/dist/channels/slack/index.js +188 -6
- package/dist/channels/slack/index.js.map +1 -1
- package/dist/channels/slack/message-content.d.ts.map +1 -1
- package/dist/channels/slack/message-content.js +23 -28
- package/dist/channels/slack/message-content.js.map +1 -1
- package/dist/channels/slack/status.d.ts +76 -0
- package/dist/channels/slack/status.d.ts.map +1 -0
- package/dist/channels/slack/status.js +427 -0
- package/dist/channels/slack/status.js.map +1 -0
- package/dist/channels/source-providers.js +1 -1
- package/dist/channels/source-providers.js.map +1 -1
- package/dist/channels/trigger/client.d.ts.map +1 -1
- package/dist/channels/trigger/client.js +9 -15
- package/dist/channels/trigger/client.js.map +1 -1
- package/dist/channels/trigger/conversation.d.ts +11 -0
- package/dist/channels/trigger/conversation.d.ts.map +1 -0
- package/dist/channels/trigger/conversation.js +72 -0
- package/dist/channels/trigger/conversation.js.map +1 -0
- package/dist/channels/trigger/http.d.ts +130 -4
- package/dist/channels/trigger/http.d.ts.map +1 -1
- package/dist/channels/trigger/http.js +408 -78
- package/dist/channels/trigger/http.js.map +1 -1
- package/dist/channels/trigger/identity-context.d.ts.map +1 -1
- package/dist/channels/trigger/identity-context.js +2 -5
- package/dist/channels/trigger/identity-context.js.map +1 -1
- package/dist/channels/trigger/ingress.d.ts +70 -1
- package/dist/channels/trigger/ingress.d.ts.map +1 -1
- package/dist/channels/trigger/ingress.js +135 -21
- package/dist/channels/trigger/ingress.js.map +1 -1
- package/dist/channels/trigger/transport.d.ts +10 -0
- package/dist/channels/trigger/transport.d.ts.map +1 -1
- package/dist/channels/trigger/transport.js +25 -9
- package/dist/channels/trigger/transport.js.map +1 -1
- package/dist/channels/trigger/types.d.ts +92 -3
- package/dist/channels/trigger/types.d.ts.map +1 -1
- package/dist/channels/trigger/types.js +37 -0
- package/dist/channels/trigger/types.js.map +1 -1
- package/dist/channels/types.d.ts +53 -4
- package/dist/channels/types.d.ts.map +1 -1
- package/dist/channels/types.js +2 -0
- package/dist/channels/types.js.map +1 -1
- package/dist/connections.d.ts +36 -12
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +125 -30
- package/dist/connections.js.map +1 -1
- package/dist/credential-gate.d.ts +2 -0
- package/dist/credential-gate.d.ts.map +1 -1
- package/dist/credential-gate.js +37 -3
- package/dist/credential-gate.js.map +1 -1
- package/dist/define-deep-agent.d.ts +2 -2
- package/dist/define-deep-agent.d.ts.map +1 -1
- package/dist/define-deep-agent.js +53 -2
- package/dist/define-deep-agent.js.map +1 -1
- package/dist/identity/index.d.ts.map +1 -1
- package/dist/identity/index.js +3 -1
- package/dist/identity/index.js.map +1 -1
- package/dist/identity/loopback.d.ts +1 -1
- package/dist/identity/loopback.d.ts.map +1 -1
- package/dist/identity/loopback.js +3 -2
- package/dist/identity/loopback.js.map +1 -1
- package/dist/identity/options.d.ts +9 -0
- package/dist/identity/options.d.ts.map +1 -1
- package/dist/identity/options.js +1 -1
- package/dist/identity/options.js.map +1 -1
- package/dist/identity/slack/links.js +3 -2
- package/dist/identity/slack/links.js.map +1 -1
- package/dist/identity/types.d.ts +3 -0
- package/dist/identity/types.d.ts.map +1 -1
- package/dist/index.d.ts +19 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/ingress/loopback.d.ts +1 -0
- package/dist/ingress/loopback.d.ts.map +1 -1
- package/dist/ingress/loopback.js +7 -3
- package/dist/ingress/loopback.js.map +1 -1
- package/dist/ingress/runs.d.ts +74 -1
- package/dist/ingress/runs.d.ts.map +1 -1
- package/dist/ingress/runs.js +184 -9
- package/dist/ingress/runs.js.map +1 -1
- package/dist/managed-composition.d.ts +3 -0
- package/dist/managed-composition.d.ts.map +1 -1
- package/dist/managed-composition.js +29 -13
- package/dist/managed-composition.js.map +1 -1
- package/dist/namespaces.d.ts +25 -21
- package/dist/namespaces.d.ts.map +1 -1
- package/dist/namespaces.js +4 -29
- package/dist/namespaces.js.map +1 -1
- package/dist/runtime/async-subagents.d.ts +27 -0
- package/dist/runtime/async-subagents.d.ts.map +1 -0
- package/dist/runtime/async-subagents.js +139 -0
- package/dist/runtime/async-subagents.js.map +1 -0
- package/dist/runtime/auth.d.ts.map +1 -1
- package/dist/runtime/auth.js +177 -8
- package/dist/runtime/auth.js.map +1 -1
- package/dist/runtime/backend.d.ts +7 -0
- package/dist/runtime/backend.d.ts.map +1 -1
- package/dist/runtime/backend.js +32 -7
- package/dist/runtime/backend.js.map +1 -1
- package/dist/runtime/browser-facade.d.ts +10 -0
- package/dist/runtime/browser-facade.d.ts.map +1 -0
- package/dist/runtime/browser-facade.js +23 -0
- package/dist/runtime/browser-facade.js.map +1 -0
- package/dist/runtime/browser-langsmith.d.ts +143 -0
- package/dist/runtime/browser-langsmith.d.ts.map +1 -0
- package/dist/runtime/browser-langsmith.js +508 -0
- package/dist/runtime/browser-langsmith.js.map +1 -0
- package/dist/runtime/browser-recorder.py +831 -0
- package/dist/runtime/browser-selection.d.ts +10 -0
- package/dist/runtime/browser-selection.d.ts.map +1 -0
- package/dist/runtime/browser-selection.js +21 -0
- package/dist/runtime/browser-selection.js.map +1 -0
- package/dist/runtime/browser.d.ts +128 -0
- package/dist/runtime/browser.d.ts.map +1 -0
- package/dist/runtime/browser.js +795 -0
- package/dist/runtime/browser.js.map +1 -0
- package/dist/runtime/channel-icon.d.ts +22 -0
- package/dist/runtime/channel-icon.d.ts.map +1 -0
- package/dist/runtime/channel-icon.js +81 -0
- package/dist/runtime/channel-icon.js.map +1 -0
- package/dist/runtime/channel.d.ts +11 -0
- package/dist/runtime/channel.d.ts.map +1 -1
- package/dist/runtime/channel.js.map +1 -1
- package/dist/runtime/graph-build-timing.d.ts +30 -0
- package/dist/runtime/graph-build-timing.d.ts.map +1 -0
- package/dist/runtime/graph-build-timing.js +50 -0
- package/dist/runtime/graph-build-timing.js.map +1 -0
- package/dist/runtime/identity-http.d.ts +2 -0
- package/dist/runtime/identity-http.d.ts.map +1 -1
- package/dist/runtime/identity-http.js +38 -2
- package/dist/runtime/identity-http.js.map +1 -1
- package/dist/runtime/identity-runtime.d.ts +10 -0
- package/dist/runtime/identity-runtime.d.ts.map +1 -1
- package/dist/runtime/identity-runtime.js +22 -0
- package/dist/runtime/identity-runtime.js.map +1 -1
- package/dist/runtime/index.d.ts +38 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +97 -43
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/langsmith-env.d.ts +19 -0
- package/dist/runtime/langsmith-env.d.ts.map +1 -0
- package/dist/runtime/langsmith-env.js +38 -0
- package/dist/runtime/langsmith-env.js.map +1 -0
- package/dist/runtime/managed-thread.d.ts +61 -0
- package/dist/runtime/managed-thread.d.ts.map +1 -0
- package/dist/runtime/managed-thread.js +76 -0
- package/dist/runtime/managed-thread.js.map +1 -0
- package/dist/runtime/managed-tools.d.ts +10 -2
- package/dist/runtime/managed-tools.d.ts.map +1 -1
- package/dist/runtime/managed-tools.js +10 -8
- package/dist/runtime/managed-tools.js.map +1 -1
- package/dist/runtime/memory/policy.d.ts.map +1 -1
- package/dist/runtime/memory/policy.js +1 -3
- package/dist/runtime/memory/policy.js.map +1 -1
- package/dist/runtime/parent-run.d.ts +33 -0
- package/dist/runtime/parent-run.d.ts.map +1 -0
- package/dist/runtime/parent-run.js +114 -0
- package/dist/runtime/parent-run.js.map +1 -0
- package/dist/runtime/run-input.d.ts +14 -1
- package/dist/runtime/run-input.d.ts.map +1 -1
- package/dist/runtime/run-input.js +100 -7
- package/dist/runtime/run-input.js.map +1 -1
- package/dist/runtime/sandbox-manager.d.ts +15 -2
- package/dist/runtime/sandbox-manager.d.ts.map +1 -1
- package/dist/runtime/sandbox-manager.js +40 -18
- package/dist/runtime/sandbox-manager.js.map +1 -1
- package/dist/runtime/schedule-auth.d.ts +79 -0
- package/dist/runtime/schedule-auth.d.ts.map +1 -1
- package/dist/runtime/schedule-auth.js +165 -7
- package/dist/runtime/schedule-auth.js.map +1 -1
- package/dist/runtime/static-entry.d.ts.map +1 -1
- package/dist/runtime/static-entry.js +1 -0
- package/dist/runtime/static-entry.js.map +1 -1
- package/dist/runtime/thread-record.d.ts +88 -0
- package/dist/runtime/thread-record.d.ts.map +1 -0
- package/dist/runtime/thread-record.js +213 -0
- package/dist/runtime/thread-record.js.map +1 -0
- package/dist/runtime/types.d.ts +12 -1
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/runtime-schedules.d.ts +15 -0
- package/dist/runtime-schedules.d.ts.map +1 -1
- package/dist/runtime-schedules.js +83 -20
- package/dist/runtime-schedules.js.map +1 -1
- package/dist/sandbox.d.ts +0 -6
- package/dist/sandbox.d.ts.map +1 -1
- package/dist/sandbox.js +3 -7
- package/dist/sandbox.js.map +1 -1
- package/dist/schedule-channel.d.ts +5 -2
- package/dist/schedule-channel.d.ts.map +1 -1
- package/dist/schedule-channel.js +13 -12
- package/dist/schedule-channel.js.map +1 -1
- package/dist/telemetry/metadata.d.ts.map +1 -1
- package/dist/telemetry/metadata.js +4 -4
- package/dist/telemetry/metadata.js.map +1 -1
- package/dist/telemetry/otel/exporter.d.ts.map +1 -1
- package/dist/telemetry/otel/exporter.js +3 -3
- package/dist/telemetry/otel/exporter.js.map +1 -1
- package/dist/types.d.ts +19 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/values.d.ts +15 -0
- package/dist/values.d.ts.map +1 -0
- package/dist/values.js +31 -0
- package/dist/values.js.map +1 -0
- package/package.json +26 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/channels/github/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C,eAAO,MAAM,sBAAsB,aAA8B,CAAC;AAElE,gFAAgF;AAChF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;iBAW9B,CAAC;AAsFH,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ar constraints. Dispatch IDs are positive safe integers.
|
|
5
|
+
const nullableTextSchema = z.string().nullable();
|
|
6
|
+
export const githubIdentifierSchema = z.number().int().positive();
|
|
7
|
+
/** Receipt metadata only, not a complete GitHub event payload specification. */
|
|
8
|
+
export const githubReceiptSchema = z.object({
|
|
9
|
+
event: nonblankStringSchema,
|
|
10
|
+
deliveryId: nonblankStringSchema,
|
|
11
|
+
payload: z.looseObject({
|
|
12
|
+
action: z.string().optional(),
|
|
13
|
+
repository: z.looseObject({ id: z.number().int().optional() }).optional(),
|
|
14
|
+
issue: z.looseObject({ number: z.number().int().optional() }).optional(),
|
|
15
|
+
pull_request: z
|
|
16
|
+
.looseObject({ number: z.number().int().optional() })
|
|
17
|
+
.optional(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
// Payload subjects. Loose objects retain unmodeled provider fields.
|
|
21
|
+
const issueSchema = z.looseObject({
|
|
22
|
+
number: githubIdentifierSchema,
|
|
23
|
+
title: nonblankStringSchema,
|
|
24
|
+
body: nullableTextSchema,
|
|
25
|
+
pull_request: z.record(z.string(), z.unknown()).optional(),
|
|
26
|
+
});
|
|
27
|
+
const pullRequestSchema = issueSchema.extend({
|
|
28
|
+
draft: z.boolean().optional(),
|
|
29
|
+
merged: z.boolean().optional(),
|
|
30
|
+
});
|
|
31
|
+
const commentSchema = z.looseObject({
|
|
32
|
+
id: githubIdentifierSchema,
|
|
33
|
+
body: z.string(),
|
|
34
|
+
});
|
|
35
|
+
const labelSchema = z.looseObject({ name: nonblankStringSchema });
|
|
36
|
+
const reviewSchema = z.looseObject({
|
|
37
|
+
id: githubIdentifierSchema,
|
|
38
|
+
body: nullableTextSchema,
|
|
39
|
+
state: nonblankStringSchema,
|
|
40
|
+
});
|
|
41
|
+
const workflowRunSchema = z.looseObject({
|
|
42
|
+
id: githubIdentifierSchema,
|
|
43
|
+
conclusion: nullableTextSchema,
|
|
44
|
+
pull_requests: z.array(z.record(z.string(), z.unknown())),
|
|
45
|
+
});
|
|
46
|
+
const checkRunSchema = z.looseObject({
|
|
47
|
+
id: githubIdentifierSchema,
|
|
48
|
+
name: nonblankStringSchema,
|
|
49
|
+
head_sha: nonblankStringSchema,
|
|
50
|
+
conclusion: nullableTextSchema,
|
|
51
|
+
pull_requests: z.array(z.record(z.string(), z.unknown())),
|
|
52
|
+
});
|
|
53
|
+
const checkSuiteSchema = z.looseObject({
|
|
54
|
+
id: githubIdentifierSchema,
|
|
55
|
+
head_sha: nonblankStringSchema,
|
|
56
|
+
conclusion: nullableTextSchema,
|
|
57
|
+
pull_requests: z.array(z.record(z.string(), z.unknown())),
|
|
58
|
+
});
|
|
59
|
+
// Common dispatch context and reusable payload families.
|
|
60
|
+
const senderSchema = z.looseObject({
|
|
61
|
+
id: githubIdentifierSchema,
|
|
62
|
+
login: nonblankStringSchema,
|
|
63
|
+
type: z.enum(["User", "Bot", "Organization"]),
|
|
64
|
+
});
|
|
65
|
+
const repositorySchema = z.looseObject({
|
|
66
|
+
id: githubIdentifierSchema,
|
|
67
|
+
owner: z.looseObject({ login: nonblankStringSchema }),
|
|
68
|
+
name: nonblankStringSchema,
|
|
69
|
+
full_name: nonblankStringSchema,
|
|
70
|
+
private: z.boolean(),
|
|
71
|
+
});
|
|
72
|
+
const dispatchPayloadSchema = z.looseObject({
|
|
73
|
+
repository: repositorySchema,
|
|
74
|
+
sender: senderSchema,
|
|
75
|
+
installation: z.looseObject({ id: githubIdentifierSchema }),
|
|
76
|
+
});
|
|
77
|
+
const issuePayloadSchema = dispatchPayloadSchema.extend({ issue: issueSchema });
|
|
78
|
+
const pullRequestPayloadSchema = dispatchPayloadSchema.extend({
|
|
79
|
+
pull_request: pullRequestSchema,
|
|
80
|
+
});
|
|
81
|
+
function dispatchEventSchema(key, payloadSchema) {
|
|
82
|
+
return z.object({
|
|
83
|
+
key: z.literal(key),
|
|
84
|
+
deliveryId: nonblankStringSchema,
|
|
85
|
+
payload: payloadSchema,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/** Each supported event key requires its exact payload action and subject. */
|
|
89
|
+
export const githubDispatchSchema = z.discriminatedUnion("key", [
|
|
90
|
+
dispatchEventSchema("issues.opened", issuePayloadSchema.extend({ action: z.literal("opened") })),
|
|
91
|
+
dispatchEventSchema("issues.edited", issuePayloadSchema.extend({ action: z.literal("edited") })),
|
|
92
|
+
dispatchEventSchema("issues.reopened", issuePayloadSchema.extend({ action: z.literal("reopened") })),
|
|
93
|
+
dispatchEventSchema("issues.labeled", issuePayloadSchema.extend({
|
|
94
|
+
action: z.literal("labeled"),
|
|
95
|
+
label: labelSchema,
|
|
96
|
+
})),
|
|
97
|
+
dispatchEventSchema("issue_comment.created", issuePayloadSchema.extend({
|
|
98
|
+
action: z.literal("created"),
|
|
99
|
+
comment: commentSchema,
|
|
100
|
+
})),
|
|
101
|
+
dispatchEventSchema("issue_comment.edited", issuePayloadSchema.extend({
|
|
102
|
+
action: z.literal("edited"),
|
|
103
|
+
comment: commentSchema,
|
|
104
|
+
})),
|
|
105
|
+
dispatchEventSchema("pull_request.opened", pullRequestPayloadSchema.extend({ action: z.literal("opened") })),
|
|
106
|
+
dispatchEventSchema("pull_request.edited", pullRequestPayloadSchema.extend({ action: z.literal("edited") })),
|
|
107
|
+
dispatchEventSchema("pull_request.reopened", pullRequestPayloadSchema.extend({ action: z.literal("reopened") })),
|
|
108
|
+
dispatchEventSchema("pull_request.ready_for_review", pullRequestPayloadSchema.extend({ action: z.literal("ready_for_review") })),
|
|
109
|
+
dispatchEventSchema("pull_request.converted_to_draft", pullRequestPayloadSchema.extend({
|
|
110
|
+
action: z.literal("converted_to_draft"),
|
|
111
|
+
})),
|
|
112
|
+
dispatchEventSchema("pull_request.synchronize", pullRequestPayloadSchema.extend({ action: z.literal("synchronize") })),
|
|
113
|
+
dispatchEventSchema("pull_request.labeled", pullRequestPayloadSchema.extend({
|
|
114
|
+
action: z.literal("labeled"),
|
|
115
|
+
label: labelSchema,
|
|
116
|
+
})),
|
|
117
|
+
dispatchEventSchema("pull_request.closed", pullRequestPayloadSchema.extend({ action: z.literal("closed") })),
|
|
118
|
+
dispatchEventSchema("pull_request_review.submitted", pullRequestPayloadSchema.extend({
|
|
119
|
+
action: z.literal("submitted"),
|
|
120
|
+
review: reviewSchema,
|
|
121
|
+
})),
|
|
122
|
+
dispatchEventSchema("pull_request_review.edited", pullRequestPayloadSchema.extend({
|
|
123
|
+
action: z.literal("edited"),
|
|
124
|
+
review: reviewSchema,
|
|
125
|
+
})),
|
|
126
|
+
dispatchEventSchema("pull_request_review.dismissed", pullRequestPayloadSchema.extend({
|
|
127
|
+
action: z.literal("dismissed"),
|
|
128
|
+
review: reviewSchema,
|
|
129
|
+
})),
|
|
130
|
+
dispatchEventSchema("pull_request_review_comment.created", pullRequestPayloadSchema.extend({
|
|
131
|
+
action: z.literal("created"),
|
|
132
|
+
comment: commentSchema,
|
|
133
|
+
})),
|
|
134
|
+
dispatchEventSchema("pull_request_review_comment.edited", pullRequestPayloadSchema.extend({
|
|
135
|
+
action: z.literal("edited"),
|
|
136
|
+
comment: commentSchema,
|
|
137
|
+
})),
|
|
138
|
+
// Events without an action are keyed by their name alone.
|
|
139
|
+
dispatchEventSchema("push", dispatchPayloadSchema.extend({
|
|
140
|
+
action: z.never().optional(),
|
|
141
|
+
ref: nonblankStringSchema,
|
|
142
|
+
before: nonblankStringSchema,
|
|
143
|
+
after: nonblankStringSchema,
|
|
144
|
+
})),
|
|
145
|
+
dispatchEventSchema("status", dispatchPayloadSchema.extend({
|
|
146
|
+
action: z.never().optional(),
|
|
147
|
+
id: githubIdentifierSchema,
|
|
148
|
+
sha: nonblankStringSchema,
|
|
149
|
+
state: nonblankStringSchema,
|
|
150
|
+
context: nonblankStringSchema,
|
|
151
|
+
})),
|
|
152
|
+
dispatchEventSchema("check_run.completed", dispatchPayloadSchema.extend({
|
|
153
|
+
action: z.literal("completed"),
|
|
154
|
+
check_run: checkRunSchema,
|
|
155
|
+
})),
|
|
156
|
+
dispatchEventSchema("check_suite.completed", dispatchPayloadSchema.extend({
|
|
157
|
+
action: z.literal("completed"),
|
|
158
|
+
check_suite: checkSuiteSchema,
|
|
159
|
+
})),
|
|
160
|
+
dispatchEventSchema("workflow_run.completed", dispatchPayloadSchema.extend({
|
|
161
|
+
action: z.literal("completed"),
|
|
162
|
+
workflow_run: workflowRunSchema,
|
|
163
|
+
})),
|
|
164
|
+
]);
|
|
165
|
+
/**
|
|
166
|
+
* The fields of a GitHub event its endpoints are sent beside its key, delivery
|
|
167
|
+
* ID and payload: what a handler gets that the payload doesn't say as plainly.
|
|
168
|
+
* The one list of them; `GitHubEndpointRequest` is typed by it.
|
|
169
|
+
*/
|
|
170
|
+
export const ENDPOINT_EVENT_FIELDS = [
|
|
171
|
+
"action",
|
|
172
|
+
"repository",
|
|
173
|
+
"sender",
|
|
174
|
+
"actor",
|
|
175
|
+
"mentions",
|
|
176
|
+
];
|
|
177
|
+
export const SUPPORTED_EVENT_KEYS = githubDispatchSchema.options.map((option) => option.shape.key.value);
|
|
178
|
+
/** A webhook's `sender`, as a channel's actor; its login is its name. */
|
|
179
|
+
function senderActor(sender) {
|
|
180
|
+
return {
|
|
181
|
+
provider: "github",
|
|
182
|
+
id: String(sender.id),
|
|
183
|
+
name: sender.login,
|
|
184
|
+
type: sender.type,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
// Expose common routing metadata while preserving the original payload.
|
|
188
|
+
export const githubEventSchema = githubDispatchSchema.transform((event) => ({
|
|
189
|
+
...event,
|
|
190
|
+
name: event.key.split(".")[0],
|
|
191
|
+
// `push` and `status` have no action, and an absent field keeps the
|
|
192
|
+
// event JSON.
|
|
193
|
+
...(event.payload.action !== undefined && {
|
|
194
|
+
action: event.payload.action,
|
|
195
|
+
}),
|
|
196
|
+
installationId: event.payload.installation.id,
|
|
197
|
+
repository: {
|
|
198
|
+
id: event.payload.repository.id,
|
|
199
|
+
owner: event.payload.repository.owner.login,
|
|
200
|
+
name: event.payload.repository.name,
|
|
201
|
+
fullName: event.payload.repository.full_name,
|
|
202
|
+
private: event.payload.repository.private,
|
|
203
|
+
},
|
|
204
|
+
sender: {
|
|
205
|
+
id: event.payload.sender.id,
|
|
206
|
+
login: event.payload.sender.login,
|
|
207
|
+
type: event.payload.sender.type,
|
|
208
|
+
},
|
|
209
|
+
/** The `sender`, in the shape every channel's `actor` has. */
|
|
210
|
+
actor: senderActor(event.payload.sender),
|
|
211
|
+
/**
|
|
212
|
+
* The handles the text this event wrote mentions, such as `@octocat` or a
|
|
213
|
+
* text tag like `@openswe`: lowercased, each once, in order. The text is a
|
|
214
|
+
* new or edited comment's or review's body, or an opened or edited issue's
|
|
215
|
+
* or pull request's title and body; an edit lists only the handles it
|
|
216
|
+
* added. As on GitHub, code, quotes and HTML comments mention no one. Empty
|
|
217
|
+
* for events that write no text, such as a push or a label.
|
|
218
|
+
*/
|
|
219
|
+
mentions: eventMentions(event),
|
|
220
|
+
}));
|
|
221
|
+
//# 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;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D,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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C,KAAK;QACjC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI;KAChC;IACD,8DAA8D;IAC9D,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;IACxC;;;;;;;OAOG;IACH,QAAQ,EAAE,aAAa,CAAC,KAAK,CAAC;CAC/B,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import type { MultitaskStrategy } from "../../ingress/runs.js";
|
|
3
|
+
import type { ENDPOINT_EVENT_FIELDS, githubEventSchema } from "./schema.js";
|
|
4
|
+
import type { ChannelRunResult } from "../run-input.js";
|
|
5
|
+
import type { GitHubActor } from "../actor.js";
|
|
6
|
+
import type { ResolveUser } from "../resolve-user.js";
|
|
7
|
+
import type { EventFinished, EventReceived } from "../http/provider.js";
|
|
8
|
+
import type { EndpointRequest, EventEndpoint } from "../http/endpoint.js";
|
|
9
|
+
/** Handwritten schema subsets; unmodeled provider fields remain unknown. */
|
|
10
|
+
type EventUnion = z.output<typeof githubEventSchema>;
|
|
11
|
+
export type SupportedEventKey = EventUnion["key"];
|
|
12
|
+
export type GitHubEvent<K extends SupportedEventKey = SupportedEventKey> = Extract<EventUnion, {
|
|
13
|
+
key: K;
|
|
14
|
+
}>;
|
|
15
|
+
export type PayloadFor<K extends SupportedEventKey> = GitHubEvent<K>["payload"];
|
|
16
|
+
/**
|
|
17
|
+
* The conversation's thread an event belongs to. A handler runs before any
|
|
18
|
+
* run exists, so this is not a run's runtime.
|
|
19
|
+
*/
|
|
20
|
+
export interface GitHubChannelThread {
|
|
21
|
+
/**
|
|
22
|
+
* The thread's ID: the one a run the handler starts runs on, or, when
|
|
23
|
+
* `interrupted`, the one that waits. Useful for run context that names the
|
|
24
|
+
* thread, such as a token a backend signs for it.
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
channel: {
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Set when the thread waits on an interrupt. No run starts: what the
|
|
32
|
+
* handler returns only decides whether the App tells the issue or pull
|
|
33
|
+
* request that a decision is pending, so skip side effects such as
|
|
34
|
+
* reactions.
|
|
35
|
+
*/
|
|
36
|
+
interrupted?: true;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* What an event handler returns: a run's input, as `agent.invoke` takes it —
|
|
40
|
+
* a string, a message such as `new HumanMessage(...)`, state such as
|
|
41
|
+
* `{ messages: [...] }`, or `[input, { context, metadata }]`. `null` or `undefined`
|
|
42
|
+
* starts nothing.
|
|
43
|
+
*/
|
|
44
|
+
export type GitHubEventResult = ChannelRunResult | null | undefined | void;
|
|
45
|
+
export type GitHubEventCallback<K extends SupportedEventKey> = (event: GitHubEvent<K>, thread: GitHubChannelThread) => GitHubEventResult | Promise<GitHubEventResult>;
|
|
46
|
+
/**
|
|
47
|
+
* What the agent may do with the GitHub App `mda deploy` sets up. Deploy
|
|
48
|
+
* applies changes to these on every run, except to the App's own
|
|
49
|
+
* permissions (see `permissions`).
|
|
50
|
+
*/
|
|
51
|
+
export interface GitHubAppOptions {
|
|
52
|
+
/**
|
|
53
|
+
* Permissions the agent's GitHub token needs beyond those the handled
|
|
54
|
+
* events need, e.g. `{ contents: "read" }`. A new App asks for both.
|
|
55
|
+
*
|
|
56
|
+
* Handled events set their own level: read to receive an event, write to
|
|
57
|
+
* also reply where it happened. These can raise that level but not lower
|
|
58
|
+
* it.
|
|
59
|
+
*
|
|
60
|
+
* Deploy renews the agent's token with changed permissions, but it cannot
|
|
61
|
+
* change the App itself: GitHub reads an App's permissions from its
|
|
62
|
+
* manifest only when the App is created, and has no API to change them
|
|
63
|
+
* later. The App's owner grants added permissions, and removes dropped or
|
|
64
|
+
* lowered ones, in the App's settings on GitHub. Deploy names both and
|
|
65
|
+
* links there; until a dropped permission is removed, the App keeps it
|
|
66
|
+
* even though the agent's token no longer has it.
|
|
67
|
+
*/
|
|
68
|
+
permissions?: Record<string, "read" | "write">;
|
|
69
|
+
/**
|
|
70
|
+
* Repositories (`owner/name`, one owner) the channel is limited to: events
|
|
71
|
+
* from other repositories start nothing, and deploy reports listed ones the
|
|
72
|
+
* App is not installed on. Defaults to every repository the App is
|
|
73
|
+
* installed on. The agent's token still reaches every repository of the
|
|
74
|
+
* installation, so install the App only on the ones the agent may change.
|
|
75
|
+
*/
|
|
76
|
+
repositories?: string[];
|
|
77
|
+
}
|
|
78
|
+
/** Options for `channels.github(...)`: App scope and event handlers that start runs. */
|
|
79
|
+
export interface GitHubChannelOptions {
|
|
80
|
+
/** App `mda deploy` creates; permissions and repository allowlist. */
|
|
81
|
+
app?: GitHubAppOptions;
|
|
82
|
+
/**
|
|
83
|
+
* What an event that starts a run does while its conversation already
|
|
84
|
+
* runs: `enqueue` (the default) waits for the run and starts after it,
|
|
85
|
+
* `interrupt` cancels the run, keeping its progress, and starts at once,
|
|
86
|
+
* `rollback` cancels it and discards its progress, and `reject` starts
|
|
87
|
+
* nothing. Events on a conversation that waits on an interrupt start
|
|
88
|
+
* nothing either way.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* // A newer comment replaces the work on an older one.
|
|
93
|
+
* channels.github({ multitaskStrategy: "interrupt", onEvent })
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
multitaskStrategy?: MultitaskStrategy;
|
|
97
|
+
/**
|
|
98
|
+
* Map the GitHub sender to one of your users, with a function or an endpoint MDA
|
|
99
|
+
* asks; overrides the identity's.
|
|
100
|
+
*/
|
|
101
|
+
resolveUser?: ResolveUser<GitHubActor> | EventEndpoint;
|
|
102
|
+
/**
|
|
103
|
+
* Event handlers that start runs. Return a prompt (string, message, or
|
|
104
|
+
* state), or nothing to skip. While a thread waits on an interrupt, events
|
|
105
|
+
* start nothing: the handler still runs, with `thread.interrupted` set, to
|
|
106
|
+
* decide whether the issue or pull request is told to continue it in
|
|
107
|
+
* LangSmith Studio.
|
|
108
|
+
*
|
|
109
|
+
* A handler may also be an endpoint, a URL or a `Request` carrying headers,
|
|
110
|
+
* to have a service of yours decide: MDA POSTs it the event and its thread,
|
|
111
|
+
* and starts the run it answers with. See the README's "Asking your service
|
|
112
|
+
* what to start".
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```ts
|
|
116
|
+
* {
|
|
117
|
+
* "issues.opened": (e) => `Help with #${e.payload.issue.number}`,
|
|
118
|
+
* "issue_comment.created": new Request(`${BACKEND}/github/runs`, {
|
|
119
|
+
* headers: { "x-api-key": process.env.BACKEND_KEY! },
|
|
120
|
+
* }),
|
|
121
|
+
* }
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
onEvent?: {
|
|
125
|
+
[K in SupportedEventKey]?: GitHubEventCallback<K> | EventEndpoint;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* A delivery of a handled event is done, once, with how, to switch on by
|
|
129
|
+
* `type`: the run it started and how that run ended, as LangGraph names it
|
|
130
|
+
* (`run`), why it started none (`skipped`, such as a handler that returned
|
|
131
|
+
* nothing), or that MDA lost it (`failed`); and the decisions the thread
|
|
132
|
+
* waits on. Called after the App's own notices, such
|
|
133
|
+
* as the comment that a decision is pending, in the background; failures
|
|
134
|
+
* are logged. See `channels.http`'s `onFinish` for its limits.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```ts
|
|
138
|
+
* onFinish: async (event, thread, finished) => {
|
|
139
|
+
* if (finished.type === "run" && finished.run.status === "success")
|
|
140
|
+
* await reportRun(thread.id, finished.run.id);
|
|
141
|
+
* }
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
144
|
+
onFinish?: EventFinished<GitHubEvent, GitHubChannelThread>;
|
|
145
|
+
/**
|
|
146
|
+
* A delivery of a handled event reached its thread, once, with the event
|
|
147
|
+
* and its thread, before MDA reads the thread or asks the handler: the
|
|
148
|
+
* moment to acknowledge it, such as with a 👀 reaction. It fires even when
|
|
149
|
+
* the thread then waits on an interrupt, or the handler declines, so apply
|
|
150
|
+
* your own filters, such as a mention check. In the background, before
|
|
151
|
+
* `onFinish`; failures are logged and don't stop the run.
|
|
152
|
+
*
|
|
153
|
+
* @example
|
|
154
|
+
* ```ts
|
|
155
|
+
* onReceived: async (event) => {
|
|
156
|
+
* if (event.name === "issue_comment") await reactEyes(event);
|
|
157
|
+
* }
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
onReceived?: EventReceived<GitHubEvent, GitHubChannelThread>;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* What a GitHub channel POSTs an endpoint, for one event key or any: the
|
|
164
|
+
* event's key, delivery ID and payload, and, as a handler gets them, its
|
|
165
|
+
* `action`, `repository`, `sender` and the handles it `mentions`. Those are
|
|
166
|
+
* optional, so a receiver takes requests from older deployments.
|
|
167
|
+
*/
|
|
168
|
+
export type GitHubEndpointRequest<K extends SupportedEventKey = SupportedEventKey> = EndpointRequest<GitHubEvent<K>, (typeof ENDPOINT_EVENT_FIELDS)[number]>;
|
|
169
|
+
export {};
|
|
170
|
+
//# 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,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,aA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BAAoB;IACnC,sEAAsE;IACtE,GAAG,CAAC,EAAE,gBAAgB,CAAC;IACvB;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,GAAG,aAAa,CAAC;IACvD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,CAAC,EAAE;SACP,CAAC,IAAI,iBAAiB,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,aAAa;KAClE,CAAC;IACF;;;;;;;;;;;;;;;;OAgBG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;IAC3D;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,aAAa,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC;CAC9D;AAED;;;;;GAKG;AACH,MAAM,MAAM,qBAAqB,CAC/B,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,IAC7C,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/channels/github/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ChannelRunResult } from "../run-input.js";
|
|
3
|
+
/**
|
|
4
|
+
* The deployment's env var holding the secret it shares with your services:
|
|
5
|
+
* every endpoint request is signed with it, as Standard Webhooks does.
|
|
6
|
+
* Several, separated by whitespace or commas, each sign the request, for
|
|
7
|
+
* rotation.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SERVICE_SECRET_ENV = "MDA_SERVICE_SECRET";
|
|
10
|
+
/**
|
|
11
|
+
* Where an `onEvent` key's events go when a service of yours decides what
|
|
12
|
+
* they start: its URL, or a `Request` that also carries headers, such as a
|
|
13
|
+
* credential the service checks. See {@link endpointHandler}.
|
|
14
|
+
*
|
|
15
|
+
* @experimental This may change in a minor release.
|
|
16
|
+
*/
|
|
17
|
+
export type EventEndpoint = string | URL | Request;
|
|
18
|
+
/** The key a Standard Webhooks secret stands for; a malformed one throws. */
|
|
19
|
+
export declare function signingKey(secret: string): Buffer;
|
|
20
|
+
/**
|
|
21
|
+
* The Standard Webhooks headers that sign one request with `keys`: none
|
|
22
|
+
* without a key. Each key signs `<id>.<timestamp>.<body>`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function signatureHeaders(keys: readonly Buffer[], id: string, timestamp: number, body: string): Record<string, string>;
|
|
25
|
+
/** A channel's event, by the fields every endpoint is sent. */
|
|
26
|
+
type ChannelEvent = {
|
|
27
|
+
key: string;
|
|
28
|
+
deliveryId: string;
|
|
29
|
+
payload: unknown;
|
|
30
|
+
};
|
|
31
|
+
/** The fields of an event every endpoint is sent. */
|
|
32
|
+
declare const EVENT_FIELDS: readonly ["key", "deliveryId", "payload"];
|
|
33
|
+
/** A field any of a union of events has, such as a field of one kind only. */
|
|
34
|
+
export type EventField<E> = E extends unknown ? keyof E : never;
|
|
35
|
+
/**
|
|
36
|
+
* The event a channel sends its endpoint: the event key, the provider's
|
|
37
|
+
* delivery ID and its payload, and the channel's own fields `X`, such as
|
|
38
|
+
* GitHub's `repository` and `mentions`. A channel's own fields are optional,
|
|
39
|
+
* so a receiver takes requests from a deployment that sends fewer. For a
|
|
40
|
+
* union of events, each is typed by the key, with the fields of `X` it has.
|
|
41
|
+
*
|
|
42
|
+
* @experimental This may change in a minor release.
|
|
43
|
+
*/
|
|
44
|
+
export type EndpointEvent<E extends ChannelEvent = ChannelEvent, X extends PropertyKey = never> = E extends unknown ? Pick<E, (typeof EVENT_FIELDS)[number]> & Partial<Pick<E, Extract<X, keyof E>>> : never;
|
|
45
|
+
/**
|
|
46
|
+
* The conversation's thread an endpoint request is about.
|
|
47
|
+
*
|
|
48
|
+
* @experimental This may change in a minor release.
|
|
49
|
+
*/
|
|
50
|
+
export interface EndpointThread {
|
|
51
|
+
/** The thread the run starts on, or that waits on an interrupt. */
|
|
52
|
+
id: string;
|
|
53
|
+
channel: {
|
|
54
|
+
name: string;
|
|
55
|
+
};
|
|
56
|
+
/** Set when the thread waits on an interrupt: no run starts, whatever the answer. */
|
|
57
|
+
interrupted?: true;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* What a channel POSTs its endpoint: the event, and the thread it belongs to.
|
|
61
|
+
*
|
|
62
|
+
* @experimental This may change in a minor release.
|
|
63
|
+
*/
|
|
64
|
+
export interface EndpointRequest<E extends ChannelEvent = ChannelEvent, X extends PropertyKey = never> {
|
|
65
|
+
event: EndpointEvent<E, X>;
|
|
66
|
+
thread: EndpointThread;
|
|
67
|
+
}
|
|
68
|
+
declare const answerSchema: z.ZodObject<{
|
|
69
|
+
input: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodCustom<import("../types.js").JsonValue, import("../types.js").JsonValue>>]>;
|
|
70
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<import("../types.js").JsonValue, import("../types.js").JsonValue>>>;
|
|
71
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<import("../types.js").JsonValue, import("../types.js").JsonValue>>>;
|
|
72
|
+
webhook: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, z.core.$strict>;
|
|
74
|
+
/**
|
|
75
|
+
* What an endpoint answers: the run's input, as a handler returns it (text,
|
|
76
|
+
* or state such as `{ messages }`), with the run options a handler may set,
|
|
77
|
+
* all JSON. An endpoint answers `null` (or HTTP 204) instead to start nothing.
|
|
78
|
+
* The channel checks an answer against the same schema.
|
|
79
|
+
*
|
|
80
|
+
* @experimental This may change in a minor release.
|
|
81
|
+
*/
|
|
82
|
+
export type EndpointAnswer = z.infer<typeof answerSchema>;
|
|
83
|
+
/** The handler an endpoint stands for; see {@link endpointHandler}. */
|
|
84
|
+
export type EndpointCallback<E extends ChannelEvent = ChannelEvent> = (event: E, thread: EndpointThread) => Promise<ChannelRunResult | null>;
|
|
85
|
+
/** Whether a handler is one an endpoint stands for. */
|
|
86
|
+
export declare function isEndpointCallback(handler: unknown): boolean;
|
|
87
|
+
/** Whether an `onEvent` value is an endpoint rather than a handler function. */
|
|
88
|
+
export declare function isEventEndpoint(value: unknown): value is EventEndpoint;
|
|
89
|
+
/**
|
|
90
|
+
* The handler an endpoint stands for. When the event's thread takes a turn,
|
|
91
|
+
* MDA POSTs `{ event: { key, deliveryId, payload }, thread: { id, channel,
|
|
92
|
+
* interrupted? } }` as JSON to the endpoint's URL, with the event's `fields`,
|
|
93
|
+
* the channel's own, beside the payload, and a `Request`'s headers,
|
|
94
|
+
* signed when the deployment has `MDA_SERVICE_SECRET`, and starts the
|
|
95
|
+
* run the service answers with: `{ input, context?, metadata?, webhook? }`.
|
|
96
|
+
* `null` or HTTP 204 starts nothing. A network error before the answer, HTTP
|
|
97
|
+
* 429 or a 5xx is tried again, up to three attempts. Any other answer, one cut
|
|
98
|
+
* off, a redirect, or no answer within 60 seconds fails the handler, as a
|
|
99
|
+
* handler that throws does.
|
|
100
|
+
* The URL is https, or http to a loopback host for local development, without
|
|
101
|
+
* credentials in it.
|
|
102
|
+
*
|
|
103
|
+
* The webhook ID is `msg_<deliveryId>` for the call that starts the run, and
|
|
104
|
+
* `msg_<deliveryId>_interrupted` for the one that asks whether to tell the
|
|
105
|
+
* conversation its thread waits on a decision.
|
|
106
|
+
*/
|
|
107
|
+
export declare function endpointHandler<E extends ChannelEvent = ChannelEvent, X extends EventField<E> & string = never>(endpoint: EventEndpoint, label: string, fields?: readonly X[]): EndpointCallback<E>;
|
|
108
|
+
/** How long a service of yours may take, and how often MDA asks it. */
|
|
109
|
+
export interface EndpointLimits {
|
|
110
|
+
/**
|
|
111
|
+
* How long the service may take to answer: each attempt, or, with `total`,
|
|
112
|
+
* all of them and the pauses between.
|
|
113
|
+
*/
|
|
114
|
+
timeoutMs: number;
|
|
115
|
+
total?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* The pauses before trying again after a network error, HTTP 429 or a 5xx,
|
|
118
|
+
* each attempt with the same webhook ID, so a receiver that dedupes on it
|
|
119
|
+
* acts once.
|
|
120
|
+
*/
|
|
121
|
+
retryDelaysMs: readonly number[];
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Ask a service of yours: POST `body` as JSON, signed as webhook `id`, and
|
|
125
|
+
* return the JSON answer, or `null` for HTTP 204.
|
|
126
|
+
*/
|
|
127
|
+
export type AskEndpoint = (id: string, body: string, limits: EndpointLimits) => Promise<unknown>;
|
|
128
|
+
/**
|
|
129
|
+
* The client of a service of yours that `endpoint` names, with a `Request`'s
|
|
130
|
+
* headers, signed when the deployment has `MDA_SERVICE_SECRET`. A bad URL or
|
|
131
|
+
* secret throws here, when the endpoint is declared. Any answer but JSON or
|
|
132
|
+
* HTTP 204, one cut off, a redirect, or a timeout throws; errors call the
|
|
133
|
+
* service `name`, such as `event endpoint`.
|
|
134
|
+
*/
|
|
135
|
+
export declare function endpointClient(endpoint: EventEndpoint, label: string, name: string): AskEndpoint;
|
|
136
|
+
export {};
|
|
137
|
+
//# sourceMappingURL=endpoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoint.d.ts","sourceRoot":"","sources":["../../../src/channels/http/endpoint.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAWxD;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAQvD;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC;AAmBnD,6EAA6E;AAC7E,wBAAgB,UAAU,CAAC,MAA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