diff --git a/THIRD_PARTY_LICENSES.md b/THIRD_PARTY_LICENSES.md index 3013553e94..20f07ffed5 100644 --- a/THIRD_PARTY_LICENSES.md +++ b/THIRD_PARTY_LICENSES.md @@ -1034,11 +1034,10 @@ Apache License The following npm packages may be included in this product: - - @types/diff@5.2.2 - @types/http-cache-semantics@4.0.4 - @types/mute-stream@0.0.4 - @types/node@16.9.1 - - @types/node@22.7.0 + - @types/node@22.7.3 - @types/turndown@5.0.5 - @types/yauzl@2.10.3 diff --git a/docs/genaisrc/genaiscript.d.ts b/docs/genaisrc/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/docs/genaisrc/genaiscript.d.ts +++ b/docs/genaisrc/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/docs/yarn.lock b/docs/yarn.lock index 9424e7af07..a83bf4efa0 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -888,39 +888,39 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz#3dd5d53e900df2a40841882c02e56f866c04d202" integrity sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q== -"@shikijs/core@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.18.0.tgz#30dde8e53026dada606c4cf7f32d80a3f33d437c" - integrity sha512-VK4BNVCd2leY62Nm2JjyxtRLkyrZT/tv104O81eyaCjHq4Adceq2uJVFJJAIof6lT1mBwZrEo2qT/T+grv3MQQ== - dependencies: - "@shikijs/engine-javascript" "1.18.0" - "@shikijs/engine-oniguruma" "1.18.0" - "@shikijs/types" "1.18.0" +"@shikijs/core@1.20.0": + version "1.20.0" + resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.20.0.tgz#e431b69bebf1c1a0dd53fd3fb16eae7e7823d9ba" + integrity sha512-KlO3iE0THzSdYkzDFugt8SHe6FR3qNYTkmpbdW1d6xo8juQkMjybxAw/cBi2npL2eb2F4PbbnSs5Z9tDusfvyg== + dependencies: + "@shikijs/engine-javascript" "1.20.0" + "@shikijs/engine-oniguruma" "1.20.0" + "@shikijs/types" "1.20.0" "@shikijs/vscode-textmate" "^9.2.2" "@types/hast" "^3.0.4" hast-util-to-html "^9.0.3" -"@shikijs/engine-javascript@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@shikijs/engine-javascript/-/engine-javascript-1.18.0.tgz#9888011c5d869a687b42e3e56c7243f15a73524b" - integrity sha512-qoP/aO/ATNwYAUw1YMdaip/YVEstMZEgrwhePm83Ll9OeQPuxDZd48szZR8oSQNQBT8m8UlWxZv8EA3lFuyI5A== +"@shikijs/engine-javascript@1.20.0": + version "1.20.0" + resolved "https://registry.yarnpkg.com/@shikijs/engine-javascript/-/engine-javascript-1.20.0.tgz#ffb18986aa4d989b0320136202b29739a659778a" + integrity sha512-ZUMo758uduM0Tfgzi/kd+0IKMbNdumCxxWjY36uf1DIs2Qyg9HIq3vA1Wfa/vc6HE7tHWFpANRi3mv7UzJ68MQ== dependencies: - "@shikijs/types" "1.18.0" + "@shikijs/types" "1.20.0" "@shikijs/vscode-textmate" "^9.2.2" oniguruma-to-js "0.4.3" -"@shikijs/engine-oniguruma@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.18.0.tgz#7e57fd19b62b18cf2de382da684d042ee934f65d" - integrity sha512-B9u0ZKI/cud+TcmF8Chyh+R4V5qQVvyDOqXC2l2a4x73PBSBc6sZ0JRAX3eqyJswqir6ktwApUUGBYePdKnMJg== +"@shikijs/engine-oniguruma@1.20.0": + version "1.20.0" + resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.20.0.tgz#21091c82349109710050169332eec1ec3ff3095b" + integrity sha512-MQ40WkVTZk7by33ces4PGK6XNFSo6PYvKTSAr2kTWdRNhFmOcnaX+1XzvFwB26eySXR7U74t91czZ1qJkEgxTA== dependencies: - "@shikijs/types" "1.18.0" + "@shikijs/types" "1.20.0" "@shikijs/vscode-textmate" "^9.2.2" -"@shikijs/types@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-1.18.0.tgz#4c2d62d17f78cbfc051a15480ab4dfb0f06196c9" - integrity sha512-O9N36UEaGGrxv1yUrN2nye7gDLG5Uq0/c1LyfmxsvzNPqlHzWo9DI0A4+fhW2y3bGKuQu/fwS7EPdKJJCowcVA== +"@shikijs/types@1.20.0": + version "1.20.0" + resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-1.20.0.tgz#6ae758cc48cf7e776a538437dc8d17d8f49bdc4e" + integrity sha512-y+EaDvU2K6/GaXOKXxJaGnr1XtmZMF7MfS0pSEDdxEq66gCtKsLwQvVwoQFdp7R7dLlNAro3ijEE19sMZ0pzqg== dependencies: "@shikijs/vscode-textmate" "^9.2.2" "@types/hast" "^3.0.4" @@ -1046,9 +1046,9 @@ "@types/unist" "*" "@types/node@*", "@types/node@>=20": - version "22.7.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.0.tgz#670aa1874bc836863e5c116f9f2c32416ff27e1f" - integrity sha512-MOdOibwBs6KW1vfqz2uKMlxq5xAfAZ98SZjO8e3XnAbFnTJtAspqhWk7hrdSAs9/Y14ZWMiy7/MxMUzAOadYEw== + version "22.7.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.3.tgz#7ddf1ddf13078692b4cfadb835852b2a718ee1ef" + integrity sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA== dependencies: undici-types "~6.19.2" @@ -1415,9 +1415,9 @@ camelcase@^7.0.1: integrity sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw== caniuse-lite@^1.0.30001663: - version "1.0.30001663" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001663.tgz#1529a723505e429fdfd49532e9fc42273ba7fed7" - integrity sha512-o9C3X27GLKbLeTYZ6HBOLU1tsAcBZsLis28wrVzddShCS16RujjHp9GDHKZqrB3meE0YjhawvMFsGb/igqiPzA== + version "1.0.30001664" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz#d588d75c9682d3301956b05a3749652a80677df4" + integrity sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g== ccount@^2.0.0: version "2.0.1" @@ -1616,9 +1616,9 @@ deterministic-object-hash@^2.0.2: base-64 "^1.0.0" devalue@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/devalue/-/devalue-5.0.0.tgz#1ca0099a7d715b4d6cac3924e770ccbbc584ad98" - integrity sha512-gO+/OMXF7488D+u3ue+G7Y4AA3ZmUnB3eHJXmBTgNHvr4ZNzl36A0ZtG+XCRNYCkYx/bFmw4qtkoFLa+wSrwAA== + version "5.1.1" + resolved "https://registry.yarnpkg.com/devalue/-/devalue-5.1.1.tgz#a71887ac0f354652851752654e4bd435a53891ae" + integrity sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw== devlop@^1.0.0, devlop@^1.1.0: version "1.1.0" @@ -1653,9 +1653,9 @@ eastasianwidth@^0.2.0: integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== electron-to-chromium@^1.5.28: - version "1.5.28" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.28.tgz#aee074e202c6ee8a0030a9c2ef0b3fe9f967d576" - integrity sha512-VufdJl+rzaKZoYVUijN13QcXVF5dWPZANeFTLNy+OSpHdDL5ynXTF35+60RSBbaQYB1ae723lQXHCrf4pyLsMw== + version "1.5.29" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz#aa592a3caa95d07cc26a66563accf99fa573a1ee" + integrity sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw== emmet@^2.4.3: version "2.4.11" @@ -1834,9 +1834,9 @@ fast-glob@^3.2.12, fast-glob@^3.3.1, fast-glob@^3.3.2: micromatch "^4.0.4" fast-uri@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" - integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== + version "3.0.2" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.2.tgz#d78b298cf70fd3b752fd951175a3da6a7b48f024" + integrity sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row== fast-xml-parser@^4.2.7: version "4.5.0" @@ -3674,14 +3674,14 @@ sharp@^0.33.3: "@img/sharp-win32-x64" "0.33.5" shiki@^1.1.7, shiki@^1.10.3, shiki@^1.16.2: - version "1.18.0" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.18.0.tgz#4f9ca2f442b3612849017ab1dcac47c35ee52276" - integrity sha512-8jo7tOXr96h9PBQmOHVrltnETn1honZZY76YA79MHheGQg55jBvbm9dtU+MI5pjC5NJCFuA6rvVTLVeSW5cE4A== - dependencies: - "@shikijs/core" "1.18.0" - "@shikijs/engine-javascript" "1.18.0" - "@shikijs/engine-oniguruma" "1.18.0" - "@shikijs/types" "1.18.0" + version "1.20.0" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.20.0.tgz#ea04cf622234c5cf8f8b6c993f8b7b05009a085e" + integrity sha512-MZJJ1PCFsQB1Piq+25wiz0a75yUv8Q3/fzy7SzRx5ONdjdtGdyiKwYn8vb/FnK5kjS0voWGnPpjG16POauUR+g== + dependencies: + "@shikijs/core" "1.20.0" + "@shikijs/engine-javascript" "1.20.0" + "@shikijs/engine-oniguruma" "1.20.0" + "@shikijs/types" "1.20.0" "@shikijs/vscode-textmate" "^9.2.2" "@types/hast" "^3.0.4" @@ -4040,9 +4040,9 @@ vfile@^6.0.0, vfile@^6.0.2, vfile@^6.0.3: vfile-message "^4.0.0" vite@^5.4.3: - version "5.4.7" - resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.7.tgz#d226f57c08b61379e955f3836253ed3efb2dcf00" - integrity sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ== + version "5.4.8" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.8.tgz#af548ce1c211b2785478d3ba3e8da51e39a287e8" + integrity sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ== dependencies: esbuild "^0.21.3" postcss "^8.4.43" diff --git a/genaisrc/genaiscript.d.ts b/genaisrc/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/genaisrc/genaiscript.d.ts +++ b/genaisrc/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/auto/genaiscript.d.ts b/packages/auto/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/auto/genaiscript.d.ts +++ b/packages/auto/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/core/package.json b/packages/core/package.json index 074951881b..13ae8f60a9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -57,6 +57,7 @@ "minimatch": "^10.0.1", "minisearch": "^7.1.0", "mustache": "^4.2.0", + "octokit": "^4.0.2", "openai": "^4.63.0", "p-limit": "^6.1.0", "parse-diff": "^0.11.1", diff --git a/packages/core/src/genaisrc/genaiscript.d.ts b/packages/core/src/genaisrc/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/core/src/genaisrc/genaiscript.d.ts +++ b/packages/core/src/genaisrc/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/core/src/github.ts b/packages/core/src/github.ts index ff41fc9b23..7a0a5dbed1 100644 --- a/packages/core/src/github.ts +++ b/packages/core/src/github.ts @@ -1,7 +1,9 @@ +import { Octokit } from "octokit" import { GITHUB_API_VERSION, GITHUB_PULL_REQUEST_REVIEW_COMMENT_LINE_DISTANCE, GITHUB_TOKEN, + TOOL_ID, } from "./constants" import { createFetch } from "./fetch" import { runtimeHost } from "./host" @@ -92,7 +94,7 @@ export async function githubParseEnv( if (!isNaN(issue)) res.issue = issue } } catch (e) {} - return res + return Object.freeze(res) } // https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#update-a-pull-request @@ -398,3 +400,218 @@ export async function githubCreatePullRequestReviews( } return true } + +export class GitHubClient implements GitHub { + private _connection: Promise + private _client: Promise< + { client: Octokit; owner: string; repo: string } | undefined + > + + constructor() {} + + private connection(): Promise> { + if (!this._connection) { + this._connection = githubParseEnv(process.env) + } + return this._connection + } + + private async client() { + if (!this._client) { + this._client = new Promise(async (resolve) => { + const { owner, repo, token, apiUrl } = await this.connection() + const res = new Octokit({ + userAgent: TOOL_ID, + owner, + repo, + auth: token, + baseUrl: apiUrl, + }) + resolve({ client: res, owner: owner, repo: repo }) + }) + } + return this._client + } + + async info(): Promise { + const { + apiUrl: baseUrl, + token: auth, + repo, + owner, + } = await this.connection() + return Object.freeze({ + baseUrl, + repo, + owner, + auth, + }) + } + + async listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise { + const { client, owner, repo } = await this.client() + const { data: issues } = await client.rest.issues.listForRepo({ + owner, + repo, + ...(options || {}), + }) + const i = issues[0] + return issues + } + + async listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise { + const { client, owner, repo } = await this.client() + const { data: prs } = await client.rest.pulls.list({ + owner, + repo, + ...(options || {}), + }) + return prs + } + + async listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise { + const { client, owner, repo } = await this.client() + const { data: comments } = await client.rest.pulls.listReviewComments({ + owner, + repo, + pull_number, + ...(options || {}), + }) + return comments + } + + async listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise { + const { client, owner, repo } = await this.client() + const { data: comments } = await client.rest.issues.listComments({ + owner, + repo, + issue_number, + ...(options || {}), + }) + return comments + } + + async listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + per_page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise { + const { client, owner, repo } = await this.client() + const { + data: { workflow_runs }, + } = await client.rest.actions.listWorkflowRuns({ + owner, + repo, + workflow_id, + per_page: 100, + ...(options || {}), + }) + const runs = workflow_runs.filter( + ({ conclusion }) => conclusion !== "skipped" + ) + return runs + } + + async listWorkflowJobs(run_id: number): Promise { + // Get the jobs for the specified workflow run + const { client, owner, repo } = await this.client() + const { + data: { jobs }, + } = await client.rest.actions.listJobsForWorkflowRun({ + owner, + repo, + run_id, + }) + + const res: GitHubWorkflowJob[] = [] + for (const job of jobs) { + const { url: logs_url } = + await client.rest.actions.downloadJobLogsForWorkflowRun({ + owner, + repo, + job_id: job.id, + }) + const { text } = await fetchText(logs_url) + res.push({ + ...job, + logs_url, + logs: text, + content: parseJobLog(text), + }) + } + return res + + function parseJobLog(text: string) { + const lines = cleanLog(text).split(/\r?\n/g) + const groups: { title: string; text: string }[] = [] + let current = groups[0] + for (const line of lines) { + if (line.startsWith("##[group]")) { + current = { + title: line.slice("##[group]".length), + text: "", + } + } else if (line.startsWith("##[endgroup]")) { + if (current) groups.push(current) + current = undefined + } else { + if (!current) current = { title: "", text: "" } + current.text += line + "\n" + } + } + if (current) groups.push(current) + + const ignoreSteps = [ + "Runner Image", + "Fetching the repository", + "Checking out the ref", + "Setting up auth", + "Setting up auth for fetching submodules", + "Getting Git version info", + "Initializing the repository", + "Determining the checkout info", + "Persisting credentials for submodules", + ] + return groups + .filter(({ title }) => !ignoreSteps.includes(title)) + .map((f) => + f.title + ? `##[group]${f.title}\n${f.text}\n##[endgroup]` + : f.text + ) + .join("\n") + } + + function cleanLog(text: string) { + return text + .replace( + // timestamps + /^?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{2,}Z /gm, + "" + ) + .replace(/\x1b\[[0-9;]*m/g, "") // ascii colors + } + } +} diff --git a/packages/core/src/globals.ts b/packages/core/src/globals.ts index 3af428506f..b15dd90df6 100644 --- a/packages/core/src/globals.ts +++ b/packages/core/src/globals.ts @@ -14,6 +14,7 @@ import { CancelError } from "./error" import { createFetch } from "./fetch" import { readText } from "./fs" import { logVerbose } from "./util" +import { GitHubClient } from "./github" /** * Resolves the global context depending on the environment. @@ -104,6 +105,8 @@ export function installGlobals() { throw new CancelError(reason || "user cancelled") } + glb.github = new GitHubClient() + /** * Asynchronous function to fetch text from a URL or file. * Handles both HTTP(S) URLs and local workspace files. diff --git a/packages/core/src/types/prompt_template.d.ts b/packages/core/src/types/prompt_template.d.ts index 165707d923..f2ff6aef4e 100644 --- a/packages/core/src/types/prompt_template.d.ts +++ b/packages/core/src/types/prompt_template.d.ts @@ -695,7 +695,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -753,9 +753,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1259,6 +1259,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1322,7 +1464,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1332,30 +1474,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1585,7 +1727,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2331,10 +2478,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments diff --git a/packages/core/src/types/prompt_type.d.ts b/packages/core/src/types/prompt_type.d.ts index a52691a33b..e68f36323d 100644 --- a/packages/core/src/types/prompt_type.d.ts +++ b/packages/core/src/types/prompt_type.d.ts @@ -182,6 +182,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/sample/genaisrc/blog/genaiscript.d.ts b/packages/sample/genaisrc/blog/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/sample/genaisrc/blog/genaiscript.d.ts +++ b/packages/sample/genaisrc/blog/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/sample/genaisrc/gai.genai.mts b/packages/sample/genaisrc/gai.genai.mts index 0fd4bd2a91..1422b79a14 100644 --- a/packages/sample/genaisrc/gai.genai.mts +++ b/packages/sample/genaisrc/gai.genai.mts @@ -1,6 +1,4 @@ /* spellchecker: disable */ -import { Octokit } from "octokit" -import { createPatch } from "diff" script({ title: "GitHub Action Investigator", @@ -20,69 +18,67 @@ const lsid = env.vars.success_run_id const branch = env.vars.branch || (await host.exec("git branch --show-current")).stdout.trim() - -const octokit = new Octokit({ - auth: process.env.GITHUB_TOKEN, -}) -const { owner, repo } = await getRepoInfo() - -script({ - system: ["system", "system.files"], - cache: "gh-investigator", -}) - -const runs = await listRuns(workflow, branch) - -// first last success -const lsi = lsid - ? runs.findIndex(({ id }) => id === lsid) - : runs.findIndex(({ conclusion }) => conclusion === "success") -const ls = runs[lsi] -if (!ls) cancel("last success run not found") -console.log( - `> last success: ${ls.id}, ${ls.created_at}, ${ls.head_sha}, ${ls.html_url}` -) -const ff = ffid ? runs.find(({ id }) => id === ffid) : runs[lsi - 1] -if (!ff) cancel("failure run not found") +const { owner, repo } = await github.info() +const runs = await github.listWorkflowRuns(workflow, { branch }) + +// find failure or first failure +const ffi = ffid + ? runs.findIndex(({ id }) => id === ffid) + : runs.findIndex(({ conclusion }) => conclusion === "failure") +if (ffi < 0) cancel("failure run not found") +const ff = runs[ffi] console.log( `> first failure: ${ff.id}, ${ff.created_at}, ${ff.head_sha}, ${ff.html_url}` ) if (ff.conclusion !== "failure") cancel("failure run not found") -const gitDiff = await host.exec( - `git diff ${ls.head_sha} ${ff.head_sha} -- . :!**/genaiscript.d.ts` -) -console.log(`> source diff: ${(gitDiff.stdout.length / 1000) | 0}kb`) +// first last success +const lsi = lsid + ? runs.slice(ffi).findIndex(({ id }) => id === lsid) + : runs.slice(ffi).findIndex(({ conclusion }) => conclusion === "success") +const ls = runs[lsi] +if (ls) { + console.log( + `> last success: ${ls.id}, ${ls.created_at}, ${ls.head_sha}, ${ls.html_url}` + ) + const gitDiff = await host.exec( + `git diff ${ls.head_sha} ${ff.head_sha} -- . :!**/genaiscript.d.ts` + ) + console.log(`> source diff: ${(gitDiff.stdout.length / 1000) | 0}kb`) + def("GIT_DIFF", gitDiff, { + language: "diff", + maxTokens: 10000, + lineNumbers: true, + }) +} // download logs -const ffjobs = await downloadRunLog(ff.id) +const ffjobs = await github.listWorkflowJobs(ff.id) const ffjob = ffjobs.find(({ conclusion }) => conclusion === "failure") -const fflog = ffjob.text -console.log( - `> first failure log: ${(fflog.length / 1000) | 0}kb ${ffjob.logUrl}` -) - -const lsjobs = await downloadRunLog(ls.id) -const lsjob = lsjobs.find(({ name }) => ffjob.name === name) -const lslog = lsjob.text +const fflog = ffjob.content console.log( - `> last success log: ${(lslog.length / 1000) | 0}kb ${lsjob.logUrl}` + `> first failure log: ${(fflog.length / 1000) | 0}kb ${ffjob.logs_url}` ) +if (!ls) { + def("LOG", fflog, { maxTokens: 20000, lineNumbers: false }) +} else { + const lsjobs = await github.listWorkflowJobs(ls.id) + const lsjob = lsjobs.find(({ name }) => ffjob.name === name) + const lslog = lsjob.content + console.log( + `> last success log: ${(lslog.length / 1000) | 0}kb ${lsjob.logs_url}` + ) -// include difss -def("GIT_DIFF", gitDiff, { - language: "diff", - maxTokens: 10000, - lineNumbers: true, -}) -defDiff("LOG_DIFF", parseJobLog(lslog), parseJobLog(fflog), { - maxTokens: 20000, - lineNumbers: false, -}) + // include difss + defDiff("LOG_DIFF", lslog, fflog, { + maxTokens: 20000, + lineNumbers: false, + }) +} $`Your are an expert software engineer and you are able to analyze the logs and find the root cause of the failure. -- GIT_DIFF contains a diff of 2 run commits -- LOG_DIFF contains a diff of 2 runs in GitHub Action +${ls ? "- GIT_DIFF contains a diff of 2 run commits" : ""} +${ls ? "- LOG_DIFF contains a diff of 2 runs in GitHub Action" : "- LOG contains the log of the failed run"} - The first run is the last successful run and the second run is the first failed run Add links to run logs. @@ -97,119 +93,10 @@ Generate a diff with suggested fixes. Use a diff format. writeText( `## Investigator report - [run failure](${ff.html_url}) -, [run last success](${ls.html_url}) +${ls ? `, [run last success](${ls.html_url})` : ""} , [${ff.head_sha.slice(0, 7)}](${ff.html_url}) -, [diff ${ls.head_sha.slice(0, 7)}...${ff.head_sha.slice(0, 7)}](https://github.com/${owner}/${repo}/compare/${ls.head_sha}...${ff.head_sha}) +${ls ? `, [diff ${ls.head_sha.slice(0, 7)}...${ff.head_sha.slice(0, 7)}](https://github.com/${owner}/${repo}/compare/${ls.head_sha}...${ff.head_sha})` : ""} `, { assistant: true } ) - -/*----------------------------------------- - -GitHub infra - ------------------------------------------*/ -async function getRepoInfo() { - const repository = process.env.GITHUB_REPOSITORY - if (repository) { - const [owner, repo] = repository.split("/") - return { owner, repo } - } - const remoteUrl = (await host.exec("git config --get remote.origin.url")) - .stdout - const match = remoteUrl.match(/github\.com\/(?.+)\/(?.+)$/) - if (!match) { - throw new Error( - "Could not parse repository information from remote URL" - ) - } - const { owner, repo } = match.groups - return { owner, repo } -} - -async function listRuns(workflow_id: string, branch: string) { - // Get the workflow runs for the specified workflow file, filtering for failures - const { - data: { workflow_runs }, - } = await octokit.rest.actions.listWorkflowRuns({ - owner, - repo, - workflow_id, - branch, - per_page: 100, - }) - const runs = workflow_runs.filter( - ({ conclusion }) => conclusion !== "skipped" - ) - return runs -} - -async function downloadRunLog(run_id: number) { - const res = [] - // Get the jobs for the specified workflow run - const { - data: { jobs }, - } = await octokit.rest.actions.listJobsForWorkflowRun({ - owner, - repo, - run_id, - }) - for (const job of jobs) { - const { url: logUrl } = - await octokit.rest.actions.downloadJobLogsForWorkflowRun({ - owner, - repo, - job_id: job.id, - }) - const { text } = await fetchText(logUrl) - res.push({ ...job, logUrl, text }) - } - return res -} - -function parseJobLog(text: string) { - const lines = cleanLog(text).split(/\r?\n/g) - const groups: { title: string; text: string }[] = [] - let current = groups[0] - for (const line of lines) { - if (line.startsWith("##[group]")) { - current = { title: line.slice("##[group]".length), text: "" } - } else if (line.startsWith("##[endgroup]")) { - if (current) groups.push(current) - current = undefined - } else { - if (!current) current = { title: "", text: "" } - current.text += line + "\n" - } - } - if (current) groups.push(current) - - const ignoreSteps = [ - "Runner Image", - "Fetching the repository", - "Checking out the ref", - "Setting up auth", - "Setting up auth for fetching submodules", - "Getting Git version info", - "Initializing the repository", - "Determining the checkout info", - "Persisting credentials for submodules", - ] - return groups - .filter(({ title }) => !ignoreSteps.includes(title)) - .map((f) => - f.title ? `##[group]${f.title}\n${f.text}\n##[endgroup]` : f.text - ) - .join("\n") -} - -function cleanLog(text: string) { - return text - .replace( - // timestamps - /^?\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{2,}Z /gm, - "" - ) - .replace(/\x1b\[[0-9;]*m/g, "") // ascii colors -} diff --git a/packages/sample/genaisrc/genaiscript.d.ts b/packages/sample/genaisrc/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/sample/genaisrc/genaiscript.d.ts +++ b/packages/sample/genaisrc/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/sample/genaisrc/node/genaiscript.d.ts b/packages/sample/genaisrc/node/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/sample/genaisrc/node/genaiscript.d.ts +++ b/packages/sample/genaisrc/node/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/sample/genaisrc/python/genaiscript.d.ts b/packages/sample/genaisrc/python/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/sample/genaisrc/python/genaiscript.d.ts +++ b/packages/sample/genaisrc/python/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/sample/genaisrc/style/genaiscript.d.ts b/packages/sample/genaisrc/style/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/sample/genaisrc/style/genaiscript.d.ts +++ b/packages/sample/genaisrc/style/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/sample/src/aici/genaiscript.d.ts b/packages/sample/src/aici/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/sample/src/aici/genaiscript.d.ts +++ b/packages/sample/src/aici/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/sample/src/errors/genaiscript.d.ts b/packages/sample/src/errors/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/sample/src/errors/genaiscript.d.ts +++ b/packages/sample/src/errors/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/sample/src/genaiscript.d.ts b/packages/sample/src/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/sample/src/genaiscript.d.ts +++ b/packages/sample/src/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/sample/src/makecode/genaiscript.d.ts b/packages/sample/src/makecode/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/sample/src/makecode/genaiscript.d.ts +++ b/packages/sample/src/makecode/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/sample/src/tla/genaiscript.d.ts b/packages/sample/src/tla/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/sample/src/tla/genaiscript.d.ts +++ b/packages/sample/src/tla/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/sample/src/vision/genaiscript.d.ts b/packages/sample/src/vision/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/sample/src/vision/genaiscript.d.ts +++ b/packages/sample/src/vision/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/packages/vscode/genaisrc/genaiscript.d.ts b/packages/vscode/genaisrc/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/packages/vscode/genaisrc/genaiscript.d.ts +++ b/packages/vscode/genaisrc/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/slides/genaisrc/genaiscript.d.ts b/slides/genaisrc/genaiscript.d.ts index 3fc0bb6fe1..99866eae6e 100644 --- a/slides/genaisrc/genaiscript.d.ts +++ b/slides/genaisrc/genaiscript.d.ts @@ -728,7 +728,7 @@ interface LineNumberingOptions { lineNumbers?: boolean } -interface FenceOptions extends LineNumberingOptions{ +interface FenceOptions extends LineNumberingOptions { /** * Language of the fenced code block. Defaults to "markdown". */ @@ -786,9 +786,9 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter { /** * Options for the `defDiff` command. */ -interface DefDiffOptions extends ContextExpansionOptions, LineNumberingOptions { - -} +interface DefDiffOptions + extends ContextExpansionOptions, + LineNumberingOptions {} interface DefImagesOptions { detail?: "high" | "low" @@ -1292,6 +1292,148 @@ interface HTML { convertToMarkdown(html: string): string } +interface GitHubOptions { + owner: string + repo: string + baseUrl?: string + auth?: string +} + +type GitHubWorkflowRunStatus = + | "completed" + | "action_required" + | "cancelled" + | "failure" + | "neutral" + | "skipped" + | "stale" + | "success" + | "timed_out" + | "in_progress" + | "queued" + | "requested" + | "waiting" + | "pending" + +interface GitHubWorkflowRun { + id: number + name?: string + status: string + conclusion: string + html_url: string + created_at: string + head_branch: string + head_sha: string +} + +interface GitHubWorkflowJob { + id: number + run_id: number + status: string + conclusion: string + name: string + html_url: string + logs_url: string + logs: string + started_at: string + completed_at: string + content: string +} + +interface GitHubIssue { + id: number + body?: string + title: string + number: number + state: string + state_reason?: "completed" | "reopened" | "not_planned" | null + html_url: string +} + +interface GitHubComment { + id: number + body?: string + created_at: string + updated_at: string + html_url: string +} + +interface GitHubPullRequest extends GitHubIssue {} + +interface GitHub { + /** + * Gets connection information for octokit + */ + info(): Promise + + /** + * Lists workflow runs for a given workflow + * @param workflowId + * @param options + */ + listWorkflowRuns( + workflow_id: string | number, + options?: { + branch?: string + event?: string + per_page?: number + page?: number + status?: GitHubWorkflowRunStatus + } + ): Promise + + /** + * Downloads a GitHub Action workflow run log + * @param runId + */ + listWorkflowJobs(runId: number): Promise + + /** + * Lists issues for a given repository + * @param options + */ + listIssues(options?: { + state?: "open" | "closed" | "all" + labels?: string + sort?: "created" | "updated" | "comments" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given issue + * @param issue_number + * @param options + */ + listIssueComments( + issue_number: number, + options?: { per_page?: number; page?: number } + ): Promise + + /** + * Lists pull requests for a given repository + * @param options + */ + listPullRequests(options?: { + state?: "open" | "closed" | "all" + sort?: "created" | "updated" | "popularity" | "long-running" + direction?: "asc" | "desc" + per_page?: number + page?: number + }): Promise + + /** + * Lists comments for a given pull request + * @param pull_number + * @param options + */ + listPullRequestReviewComments( + pull_number: number, + options?: { per_page?: number; page?: number } + ): Promise +} + interface MD { /** * Parses front matter from markdown @@ -1355,7 +1497,7 @@ interface CSVStringifyOptions { interface CSV { /** * Parses a CSV string to an array of objects. - * + * * @param text - The CSV string to parse. * @param options - Optional settings for parsing. * @param options.delimiter - The delimiter used in the CSV string. Defaults to ','. @@ -1365,30 +1507,30 @@ interface CSV { parse( text: string, options?: { - delimiter?: string; - headers?: string[]; + delimiter?: string + headers?: string[] } - ): object[]; + ): object[] /** * Converts an array of objects to a CSV string. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for stringifying. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A CSV string representing the data. */ - stringify(csv: object[], options?: CSVStringifyOptions): string; + stringify(csv: object[], options?: CSVStringifyOptions): string /** * Converts an array of objects that represents a data table to a markdown table. - * + * * @param csv - The array of objects to convert. * @param options - Optional settings for markdown conversion. * @param options.headers - An array of headers to use. If not provided, headers will be inferred from the object keys. * @returns A markdown string representing the data table. */ - markdownify(csv: object[], options?: { headers?: string[] }): string; + markdownify(csv: object[], options?: { headers?: string[] }): string } interface HighlightOptions { @@ -1618,7 +1760,12 @@ interface ChatTurnGenerationContext { data: object[] | object, options?: DefDataOptions ): string - defDiff(name: string, left: T, right: T, options?: DefDiffOptions): string + defDiff( + name: string, + left: T, + right: T, + options?: DefDiffOptions + ): string console: PromptGenerationConsole } @@ -2364,10 +2511,10 @@ interface PromiseQueue { /** * Applies a function to all the values in the queue with limited concurrency - * @param values - * @param fn + * @param values + * @param fn */ - async mapAll( + mapAll( values: T[], fn: (value: T, ...arguments_: Arguments) => Awaitable, ...arguments_: Arguments @@ -2638,6 +2785,11 @@ declare var AICI: AICI */ declare var host: PromptHost +/** + * Access to GitHub queries for the current repository + */ +declare var github: GitHub + /** * Fetches a given URL and returns the response. * @param url diff --git a/slides/yarn.lock b/slides/yarn.lock index f3d5fe5fe0..ad1c8892a6 100644 --- a/slides/yarn.lock +++ b/slides/yarn.lock @@ -41,7 +41,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.4.tgz#7d2a80ce229890edcf4cc259d4d696cb4dae2fcb" integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ== -"@babel/core@^7.23.7", "@babel/core@^7.24.7": +"@babel/core@^7.24.7", "@babel/core@^7.25.2": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== @@ -231,7 +231,7 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.24.7" "@babel/plugin-syntax-typescript" "^7.24.7" -"@babel/standalone@^7.23.8": +"@babel/standalone@^7.25.6": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.25.6.tgz#b81f6cefd3b667ae5334979d01b3633c70bb231f" integrity sha512-Kf2ZcZVqsKbtYhlA7sP0z5A3q5hmCVYMKMWRWNK/5OVwHIve3JY1djVRmIVAx8FMueLIfZGKQDIILK2w8zO4mg== @@ -258,7 +258,7 @@ debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.23.6", "@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.6": +"@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.6": version "7.25.6" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6" integrity sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw== @@ -766,7 +766,7 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.28.tgz#d45e01c4a56f143ee69c54dd6b12eade9e270a73" integrity sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw== -"@rollup/pluginutils@^5.1.0": +"@rollup/pluginutils@^5.1.0", "@rollup/pluginutils@^5.1.2": version "5.1.2" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.1.2.tgz#d3bc9f0fea4fd4086aaac6aa102f3fa587ce8bd9" integrity sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw== @@ -855,83 +855,83 @@ resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz#3dd5d53e900df2a40841882c02e56f866c04d202" integrity sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q== -"@shikijs/core@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.18.0.tgz#30dde8e53026dada606c4cf7f32d80a3f33d437c" - integrity sha512-VK4BNVCd2leY62Nm2JjyxtRLkyrZT/tv104O81eyaCjHq4Adceq2uJVFJJAIof6lT1mBwZrEo2qT/T+grv3MQQ== +"@shikijs/core@1.20.0": + version "1.20.0" + resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.20.0.tgz#e431b69bebf1c1a0dd53fd3fb16eae7e7823d9ba" + integrity sha512-KlO3iE0THzSdYkzDFugt8SHe6FR3qNYTkmpbdW1d6xo8juQkMjybxAw/cBi2npL2eb2F4PbbnSs5Z9tDusfvyg== dependencies: - "@shikijs/engine-javascript" "1.18.0" - "@shikijs/engine-oniguruma" "1.18.0" - "@shikijs/types" "1.18.0" + "@shikijs/engine-javascript" "1.20.0" + "@shikijs/engine-oniguruma" "1.20.0" + "@shikijs/types" "1.20.0" "@shikijs/vscode-textmate" "^9.2.2" "@types/hast" "^3.0.4" hast-util-to-html "^9.0.3" -"@shikijs/engine-javascript@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@shikijs/engine-javascript/-/engine-javascript-1.18.0.tgz#9888011c5d869a687b42e3e56c7243f15a73524b" - integrity sha512-qoP/aO/ATNwYAUw1YMdaip/YVEstMZEgrwhePm83Ll9OeQPuxDZd48szZR8oSQNQBT8m8UlWxZv8EA3lFuyI5A== +"@shikijs/engine-javascript@1.20.0": + version "1.20.0" + resolved "https://registry.yarnpkg.com/@shikijs/engine-javascript/-/engine-javascript-1.20.0.tgz#ffb18986aa4d989b0320136202b29739a659778a" + integrity sha512-ZUMo758uduM0Tfgzi/kd+0IKMbNdumCxxWjY36uf1DIs2Qyg9HIq3vA1Wfa/vc6HE7tHWFpANRi3mv7UzJ68MQ== dependencies: - "@shikijs/types" "1.18.0" + "@shikijs/types" "1.20.0" "@shikijs/vscode-textmate" "^9.2.2" oniguruma-to-js "0.4.3" -"@shikijs/engine-oniguruma@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.18.0.tgz#7e57fd19b62b18cf2de382da684d042ee934f65d" - integrity sha512-B9u0ZKI/cud+TcmF8Chyh+R4V5qQVvyDOqXC2l2a4x73PBSBc6sZ0JRAX3eqyJswqir6ktwApUUGBYePdKnMJg== +"@shikijs/engine-oniguruma@1.20.0": + version "1.20.0" + resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.20.0.tgz#21091c82349109710050169332eec1ec3ff3095b" + integrity sha512-MQ40WkVTZk7by33ces4PGK6XNFSo6PYvKTSAr2kTWdRNhFmOcnaX+1XzvFwB26eySXR7U74t91czZ1qJkEgxTA== dependencies: - "@shikijs/types" "1.18.0" + "@shikijs/types" "1.20.0" "@shikijs/vscode-textmate" "^9.2.2" "@shikijs/markdown-it@^1.14.1": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@shikijs/markdown-it/-/markdown-it-1.18.0.tgz#e238f363489de5a4b0d05e2d77969a2ada1b29b8" - integrity sha512-acU44AAYYk7cESJbpEmcmLP5KJzuIUBzuCHcVd4glJPRK1UYc7Pqfg/chKv0DFYsC0u5BdFT15Od959tPA3xJQ== + version "1.20.0" + resolved "https://registry.yarnpkg.com/@shikijs/markdown-it/-/markdown-it-1.20.0.tgz#068c3c423bc1f5e7aea21e5d61ba6c000b2ee4e9" + integrity sha512-WmvhXzGybpvND3k3/4dJTTNZWkbvp2rRjx895iiR1derBXYFR3Qn4uTTNCk7UvAkxo5vZ1BlJL71hnASxh+/aQ== dependencies: markdown-it "^14.1.0" - shiki "1.18.0" + shiki "1.20.0" "@shikijs/monaco@^1.14.1": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@shikijs/monaco/-/monaco-1.18.0.tgz#753ffbc92fdee4992c827b05fd6eeab1c40dc12a" - integrity sha512-3DDL/VozROiMMcZFNQ3UPdMWQCk9ToDtSEK6W9l38oQqA3m/nj9a+AUzodiMMhF09vCUjlRxFH4ep8otPv3Mug== + version "1.20.0" + resolved "https://registry.yarnpkg.com/@shikijs/monaco/-/monaco-1.20.0.tgz#98b6556ac430b680b997ff5a19d03811422850f5" + integrity sha512-0aUjeATNBvGQeGZl10WyY7yTZ2ZMxXM9ahulKwI8r+6Yvk6PskNKodktsDgJzOnWrfeyFbTMiRFPz7qtlGd0gA== dependencies: - "@shikijs/core" "1.18.0" - "@shikijs/types" "1.18.0" + "@shikijs/core" "1.20.0" + "@shikijs/types" "1.20.0" "@shikijs/vscode-textmate" "^9.2.2" "@shikijs/twoslash@", "@shikijs/twoslash@^1.14.1": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@shikijs/twoslash/-/twoslash-1.18.0.tgz#fe4fbecc870543bac6766435692b6a6699b37d55" - integrity sha512-nbv1vEiNlM9GbXpN0++5QiT2NdUbAJ6y8yBuMWIiT04dxD3tdl7Ud3TL6hAZ6CAwMGn5hRaN+2va2oN1Rsy1Ww== + version "1.20.0" + resolved "https://registry.yarnpkg.com/@shikijs/twoslash/-/twoslash-1.20.0.tgz#d020a2d0c8411a59e4af999c60aa1a0b8d05ed6c" + integrity sha512-NGaZgluqyo/P8r35/y82lhGtHjQaDlFTpmRzl/T+aNMshatcOsTvMN9uVWSNy83di1VGTxhH4ruX0xUsOAgdtg== dependencies: - "@shikijs/core" "1.18.0" - "@shikijs/types" "1.18.0" + "@shikijs/core" "1.20.0" + "@shikijs/types" "1.20.0" twoslash "^0.2.11" -"@shikijs/types@1.18.0": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-1.18.0.tgz#4c2d62d17f78cbfc051a15480ab4dfb0f06196c9" - integrity sha512-O9N36UEaGGrxv1yUrN2nye7gDLG5Uq0/c1LyfmxsvzNPqlHzWo9DI0A4+fhW2y3bGKuQu/fwS7EPdKJJCowcVA== +"@shikijs/types@1.20.0": + version "1.20.0" + resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-1.20.0.tgz#6ae758cc48cf7e776a538437dc8d17d8f49bdc4e" + integrity sha512-y+EaDvU2K6/GaXOKXxJaGnr1XtmZMF7MfS0pSEDdxEq66gCtKsLwQvVwoQFdp7R7dLlNAro3ijEE19sMZ0pzqg== dependencies: "@shikijs/vscode-textmate" "^9.2.2" "@types/hast" "^3.0.4" "@shikijs/vitepress-twoslash@^1.14.1": - version "1.18.0" - resolved "https://registry.yarnpkg.com/@shikijs/vitepress-twoslash/-/vitepress-twoslash-1.18.0.tgz#44820822b2bcb09753bb5cca221221fd584013a4" - integrity sha512-yk1VyStviw/vmVXOZ1/DofgYjFmkm41UKzjEHu/8ZJ+UuPFjqu6Y2n6rtd4vkr8vBs5lv32FGPcQUseURTDs1g== + version "1.20.0" + resolved "https://registry.yarnpkg.com/@shikijs/vitepress-twoslash/-/vitepress-twoslash-1.20.0.tgz#ad6b897c59d1a83ea13effed06e0286b2dd92639" + integrity sha512-9/BqSp1yF0QQ5jVXX/KbIVnwaw+14NJfcw4r1RAWIVykDUvXKO16dSmdV4UlRVh6VyrtF2EFdoFCvVnllrKccQ== dependencies: "@shikijs/twoslash" "" floating-vue "^5.2.2" mdast-util-from-markdown "^2.0.1" mdast-util-gfm "^3.0.0" mdast-util-to-hast "^13.2.0" - shiki "1.18.0" + shiki "1.20.0" twoslash "^0.2.11" twoslash-vue "^0.2.11" - vue "^3.5.6" + vue "^3.5.9" "@shikijs/vscode-textmate@^9.2.2": version "9.2.2" @@ -1198,16 +1198,16 @@ integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g== "@types/node@*", "@types/node@>=20": - version "22.7.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.0.tgz#670aa1874bc836863e5c116f9f2c32416ff27e1f" - integrity sha512-MOdOibwBs6KW1vfqz2uKMlxq5xAfAZ98SZjO8e3XnAbFnTJtAspqhWk7hrdSAs9/Y14ZWMiy7/MxMUzAOadYEw== + version "22.7.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.3.tgz#7ddf1ddf13078692b4cfadb835852b2a718ee1ef" + integrity sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA== dependencies: undici-types "~6.19.2" "@types/node@^18.7.3": - version "18.19.51" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.51.tgz#bebfb2f282de467f556a1a85aa74878b6ca0ab3a" - integrity sha512-IIMkWEIVQDlBpi6pPeGqTqOx7KbzGC3EgIyH8NrxplXOwWw0uVl9vthJUMFrxD7kcEfcRp7jIkgpB28M6JnfWA== + version "18.19.53" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.53.tgz#1e2f83eeede6031f03bc4780826b8b02b42ac50d" + integrity sha512-GLxgUgHhDKO1Edw9Q0lvMbiO/IQXJwJlMaqxSGBXMpPy8uhkCs2iiPFaB2Q/gmobnFkckD3rqTBMVjXdwq+nKg== dependencies: undici-types "~5.26.4" @@ -1529,47 +1529,47 @@ "@babel/parser" "^7.25.6" "@vue/compiler-sfc" "^3.5.3" -"@vue/compiler-core@3.5.8": - version "3.5.8" - resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.5.8.tgz#03ee4a2fa022c9bc3e59f789a1e14593b1e95b10" - integrity sha512-Uzlxp91EPjfbpeO5KtC0KnXPkuTfGsNDeaKQJxQN718uz+RqDYarEf7UhQJGK+ZYloD2taUbHTI2J4WrUaZQNA== +"@vue/compiler-core@3.5.9": + version "3.5.9" + resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.5.9.tgz#d51fbfe6c18479b27fe6b1723344ba0832e4aacb" + integrity sha512-KE1sCdwqSKq0CQ/ltg3XnlMTKeinjegIkuFsuq9DKvNPmqLGdmI51ChZdGBBRXIvEYTLm8X/JxOuBQ1HqF/+PA== dependencies: "@babel/parser" "^7.25.3" - "@vue/shared" "3.5.8" + "@vue/shared" "3.5.9" entities "^4.5.0" estree-walker "^2.0.2" source-map-js "^1.2.0" -"@vue/compiler-dom@3.5.8", "@vue/compiler-dom@^3.4.0": - version "3.5.8" - resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.5.8.tgz#03e4a6bef00a1979613a1db2ab39e9b2dced3373" - integrity sha512-GUNHWvoDSbSa5ZSHT9SnV5WkStWfzJwwTd6NMGzilOE/HM5j+9EB9zGXdtu/fCNEmctBqMs6C9SvVPpVPuk1Eg== +"@vue/compiler-dom@3.5.9", "@vue/compiler-dom@^3.4.0": + version "3.5.9" + resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.5.9.tgz#6fa2b7e536ae4c416fc2d60b7e9e33b3410eac7a" + integrity sha512-gEAURwPo902AsJF50vl59VaWR+Cx6cX9SoqLYHu1jq9hDbmQlXvpZyYNIIbxa2JTJ+FD/oBQweVUwuTQv79KTg== dependencies: - "@vue/compiler-core" "3.5.8" - "@vue/shared" "3.5.8" + "@vue/compiler-core" "3.5.9" + "@vue/shared" "3.5.9" -"@vue/compiler-sfc@3.5.8", "@vue/compiler-sfc@^3.5.3": - version "3.5.8" - resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.5.8.tgz#b2091ec01c63ab02a1cd6783224322f245c6a308" - integrity sha512-taYpngQtSysrvO9GULaOSwcG5q821zCoIQBtQQSx7Uf7DxpR6CIHR90toPr9QfDD2mqHQPCSgoWBvJu0yV9zjg== +"@vue/compiler-sfc@3.5.9", "@vue/compiler-sfc@^3.5.3": + version "3.5.9" + resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.5.9.tgz#020b7654f1fde7c606a49ec4e4d2838e8e1a43c5" + integrity sha512-kp9qawcTXakYm0TN6YAwH24IurSywoXh4fWhRbLu0at4UVyo994bhEzJlQn82eiyqtut4GjkQodSfn8drFbpZQ== dependencies: "@babel/parser" "^7.25.3" - "@vue/compiler-core" "3.5.8" - "@vue/compiler-dom" "3.5.8" - "@vue/compiler-ssr" "3.5.8" - "@vue/shared" "3.5.8" + "@vue/compiler-core" "3.5.9" + "@vue/compiler-dom" "3.5.9" + "@vue/compiler-ssr" "3.5.9" + "@vue/shared" "3.5.9" estree-walker "^2.0.2" magic-string "^0.30.11" postcss "^8.4.47" source-map-js "^1.2.0" -"@vue/compiler-ssr@3.5.8": - version "3.5.8" - resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.5.8.tgz#fbad34f8bbed15aa6e7b9d78324d93af93403145" - integrity sha512-W96PtryNsNG9u0ZnN5Q5j27Z/feGrFV6zy9q5tzJVyJaLiwYxvC0ek4IXClZygyhjm+XKM7WD9pdKi/wIRVC/Q== +"@vue/compiler-ssr@3.5.9": + version "3.5.9" + resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.5.9.tgz#e30f8e866589392421abcbfc0e0241470f3ca9a6" + integrity sha512-fb1g2mQv32QzIei76rlXRTz08Grw+ZzBXSQfHo4StGFutm/flyebw3dGJkexKwcU3GjX9s5fIGjEv/cjO8j8Yw== dependencies: - "@vue/compiler-dom" "3.5.8" - "@vue/shared" "3.5.8" + "@vue/compiler-dom" "3.5.9" + "@vue/shared" "3.5.9" "@vue/compiler-vue2@^2.7.16": version "2.7.16" @@ -1598,43 +1598,43 @@ muggle-string "^0.4.1" path-browserify "^1.0.1" -"@vue/reactivity@3.5.8": - version "3.5.8" - resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.5.8.tgz#23e1bceceb9b94b136fa91f11b308e3f712dea6d" - integrity sha512-mlgUyFHLCUZcAYkqvzYnlBRCh0t5ZQfLYit7nukn1GR96gc48Bp4B7OIcSfVSvlG1k3BPfD+p22gi1t2n9tsXg== +"@vue/reactivity@3.5.9": + version "3.5.9" + resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.5.9.tgz#8864a55e4c495666f3c679beb8f734489eeb042e" + integrity sha512-88ApgNZ6yPYpyYkTfXzcbWk6O8+LrPRIpa/U4AdeTzpfRUO+EUt5jemnTBVSlAUNmlYY96xa5feUNEq+BouLog== dependencies: - "@vue/shared" "3.5.8" + "@vue/shared" "3.5.9" -"@vue/runtime-core@3.5.8": - version "3.5.8" - resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.5.8.tgz#235251fa40dae61db7becacf6bda5bc6561cbbc5" - integrity sha512-fJuPelh64agZ8vKkZgp5iCkPaEqFJsYzxLk9vSC0X3G8ppknclNDr61gDc45yBGTaN5Xqc1qZWU3/NoaBMHcjQ== +"@vue/runtime-core@3.5.9": + version "3.5.9" + resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.5.9.tgz#e47f890734039f77dac86328cc059cf8188c5729" + integrity sha512-YAeP0zNkjSl5mEc1NxOg9qoAhLNbREElHAhfYbMXT57oF0ixehEEJWBhg2uvVxslCGh23JhpEAyMvJrJHW9WGg== dependencies: - "@vue/reactivity" "3.5.8" - "@vue/shared" "3.5.8" + "@vue/reactivity" "3.5.9" + "@vue/shared" "3.5.9" -"@vue/runtime-dom@3.5.8": - version "3.5.8" - resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.5.8.tgz#9d3a4f4a9a9a0002b085a5e18a2ca16c009cb3ad" - integrity sha512-DpAUz+PKjTZPUOB6zJgkxVI3GuYc2iWZiNeeHQUw53kdrparSTG6HeXUrYDjaam8dVsCdvQxDz6ZWxnyjccUjQ== +"@vue/runtime-dom@3.5.9": + version "3.5.9" + resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.5.9.tgz#088746207f74963d09b31ce7b79add0bf96aa337" + integrity sha512-5Oq/5oenpB9lw94moKvOHqBDEaMSyDmcu2HS8AtAT6/pwdo/t9fR9aVtLh6FzYGGqZR9yRfoHAN6P7goblq1aA== dependencies: - "@vue/reactivity" "3.5.8" - "@vue/runtime-core" "3.5.8" - "@vue/shared" "3.5.8" + "@vue/reactivity" "3.5.9" + "@vue/runtime-core" "3.5.9" + "@vue/shared" "3.5.9" csstype "^3.1.3" -"@vue/server-renderer@3.5.8": - version "3.5.8" - resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.5.8.tgz#d6c292409e880db4151223c27fa0d1cd879cc239" - integrity sha512-7AmC9/mEeV9mmXNVyUIm1a1AjUhyeeGNbkLh39J00E7iPeGks8OGRB5blJiMmvqSh8SkaS7jkLWSpXtxUCeagA== +"@vue/server-renderer@3.5.9": + version "3.5.9" + resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.5.9.tgz#3bf0736001623960d120ef01dee5045fad6efadb" + integrity sha512-tbuUsZfMWGazR9LXLNiiDSTwkO8K9sLyR70diY+FbQmKmh7236PPz4jkTxymelV8D89IJUGtbfe4VdmpHkmuxg== dependencies: - "@vue/compiler-ssr" "3.5.8" - "@vue/shared" "3.5.8" + "@vue/compiler-ssr" "3.5.9" + "@vue/shared" "3.5.9" -"@vue/shared@3.5.8", "@vue/shared@^3.4.0": - version "3.5.8" - resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.5.8.tgz#6ef14933872dcc4f7b79fee3aaecf648ff807fed" - integrity sha512-mJleSWbAGySd2RJdX1RBtcrUBX6snyOc0qHpgk3lGi4l9/P/3ny3ELqFWqYdkXIwwNN/kdm8nD9ky8o6l/Lx2A== +"@vue/shared@3.5.9", "@vue/shared@^3.4.0": + version "3.5.9" + resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.5.9.tgz#713257216ea2cbf4e200cb9ae395c34ae2349385" + integrity sha512-8wiT/m0mnsLhTME0mPgc57jv+4TipRBSAAmheUdYgiOaO6AobZPNOmm87ub4np65VVDgLcWxc+Edc++5Wyz1uA== "@vueuse/core@^10.10.0": version "10.11.1" @@ -1855,9 +1855,9 @@ cacheable-request@^10.2.8: responselike "^3.0.0" caniuse-lite@^1.0.30001663: - version "1.0.30001663" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001663.tgz#1529a723505e429fdfd49532e9fc42273ba7fed7" - integrity sha512-o9C3X27GLKbLeTYZ6HBOLU1tsAcBZsLis28wrVzddShCS16RujjHp9GDHKZqrB3meE0YjhawvMFsGb/igqiPzA== + version "1.0.30001664" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz#d588d75c9682d3301956b05a3749652a80677df4" + integrity sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g== ccount@^2.0.0: version "2.0.1" @@ -2533,9 +2533,9 @@ domhandler@^5.0.2, domhandler@^5.0.3: domelementtype "^2.3.0" dompurify@^3.0.11: - version "3.1.6" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.1.6.tgz#43c714a94c6a7b8801850f82e756685300a027e2" - integrity sha512-cTOAhc36AalkjtBpfG6O8JimdTMWNXjiePT2xQH/ppBGi/4uIpmj8eKyIkMJErXWARyINV/sB38yf8JCLF5pbQ== + version "3.1.7" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.1.7.tgz#711a8c96479fb6ced93453732c160c3c72418a6a" + integrity sha512-VaTstWtsneJY8xzy7DekmYWEOZcmzIe3Qb3zPd4STve1OBTa+e+WmS1ITQec1fZYXI3HCsOZZiSMpG6oxoWMWQ== domutils@^3.1.0: version "3.1.0" @@ -2569,9 +2569,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.5.28: - version "1.5.28" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.28.tgz#aee074e202c6ee8a0030a9c2ef0b3fe9f967d576" - integrity sha512-VufdJl+rzaKZoYVUijN13QcXVF5dWPZANeFTLNy+OSpHdDL5ynXTF35+60RSBbaQYB1ae723lQXHCrf4pyLsMw== + version "1.5.29" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz#aa592a3caa95d07cc26a66563accf99fa573a1ee" + integrity sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw== emoji-regex@^8.0.0: version "8.0.0" @@ -3208,11 +3208,16 @@ jiti@2.0.0-beta.3: resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.0.0-beta.3.tgz#8b97dcb268a7409c3fbda9242453486564a11c36" integrity sha512-pmfRbVRs/7khFrSAYnSiJ8C0D5GvzkE4Ey2pAvUcJsw1ly/p+7ut27jbJrjY79BpAJQJ4gXYFtK6d1Aub+9baQ== -jiti@^1.21.0, jiti@^1.21.6: +jiti@^1.21.6: version "1.21.6" resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.6.tgz#6c7f7398dd4b3142767f9a168af2f317a428d268" integrity sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w== +jiti@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.0.0.tgz#ccaab6ce73a73cbf04e187645c614b3a3d41b653" + integrity sha512-CJ7e7Abb779OTRv3lomfp7Mns/Sy1+U4pcAx5VbjxCZD5ZM/VJaXPpPjNKjtSvWQy/H86E49REXR34dl1JEz9w== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -3956,9 +3961,9 @@ npm-run-path@^5.1.0: path-key "^4.0.0" nypm@^0.3.8: - version "0.3.11" - resolved "https://registry.yarnpkg.com/nypm/-/nypm-0.3.11.tgz#57e9a91bbf1dd357add633b1abca90df7a908456" - integrity sha512-E5GqaAYSnbb6n1qZyik2wjPDZON43FqOJO59+3OkWrnmQtjggrMOVnsyzfjxp/tS6nlYJBA4zRA5jSM2YaadMg== + version "0.3.12" + resolved "https://registry.yarnpkg.com/nypm/-/nypm-0.3.12.tgz#37541bec0af3a37d3acd81d6662c6666e650b22e" + integrity sha512-D3pzNDWIvgA+7IORhD/IuWzEk4uXv6GsgOxiid4UU3h9oq5IqV1KtPDi63n4sZJ/xcWlr88c0QM2RgN5VbOhFA== dependencies: citty "^0.1.6" consola "^3.2.3" @@ -4376,7 +4381,7 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -scule@^1.2.0, scule@^1.3.0: +scule@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/scule/-/scule-1.3.0.tgz#6efbd22fd0bb801bdcc585c89266a7d2daa8fbd3" integrity sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g== @@ -4424,15 +4429,15 @@ shiki-magic-move@^0.4.4: diff-match-patch-es "^0.1.0" ohash "^1.1.3" -shiki@1.18.0, shiki@^1.14.1: - version "1.18.0" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.18.0.tgz#4f9ca2f442b3612849017ab1dcac47c35ee52276" - integrity sha512-8jo7tOXr96h9PBQmOHVrltnETn1honZZY76YA79MHheGQg55jBvbm9dtU+MI5pjC5NJCFuA6rvVTLVeSW5cE4A== +shiki@1.20.0, shiki@^1.14.1: + version "1.20.0" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.20.0.tgz#ea04cf622234c5cf8f8b6c993f8b7b05009a085e" + integrity sha512-MZJJ1PCFsQB1Piq+25wiz0a75yUv8Q3/fzy7SzRx5ONdjdtGdyiKwYn8vb/FnK5kjS0voWGnPpjG16POauUR+g== dependencies: - "@shikijs/core" "1.18.0" - "@shikijs/engine-javascript" "1.18.0" - "@shikijs/engine-oniguruma" "1.18.0" - "@shikijs/types" "1.18.0" + "@shikijs/core" "1.20.0" + "@shikijs/engine-javascript" "1.20.0" + "@shikijs/engine-oniguruma" "1.20.0" + "@shikijs/types" "1.20.0" "@shikijs/vscode-textmate" "^9.2.2" "@types/hast" "^3.0.4" @@ -4733,11 +4738,11 @@ unicorn-magic@^0.1.0: integrity sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ== unimport@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/unimport/-/unimport-3.12.0.tgz#f68e3cfbc60b488f31f4bb13c2e14e2eb58a5bce" - integrity sha512-5y8dSvNvyevsnw4TBQkIQR1Rjdbb+XjVSwQwxltpnVZrStBvvPkMPcZrh1kg5kY77kpx6+D4Ztd3W6FOBH/y2Q== + version "3.13.0" + resolved "https://registry.yarnpkg.com/unimport/-/unimport-3.13.0.tgz#0ef719ede5661db04fa62ea77db952a22e1e34bf" + integrity sha512-0WkKsLy8jkcnB38VQdAGvF0N2trJyDbUuHsfXcyrspwgwWTIThiMpvnDNZMVsuNc11SwT2GYzcQ2RnI1TY/xcw== dependencies: - "@rollup/pluginutils" "^5.1.0" + "@rollup/pluginutils" "^5.1.2" acorn "^8.12.1" escape-string-regexp "^5.0.0" estree-walker "^3.0.3" @@ -4882,17 +4887,17 @@ untun@^0.1.3: pathe "^1.1.1" untyped@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/untyped/-/untyped-1.4.2.tgz#7945ea53357635434284e6112fd1afe84dd5dcab" - integrity sha512-nC5q0DnPEPVURPhfPQLahhSTnemVtPzdx7ofiRxXpOB2SYnb3MfdU3DVGyJdS8Lx+tBWeAePO8BfU/3EgksM7Q== + version "1.5.0" + resolved "https://registry.yarnpkg.com/untyped/-/untyped-1.5.0.tgz#18b5329b72e49f6c75ff7fea537ea5fe4cf52270" + integrity sha512-o2Vjmn2dal08BzCcINxSmWuAteReUUiXseii5VRhmxyLF0b21K0iKZQ9fMYK7RWspVkY+0saqaVQNq4roe3Efg== dependencies: - "@babel/core" "^7.23.7" - "@babel/standalone" "^7.23.8" - "@babel/types" "^7.23.6" + "@babel/core" "^7.25.2" + "@babel/standalone" "^7.25.6" + "@babel/types" "^7.25.6" defu "^6.1.4" - jiti "^1.21.0" + jiti "^2.0.0" mri "^1.2.0" - scule "^1.2.0" + scule "^1.3.0" update-browserslist-db@^1.1.0: version "1.1.0" @@ -4987,9 +4992,9 @@ vite-plugin-vue-server-ref@^0.4.2: ufo "^1.3.2" vite@^5.4.2: - version "5.4.7" - resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.7.tgz#d226f57c08b61379e955f3836253ed3efb2dcf00" - integrity sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ== + version "5.4.8" + resolved "https://registry.yarnpkg.com/vite/-/vite-5.4.8.tgz#af548ce1c211b2785478d3ba3e8da51e39a287e8" + integrity sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ== dependencies: esbuild "^0.21.3" postcss "^8.4.43" @@ -5054,16 +5059,16 @@ vue-router@^4.4.3: dependencies: "@vue/devtools-api" "^6.6.4" -vue@^3.4.38, vue@^3.5.6: - version "3.5.8" - resolved "https://registry.yarnpkg.com/vue/-/vue-3.5.8.tgz#7d2fa98ea85228dcb90f897ef5df74df1d5825a1" - integrity sha512-hvuvuCy51nP/1fSRvrrIqTLSvrSyz2Pq+KQ8S8SXCxTWVE0nMaOnSDnSOxV1eYmGfvK7mqiwvd1C59CEEz7dAQ== +vue@^3.4.38, vue@^3.5.9: + version "3.5.9" + resolved "https://registry.yarnpkg.com/vue/-/vue-3.5.9.tgz#a065952d7a7c0e2cbfec8e016582b055ab984357" + integrity sha512-nHzQhZ5cjFKynAY2beAm7XtJ5C13VKAFTLTgRYXy+Id1KEKBeiK6hO2RcW1hUjdbHMadz1YzxyHgQigOC54wug== dependencies: - "@vue/compiler-dom" "3.5.8" - "@vue/compiler-sfc" "3.5.8" - "@vue/runtime-dom" "3.5.8" - "@vue/server-renderer" "3.5.8" - "@vue/shared" "3.5.8" + "@vue/compiler-dom" "3.5.9" + "@vue/compiler-sfc" "3.5.9" + "@vue/runtime-dom" "3.5.9" + "@vue/server-renderer" "3.5.9" + "@vue/shared" "3.5.9" webpack-virtual-modules@^0.6.2: version "0.6.2" diff --git a/yarn.lock b/yarn.lock index 7eee39c3af..fcc01722c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1493,9 +1493,9 @@ form-data "^4.0.0" "@types/node@*", "@types/node@>=13.7.0", "@types/node@>=20", "@types/node@^22.5.5": - version "22.7.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.0.tgz#670aa1874bc836863e5c116f9f2c32416ff27e1f" - integrity sha512-MOdOibwBs6KW1vfqz2uKMlxq5xAfAZ98SZjO8e3XnAbFnTJtAspqhWk7hrdSAs9/Y14ZWMiy7/MxMUzAOadYEw== + version "22.7.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.3.tgz#7ddf1ddf13078692b4cfadb835852b2a718ee1ef" + integrity sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA== dependencies: undici-types "~6.19.2" @@ -1505,16 +1505,16 @@ integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g== "@types/node@^18.11.18": - version "18.19.51" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.51.tgz#bebfb2f282de467f556a1a85aa74878b6ca0ab3a" - integrity sha512-IIMkWEIVQDlBpi6pPeGqTqOx7KbzGC3EgIyH8NrxplXOwWw0uVl9vthJUMFrxD7kcEfcRp7jIkgpB28M6JnfWA== + version "18.19.53" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.53.tgz#1e2f83eeede6031f03bc4780826b8b02b42ac50d" + integrity sha512-GLxgUgHhDKO1Edw9Q0lvMbiO/IQXJwJlMaqxSGBXMpPy8uhkCs2iiPFaB2Q/gmobnFkckD3rqTBMVjXdwq+nKg== dependencies: undici-types "~5.26.4" "@types/node@^20.14.12": - version "20.16.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.7.tgz#0a245bf5805add998a22b8b5adac612ee70190bc" - integrity sha512-QkDQjAY3gkvJNcZOWwzy3BN34RweT0OQ9zJyvLCU0kSK22dO2QYh/NHGfbEAYylPYzRB1/iXcojS79wOg5gFSw== + version "20.16.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.9.tgz#1217c6cc77c4f3aaf4a6c76fb56b790e81e48120" + integrity sha512-rkvIVJxsOfBejxK7I0FO5sa2WxFmJCzoDwcd88+fq/CUfynNywTo/1/T6hyFz22CyztsnLS9nVlHOnTI36RH5w== dependencies: undici-types "~6.19.2" @@ -1916,9 +1916,9 @@ azure-devops-node-api@^12.5.0: typed-rest-client "^1.8.4" b4a@^1.6.4, b4a@^1.6.6: - version "1.6.6" - resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.6.tgz#a4cc349a3851987c3c4ac2d7785c18744f6da9ba" - integrity sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg== + version "1.6.7" + resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.7.tgz#a99587d4ebbfbd5a6e3b21bdb5d5fa385767abe4" + integrity sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg== balanced-match@^1.0.0: version "1.0.2" @@ -2976,9 +2976,9 @@ fast-levenshtein@^2.0.6: integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fast-uri@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.1.tgz#cddd2eecfc83a71c1be2cc2ef2061331be8a7134" - integrity sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw== + version "3.0.2" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.2.tgz#d78b298cf70fd3b752fd951175a3da6a7b48f024" + integrity sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row== fast-xml-parser@^4.3.2, fast-xml-parser@^4.5.0: version "4.5.0" @@ -4635,9 +4635,9 @@ openai@^3.2.1: form-data "^4.0.0" openai@^4.63.0: - version "4.63.0" - resolved "https://registry.yarnpkg.com/openai/-/openai-4.63.0.tgz#cabe7223788157c96c818317cc361386807157f7" - integrity sha512-Y9V4KODbmrOpqiOmCDVnPfMxMqKLOx8Hwcdn/r8mePq4yv7FSXGnxCs8/jZKO7zCB/IVPWihpJXwJNAIOEiZ2g== + version "4.65.0" + resolved "https://registry.yarnpkg.com/openai/-/openai-4.65.0.tgz#97878efc00013b13b946b1be15a586bb4b125c62" + integrity sha512-LfA4KUBpH/8rA3vjCQ74LZtdK/8wx9W6Qxq8MHqEdImPsN1XPQ2ompIuJWkKS6kXt5Cs5i8Eb65IIo4M7U+yeQ== dependencies: "@types/node" "^18.11.18" "@types/node-fetch" "^2.6.4" @@ -4737,9 +4737,9 @@ p-try@^2.0.0: integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== package-json-from-dist@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz#e501cd3094b278495eb4258d4c9f6d5ac3019f00" - integrity sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw== + version "1.0.1" + resolved "https://registry.yarnpkg.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== pako@^1.0.0, pako@^1.0.11, pako@~1.0.2: version "1.0.11"