@framers/agentos-ext-github 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -13
- package/dist/documents/GitHubDocumentsConnector.d.ts +123 -26
- package/dist/documents/GitHubDocumentsConnector.d.ts.map +1 -1
- package/dist/documents/GitHubDocumentsConnector.js +229 -46
- package/dist/documents/GitHubDocumentsConnector.js.map +1 -1
- package/dist/documents/index.d.ts +3 -3
- package/dist/documents/index.d.ts.map +1 -1
- package/dist/documents/index.js +2 -2
- package/dist/documents/index.js.map +1 -1
- package/dist/documents/links.d.ts +28 -14
- package/dist/documents/links.d.ts.map +1 -1
- package/dist/documents/links.js +113 -39
- package/dist/documents/links.js.map +1 -1
- package/dist/documents/tree.d.ts +47 -13
- package/dist/documents/tree.d.ts.map +1 -1
- package/dist/documents/tree.js +98 -15
- package/dist/documents/tree.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +5 -4
- package/dist/__tests__/app.test.d.ts +0 -7
- package/dist/__tests__/app.test.d.ts.map +0 -1
- package/dist/__tests__/app.test.js +0 -1219
- package/dist/__tests__/app.test.js.map +0 -1
- package/dist/__tests__/documents.test.d.ts +0 -9
- package/dist/__tests__/documents.test.d.ts.map +0 -1
- package/dist/__tests__/documents.test.js +0 -644
- package/dist/__tests__/documents.test.js.map +0 -1
- package/dist/__tests__/entry.test.d.ts +0 -7
- package/dist/__tests__/entry.test.d.ts.map +0 -1
- package/dist/__tests__/entry.test.js +0 -34
- package/dist/__tests__/entry.test.js.map +0 -1
- package/dist/__tests__/events.test.d.ts +0 -8
- package/dist/__tests__/events.test.d.ts.map +0 -1
- package/dist/__tests__/events.test.js +0 -321
- package/dist/__tests__/events.test.js.map +0 -1
- package/dist/__tests__/fileAndBranchTools.test.d.ts +0 -6
- package/dist/__tests__/fileAndBranchTools.test.d.ts.map +0 -1
- package/dist/__tests__/fileAndBranchTools.test.js +0 -310
- package/dist/__tests__/fileAndBranchTools.test.js.map +0 -1
- package/dist/__tests__/indexer.test.d.ts +0 -6
- package/dist/__tests__/indexer.test.d.ts.map +0 -1
- package/dist/__tests__/indexer.test.js +0 -253
- package/dist/__tests__/indexer.test.js.map +0 -1
- package/dist/__tests__/issueTools.test.d.ts +0 -5
- package/dist/__tests__/issueTools.test.d.ts.map +0 -1
- package/dist/__tests__/issueTools.test.js +0 -183
- package/dist/__tests__/issueTools.test.js.map +0 -1
- package/dist/__tests__/links.test.d.ts +0 -8
- package/dist/__tests__/links.test.d.ts.map +0 -1
- package/dist/__tests__/links.test.js +0 -182
- package/dist/__tests__/links.test.js.map +0 -1
- package/dist/__tests__/prTools.test.d.ts +0 -5
- package/dist/__tests__/prTools.test.d.ts.map +0 -1
- package/dist/__tests__/prTools.test.js +0 -318
- package/dist/__tests__/prTools.test.js.map +0 -1
- package/dist/__tests__/refs.test.d.ts +0 -7
- package/dist/__tests__/refs.test.d.ts.map +0 -1
- package/dist/__tests__/refs.test.js +0 -420
- package/dist/__tests__/refs.test.js.map +0 -1
- package/dist/__tests__/releaseAndActionsTools.test.d.ts +0 -6
- package/dist/__tests__/releaseAndActionsTools.test.d.ts.map +0 -1
- package/dist/__tests__/releaseAndActionsTools.test.js +0 -315
- package/dist/__tests__/releaseAndActionsTools.test.js.map +0 -1
- package/dist/__tests__/repoTools.test.d.ts +0 -6
- package/dist/__tests__/repoTools.test.d.ts.map +0 -1
- package/dist/__tests__/repoTools.test.js +0 -308
- package/dist/__tests__/repoTools.test.js.map +0 -1
- package/dist/__tests__/service.test.d.ts +0 -6
- package/dist/__tests__/service.test.d.ts.map +0 -1
- package/dist/__tests__/service.test.js +0 -173
- package/dist/__tests__/service.test.js.map +0 -1
package/README.md
CHANGED
|
@@ -351,7 +351,7 @@ Top-level pull request comments use the issues API. `github_pr_comment_list` ret
|
|
|
351
351
|
|
|
352
352
|
The `./documents` entry reads repositories through a GitHub App instead of one personal token. Every call goes to GitHub's REST API over the `fetch` you pass (the global `fetch` by default) with `X-GitHub-Api-Version: 2026-03-10`, so tests point it at a stand-in with `{ fetchImpl, apiBase }`.
|
|
353
353
|
|
|
354
|
-
A repository is read by its id, at `/repositories/<id>/branches/<branch>`, `/repositories/<id>/git/trees/<sha>`, `/repositories/<id>/contents/<path
|
|
354
|
+
A repository is read by its id, at `/repositories/<id>/branches/<branch>`, `/repositories/<id>/git/trees/<sha>`, `/repositories/<id>/contents/<path>`, `/repositories/<id>/git/matching-refs/heads/<name>` and `.../matching-refs/tags/<name>`, `/repositories/<id>/git/tags/<sha>` and `/repositories/<id>/commits/<short commit>`, the address GitHub's own redirects for a renamed or moved repository lead to, and never by its name. A name can come to mean another repository: a renamed repository's old name can be taken again, and an account's old login claimed by another account, which ends GitHub's redirects to it; and GitHub answers a public repository's branch, tree and files to any token, an installation token narrowed to other repositories included. The full name builds a read's attribution link and nothing else.
|
|
355
355
|
|
|
356
356
|
```ts
|
|
357
357
|
import { readFileSync } from 'node:fs';
|
|
@@ -450,9 +450,9 @@ Every call runs under a deadline, 30 seconds by default (`GITHUB_TIMEOUT_MS`), i
|
|
|
450
450
|
| `verifyWebhookSignature(body, header, secret)` | Checks `X-Hub-Signature-256` against the HMAC SHA-256 of the raw body in constant time; an empty or missing secret throws a `TypeError`, since anyone can sign a delivery under an empty key |
|
|
451
451
|
| `readWebhookRequest(request, secret, { maxBytes })`, `readWebhookDelivery({ headers, body }, secret, { maxBytes })` | Read a delivery under a cap, check its signature and id, and answer it as a typed event, or throw `WebhookDeliveryRefused` with its reason |
|
|
452
452
|
| `reconcileInstallations(credential, links, { since })` | Answers the linked installations GitHub no longer has (`gone`: missing from the listing and answered 404 at their own address, since an installation removed while the listing is read can move another past a page's end), those GitHub has suspended (`suspended`, whose repositories it does not read), the repositories whose default branch moved past the head last read, the repositories it could not read, and asks again for each event since `since` that no delivery attempt delivered, reporting GitHub's refusals of that step in `deliveries`; a rate limit ends it, with `retryAt` |
|
|
453
|
-
| `GitHubDocumentsConnector` | An `AccountSourceConnector` of `@framers/agentos-ext-account-sources` over one installation's linked repositories, at each one's default branch or at the branch or commit a selection's `at` names; `resolveRef(repositoryId, refAndPath)` settles
|
|
453
|
+
| `GitHubDocumentsConnector` | An `AccountSourceConnector` of `@framers/agentos-ext-account-sources` over one installation's linked repositories, at each one's default branch or at the branch or commit a selection's `at` names, whole or within the folder its `path` names; `resolveRef(repositoryId, refAndPath)` settles a link's ref as a branch, a tag or a commit |
|
|
454
454
|
| `parseGitHubLink(text)` | The repository, folder or file a GitHub address names, read without a request; `refused` for any other address on GitHub's hosts, `null` for another host's |
|
|
455
|
-
| `readTree`, `pathFilter`, `TreeTooLarge` | A tree at a commit within a request budget, `readTree(fetchImpl, token, repositoryId, commit)` reading the repository by its id (a full name is taken too, and reads whatever repository holds that name; a number that is not a positive integer is a `TypeError` before any request), and the filter that keeps documentation, and code when asked (`includeCode`); `TreeTooLarge` carries `reason`, `budget` or `truncated` |
|
|
455
|
+
| `readTree`, `pathFilter`, `TreeTooLarge` | A tree at a commit within a request budget, `readTree(fetchImpl, token, repositoryId, commit, apiBase, { maxRequests, skipFolders, path, signal })` reading the repository by its id (a full name is taken too, and reads whatever repository holds that name; a number that is not a positive integer is a `TypeError` before any request), the whole tree or the folder or file `path` names, and the filter that keeps documentation, and code when asked (`includeCode`); `TreeTooLarge` carries `reason`, `budget` or `truncated` |
|
|
456
456
|
| `CODE_EXTENSIONS`, `GENERATED_CODE_ENDINGS`, `isGeneratedCode(path)` | The source files a filter that includes code keeps, and the endings of the code files a tool writes (minified and bundled files, generated Protocol Buffers and Dart files), which it leaves out |
|
|
457
457
|
| `planTree(blobs, options)`, `IMAGE_EXTENSIONS` | Every file of a tree with its outcome under `pathFilter`'s filter: a note, or skipped with the reason it is left out |
|
|
458
458
|
| `GitHubApiError` | An answer outside 2xx; carries the status, `rateLimited` and `retryAt`, and nothing of the body |
|
|
@@ -472,15 +472,17 @@ The connector's filter, `new GitHubDocumentsConnector(credential, installationId
|
|
|
472
472
|
| `extensions` | `.md`, `.markdown`, `.txt`, `.rst`, `.html`, `.htm`, `.pdf`, `.docx` |
|
|
473
473
|
| `includeCode` | `false`: when true, the source files of `CODE_EXTENSIONS` are kept beside `extensions` under the same bounds and skipped folders, each read as UTF-8 text, and a code file a tool wrote is left out (`isGeneratedCode`: a name ending in `.min.js`, `.min.css`, `.bundle.js`, `.bundle.css`, `.pb.go`, `_pb2.py` and the like), under an extension `extensions` names too. Data and configuration files (JSON, YAML, XML, CSV) are not code here; name their extensions in `extensions` to keep them |
|
|
474
474
|
| `skipFolders` | `node_modules`, `vendor`, `dist`, `build`, `.git`, `third_party`, at any depth |
|
|
475
|
-
| `maxFiles` | `2000`, in path order: a listing keeps the first `maxFiles` documentation paths, so when a new path sorts before them, the last one kept leaves the listing and `changesSince` answers it gone. With `includeCode`, the documentation keeps its places first and the code paths, in path order, take the room left, so turning code on drops no document |
|
|
475
|
+
| `maxFiles` | `2000`, in path order: a listing keeps the first `maxFiles` documentation paths, so when a new path sorts before them, the last one kept leaves the listing and `changesSince` answers it gone. A selection's `path` narrows a listing to a folder, or a file, before the count, so the folder's files are counted alone; a `listing` handed to `changesSince` with a `path` that holds `maxFiles` files may have been cut before the folder's files, and the folder is read afresh instead of it. With `includeCode`, the documentation keeps its places first and the code paths, in path order, take the room left, so turning code on drops no document |
|
|
476
476
|
| `maxFileBytes` | `10485760` (10 MiB): larger files are left out of a listing, and a read past it is answered gone |
|
|
477
477
|
| `maxTreeRequests` | `50` tree requests to list one commit |
|
|
478
478
|
|
|
479
|
-
An item's id is `<repositoryId>:<path>` and its version `<blob>@<commit>`. A tree is asked for recursively; when GitHub answers it truncated (past 100,000 entries or 7 MB), its top level is read and each subtree is asked for the same way, never walking a skipped folder. `TreeTooLarge` is thrown rather than pass `maxTreeRequests` (`reason: 'budget'`), and at a level GitHub answers truncated when it is asked for alone as well (`reason: 'truncated'`), before any folder under it is asked for: no part of a tree is answered, since the files it left out would read as removed. Files are read through the contents endpoint's raw media type as a stream cut at `maxFileBytes`: PDF, Word and HTML as bytes with their media type, the rest as UTF-8 text, each with a `github` source reference whose `url` is the file at the commit, the commit or branch encoded segment by segment as the path is, so a branch named `docs#1` links as `docs%231`. An item whose version names no commit (none, or no `@<commit>` part) is read at the default branch, and its reference names the branch. `changesSince` takes the cursor it answered last (each documentation path's blob), never reads a push's commit list, so a force push is read like any other, and answers a push to another branch than the one it follows with no change. `listing(repositoryId, commit)` lets a caller keep a commit's listing and pass it to `changesSince` as `listing`, with that commit as `after`; it then reads no tree. A cursor `changesSince` did not answer throws a `TypeError` that quotes none of it, whatever the push's branch. A file read GitHub refuses for a rate limit throws `GitHubApiError` with its `retryAt`, never an answer that the file is gone, and so does a refused installation token (404 for an installation GitHub no longer has): only the contents read's own 404 answers a file `removed`, so a lost installation never reads as every file gone.
|
|
479
|
+
An item's id is `<repositoryId>:<path>` and its version `<blob>@<commit>`. A tree is asked for recursively; when GitHub answers it truncated (past 100,000 entries or 7 MB), its top level is read and each subtree is asked for the same way, never walking a skipped folder. `TreeTooLarge` is thrown rather than pass `maxTreeRequests` (`reason: 'budget'`), and at a level GitHub answers truncated when it is asked for alone as well (`reason: 'truncated'`), before any folder under it is asked for: no part of a tree is answered, since the files it left out would read as removed. A folder's listing, or a file's, reads the tree for its path alone: when GitHub truncates the tree, the folders on the path are asked for one at a time and the folder the path names is read as a whole tree is, so a folder of a repository with sixty top-level folders costs three requests (the truncated tree, its top level and the folder) where a walk of every folder would pass the default budget of 50. A level that does not name the path's next folder or file answers no file, unless GitHub cut that level short (`reason: 'truncated'`, since the name may stand past the cut). A path through a skipped folder (a folder on it, the last segment aside) holds no file a listing keeps, and answers none before any request. Files are read through the contents endpoint's raw media type as a stream cut at `maxFileBytes`: PDF, Word and HTML as bytes with their media type, the rest as UTF-8 text, each with a `github` source reference whose `url` is the file at the commit, the commit or branch encoded segment by segment as the path is, so a branch named `docs#1` links as `docs%231`. An item whose version names no commit (none, or no `@<commit>` part) is read at the default branch, and its reference names the branch. `changesSince` takes the cursor it answered last (each documentation path's blob), never reads a push's commit list, so a force push is read like any other, and answers a push to another branch than the one it follows with no change. `listing(repositoryId, commit)` lets a caller keep a commit's listing and pass it to `changesSince` as `listing`, with that commit as `after`; it then reads no tree. `listing(repositoryId, commit, { path, signal })` reads a folder's listing, or a file's, the same way. A cursor `changesSince` did not answer throws a `TypeError` that quotes none of it, whatever the push's branch. A file read GitHub refuses for a rate limit throws `GitHubApiError` with its `retryAt`, never an answer that the file is gone, and so does a refused installation token (404 for an installation GitHub no longer has): only the contents read's own 404 answers a file `removed`, so a lost installation never reads as every file gone.
|
|
480
480
|
|
|
481
|
-
The connector refuses, before any request, what it cannot answer whole, and no refusal quotes a cursor, an item id or a path. A repository id, in a selection or in an item id, is a positive integer in decimal (`77`; never `077`, `0x4d` or ` 77`), else a `TypeError`. `list` checks every id of its selection before it reads any repository, so a selection is listed whole or not at all: a repository named twice is a `TypeError`, and one outside the link an `Error` naming its number. `read` throws a `TypeError` for an item id that names no file: one without a path, or whose path has an empty, `.` or `..` segment. `changesSince` compares one repository a call: a selection of none or several, an empty `after`, or a `listing` without the `after` commit it was read at is a `TypeError`, so call it once per repository, each with that repository's own cursor. A call whose signal is already aborted throws `GitHubNoAnswer` (`cancelled`) before it checks anything else, so every aborted call answers alike, whatever its inputs.
|
|
481
|
+
The connector refuses, before any request, what it cannot answer whole, and no refusal quotes a cursor, an item id or a path. A repository id, in a selection or in an item id, is a positive integer in decimal (`77`; never `077`, `0x4d` or ` 77`), else a `TypeError`. `list` checks every id of its selection before it reads any repository, so a selection is listed whole or not at all: a repository named twice is a `TypeError`, and one outside the link an `Error` naming its number. `read` throws a `TypeError` for an item id that names no file: one without a path, or whose path has an empty, `.` or `..` segment. `changesSince` compares one repository a call: a selection of none or several, an empty `after`, or a `listing` without the `after` commit it was read at is a `TypeError`, so call it once per repository, each with that repository's own cursor. A `path` with an empty, `.` or `..` segment (a leading or a trailing slash among them), or one that is not text, is a `TypeError` in `list`, `listing`, `changesSince` and `planTree`, and so is a `path` beside other than one repository in `list`. A call whose signal is already aborted throws `GitHubNoAnswer` (`cancelled`) before it checks anything else, so every aborted call answers alike, whatever its inputs.
|
|
482
482
|
|
|
483
|
-
`list`, `changesSince` and `head` follow the default branch, or the branch or commit a selection's `at` names (`head(repositoryId, at, signal)`; `head(repositoryId, signal)` reads the default branch as before). A branch's head is read when the call is made; a commit, 40 hexadecimal characters in either case, is read as it is with no branch read, in lower case, and never changes. `list({ ids: [String(repositoryId)], at: 'release/1.0' })` lists one repository at that branch's head, each item's version `<blob>@<commit>` at it. `changesSince` compares at the followed branch's head when the call names no `after`, answers a push whose `ref` is not `refs/heads/<at>` with no change (the default branch's push included, while `at` names another branch), and answers any push with no change when `at` is a commit; without a push, an `after` naming another commit than `at`'s is a `TypeError`. An `at` that is neither a commit nor a branch name by [git's rules](https://git-scm.com/docs/git-check-ref-format) (no `..`, `@{`, space, control character, `~`, `^`, `:`, `?`, `*`, `[` or `\`; no part empty, starting with a dot or ending in `.lock`; not ending with a dot, not starting with a dash, neither `@` nor `HEAD`), and an `at` beside other than one repository in `list`, throw a `TypeError` before any request.
|
|
483
|
+
`list`, `changesSince` and `head` follow the default branch, or the branch or commit a selection's `at` names (`head(repositoryId, at, signal)`; `head(repositoryId, signal)` reads the default branch as before). A branch's head is read when the call is made; a commit, 40 hexadecimal characters in either case, is read as it is with no branch read, in lower case, and never changes. `list({ ids: [String(repositoryId)], at: 'release/1.0' })` lists one repository at that branch's head, each item's version `<blob>@<commit>` at it. `changesSince` compares at the followed branch's head when the call names no `after`, answers a push whose `ref` is not `refs/heads/<at>` with no change (the default branch's push included, while `at` names another branch), and answers any push with no change when `at` is a commit; without a push, an `after` naming another commit than `at`'s is a `TypeError`. An `at` that is neither a commit nor a branch name by [git's rules](https://git-scm.com/docs/git-check-ref-format) (no `..`, `@{`, space, control character, `~`, `^`, `:`, `?`, `*`, `[` or `\`; no part empty, starting with a dot or ending in `.lock`; not ending with a dot, not starting with a dash, neither `@` nor `HEAD`), and an `at` beside other than one repository in `list`, throw a `TypeError` before any request. A tag or a short commit is followed by the commit `resolveRef` settles it to.
|
|
484
|
+
|
|
485
|
+
A selection's `path` narrows `list` and `changesSince` to a folder of one repository, or to the one file it names, by its path with no leading or trailing slash (`resolveRef`'s `path`; `''` or none for the whole repository). The files at the path or under it are kept before `maxFiles` counts them, so a folder's files are listed and compared whatever sorts before them: over the whole repository, 2,000 documents whose paths sort before `docs/` fill the count, and the folder's files are left out of the listing and answered gone by `changesSince`. A `/tree/` address that names a file lists that file, as github.com shows it. `changesSince` narrows a `listing` handed in to the path, and compares a cursor under the path it was answered under: a path in it outside the one given is answered gone.
|
|
484
486
|
|
|
485
487
|
`parseGitHubLink(text)` reads the GitHub address a person pastes, without a request:
|
|
486
488
|
|
|
@@ -489,10 +491,12 @@ The connector refuses, before any request, what it cannot answer whole, and no r
|
|
|
489
491
|
| `github.com/<owner>/<repo>`, with or without `.git`; `git@github.com:<owner>/<repo>.git` | `{ kind: 'github_repository', owner, repo }` |
|
|
490
492
|
| `github.com/<owner>/<repo>/tree/<ref>/<path>`, and `/blob/<ref>` with no path, which GitHub shows as the folder | `{ kind: 'github_folder', owner, repo, refAndPath }` |
|
|
491
493
|
| `github.com/<owner>/<repo>/blob/<ref>/<path>` and `/raw/<ref>/<path>`; `raw.githubusercontent.com/<owner>/<repo>/<ref>/<path>` | `{ kind: 'github_file', owner, repo, refAndPath, raw }`, `raw` true for the two raw forms |
|
|
492
|
-
| Any other address on `github.com`, `www.github.com`, `gist.github.com`, `api.github.com`, `codeload.github.com`, `uploads.github.com` or a host under `githubusercontent.com`: an account, an issue, a pull request, a wiki, a release, a commit, a tag (`refs/tags
|
|
494
|
+
| Any other address on `github.com`, `www.github.com`, `gist.github.com`, `api.github.com`, `codeload.github.com`, `uploads.github.com` or a host under `githubusercontent.com`: an account, an issue, a pull request, a wiki, a release, a commit, a reference that is neither a branch nor a tag (`refs/pull/<n>/head`), a full name with nothing after it under `/blob/` or `/raw/` (`/blob/refs/tags/v1.0`, which GitHub answers 404), a gist, GitHub's own pages, an address that carries credentials, with a scheme or without one (`<user>:<password>@github.com/...`, which a browser opens as an `https://` address); and any address on `ghe.com` or a host under it, where GitHub Enterprise Cloud with data residency serves an enterprise ([GitHub's docs](https://docs.github.com/en/enterprise-cloud@latest/admin/data-residency/about-github-enterprise-cloud-with-data-residency)) | `{ kind: 'refused' }` |
|
|
493
495
|
| An address on any other host, an opaque address such as `mailto:someone@github.com`, and text that is no address | `null` |
|
|
494
496
|
|
|
495
|
-
The scheme, or its absence, a port, the dots that end a host (`github.com.`, `github.com..`), a trailing slash, a query and a fragment are ignored
|
|
497
|
+
The scheme, or its absence, a port, the dots that end a host (`github.com.`, `github.com..`), a trailing slash, a query and a fragment are ignored, and `www.github.com` is read as `github.com`. A branch's or a tag's full name, `refs/heads/<branch>` or `refs/tags/<tag>`, the form GitHub's own Raw links write (`https://github.com/cli/cli/raw/refs/tags/v2.0.0/README.md` for a file at the tag `v2.0.0`, which redirects to `raw.githubusercontent.com/cli/cli/refs/tags/v2.0.0/README.md`), stays whole in `refAndPath` (`refs/tags/v2.0.0/README.md`). The text is read as the [URL standard](https://url.spec.whatwg.org/#concept-basic-url-parser) reads an address, as a browser opens it: the C0 controls and spaces around it (and any other white space there) are dropped, and every tab and newline in it; after `http`, `https`, `ws`, `wss` and `ftp` any run of `/` and `\` stands before the host, none included ([special authority slashes](https://url.spec.whatwg.org/#special-authority-slashes-state)), so `https:github.com/acme-team/handbook`, `https:/github.com/...` and `https:\\github.com\acme-team\handbook` read as `https://github.com/acme-team/handbook`; after `file` two of them, and a third leaves the host [empty](https://url.spec.whatwg.org/#file-host-state), so `file:///github.com/acme-team/handbook` names no host (`null`); after any other scheme (`git://`, `ssh://`) `//`, and without it such a scheme names no host (`null`). A backslash in the path is a slash. Each segment is decoded, and an address whose path has an empty segment, an escape that does not decode, or a `.` or `..` segment or a control character once decoded is refused.
|
|
498
|
+
|
|
499
|
+
A folder's and a file's ref and path are one text, `refAndPath`, since a branch or a tag name may hold a slash. `connector.resolveRef(repositoryId, refAndPath)` settles it as `{ ref, path, commit, kind, name }`: `kind` is `branch`, `tag` or `commit`, `name` the ref as the link writes it (the branch's or the tag's name, without `refs/heads/` or `refs/tags/`), `ref` what `list`, `head` and `changesSince` take as `at`, and `path` the rest (`''` for the ref's root). A full name, `refs/heads/<branch>/<path>` or `refs/tags/<tag>/<path>`, is read among its own namespace alone: the longest branch, or the longest tag at the commit it names, that is the name and the path or starts them at a slash, with no other namespace, `HEAD` or commit read. It is the one form that tells a tag from a branch of the same name, and a branch from a longer tag beside it: `refs/heads/release/2.0/README.md` is the file `2.0/README.md` of the branch `release` though the tag `release/2.0` stands beside it, and `refs/tags/release/docs` the tag `release` though a branch of that name exists. A branch it names that the repository does not have is answered as a branch, whose listing throws GitHub's 404; a tag it names that the repository does not have, or one that names no commit, throws `GitHubApiError` with status 404, as GitHub answers the address. A branch whose name is 40 hexadecimal characters, which `at` reads as the commit it spells, is settled at its head, read through GitHub's branches (`commit: true`); one the repository does not have throws GitHub's 404 there. For any other text, a first segment of 40 hexadecimal characters is a commit (`commit: true`, in lower case) and `HEAD` the default branch, with no request, but for a default branch whose name is 40 hexadecimal characters, settled at its head the same way. Otherwise GitHub's [matching references](https://docs.github.com/en/rest/git/refs#list-matching-references), which answer every reference whose name starts with that segment, are read in turn: the branches and the tags, where the longest name of either that is the text or starts it at a slash is the ref, a tag answered at the commit it names (`commit: true`; an annotated tag's object is [read](https://docs.github.com/en/rest/git/tags#get-a-tag) for it), as github.com serves `/tree/<tag>/`, and the tags not read when a branch's name is the whole text; then, for a first segment of 4 to 39 hexadecimal characters, the short commit through GitHub's [commits](https://docs.github.com/en/rest/commits/commits#get-a-commit) under the `application/vnd.github.sha` media type, which answers the whole commit, or 422 for a prefix no commit has or several have. By the short name, a branch and a tag of one name settle as the branch. Git keeps no branch beside one under its name (`release` beside `release/1.0`), so at most one such branch exists, but it keeps a tag under a branch's name beside the branch, and the tag `release/2.0` beside the branch `release` settles `release/2.0/docs` as the tag. A first segment none of them settles is answered as a branch all the same, and a listing at it throws GitHub's 404 as `GitHubApiError`; so does 409 for a repository with no commit. A first segment no ref name can begin (a control character, a space, `~`, `^`, `:`, `?`, `*`, `[`, `\`, `..` or `@{`, a leading dot, a trailing `.lock`) is a `TypeError` before any request, and one that is no branch name and none of them settles (`-x`, `@`, `end.`) a `TypeError` after the reads. A `/blob/` address whose text has no slash (`/blob/main`) names its ref alone and is answered as the folder, since GitHub redirects it to `/tree/main`; one whose text has a slash is a file, and when `resolveRef` settles the whole text as the ref (`/blob/release/1.0` in a repository with a `release/1.0` branch), the path is `''`: the address names a ref and no file, which GitHub answers 404.
|
|
496
500
|
|
|
497
501
|
```ts
|
|
498
502
|
import { parseGitHubLink } from '@framers/agentos-ext-github/documents';
|
|
@@ -500,13 +504,15 @@ import { parseGitHubLink } from '@framers/agentos-ext-github/documents';
|
|
|
500
504
|
const link = parseGitHubLink('https://github.com/acme-team/handbook/tree/release/1.0/docs');
|
|
501
505
|
if (link?.kind === 'github_folder') {
|
|
502
506
|
// repositoryId: the linked repository whose full name is `${link.owner}/${link.repo}`.
|
|
503
|
-
const { ref, path } = await connector.resolveRef(repositoryId, link.refAndPath); // 'release/1.0'
|
|
504
|
-
|
|
505
|
-
const
|
|
507
|
+
const { ref, path, kind } = await connector.resolveRef(repositoryId, link.refAndPath); // 'release/1.0', 'docs', 'branch'
|
|
508
|
+
// The folder's files, kept before maxFiles counts them; a path that names a file lists that file.
|
|
509
|
+
const { items } = await connector.list({ ids: [String(repositoryId)], at: ref, path });
|
|
510
|
+
// A branch's push is compared within the same folder, with the cursor answered under that path.
|
|
511
|
+
const changes = await connector.changesSince(cursor, { ids: [String(repositoryId)], at: ref, path, ref: push.ref, after: push.after });
|
|
506
512
|
}
|
|
507
513
|
```
|
|
508
514
|
|
|
509
|
-
`planTree(blobs, options)` answers every file of a tree (`readTree`'s blobs) in path order, each a new object with its `path`, `sha`, `size` and `outcome`: `'note'`, or `{ skipped }` with the first reason the file is left out. `folder` under a skipped folder; `kind` for a file that is neither documentation, code nor an image (data, configuration, a binary, a file with no extension); `image` for `IMAGE_EXTENSIONS`, or the `imageExtensions` given; `code` for code while `includeCode` is off; `generated` for code a tool wrote while `includeCode` is on; `size` past `maxFileBytes`, or past `maxCodeBytes` for a file of a code extension while `includeCode` is on, whatever `extensions` names (`maxFileBytes` when absent, a non-negative integer, else a `TypeError`); `count` past `maxFiles`, the documentation keeping its places first and the code taking the room left. The notes are exactly what `pathFilter` keeps under the same filter, a code file past `maxCodeBytes` aside, so a caller can show what is left out and why from one listing, and turn code on or off without reading the tree again. An extension the filter's `extensions` names is documentation, an image's included.
|
|
515
|
+
`planTree(blobs, options)` answers every file of a tree (`readTree`'s blobs) in path order, each a new object with its `path`, `sha`, `size` and `outcome`: `'note'`, or `{ skipped }` with the first reason the file is left out. `folder` under a skipped folder; `kind` for a file that is neither documentation, code nor an image (data, configuration, a binary, a file with no extension); `image` for `IMAGE_EXTENSIONS`, or the `imageExtensions` given; `code` for code while `includeCode` is off; `generated` for code a tool wrote while `includeCode` is on; `size` past `maxFileBytes`, or past `maxCodeBytes` for a file of a code extension while `includeCode` is on, whatever `extensions` names (`maxFileBytes` when absent, a non-negative integer, else a `TypeError`); `count` past `maxFiles`, the documentation keeping its places first and the code taking the room left. The notes are exactly what `pathFilter` keeps under the same filter, a code file past `maxCodeBytes` aside, so a caller can show what is left out and why from one listing, and turn code on or off without reading the tree again. An extension the filter's `extensions` names is documentation, an image's included. With `path`, only the files at that folder or under it, or the one file it names, are planned and counted, as `list` keeps them under the same `path`: a folder link's plan counts the folder's files alone.
|
|
510
516
|
|
|
511
517
|
## License
|
|
512
518
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview A repository's documentation as account sources, read through a GitHub App's installation: each
|
|
3
|
-
* repository read by its id at its default branch or at a named branch or commit,
|
|
4
|
-
* request budget, the documentation kept by a filter, each file read as raw bytes under a
|
|
5
|
-
* tree at its `after` commit, and a link's ref settled
|
|
6
|
-
*
|
|
3
|
+
* repository read by its id at its default branch or at a named branch or commit, whole or within a folder, its tree
|
|
4
|
+
* read once a commit within a request budget, the documentation kept by a filter, each file read as raw bytes under a
|
|
5
|
+
* cap, a push compared by the tree at its `after` commit, and a link's ref settled as a branch (where its name holds a
|
|
6
|
+
* slash), a tag or a commit, a full name (`refs/heads/<branch>`, `refs/tags/<tag>`) among its own namespace alone. A
|
|
7
|
+
* selection, an item or a call it cannot answer whole is refused before any request.
|
|
7
8
|
* @module agentos-ext-github/documents/GitHubDocumentsConnector
|
|
8
9
|
*/
|
|
9
10
|
import { type AccountSourceConnector, type SourceChanges, type SourceGone, type SourceItem, type SourceRead, type SourceSelection } from '@framers/agentos-ext-account-sources';
|
|
@@ -17,13 +18,27 @@ export interface LinkedRepository {
|
|
|
17
18
|
fullName: string;
|
|
18
19
|
defaultBranch: string;
|
|
19
20
|
}
|
|
20
|
-
/** What `list` reads: the repositories (`ids`),
|
|
21
|
+
/** What `list` reads: the repositories (`ids`), the branch or commit a listing is made at, and a folder or a file. */
|
|
21
22
|
export interface GitHubListSelection extends SourceSelection {
|
|
22
23
|
/**
|
|
23
24
|
* A branch name, or a commit as 40 hexadecimal characters in either case, the listing is made at: the branch's head,
|
|
24
|
-
* or the commit itself.
|
|
25
|
+
* or the commit itself. A tag or a short commit is followed by the commit `resolveRef` settles it to. The default
|
|
26
|
+
* branch's head when absent. Given, the selection names one repository.
|
|
25
27
|
*/
|
|
26
28
|
at?: string;
|
|
29
|
+
/**
|
|
30
|
+
* A folder of the repository, or a file, by its path with no leading or trailing slash (`resolveRef`'s `path`): the
|
|
31
|
+
* listing keeps the files at it or under it before `maxFiles` counts them, so a folder's files are listed whatever
|
|
32
|
+
* sorts before them, and a `/tree/` address that names a file lists that file. The whole repository when absent or
|
|
33
|
+
* `''`. Given, the selection names one repository.
|
|
34
|
+
*/
|
|
35
|
+
path?: string;
|
|
36
|
+
}
|
|
37
|
+
/** What `listing` reads within, and its abort signal. */
|
|
38
|
+
export interface GitHubListingOptions {
|
|
39
|
+
/** A folder or a file, as a selection's `path` names it; the whole repository when absent or `''`. */
|
|
40
|
+
path?: string;
|
|
41
|
+
signal?: AbortSignal;
|
|
27
42
|
}
|
|
28
43
|
/**
|
|
29
44
|
* What `changesSince` compares: one repository (`ids` holds its id alone), the branch or commit the comparison follows
|
|
@@ -45,12 +60,27 @@ export interface GitHubChangesSelection extends GitHubListSelection {
|
|
|
45
60
|
}
|
|
46
61
|
/** The ref and the path a link's `<ref>/<path>` text names, as `resolveRef` settles them. */
|
|
47
62
|
export interface ResolvedRef {
|
|
48
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* The branch's name, or a commit of 40 hexadecimal characters in lower case: the commit the link names, whole or by
|
|
65
|
+
* its first characters, the commit a tag names, or the head of a branch whose own name is 40 hexadecimal characters
|
|
66
|
+
* (named by its full name, or the default branch named by `HEAD`), which `at` would read as the commit it spells.
|
|
67
|
+
* `list`, `head` and `changesSince` take it as `at`.
|
|
68
|
+
*/
|
|
49
69
|
ref: string;
|
|
50
70
|
/** The path under the ref, with no leading or trailing slash; `''` for the ref's root. */
|
|
51
71
|
path: string;
|
|
52
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* True when `ref` is a commit, which never moves: for a commit, for a tag, read at its commit, and for a branch whose
|
|
74
|
+
* name is 40 hexadecimal characters, read at its head when settled.
|
|
75
|
+
*/
|
|
53
76
|
commit: boolean;
|
|
77
|
+
/** What the link's ref names: a branch (`HEAD` the default branch), a tag or a commit. */
|
|
78
|
+
kind: 'branch' | 'tag' | 'commit';
|
|
79
|
+
/**
|
|
80
|
+
* The ref as the link writes it: the branch's or the tag's name (without `refs/heads/` or `refs/tags/` when the link
|
|
81
|
+
* writes the full name), `HEAD`, or the commit, whole or short, as written.
|
|
82
|
+
*/
|
|
83
|
+
name: string;
|
|
54
84
|
}
|
|
55
85
|
/**
|
|
56
86
|
* A repository's documentation as account sources: an item's id is `<repositoryId>:<path>`, its version
|
|
@@ -59,12 +89,14 @@ export interface ResolvedRef {
|
|
|
59
89
|
* `GitHubNoAnswer` (`cancelled`) before it checks anything else. What a call cannot answer whole then throws before any
|
|
60
90
|
* request: a `TypeError` for an id that is not a repository id, a repository named twice, an item id that names no
|
|
61
91
|
* file, a change set of other than one repository, an `at` that is neither a branch name nor a commit or that names
|
|
62
|
-
* other than one repository,
|
|
63
|
-
*
|
|
64
|
-
*
|
|
92
|
+
* other than one repository, a `path` with an empty, `.` or `..` segment or beside other than one repository, a link's
|
|
93
|
+
* text with an empty, `.` or `..` segment, and a link's ref that no ref name can begin with, and an `Error` for a
|
|
94
|
+
* repository outside the link. An installation is removed by the app's own call (`uninstallInstallation`), never by a
|
|
95
|
+
* link's connector.
|
|
65
96
|
*
|
|
66
97
|
* A listing and a comparison follow the default branch, or the branch or commit a selection's `at` names: a branch's
|
|
67
|
-
* head is read when the call is made, a commit is read as it is and never changes.
|
|
98
|
+
* head is read when the call is made, a commit is read as it is and never changes. A selection's `path` narrows them to
|
|
99
|
+
* a folder, or a file, before `maxFiles` counts the files.
|
|
68
100
|
*
|
|
69
101
|
* Every read addresses a linked repository by its id (`/repositories/<id>/...`, where GitHub's own redirects for a
|
|
70
102
|
* renamed or moved repository lead), never by its name. A name can come to mean another repository (a renamed
|
|
@@ -112,13 +144,25 @@ export declare class GitHubDocumentsConnector implements AccountSourceConnector
|
|
|
112
144
|
* as `after`.
|
|
113
145
|
*/
|
|
114
146
|
listing(repositoryId: number, commit: string, signal?: AbortSignal): Promise<TreeBlob[]>;
|
|
147
|
+
/**
|
|
148
|
+
* The documentation files of a repository at a commit within a folder, or the one file a path names
|
|
149
|
+
* (`options.path`), kept before `maxFiles` counts them, under `options.signal`; the whole repository for no path or
|
|
150
|
+
* `''`. The tree is read for the path alone (`readTree`'s `path`): when GitHub truncates it, only the folders on the
|
|
151
|
+
* path and the folder's own subtree are asked for, within `maxTreeRequests`, so a small folder of a large repository
|
|
152
|
+
* is listed whatever lies beside it. A path with an empty, `.` or `..` segment, or one that is not text, throws a
|
|
153
|
+
* `TypeError` before any request. A caller keeps it for that commit and hands it to `changesSince` with that commit
|
|
154
|
+
* as `after` and the same `path`.
|
|
155
|
+
*/
|
|
156
|
+
listing(repositoryId: number, commit: string, options: GitHubListingOptions): Promise<TreeBlob[]>;
|
|
115
157
|
/**
|
|
116
158
|
* The documentation of each selected repository (its id in `ids`) at its default branch's head, or of one repository
|
|
117
|
-
* at the branch or commit `at` names: the branch's head, or the commit itself with no branch read.
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
159
|
+
* at the branch or commit `at` names: the branch's head, or the commit itself with no branch read. With a `path`, the
|
|
160
|
+
* files of one repository at that folder or under it, or the one file it names, kept before `maxFiles` counts them.
|
|
161
|
+
* Every id, `at` and `path` are checked before any repository is read, so a selection is listed whole or not at all:
|
|
162
|
+
* an id that is not a repository id, a repository named twice, an `at` that is neither a branch name nor a commit, a
|
|
163
|
+
* `path` with an empty, `.` or `..` segment or that is not text, and an `at` or a `path` beside other than one
|
|
164
|
+
* repository throw a `TypeError`, and a repository outside the link an `Error`. A selection's other fields are
|
|
165
|
+
* `changesSince`'s, and a listing reads none of them.
|
|
122
166
|
*/
|
|
123
167
|
list(selection: GitHubListSelection, signal?: AbortSignal): Promise<{
|
|
124
168
|
items: SourceItem[];
|
|
@@ -148,21 +192,74 @@ export declare class GitHubDocumentsConnector implements AccountSourceConnector
|
|
|
148
192
|
* followed branch's head, or at the commit. A push to another branch than the one followed answers no change and the
|
|
149
193
|
* cursor it was given, and so does any push when `at` is a commit, which never changes; without a push, an `after`
|
|
150
194
|
* naming another commit than `at`'s throws a `TypeError` before any request.
|
|
195
|
+
*
|
|
196
|
+
* With a `path` the comparison is made within that folder, or of the one file it names: the listing at `after` keeps
|
|
197
|
+
* the files there before `maxFiles` counts them, so the folder's files are never answered gone for the files sorting
|
|
198
|
+
* before it, and a `listing` handed in is narrowed to the path (read it with `listing(repositoryId, after, { path })`
|
|
199
|
+
* so the count is the folder's). A listing handed in that holds `maxFiles` files may have been cut before the folder's
|
|
200
|
+
* files, so with a path the folder is read afresh instead of it. A cursor is compared under the path it was answered under: a path in it outside the
|
|
201
|
+
* one given is answered gone.
|
|
151
202
|
*/
|
|
152
203
|
changesSince(cursor: string | null, selection: GitHubChangesSelection, signal?: AbortSignal): Promise<SourceChanges>;
|
|
153
204
|
/**
|
|
154
205
|
* The ref and the path of a folder's or a file's `<ref>/<path>` text (`parseGitHubLink`'s `refAndPath`), whose
|
|
155
|
-
* branch name may hold a slash
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* (https://docs.github.com/en/rest/git/refs#list-matching-references)
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
206
|
+
* branch or tag name may hold a slash, answered with what the ref is (`kind`) and the name the text writes it by
|
|
207
|
+
* (`name`). A first segment of 40 hexadecimal characters is a commit, in lower case, and `HEAD` the default branch
|
|
208
|
+
* (git names no branch `HEAD`), each settled with no request, but for a default branch whose name is 40 hexadecimal
|
|
209
|
+
* characters, settled at its head as below. Otherwise, under an installation token narrowed to the
|
|
210
|
+
* repository, GitHub's matching references (https://docs.github.com/en/rest/git/refs#list-matching-references), which
|
|
211
|
+
* answer every reference whose name starts with the first segment, are read in turn until one settles it:
|
|
212
|
+
*
|
|
213
|
+
* 1. The branches (`/repositories/<id>/git/matching-refs/heads/<first segment>`) and the tags
|
|
214
|
+
* (`.../matching-refs/tags/<first segment>`): the longest name of either that is the text, or starts it at a slash,
|
|
215
|
+
* is the ref and the rest the path, a branch and a tag of one name settling as the branch. Git keeps a tag under a
|
|
216
|
+
* branch's name beside the branch (`release/2.0` beside `release`), and the longer name is the more of the link it
|
|
217
|
+
* names. The tags are not read when a branch's name is the whole text, since no name is longer. A tag is answered
|
|
218
|
+
* at the commit it names (`commit: true`), as GitHub serves a `/tree/<tag>/` address: a lightweight tag names it,
|
|
219
|
+
* and an annotated tag's object is read for it (https://docs.github.com/en/rest/git/tags#get-a-tag). A tag that
|
|
220
|
+
* names no commit is read as no tag, and the branch, if one matched, settles it.
|
|
221
|
+
* 2. A first segment of 4 to 39 hexadecimal characters, a short commit, through GitHub's commits under its sha media
|
|
222
|
+
* type (https://docs.github.com/en/rest/commits/commits#get-a-commit), which answers the whole commit, or 422 for
|
|
223
|
+
* a prefix no commit has or several have.
|
|
224
|
+
*
|
|
225
|
+
* A first segment neither settles is answered as a branch all the same, and a listing at it then throws GitHub's
|
|
226
|
+
* 404 as `GitHubApiError`; one that is no branch name by git's rules (such as `-x`, `@` or `end.`) throws a
|
|
227
|
+
* `TypeError` instead.
|
|
228
|
+
*
|
|
229
|
+
* A full name, `refs/heads/<branch>/<path>` or `refs/tags/<tag>/<path>`, the form GitHub's own Raw links write, is
|
|
230
|
+
* read among its own namespace alone, the name after it as the first segment: the longest branch, or the longest tag
|
|
231
|
+
* at the commit it names, that is the name and the path or starts them at a slash. It is the one form that tells a tag
|
|
232
|
+
* from a branch of the same name, and a branch from a longer tag beside it, so no commit, `HEAD` or other namespace is
|
|
233
|
+
* read for it. A branch it names that the repository does not have is answered as a branch all the same, as above; a
|
|
234
|
+
* tag the repository does not have, or one that names no commit, throws `GitHubApiError` with status 404, as GitHub
|
|
235
|
+
* answers an address naming it, since no commit is there to read at. A branch whose name is 40 hexadecimal characters,
|
|
236
|
+
* which a full name or `HEAD` alone reaches, is settled at its head (`commit: true`), read through GitHub's branches,
|
|
237
|
+
* since `at` reads such a name as the commit it spells; one the repository does not have throws GitHub's 404 there as
|
|
238
|
+
* `GitHubApiError`.
|
|
239
|
+
*
|
|
240
|
+
* A text with an empty, `.` or `..` segment, and one whose first segment (after a full name's namespace) no ref
|
|
241
|
+
* name can begin (a control character, a space, `~`, `^`, `:`, `?`, `*`, `[`, `\`, `..` or `@{`, a leading dot or a
|
|
242
|
+
* trailing `.lock`), throw a `TypeError` that quotes none of it, before any request; GitHub's refusal of a read, such
|
|
243
|
+
* as 409 for a repository with no commit, throws `GitHubApiError`.
|
|
164
244
|
*/
|
|
165
245
|
resolveRef(repositoryId: number, refAndPath: string, signal?: AbortSignal): Promise<ResolvedRef>;
|
|
246
|
+
/**
|
|
247
|
+
* The longest branch or tag (`space`) whose name is `text` or starts it at a slash, from GitHub's matching references
|
|
248
|
+
* for `first`, the text's first segment, with the reference's fields; null for none.
|
|
249
|
+
*/
|
|
250
|
+
private longestRef;
|
|
251
|
+
/**
|
|
252
|
+
* The commit a tag's reference names: a lightweight tag's own object, or the object an annotated tag names, read
|
|
253
|
+
* through GitHub's tags and followed through a tag of a tag up to {@link MAX_TAG_DEPTH}, in lower case. Null for a
|
|
254
|
+
* tag that names a tree or a blob, or a longer chain of tags.
|
|
255
|
+
*/
|
|
256
|
+
private tagCommit;
|
|
257
|
+
/**
|
|
258
|
+
* The whole commit a short commit names, in lower case, through GitHub's commits under the sha media type, which
|
|
259
|
+
* answers the commit's sha alone; null when GitHub answers 422 or 404, as it does for a prefix no commit has or
|
|
260
|
+
* several have. An answer that is not a commit starting with the prefix throws.
|
|
261
|
+
*/
|
|
262
|
+
private commitOf;
|
|
166
263
|
/** Nothing to end here: an installation is removed by the app's own call (`uninstallInstallation`). */
|
|
167
264
|
revoke(): Promise<void>;
|
|
168
265
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitHubDocumentsConnector.d.ts","sourceRoot":"","sources":["../../src/documents/GitHubDocumentsConnector.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"GitHubDocumentsConnector.d.ts","sourceRoot":"","sources":["../../src/documents/GitHubDocumentsConnector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,UAAU,EAEf,KAAK,eAAe,EACrB,MAAM,sCAAsC,CAAC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