3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 00:55:31 +00:00

try to build java on linux/arm nightly

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2024-09-30 04:14:12 +01:00
parent 9a8ff74924
commit fc1c6b48ce
2 changed files with 358 additions and 24 deletions

380
genaisrc/genaiscript.d.ts generated vendored
View file

@ -225,6 +225,11 @@ interface ModelOptions extends ModelConnectionOptions {
* Budget of tokens to apply the prompt flex renderer.
*/
flexTokens?: number
/**
* A list of model ids and their maximum number of concurrent requests.
*/
modelConcurrency?: Record<string, number>
}
interface EmbeddingsModelConnectionOptions {
@ -711,11 +716,19 @@ type PromptSystemArgs = Omit<
| "responseType"
| "responseSchema"
| "files"
| "modelConcurrency"
>
type StringLike = string | WorkspaceFile | WorkspaceFile[]
interface FenceOptions {
interface LineNumberingOptions {
/**
* Prepend each line with a line numbers. Helps with generating diffs.
*/
lineNumbers?: boolean
}
interface FenceOptions extends LineNumberingOptions {
/**
* Language of the fenced code block. Defaults to "markdown".
*/
@ -730,11 +743,6 @@ interface FenceOptions {
| "toml"
| string
/**
* Prepend each line with a line numbers. Helps with generating diffs.
*/
lineNumbers?: boolean
/**
* JSON schema identifier
*/
@ -775,6 +783,13 @@ interface DefOptions extends FenceOptions, ContextExpansionOptions, DataFilter {
ignoreEmpty?: boolean
}
/**
* Options for the `defDiff` command.
*/
interface DefDiffOptions
extends ContextExpansionOptions,
LineNumberingOptions {}
interface DefImagesOptions {
detail?: "high" | "low"
/**
@ -1096,14 +1111,14 @@ interface Parsers {
HTMLToText(
content: string | WorkspaceFile,
options?: HTMLToTextOptions
): string
): Promise<string>
/**
* Convert HTML to markdown
* @param content html string or file
* @param options
*/
HTMLToMarkdown(content: string | WorkspaceFile): string
HTMLToMarkdown(content: string | WorkspaceFile): Promise<string>
/**
* Extracts the contents of a zip archive file
@ -1264,17 +1279,238 @@ interface HTML {
convertTablesToJSON(
html: string,
options?: HTMLTableToJSONOptions
): object[][]
): Promise<object[][]>
/**
* Converts HTML markup to plain text
* @param html
*/
convertToText(html: string): string
convertToText(html: string): Promise<string>
/**
* Converts HTML markup to markdown
* @param html
*/
convertToMarkdown(html: string): string
convertToMarkdown(html: string): Promise<string>
}
interface GitHubOptions {
owner: string
repo: string
baseUrl?: string
auth?: string
ref?: string
refName?: 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
display_title: 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 GitHubCodeSearchResult {
name: string
path: string
sha: string
html_url: string
score: number
repository: string
}
interface GitHubWorkflow {
id: number
name: string
path: string
}
interface GitHubPaginationOptions {
page?: number
per_page?: number
}
interface GitHubFile extends WorkspaceFile {
type: "file" | "dir" | "submodule" | "symlink"
size: number
}
interface GitHub {
/**
* Gets connection information for octokit
*/
info(): Promise<GitHubOptions | undefined>
/**
* Lists workflows in a GitHub repository
*/
listWorkflows(options?: GitHubPaginationOptions): Promise<GitHubWorkflow[]>
/**
* Lists workflow runs for a given workflow
* @param workflowId
* @param options
*/
listWorkflowRuns(
workflow_id: string | number,
options?: {
branch?: string
event?: string
status?: GitHubWorkflowRunStatus
} & GitHubPaginationOptions
): Promise<GitHubWorkflowRun[]>
/**
* Downloads a GitHub Action workflow run log
* @param runId
*/
listWorkflowJobs(
runId: number,
options?: GitHubPaginationOptions
): Promise<GitHubWorkflowJob[]>
/**
* Lists issues for a given repository
* @param options
*/
listIssues(
options?: {
state?: "open" | "closed" | "all"
labels?: string
sort?: "created" | "updated" | "comments"
direction?: "asc" | "desc"
} & GitHubPaginationOptions
): Promise<GitHubIssue[]>
/**
* Lists comments for a given issue
* @param issue_number
* @param options
*/
listIssueComments(
issue_number: number,
options?: GitHubPaginationOptions
): Promise<GitHubComment[]>
/**
* Lists pull requests for a given repository
* @param options
*/
listPullRequests(
options?: {
state?: "open" | "closed" | "all"
sort?: "created" | "updated" | "popularity" | "long-running"
direction?: "asc" | "desc"
} & GitHubPaginationOptions
): Promise<GitHubPullRequest[]>
/**
* Lists comments for a given pull request
* @param pull_number
* @param options
*/
listPullRequestReviewComments(
pull_number: number,
options?: GitHubPaginationOptions
): Promise<GitHubComment[]>
/**
* Gets the content of a file from a GitHub repository
* @param filepath
* @param options
*/
getFile(
filepath: string,
/**
* commit sha, branch name or tag name
*/
ref: string
): Promise<WorkspaceFile>
/**
* Searches code in a GitHub repository
*/
searchCode(
query: string,
options?: GitHubPaginationOptions
): Promise<GitHubCodeSearchResult[]>
/**
* Lists branches in a GitHub repository
*/
listBranches(options?: GitHubPaginationOptions): Promise<string[]>
/**
* Lists tags in a GitHub repository
*/
listRepositoryLanguages(): Promise<Record<string, number>>
/**
* Lists tags in a GitHub repository
*/
getRepositoryContent(
path?: string,
options?: {
ref?: string
glob?: string
downloadContent?: boolean
maxDownloadSize?: number
type?: (typeof GitHubFile)["type"]
}
): Promise<GitHubFile[]>
}
interface MD {
@ -1329,11 +1565,23 @@ interface INI {
stringify(value: any): string
}
interface CSVStringifyOptions {
delimiter?: string
header?: boolean
}
/**
* Interface representing CSV operations.
*/
interface CSV {
/**
* Parses a CSV string to an array of objects
* @param text
* @param options
* 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 ','.
* @param options.headers - An array of headers to use. If not provided, headers will be inferred from the first row.
* @returns An array of objects representing the parsed CSV data.
*/
parse(
text: string,
@ -1344,9 +1592,22 @@ interface CSV {
): object[]
/**
* Converts an array of object that represents a data table to a markdown table
* @param csv
* @param options
* 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
/**
* 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
}
@ -1512,7 +1773,7 @@ interface FileOutputOptions {
}
interface FileOutput {
pattern: string
pattern: string[]
description?: string
options?: FileOutputOptions
}
@ -1556,11 +1817,21 @@ interface ChatTurnGenerationContext {
options?: ImportTemplateOptions
): void
writeText(body: Awaitable<string>, options?: WriteTextOptions): void
assistant(
text: Awaitable<string>,
options?: Omit<WriteTextOptions, "assistant">
): void
$(strings: TemplateStringsArray, ...args: any[]): PromptTemplateString
fence(body: StringLike, options?: FenceOptions): void
def(
name: string,
body: string | WorkspaceFile | WorkspaceFile[] | ShellOutput | Fenced,
body:
| string
| WorkspaceFile
| WorkspaceFile[]
| ShellOutput
| Fenced
| RunPromptResult,
options?: DefOptions
): string
defData(
@ -1568,6 +1839,12 @@ interface ChatTurnGenerationContext {
data: object[] | object,
options?: DefDataOptions
): string
defDiff<T extends string | WorkspaceFile>(
name: string,
left: T,
right: T,
options?: DefDiffOptions
): string
console: PromptGenerationConsole
}
@ -1605,7 +1882,7 @@ interface ChatGenerationContext extends ChatTurnGenerationContext {
options?: ChatParticipantOptions
): void
defFileOutput(
pattern: string,
pattern: string | string[],
description?: string,
options?: FileOutputOptions
): void
@ -2255,7 +2532,7 @@ interface ShellHost {
}
interface ContainerPortBinding {
containerPort: OptionsOrString<"80/tcp">
containerPort: OptionsOrString<"8000/tcp">
hostPort: string | number
}
@ -2295,12 +2572,45 @@ interface ContainerOptions {
ports?: ElementOrArray<ContainerPortBinding>
}
interface PromiseQueue {
/**
* Adds a new promise to the queue
* @param fn
*/
add<Arguments extends unknown[], ReturnType>(
function_: (...arguments_: Arguments) => Awaitable<ReturnType>,
...arguments_: Arguments
): Promise<ReturnType>
/**
* Runs all the functions in the queue with limited concurrency
* @param fns
*/
all<T = any>(fns: (() => Awaitable<T>)[]): Promise<T[]>
/**
* Applies a function to all the values in the queue with limited concurrency
* @param values
* @param fn
*/
mapAll<T extends unknown, Arguments extends unknown[], ReturnType>(
values: T[],
fn: (value: T, ...arguments_: Arguments) => Awaitable<ReturnType>,
...arguments_: Arguments
): Promise<ReturnType[]>
}
interface PromptHost extends ShellHost {
/**
* Starts a container
* @param options container creation options
*/
container(options?: ContainerOptions): Promise<ContainerHost>
/**
* Create a new promise queue to run async functions with limited concurrency
*/
promiseQueue(concurrency: number): PromiseQueue
}
interface ContainerHost extends ShellHost {
@ -2439,7 +2749,13 @@ declare function fence(body: StringLike, options?: FenceOptions): void
*/
declare function def(
name: string,
body: string | WorkspaceFile | WorkspaceFile[] | ShellOutput | Fenced,
body:
| string
| WorkspaceFile
| WorkspaceFile[]
| ShellOutput
| Fenced
| RunPromptResult,
options?: DefOptions
): string
@ -2449,7 +2765,7 @@ declare function def(
* @param options expectations about the generated file content
*/
declare function defFileOutput(
pattern: string,
pattern: string | string[],
description?: string,
options?: FileOutputOptions
): void
@ -2548,6 +2864,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
@ -2592,6 +2913,19 @@ declare function defData(
options?: DefDataOptions
): string
/**
* Renders a diff of the two given values
* @param left
* @param right
* @param options
*/
declare function defDiff<T extends string | WorkspaceFile>(
name: string,
left: T,
right: T,
options?: DefDiffOptions
): string
/**
* Cancels the current prompt generation/execution with the given reason.
* @param reason