@dual-os/github-api 6.0.3 → 6.0.5
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/LICENSE +24 -0
- package/README.md +35 -0
- package/Runner.js +342 -576
- package/Runner.js.map +5 -9
- package/bundle-inventory.json +1 -1
- package/dist/auth.d.ts +13 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +5 -3
- package/dist/auth.js.map +1 -1
- package/dist/channel/github-app-client.d.ts +67 -0
- package/dist/channel/github-app-client.d.ts.map +1 -0
- package/dist/channel/github-app-client.js +18 -0
- package/dist/channel/github-app-client.js.map +9 -0
- package/dist/channel/github-app-definition.d.ts +190 -0
- package/dist/channel/github-app-definition.d.ts.map +1 -0
- package/dist/channel/github-app-definition.js +32 -0
- package/dist/channel/github-app-definition.js.map +9 -0
- package/dist/channel/github-app.d.ts +126 -0
- package/dist/channel/github-app.d.ts.map +1 -0
- package/dist/channel/github-app.js +17 -0
- package/dist/channel/github-app.js.map +9 -0
- package/dist/channel/internal/webhook.d.ts +38 -0
- package/dist/channel/internal/webhook.d.ts.map +1 -0
- package/dist/channel/internal/webhook.js +22 -0
- package/dist/channel/internal/webhook.js.map +9 -0
- package/dist/generated/http.js +7 -5
- package/dist/generated/http.js.map +1 -1
- package/dist/generated/operations.d.ts +1154 -1154
- package/dist/generated/operations.d.ts.map +1 -1
- package/dist/generated/operations.js +7 -5
- package/dist/generated/operations.js.map +1 -1
- package/dist/generated/plugin.js +14 -10515
- package/dist/generated/plugin.js.map +3 -4
- package/dist/plugin.d.ts +10 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +33 -0
- package/dist/plugin.js.map +10 -0
- package/dist/triggers.d.ts +26 -2
- package/dist/triggers.d.ts.map +1 -1
- package/dist/triggers.js +8 -6
- package/dist/triggers.js.map +1 -1
- package/dual-plugin.json +1 -1
- package/package.json +1 -1
- package/{plugin-t4j28rxn.js → plugin-1b35jx9g.js} +6 -4
- package/{plugin-t4j28rxn.js.map → plugin-1b35jx9g.js.map} +2 -2
- package/plugin-2qqpmr67.js +108 -0
- package/plugin-2qqpmr67.js.map +10 -0
- package/{plugin-yzj02c6j.js → plugin-3ryytw13.js} +193 -308
- package/{plugin-yzj02c6j.js.map → plugin-3ryytw13.js.map} +5 -6
- package/{plugin-3mpmm6hc.js → plugin-5rkcrntd.js} +4 -4
- package/plugin-7hfrx1dg.js +167 -0
- package/plugin-7hfrx1dg.js.map +10 -0
- package/plugin-e0mt19z7.js +377 -0
- package/plugin-e0mt19z7.js.map +10 -0
- package/{plugin-ahctqzvj.js → plugin-gtd7vh23.js} +4 -4
- package/plugin-p1y3h7d7.js +10516 -0
- package/plugin-p1y3h7d7.js.map +10 -0
- package/plugin-p6f7n836.js +631 -0
- package/plugin-p6f7n836.js.map +12 -0
- package/plugin-r0m0v72b.js +156 -0
- package/plugin-r0m0v72b.js.map +10 -0
- package/{plugin-gajxsj3f.js → plugin-w0va8331.js} +2495 -2288
- package/{plugin-gajxsj3f.js.map → plugin-w0va8331.js.map} +12 -13
- /package/licenses/{@dual-os_sdk@0.8.1 → @dual-os_sdk@0.9.0}/LICENSE +0 -0
- /package/{plugin-3mpmm6hc.js.map → plugin-5rkcrntd.js.map} +0 -0
- /package/{plugin-ahctqzvj.js.map → plugin-gtd7vh23.js.map} +0 -0
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { issuesChannel } from "./channel/github-app-definition.js";
|
|
2
|
+
import { githubChannelLayer } from "./channel/github-app.js";
|
|
3
|
+
import { githubApiPlugin as githubApiPlugin$1, githubApiPluginBase as githubApiPluginBase$1 } from "./generated/plugin.js";
|
|
4
|
+
import { Layer } from "effect";
|
|
5
|
+
import { Plugin } from "@dual-os/sdk";
|
|
6
|
+
//#region src/plugin.d.ts
|
|
7
|
+
export declare const githubApiPluginBase: Plugin.AddChildren<typeof githubApiPluginBase$1, readonly [], readonly [], readonly [], readonly [typeof issuesChannel]>;
|
|
8
|
+
export declare const githubApiPlugin: Plugin.Provided<typeof githubApiPluginBase, Plugin.LayerOutput<readonly [typeof githubApiPlugin$1]> | Layer.Success<typeof githubChannelLayer>, Plugin.LayerError<readonly [typeof githubApiPlugin$1]>, Plugin.LayerRequirements<readonly [typeof githubApiPlugin$1]>>;
|
|
9
|
+
//#endregion
|
|
10
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","names":["Generated.githubApiPluginBase","Generated.githubApiPlugin"],"sources":["../src/plugin.ts"],"mappings":";;;;;;qBASa,qBAAqB,OAAO,mBAChCA,+EAIU;qBAMN,iBAAiB,OAAO,gBAC5B,qBACP,OAAO,6BAA6BC,sBAA8B,MAAM,eAAe,qBACvF,OAAO,4BAA4BA,qBACnC,OAAO,mCAAmCA"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
Plugin_exports
|
|
4
|
+
} from "../plugin-w0va8331.js";
|
|
5
|
+
import"../plugin-3ryytw13.js";
|
|
6
|
+
import {
|
|
7
|
+
issuesChannel2
|
|
8
|
+
} from "../plugin-2qqpmr67.js";
|
|
9
|
+
import"../plugin-7hfrx1dg.js";
|
|
10
|
+
import"../plugin-p6f7n836.js";
|
|
11
|
+
import {
|
|
12
|
+
githubChannelLayer2
|
|
13
|
+
} from "../plugin-e0mt19z7.js";
|
|
14
|
+
import"../plugin-2jdfj02n.js";
|
|
15
|
+
import"../plugin-r0m0v72b.js";
|
|
16
|
+
import"../plugin-1b35jx9g.js";
|
|
17
|
+
import"../plugin-gtd7vh23.js";
|
|
18
|
+
import"../plugin-5rkcrntd.js";
|
|
19
|
+
import {
|
|
20
|
+
githubApiPluginBase2,
|
|
21
|
+
githubApiPlugin2
|
|
22
|
+
} from "../plugin-p1y3h7d7.js";
|
|
23
|
+
|
|
24
|
+
// dist/plugin.js
|
|
25
|
+
var githubApiPluginBase = githubApiPluginBase2.pipe(Plugin_exports.withAgentChannel(issuesChannel2));
|
|
26
|
+
var githubApiPlugin = githubApiPlugin2.pipe(Plugin_exports.withAgentChannel(issuesChannel2), Plugin_exports.provide(githubChannelLayer2));
|
|
27
|
+
export {
|
|
28
|
+
githubApiPlugin,
|
|
29
|
+
githubApiPluginBase
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
//# debugId=A41AF914D1F91BC464756E2164756E21
|
|
33
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../bundle-input/dist/plugin.js"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { issuesChannel } from \"./channel/github-app-definition.js\";\nimport { githubChannelLayer } from \"./channel/github-app.js\";\nimport { githubApiPlugin as githubApiPlugin$1, githubApiPluginBase as githubApiPluginBase$1 } from \"./generated/plugin.js\";\nimport { Plugin } from \"@dual-os/sdk\";\n//#region src/plugin.ts\nconst githubApiPluginBase = githubApiPluginBase$1.pipe(Plugin.withAgentChannel(issuesChannel));\nconst githubApiPlugin = githubApiPlugin$1.pipe(Plugin.withAgentChannel(issuesChannel), Plugin.provide(githubChannelLayer));\n//#endregion\nexport { githubApiPlugin, githubApiPluginBase };\n\n//# sourceMappingURL=plugin.js.map"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAM,sBAAsB,qBAAsB,KAAK,eAAO,iBAAiB,cAAa,CAAC;AAC7F,IAAM,kBAAkB,iBAAkB,KAAK,eAAO,iBAAiB,cAAa,GAAG,eAAO,QAAQ,mBAAkB,CAAC;",
|
|
8
|
+
"debugId": "A41AF914D1F91BC464756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
package/dist/triggers.d.ts
CHANGED
|
@@ -48,7 +48,19 @@ export declare const handlers: {
|
|
|
48
48
|
}>, Schema.Struct<{
|
|
49
49
|
readonly accessToken: Schema.String;
|
|
50
50
|
readonly server: Schema.optional<Schema.String>;
|
|
51
|
-
}>, import("@dual-os/sdk/OAuth2TokenRefresher").Service
|
|
51
|
+
}>, import("@dual-os/sdk/OAuth2TokenRefresher").Service>, import("@dual-os/sdk/AuthMethod").AuthMethod<"app", undefined, Schema.Struct<{
|
|
52
|
+
readonly appId: Schema.String;
|
|
53
|
+
readonly privateKey: Schema.NonEmptyString;
|
|
54
|
+
readonly webhookSecret: Schema.NonEmptyString;
|
|
55
|
+
}>, Schema.Struct<{
|
|
56
|
+
readonly appId: Schema.String;
|
|
57
|
+
readonly privateKey: Schema.NonEmptyString;
|
|
58
|
+
readonly webhookSecret: Schema.NonEmptyString;
|
|
59
|
+
}>, Schema.Struct<{
|
|
60
|
+
readonly appId: Schema.String;
|
|
61
|
+
readonly privateKey: Schema.NonEmptyString;
|
|
62
|
+
readonly webhookSecret: Schema.NonEmptyString;
|
|
63
|
+
}>, never>]>;
|
|
52
64
|
} & import("@dual-os/sdk/ConnectionResolver").ConnectionResolutionContext) => Effect.Effect<{
|
|
53
65
|
state: {
|
|
54
66
|
hookId: number;
|
|
@@ -88,7 +100,19 @@ export declare const handlers: {
|
|
|
88
100
|
}>, Schema.Struct<{
|
|
89
101
|
readonly accessToken: Schema.String;
|
|
90
102
|
readonly server: Schema.optional<Schema.String>;
|
|
91
|
-
}>, import("@dual-os/sdk/OAuth2TokenRefresher").Service
|
|
103
|
+
}>, import("@dual-os/sdk/OAuth2TokenRefresher").Service>, import("@dual-os/sdk/AuthMethod").AuthMethod<"app", undefined, Schema.Struct<{
|
|
104
|
+
readonly appId: Schema.String;
|
|
105
|
+
readonly privateKey: Schema.NonEmptyString;
|
|
106
|
+
readonly webhookSecret: Schema.NonEmptyString;
|
|
107
|
+
}>, Schema.Struct<{
|
|
108
|
+
readonly appId: Schema.String;
|
|
109
|
+
readonly privateKey: Schema.NonEmptyString;
|
|
110
|
+
readonly webhookSecret: Schema.NonEmptyString;
|
|
111
|
+
}>, Schema.Struct<{
|
|
112
|
+
readonly appId: Schema.String;
|
|
113
|
+
readonly privateKey: Schema.NonEmptyString;
|
|
114
|
+
readonly webhookSecret: Schema.NonEmptyString;
|
|
115
|
+
}>, never>]>;
|
|
92
116
|
} & import("@dual-os/sdk/ConnectionResolver").ConnectionResolutionContext) => Effect.Effect<void, Action.ActionHandlerFailure, import("effect/http/HttpClient").HttpClient>;
|
|
93
117
|
parse: (input: Trigger.WebhookLifecycleInput<{
|
|
94
118
|
readonly events: readonly ("*" | "check_run" | "check_suite" | "commit_comment" | "create" | "delete" | "deploy_key" | "deployment" | "deployment_status" | "fork" | "github_app_authorization" | "gollum" | "installation" | "installation_repositories" | "issue_comment" | "issues" | "label" | "marketplace_purchase" | "member" | "membership" | "meta" | "milestone" | "org_block" | "organization" | "page_build" | "project" | "project_card" | "project_column" | "public" | "pull_request" | "pull_request_review" | "pull_request_review_comment" | "push" | "release" | "repository" | "repository_import" | "repository_vulnerability_alert" | "security_advisory" | "star" | "status" | "team" | "team_add" | "watch")[];
|
package/dist/triggers.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers.d.ts","names":[],"sources":["../src/triggers.ts"],"mappings":";;;qBAgFa,oBAAQ,QAAA,4BAAA,OAAA;;;;;;;;;;;;qBAER;;IAET,WAAQ,OAAA,QAAA
|
|
1
|
+
{"version":3,"file":"triggers.d.ts","names":[],"sources":["../src/triggers.ts"],"mappings":";;;qBAgFa,oBAAQ,QAAA,4BAAA,OAAA;;;;;;;;;;;;qBAER;;IAET,WAAQ,OAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAyBR,aAAU,OAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOV,QAAK,OAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;IAaL,SAAM,OAAA,QAAA"}
|
package/dist/triggers.js
CHANGED
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
triggers2,
|
|
4
4
|
handlers2
|
|
5
|
-
} from "../plugin-
|
|
6
|
-
import"../plugin-
|
|
7
|
-
import"../plugin-
|
|
8
|
-
import"../plugin-
|
|
5
|
+
} from "../plugin-5rkcrntd.js";
|
|
6
|
+
import"../plugin-gtd7vh23.js";
|
|
7
|
+
import"../plugin-1b35jx9g.js";
|
|
8
|
+
import"../plugin-r0m0v72b.js";
|
|
9
9
|
import"../plugin-2jdfj02n.js";
|
|
10
|
-
import"../plugin-
|
|
10
|
+
import"../plugin-2qqpmr67.js";
|
|
11
|
+
import"../plugin-3ryytw13.js";
|
|
12
|
+
import"../plugin-w0va8331.js";
|
|
11
13
|
export {
|
|
12
14
|
handlers2 as handlers,
|
|
13
15
|
triggers2 as triggers
|
|
14
16
|
};
|
|
15
17
|
|
|
16
|
-
//# debugId=
|
|
18
|
+
//# debugId=C042B773CC8A1C7B64756E2164756E21
|
|
17
19
|
//# sourceMappingURL=triggers.js.map
|
package/dist/triggers.js.map
CHANGED
package/dual-plugin.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"entrypoint":"dist/
|
|
1
|
+
{"entrypoint":"dist/plugin.js","export":"githubApiPlugin","format":2,"plugin":"github-api","runner":"Runner.js","sdk_version":"0.9.0","version":"6.0.5"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@dual-os/github-api","version":"6.0.
|
|
1
|
+
{"name":"@dual-os/github-api","version":"6.0.5","license":"UNLICENSED","exports":{".":"./dist/plugin.js","./definition":"./dist/plugin.js","./executable":"./dist/plugin.js","./plugin.json":"./plugin.json","./package.json":"./package.json"},"files":["**/*"],"type":"module","scripts":{},"dependencies":{},"devDependencies":{},"dual":{"plugin":{"entrypoint":"dist/plugin.js","export":"githubApiPlugin","format":2,"plugin":"github-api","runner":"Runner.js","sdk_version":"0.9.0","version":"6.0.5","assets":["dist/_virtual/_rolldown/runtime.js","dist/auth.d.ts","dist/auth.d.ts.map","dist/auth.js","dist/auth.js.map","dist/channel/github-app-client.d.ts","dist/channel/github-app-client.d.ts.map","dist/channel/github-app-client.js","dist/channel/github-app-client.js.map","dist/channel/github-app-definition.d.ts","dist/channel/github-app-definition.d.ts.map","dist/channel/github-app-definition.js","dist/channel/github-app-definition.js.map","dist/channel/github-app.d.ts","dist/channel/github-app.d.ts.map","dist/channel/github-app.js","dist/channel/github-app.js.map","dist/channel/internal/webhook.d.ts","dist/channel/internal/webhook.d.ts.map","dist/channel/internal/webhook.js","dist/channel/internal/webhook.js.map","dist/generated/http.d.ts","dist/generated/http.d.ts.map","dist/generated/http.js","dist/generated/http.js.map","dist/generated/operations.d.ts","dist/generated/operations.d.ts.map","dist/generated/operations.js","dist/generated/operations.js.map","dist/generated/plugin.d.ts","dist/generated/plugin.d.ts.map","dist/generated/plugin.js","dist/generated/plugin.js.map","dist/plugin.d.ts","dist/plugin.d.ts.map","dist/plugin.js","dist/plugin.js.map","dist/triggers.d.ts","dist/triggers.d.ts.map","dist/triggers.js","dist/triggers.js.map","plugin.json","package.json"]}},"peerDependencies":{},"optionalDependencies":{}}
|
|
@@ -22,9 +22,11 @@ import {
|
|
|
22
22
|
params2,
|
|
23
23
|
form2,
|
|
24
24
|
continuation2,
|
|
25
|
-
preauthenticated2
|
|
25
|
+
preauthenticated2
|
|
26
|
+
} from "./plugin-3ryytw13.js";
|
|
27
|
+
import {
|
|
26
28
|
auth_exports2
|
|
27
|
-
} from "./plugin-
|
|
29
|
+
} from "./plugin-r0m0v72b.js";
|
|
28
30
|
|
|
29
31
|
// dist/generated/http.js
|
|
30
32
|
var http_exports = /* @__PURE__ */ __exportAll2({
|
|
@@ -58,5 +60,5 @@ var http_exports = /* @__PURE__ */ __exportAll2({
|
|
|
58
60
|
var { endpoint: endpoint2, execute: execute2, googleUpload: googleUpload2, graphql: graphql2, mcp: mcp2, variants: variants2 } = Http_exports.make(auth_exports2);
|
|
59
61
|
export { http_exports, endpoint2, execute2, googleUpload2, graphql2, mcp2, variants2 };
|
|
60
62
|
|
|
61
|
-
//# debugId=
|
|
62
|
-
//# sourceMappingURL=plugin-
|
|
63
|
+
//# debugId=408C6208F824AFC164756E2164756E21
|
|
64
|
+
//# sourceMappingURL=plugin-1b35jx9g.js.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { __exportAll } from \"../_virtual/_rolldown/runtime.js\";\nimport { auth_exports } from \"../auth.js\";\nimport \"./http.js\";\nimport { Http } from \"@dual-os/sdk\";\nimport { Base64FromFile, Base64UrlFromFile, DataUriFromFile, DateTimeFromRfc2822, DateTimeFromUnixSeconds, File, FileFromBase64, FileFromBase64Url, FileFromDataUri, Rfc2822FromDateTime, UnixSecondsFromDateTime, continuation, decoded, form, literal, params, path, preauthenticated, segments } from \"@dual-os/sdk/Http\";\n//#region src/generated/http.ts\nvar http_exports = /* @__PURE__ */ __exportAll({\n\tBase64FromFile: () => Base64FromFile,\n\tBase64UrlFromFile: () => Base64UrlFromFile,\n\tDataUriFromFile: () => DataUriFromFile,\n\tDateTimeFromRfc2822: () => DateTimeFromRfc2822,\n\tDateTimeFromUnixSeconds: () => DateTimeFromUnixSeconds,\n\tFile: () => File,\n\tFileFromBase64: () => FileFromBase64,\n\tFileFromBase64Url: () => FileFromBase64Url,\n\tFileFromDataUri: () => FileFromDataUri,\n\tHttp: () => http_exports,\n\tRfc2822FromDateTime: () => Rfc2822FromDateTime,\n\tUnixSecondsFromDateTime: () => UnixSecondsFromDateTime,\n\tcontinuation: () => continuation,\n\tdecoded: () => decoded,\n\tendpoint: () => endpoint,\n\texecute: () => execute,\n\tform: () => form,\n\tgoogleUpload: () => googleUpload,\n\tgraphql: () => graphql,\n\tliteral: () => literal,\n\tmcp: () => mcp,\n\tparams: () => params,\n\tpath: () => path,\n\tpreauthenticated: () => preauthenticated,\n\tsegments: () => segments,\n\tvariants: () => variants\n});\nconst { endpoint, execute, googleUpload, graphql, mcp, variants } = Http.make(auth_exports);\n//#endregion\nexport { Base64FromFile, Base64UrlFromFile, DataUriFromFile, DateTimeFromRfc2822, DateTimeFromUnixSeconds, File, FileFromBase64, FileFromBase64Url, FileFromDataUri, http_exports as Http, Rfc2822FromDateTime, UnixSecondsFromDateTime, continuation, decoded, endpoint, execute, form, googleUpload, graphql, literal, mcp, params, path, preauthenticated, segments, variants };\n\n//# sourceMappingURL=http.js.map"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,IAAI,+BAA+B,aAAY;AAAA,EAC9C,gBAAgB,MAAM;AAAA,EACtB,mBAAmB,MAAM;AAAA,EACzB,iBAAiB,MAAM;AAAA,EACvB,qBAAqB,MAAM;AAAA,EAC3B,yBAAyB,MAAM;AAAA,EAC/B,MAAM,MAAM;AAAA,EACZ,gBAAgB,MAAM;AAAA,EACtB,mBAAmB,MAAM;AAAA,EACzB,iBAAiB,MAAM;AAAA,EACvB,MAAM,MAAM;AAAA,EACZ,qBAAqB,MAAM;AAAA,EAC3B,yBAAyB,MAAM;AAAA,EAC/B,cAAc,MAAM;AAAA,EACpB,SAAS,MAAM;AAAA,EACf,UAAU,MAAM;AAAA,EAChB,SAAS,MAAM;AAAA,EACf,MAAM,MAAM;AAAA,EACZ,cAAc,MAAM;AAAA,EACpB,SAAS,MAAM;AAAA,EACf,SAAS,MAAM;AAAA,EACf,KAAK,MAAM;AAAA,EACX,QAAQ,MAAM;AAAA,EACd,MAAM,MAAM;AAAA,EACZ,kBAAkB,MAAM;AAAA,EACxB,UAAU,MAAM;AAAA,EAChB,UAAU,MAAM;AACjB,CAAC;AACD,MAAQ,qBAAU,mBAAS,6BAAc,mBAAS,WAAK,wBAAa,aAAK,KAAK,aAAY;",
|
|
8
|
+
"debugId": "408C6208F824AFC164756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
Never,
|
|
4
|
+
String3,
|
|
5
|
+
Struct,
|
|
6
|
+
Record,
|
|
7
|
+
ArraySchema,
|
|
8
|
+
Literals,
|
|
9
|
+
isPattern,
|
|
10
|
+
isMaxLength,
|
|
11
|
+
NonEmptyString,
|
|
12
|
+
AuthMethod_exports,
|
|
13
|
+
AgentChannel_exports,
|
|
14
|
+
Plugin_exports
|
|
15
|
+
} from "./plugin-w0va8331.js";
|
|
16
|
+
|
|
17
|
+
// dist/channel/github-app-definition.js
|
|
18
|
+
var apiVersion2 = "2022-11-28";
|
|
19
|
+
var maxCommentLength2 = 65536;
|
|
20
|
+
var GitHubId2 = String3.check(isPattern(/^[1-9][0-9]{0,19}$/u));
|
|
21
|
+
var Permission2 = Literals([
|
|
22
|
+
"read",
|
|
23
|
+
"triage",
|
|
24
|
+
"write",
|
|
25
|
+
"maintain",
|
|
26
|
+
"admin"
|
|
27
|
+
]);
|
|
28
|
+
var Repository3 = String3.check(isPattern(/^[A-Za-z0-9-]{1,39}\/[A-Za-z0-9._-]{1,100}$/u));
|
|
29
|
+
var ConversationKey2 = AgentChannel_exports.Key.check(isPattern(/^[A-Za-z0-9-]{1,39}\/[A-Za-z0-9._-]{1,100}#[1-9][0-9]{0,9}$/u));
|
|
30
|
+
var Credentials2 = Struct({
|
|
31
|
+
appId: GitHubId2,
|
|
32
|
+
privateKey: NonEmptyString.check(isMaxLength(16384)),
|
|
33
|
+
webhookSecret: NonEmptyString.check(isMaxLength(1024))
|
|
34
|
+
});
|
|
35
|
+
var gitHubAppAuth2 = AuthMethod_exports.make("app", {
|
|
36
|
+
description: "The customer's own GitHub App: its App ID, a private key in PEM and the webhook secret. Replies come from the App's bot account.",
|
|
37
|
+
name: "GitHub App",
|
|
38
|
+
schema: Credentials2
|
|
39
|
+
});
|
|
40
|
+
var issuesDefinition2 = {
|
|
41
|
+
authMethods: [gitHubAppAuth2],
|
|
42
|
+
definitionSettings: Record(String3, Never),
|
|
43
|
+
deploymentSettings: Struct({
|
|
44
|
+
installationId: GitHubId2.annotate({
|
|
45
|
+
description: "The App installation, on one user or organization, whose repositories this Channel serves.",
|
|
46
|
+
title: "Installation ID"
|
|
47
|
+
}),
|
|
48
|
+
repositories: ArraySchema(Repository3).check(isMaxLength(1000)).annotate({
|
|
49
|
+
description: "Repositories (owner/repo) of the installation where the Agent can be activated. Leave empty for every repository of the installation.",
|
|
50
|
+
title: "Repositories"
|
|
51
|
+
}),
|
|
52
|
+
access: Literals(["open", "restricted"]).annotate({
|
|
53
|
+
description: "Who can activate the Agent: anyone who can comment (open) or only the allowed people (restricted).",
|
|
54
|
+
title: "Access"
|
|
55
|
+
}),
|
|
56
|
+
allowedSenderKeys: ArraySchema(GitHubId2).check(isMaxLength(1000)).annotate({
|
|
57
|
+
description: "Numeric GitHub user IDs who can activate the Agent when access is restricted.",
|
|
58
|
+
title: "Allowed people"
|
|
59
|
+
}),
|
|
60
|
+
mentionPermission: Permission2.annotate({
|
|
61
|
+
description: "The lowest repository role that can activate the Agent, also when access is open: anyone can comment on a public repository.",
|
|
62
|
+
title: "Lowest repository role"
|
|
63
|
+
}),
|
|
64
|
+
respondTo: Literals(["mentions", "all_messages"]).annotate({
|
|
65
|
+
description: "Which comments activate the Agent: only those that mention the App, or every new issue, pull request and comment in the chosen repositories.",
|
|
66
|
+
title: "Respond to"
|
|
67
|
+
})
|
|
68
|
+
}),
|
|
69
|
+
exposure: "webhook",
|
|
70
|
+
features: {
|
|
71
|
+
assets: false,
|
|
72
|
+
deliveryMode: "at-most-once",
|
|
73
|
+
deliveryState: false,
|
|
74
|
+
directText: true,
|
|
75
|
+
groups: true,
|
|
76
|
+
maxTextLength: maxCommentLength2,
|
|
77
|
+
mentions: false,
|
|
78
|
+
operations: [
|
|
79
|
+
"present_outcome",
|
|
80
|
+
"create_message",
|
|
81
|
+
"update_message",
|
|
82
|
+
"delete_message",
|
|
83
|
+
"set_reaction",
|
|
84
|
+
"render_plan"
|
|
85
|
+
],
|
|
86
|
+
readContext: true,
|
|
87
|
+
replies: false,
|
|
88
|
+
threads: false
|
|
89
|
+
},
|
|
90
|
+
requiredChecks: ["access"],
|
|
91
|
+
state: Struct({
|
|
92
|
+
appId: GitHubId2,
|
|
93
|
+
botUserId: GitHubId2,
|
|
94
|
+
ingressUrl: String3,
|
|
95
|
+
installationId: GitHubId2,
|
|
96
|
+
slug: String3.check(isPattern(/^[a-z0-9][a-z0-9-]{0,99}$/u))
|
|
97
|
+
})
|
|
98
|
+
};
|
|
99
|
+
var issuesChannel2 = AgentChannel_exports.make("agent-issues", {
|
|
100
|
+
...issuesDefinition2,
|
|
101
|
+
description: "GitHub issues and pull requests: one conversation each. A mention of the App, or any comment, starts a turn; it answers with comments and reactions.",
|
|
102
|
+
name: "GitHub issues and pull requests"
|
|
103
|
+
});
|
|
104
|
+
var gitHubAppPluginBase2 = Plugin_exports.make("github-api").pipe(Plugin_exports.withName("GitHub App"), Plugin_exports.withIconUrl("https://github.com/apple-touch-icon.png"), Plugin_exports.withDescription("The customer's own GitHub App, so an Agent answers in issues and pull requests as the App's bot."), Plugin_exports.withAuthMethods([gitHubAppAuth2]), Plugin_exports.withAgentChannel(issuesChannel2));
|
|
105
|
+
export { apiVersion2, maxCommentLength2, GitHubId2, Permission2, Repository3, ConversationKey2, Credentials2, gitHubAppAuth2, issuesDefinition2, issuesChannel2, gitHubAppPluginBase2 };
|
|
106
|
+
|
|
107
|
+
//# debugId=A098643FED41CE4C64756E2164756E21
|
|
108
|
+
//# sourceMappingURL=plugin-2qqpmr67.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../bundle-input/dist/channel/github-app-definition.js"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import { Schema } from \"effect\";\nimport { AgentChannel, AuthMethod, Plugin } from \"@dual-os/sdk\";\n//#region src/channel/github-app-definition.ts\n/** The REST API version every request pins. */\nconst apiVersion = \"2022-11-28\";\n/** GitHub's longest comment body, in characters. */\nconst maxCommentLength = 65536;\n/** A numeric GitHub ID, as decimal digits. */\nconst GitHubId = Schema.String.check(Schema.isPattern(/^[1-9][0-9]{0,19}$/u));\n/** The repository roles, lowest first. */\nconst Permission = Schema.Literals([\n\t\"read\",\n\t\"triage\",\n\t\"write\",\n\t\"maintain\",\n\t\"admin\"\n]);\n/** A repository: `owner/repo`. */\nconst Repository = Schema.String.check(Schema.isPattern(/^[A-Za-z0-9-]{1,39}\\/[A-Za-z0-9._-]{1,100}$/u));\n/** An issue or pull request: `owner/repo#number`. */\nconst ConversationKey = AgentChannel.Key.check(Schema.isPattern(/^[A-Za-z0-9-]{1,39}\\/[A-Za-z0-9._-]{1,100}#[1-9][0-9]{0,9}$/u));\n/** What the customer copies from their GitHub App's settings. */\nconst Credentials = Schema.Struct({\n\tappId: GitHubId,\n\tprivateKey: Schema.NonEmptyString.check(Schema.isMaxLength(16384)),\n\twebhookSecret: Schema.NonEmptyString.check(Schema.isMaxLength(1024))\n});\nconst gitHubAppAuth = AuthMethod.make(\"app\", {\n\tdescription: \"The customer's own GitHub App: its App ID, a private key in PEM and the webhook secret. Replies come from the App's bot account.\",\n\tname: \"GitHub App\",\n\tschema: Credentials\n});\nconst issuesDefinition = {\n\tauthMethods: [gitHubAppAuth],\n\tdefinitionSettings: Schema.Record(Schema.String, Schema.Never),\n\tdeploymentSettings: Schema.Struct({\n\t\tinstallationId: GitHubId.annotate({\n\t\t\tdescription: \"The App installation, on one user or organization, whose repositories this Channel serves.\",\n\t\t\ttitle: \"Installation ID\"\n\t\t}),\n\t\trepositories: Schema.Array(Repository).check(Schema.isMaxLength(1e3)).annotate({\n\t\t\tdescription: \"Repositories (owner/repo) of the installation where the Agent can be activated. Leave empty for every repository of the installation.\",\n\t\t\ttitle: \"Repositories\"\n\t\t}),\n\t\taccess: Schema.Literals([\"open\", \"restricted\"]).annotate({\n\t\t\tdescription: \"Who can activate the Agent: anyone who can comment (open) or only the allowed people (restricted).\",\n\t\t\ttitle: \"Access\"\n\t\t}),\n\t\tallowedSenderKeys: Schema.Array(GitHubId).check(Schema.isMaxLength(1e3)).annotate({\n\t\t\tdescription: \"Numeric GitHub user IDs who can activate the Agent when access is restricted.\",\n\t\t\ttitle: \"Allowed people\"\n\t\t}),\n\t\tmentionPermission: Permission.annotate({\n\t\t\tdescription: \"The lowest repository role that can activate the Agent, also when access is open: anyone can comment on a public repository.\",\n\t\t\ttitle: \"Lowest repository role\"\n\t\t}),\n\t\trespondTo: Schema.Literals([\"mentions\", \"all_messages\"]).annotate({\n\t\t\tdescription: \"Which comments activate the Agent: only those that mention the App, or every new issue, pull request and comment in the chosen repositories.\",\n\t\t\ttitle: \"Respond to\"\n\t\t})\n\t}),\n\texposure: \"webhook\",\n\tfeatures: {\n\t\tassets: false,\n\t\tdeliveryMode: \"at-most-once\",\n\t\tdeliveryState: false,\n\t\tdirectText: true,\n\t\tgroups: true,\n\t\tmaxTextLength: maxCommentLength,\n\t\tmentions: false,\n\t\toperations: [\n\t\t\t\"present_outcome\",\n\t\t\t\"create_message\",\n\t\t\t\"update_message\",\n\t\t\t\"delete_message\",\n\t\t\t\"set_reaction\",\n\t\t\t\"render_plan\"\n\t\t],\n\t\treadContext: true,\n\t\treplies: false,\n\t\tthreads: false\n\t},\n\trequiredChecks: [\"access\"],\n\tstate: Schema.Struct({\n\t\tappId: GitHubId,\n\t\tbotUserId: GitHubId,\n\t\tingressUrl: Schema.String,\n\t\tinstallationId: GitHubId,\n\t\tslug: Schema.String.check(Schema.isPattern(/^[a-z0-9][a-z0-9-]{0,99}$/u))\n\t})\n};\nconst issuesChannel = AgentChannel.make(\"agent-issues\", {\n\t...issuesDefinition,\n\tdescription: \"GitHub issues and pull requests: one conversation each. A mention of the App, or any comment, starts a turn; it answers with comments and reactions.\",\n\tname: \"GitHub issues and pull requests\"\n});\nconst gitHubAppPluginBase = Plugin.make(\"github-api\").pipe(Plugin.withName(\"GitHub App\"), Plugin.withIconUrl(\"https://github.com/apple-touch-icon.png\"), Plugin.withDescription(\"The customer's own GitHub App, so an Agent answers in issues and pull requests as the App's bot.\"), Plugin.withAuthMethods([gitHubAppAuth]), Plugin.withAgentChannel(issuesChannel));\n//#endregion\nexport { ConversationKey, Credentials, GitHubId, Permission, Repository, apiVersion, gitHubAppAuth, gitHubAppPluginBase, issuesChannel, issuesDefinition, maxCommentLength };\n\n//# sourceMappingURL=github-app-definition.js.map"
|
|
6
|
+
],
|
|
7
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAIA,IAAM,cAAa;AAEnB,IAAM,oBAAmB;AAEzB,IAAM,YAAW,QAAc,MAAM,UAAiB,qBAAqB,CAAC;AAE5E,IAAM,cAAa,SAAgB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,CAAC;AAED,IAAM,cAAa,QAAc,MAAM,UAAiB,8CAA8C,CAAC;AAEvG,IAAM,mBAAkB,qBAAa,IAAI,MAAM,UAAiB,8DAA8D,CAAC;AAE/H,IAAM,eAAc,OAAc;AAAA,EACjC,OAAO;AAAA,EACP,YAAY,eAAsB,MAAM,YAAmB,KAAK,CAAC;AAAA,EACjE,eAAe,eAAsB,MAAM,YAAmB,IAAI,CAAC;AACpE,CAAC;AACD,IAAM,iBAAgB,mBAAW,KAAK,OAAO;AAAA,EAC5C,aAAa;AAAA,EACb,MAAM;AAAA,EACN,QAAQ;AACT,CAAC;AACD,IAAM,oBAAmB;AAAA,EACxB,aAAa,CAAC,cAAa;AAAA,EAC3B,oBAAoB,OAAc,SAAe,KAAY;AAAA,EAC7D,oBAAoB,OAAc;AAAA,IACjC,gBAAgB,UAAS,SAAS;AAAA,MACjC,aAAa;AAAA,MACb,OAAO;AAAA,IACR,CAAC;AAAA,IACD,cAAc,YAAa,WAAU,EAAE,MAAM,YAAmB,IAAG,CAAC,EAAE,SAAS;AAAA,MAC9E,aAAa;AAAA,MACb,OAAO;AAAA,IACR,CAAC;AAAA,IACD,QAAQ,SAAgB,CAAC,QAAQ,YAAY,CAAC,EAAE,SAAS;AAAA,MACxD,aAAa;AAAA,MACb,OAAO;AAAA,IACR,CAAC;AAAA,IACD,mBAAmB,YAAa,SAAQ,EAAE,MAAM,YAAmB,IAAG,CAAC,EAAE,SAAS;AAAA,MACjF,aAAa;AAAA,MACb,OAAO;AAAA,IACR,CAAC;AAAA,IACD,mBAAmB,YAAW,SAAS;AAAA,MACtC,aAAa;AAAA,MACb,OAAO;AAAA,IACR,CAAC;AAAA,IACD,WAAW,SAAgB,CAAC,YAAY,cAAc,CAAC,EAAE,SAAS;AAAA,MACjE,aAAa;AAAA,MACb,OAAO;AAAA,IACR,CAAC;AAAA,EACF,CAAC;AAAA,EACD,UAAU;AAAA,EACV,UAAU;AAAA,IACT,QAAQ;AAAA,IACR,cAAc;AAAA,IACd,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,eAAe;AAAA,IACf,UAAU;AAAA,IACV,YAAY;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,aAAa;AAAA,IACb,SAAS;AAAA,IACT,SAAS;AAAA,EACV;AAAA,EACA,gBAAgB,CAAC,QAAQ;AAAA,EACzB,OAAO,OAAc;AAAA,IACpB,OAAO;AAAA,IACP,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,gBAAgB;AAAA,IAChB,MAAM,QAAc,MAAM,UAAiB,4BAA4B,CAAC;AAAA,EACzE,CAAC;AACF;AACA,IAAM,iBAAgB,qBAAa,KAAK,gBAAgB;AAAA,KACpD;AAAA,EACH,aAAa;AAAA,EACb,MAAM;AACP,CAAC;AACD,IAAM,uBAAsB,eAAO,KAAK,YAAY,EAAE,KAAK,eAAO,SAAS,YAAY,GAAG,eAAO,YAAY,yCAAyC,GAAG,eAAO,gBAAgB,kGAAkG,GAAG,eAAO,gBAAgB,CAAC,cAAa,CAAC,GAAG,eAAO,iBAAiB,cAAa,CAAC;",
|
|
8
|
+
"debugId": "A098643FED41CE4C64756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|