@sanoma-ai/connector-github 0.11.21 → 0.11.23

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/MARKS-LICENSE ADDED
@@ -0,0 +1,25 @@
1
+ The marks in this package (copilot.svg and copilot-dark.svg, Copilot's; not logo.svg and logo-dark.svg) come from LobeHub's icon set (@lobehub/icons-static-svg 1.102.0,
2
+ https://github.com/lobehub/lobe-icons), under the MIT License below. The marks themselves are
3
+ the trademarks of GitHub and name their products only.
4
+
5
+ MIT License
6
+
7
+ Copyright (c) 2023 LobeHub
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
package/README.md CHANGED
@@ -51,7 +51,11 @@ A branch protection rule names its repository by the declared repository itself
51
51
 
52
52
  The fields are the provider's attributes, by their names, and `owner` (required) on a repository and a team membership. A list block of at most one item (`pages`, `security_and_analysis`, `template`) is one object. Only declared fields are compared for drift; sets (`topics`, and five lists in a branch protection rule) are compared in any order.
53
53
 
54
- The logo is GitHub's mark from [Octicons](https://primer.style/octicons/) (`mark-github`, MIT), there only to identify the service an operation calls.
54
+ The logo is GitHub's mark from [Octicons](https://primer.style/octicons/) (`mark-github`, MIT), there only to identify the service an operation calls; Copilot's is from [LobeHub's icon set](https://github.com/lobehub/lobe-icons) (MIT, [`MARKS-LICENSE`](MARKS-LICENSE)).
55
+
56
+ ## Copilot
57
+
58
+ The connector also gives the app's chat Copilot, a coding agent (`withSetup({ agent })`), on a person's own plan only, as the engine `acp-copilot`: GitHub's Copilot CLI (`@github/copilot`, pinned) over the Agent Client Protocol (`copilot --acp`), installed on first use in the person's box and signed in with the person's GitHub account by the device code the chat's card shows.
55
59
 
56
60
  ## Remote half
57
61
 
@@ -0,0 +1 @@
1
+ <svg fill="#f2f4f3" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GithubCopilot</title><path d="M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"></path></svg>
package/copilot.svg ADDED
@@ -0,0 +1 @@
1
+ <svg fill="#1d2422" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GithubCopilot</title><path d="M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z"></path></svg>
@@ -0,0 +1,6 @@
1
+ import type { CodingAgent } from "sanoma/workflows";
2
+ /**
3
+ * Copilot, the chat's coding agent on a person's own plan: GitHub's Copilot CLI over the Agent
4
+ * Client Protocol (`copilot --acp`), signed in with the person's GitHub account in the chat.
5
+ */
6
+ export declare const copilot: CodingAgent;
package/dist/agent.js ADDED
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Copilot, the chat's coding agent on a person's own plan: GitHub's Copilot CLI over the Agent
3
+ * Client Protocol (`copilot --acp`), signed in with the person's GitHub account in the chat.
4
+ */
5
+ export const copilot = {
6
+ own: {
7
+ packages: ["@github/copilot@1.0.103"],
8
+ bin: "copilot",
9
+ args: ["--acp"],
10
+ // Its advertised method (`copilot login`) opens a browser on this machine; the device flow prints a link and a code.
11
+ signIn: { run: ["login", "--device-code"] },
12
+ },
13
+ };
14
+ //# sourceMappingURL=agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAgB;IAClC,GAAG,EAAE;QACH,QAAQ,EAAE,CAAC,yBAAyB,CAAC;QACrC,GAAG,EAAE,SAAS;QACd,IAAI,EAAE,CAAC,OAAO,CAAC;QACf,qHAAqH;QACrH,MAAM,EAAE,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC,EAAE;KAC5C;CACF,CAAC"}
package/dist/index.d.ts CHANGED
@@ -5,7 +5,8 @@
5
5
  * `.commit`, `.head`, `.addDeployKey`), each on an installation token minted when called. It carries its
6
6
  * live driver (`githubDriver`, on the default bridge), its fake (`fakeGithub`), of which each
7
7
  * sandbox run makes its own, and its remote half (`githubRemote`): a repository's pull requests,
8
- * the `sanoma` status, the rules on a branch and the App's webhooks.
8
+ * the `sanoma` status, the rules on a branch and the App's webhooks. And Copilot (`copilot`), a
9
+ * coding agent the chat runs on a person's own plan.
9
10
  */
10
11
  export declare const github: import("sanoma/workflows").Connector<"github", Omit<import("sanoma/internal/bridge/connector").TfResources<"github", {
11
12
  readonly repository: import("zod").ZodObject<{
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { withSetup } from "sanoma/workflows";
2
+ import { copilot } from "./agent.js";
2
3
  import { githubOps } from "./connector.js";
3
4
  import { githubDriver } from "./driver.js";
4
5
  import { fakeGithub } from "./fake.js";
@@ -10,11 +11,13 @@ import { githubRemote } from "./remote.js";
10
11
  * `.commit`, `.head`, `.addDeployKey`), each on an installation token minted when called. It carries its
11
12
  * live driver (`githubDriver`, on the default bridge), its fake (`fakeGithub`), of which each
12
13
  * sandbox run makes its own, and its remote half (`githubRemote`): a repository's pull requests,
13
- * the `sanoma` status, the rules on a branch and the App's webhooks.
14
+ * the `sanoma` status, the rules on a branch and the App's webhooks. And Copilot (`copilot`), a
15
+ * coding agent the chat runs on a person's own plan.
14
16
  */
15
17
  export const github = withSetup(githubOps, {
16
18
  driver: githubDriver,
17
19
  fake: fakeGithub,
18
20
  remote: () => githubRemote,
21
+ agent: copilot,
19
22
  });
20
23
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,EAAE;IACzC,MAAM,EAAE,YAAY;IACpB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,GAAG,EAAE,CAAC,YAAY;CAC3B,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,EAAE;IACzC,MAAM,EAAE,YAAY;IACpB,IAAI,EAAE,UAAU;IAChB,MAAM,EAAE,GAAG,EAAE,CAAC,YAAY;IAC1B,KAAK,EAAE,OAAO;CACf,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,9 +1,11 @@
1
1
  {
2
2
  "name": "@sanoma-ai/connector-github",
3
- "version": "0.11.21",
4
- "description": "GitHub resources (repositories, branch protection, team membership, deploy keys, collaborators) for Sanoma, read through the OpenTofu provider, and repositories generated, committed to and given deploy keys through Sanoma's GitHub App",
3
+ "version": "0.11.23",
4
+ "description": "GitHub resources (repositories, branch protection, team membership, deploy keys, collaborators) for Sanoma, read through the OpenTofu provider, and repositories generated, committed to and given deploy keys through Sanoma's GitHub App; and Copilot, a coding agent for the chat on a person's own plan",
5
5
  "keywords": [
6
+ "coding-agent",
6
7
  "connector",
8
+ "copilot",
7
9
  "github",
8
10
  "opentofu",
9
11
  "resources",
@@ -22,8 +24,11 @@
22
24
  "dist",
23
25
  "logo.svg",
24
26
  "logo-dark.svg",
27
+ "copilot.svg",
28
+ "copilot-dark.svg",
25
29
  "README.md",
26
- "LICENSE"
30
+ "LICENSE",
31
+ "MARKS-LICENSE"
27
32
  ],
28
33
  "type": "module",
29
34
  "sideEffects": false,
@@ -55,11 +60,11 @@
55
60
  "access": "public"
56
61
  },
57
62
  "devDependencies": {
58
- "sanoma": "0.11.21",
63
+ "sanoma": "0.11.23",
59
64
  "zod": "^4.6.5"
60
65
  },
61
66
  "peerDependencies": {
62
- "sanoma": "0.11.21",
67
+ "sanoma": "0.11.23",
63
68
  "zod": "^4"
64
69
  },
65
70
  "engines": {
@@ -68,7 +73,13 @@
68
73
  "sanoma": {
69
74
  "title": "GitHub",
70
75
  "logo": "logo.svg",
71
- "logoDark": "logo-dark.svg"
76
+ "logoDark": "logo-dark.svg",
77
+ "agent": {
78
+ "id": "copilot",
79
+ "title": "Copilot",
80
+ "mark": "copilot.svg",
81
+ "markDark": "copilot-dark.svg"
82
+ }
72
83
  },
73
84
  "scripts": {
74
85
  "build": "tsc -p tsconfig.build.json",