From 3b1ef926fa5099917b8dd8d2247ef8a2832dde05 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Sat, 4 Jan 2025 18:55:29 +0000 Subject: [PATCH 1/5] support binary files --- packages/cli/src/run.ts | 3 + packages/cli/src/server.ts | 20 ++-- packages/core/package.json | 1 + packages/core/src/base64.ts | 4 + packages/core/src/binary.ts | 47 ++++++++ packages/core/src/file.ts | 39 ++++++- packages/core/src/generation.ts | 1 + packages/core/src/parser.ts | 46 -------- packages/core/src/pdf.ts | 10 +- packages/core/src/promptrunner.ts | 15 ++- packages/core/src/types/prompt_template.d.ts | 10 ++ packages/core/src/util.ts | 28 ----- packages/core/src/zip.ts | 9 +- packages/web/src/App.tsx | 109 ++++++++++--------- 14 files changed, 196 insertions(+), 146 deletions(-) create mode 100644 packages/core/src/base64.ts create mode 100644 packages/core/src/binary.ts diff --git a/packages/cli/src/run.ts b/packages/cli/src/run.ts index 769288c8f9..aa261ad078 100644 --- a/packages/cli/src/run.ts +++ b/packages/cli/src/run.ts @@ -141,6 +141,7 @@ export async function runScriptInternal( TraceOptions & CancellationOptions & { cli?: boolean + workspaceFiles?: WorkspaceFile[] infoCb?: (partialResponse: { text: string }) => void partialCb?: (progress: ChatCompletionsProgressReport) => void } @@ -148,6 +149,7 @@ export async function runScriptInternal( const { trace = new MarkdownTrace(), infoCb, partialCb } = options || {} let result: GenerationResult + const workspaceFiles = options.workspaceFiles const excludedFiles = options.excludedFiles const excludeGitIgnore = !!options.excludeGitIgnore const out = options.out @@ -261,6 +263,7 @@ export async function runScriptInternal( if (!script) throw new Error(`script ${scriptId} not found`) const fragment: Fragment = { files: Array.from(resolvedFiles), + workspaceFiles, } const vars = Array.isArray(options.vars) ? parseOptionsVars(options.vars, process.env) diff --git a/packages/cli/src/server.ts b/packages/cli/src/server.ts index e83f4ebcfd..2f11bd557d 100644 --- a/packages/cli/src/server.ts +++ b/packages/cli/src/server.ts @@ -428,35 +428,35 @@ export async function startServer(options: { // Create an HTTP server to handle basic requests. const httpServer = http.createServer(async (req, res) => { - const { url } = req + const { url, method } = req const route = url?.replace(/\?.*$/, "") res.setHeader("Cache-Control", "no-store") - if (route === "/") { + if (method === "GET" && route === "/") { res.setHeader("Content-Type", "text/html") res.setHeader("Cache-Control", "no-store") res.statusCode = 200 const filePath = join(__dirname, "index.html") const stream = createReadStream(filePath) stream.pipe(res) - } else if (route === "/built/markdown.css") { + } else if (method === "GET" && route === "/built/markdown.css") { res.setHeader("Content-Type", "text/css") res.statusCode = 200 const filePath = join(__dirname, "markdown.css") const stream = createReadStream(filePath) stream.pipe(res) - } else if (route === "/built/web.mjs") { + } else if (method === "GET" && route === "/built/web.mjs") { res.setHeader("Content-Type", "application/javascript") res.statusCode = 200 const filePath = join(__dirname, "web.mjs") const stream = createReadStream(filePath) stream.pipe(res) - } else if (route === "/built/web.mjs.map") { + } else if (method === "GET" && route === "/built/web.mjs.map") { res.setHeader("Content-Type", "text/json") res.statusCode = 200 const filePath = join(__dirname, "web.mjs.map") const stream = createReadStream(filePath) stream.pipe(res) - } else if (route === "/favicon.svg") { + } else if (method === "GET" && route === "/favicon.svg") { res.setHeader("Content-Type", "image/svg+xml") res.statusCode = 200 const filePath = join(__dirname, "favicon.svg") @@ -471,12 +471,14 @@ export async function startServer(options: { return } let response: ResponseStatus - if (route === "/api/version") response = serverVersion() - else if (route === "/api/scripts") { + if (method === "GET" && route === "/api/version") + response = serverVersion() + else if (method === "GET" && route === "/api/scripts") { response = await scriptList() - } else if (route === "/api/env") { + } else if (method === "GET" && route === "/api/env") { response = await serverEnv() } + if (response === undefined) { console.debug(`404: ${url}`) res.statusCode = 404 diff --git a/packages/core/package.json b/packages/core/package.json index 8f06d913c3..1bf5dcd477 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -29,6 +29,7 @@ "@octokit/plugin-retry": "^7.1.2", "@octokit/plugin-throttling": "^9.3.2", "@octokit/rest": "^21.0.2", + "@smithy/util-base64": "^3.0.0", "@tidyjs/tidy": "^2.5.2", "@types/diff": "^6.0.0", "@types/html-escaper": "^3.0.2", diff --git a/packages/core/src/base64.ts b/packages/core/src/base64.ts new file mode 100644 index 0000000000..f22be805ca --- /dev/null +++ b/packages/core/src/base64.ts @@ -0,0 +1,4 @@ +import { fromBase64 as _fromBase64, toBase64 as _toBase64 } from "@smithy/util-base64"; + +export const fromBase64 = _fromBase64; +export const toBase64 = _toBase64; \ No newline at end of file diff --git a/packages/core/src/binary.ts b/packages/core/src/binary.ts new file mode 100644 index 0000000000..387fbbe07e --- /dev/null +++ b/packages/core/src/binary.ts @@ -0,0 +1,47 @@ +import { DOCX_MIME_TYPE, PDF_MIME_TYPE, XLSX_MIME_TYPE } from "./constants" + +/** + * Determines if a given MIME type is binary. + * Checks against common and additional specified binary types. + * @param mimeType - The MIME type to check. + * @returns boolean - True if the MIME type is binary, otherwise false. + */ +export function isBinaryMimeType(mimeType: string) { + return ( + /^(image|audio|video)\//.test(mimeType) || // Common binary types + BINARY_MIME_TYPES.includes(mimeType) // Additional specified binary types + ) +} + +// List of known binary MIME types +const BINARY_MIME_TYPES = [ + // Documents + "application/pdf", + "application/msword", + "application/vnd.ms-excel", + "application/vnd.ms-powerpoint", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", // .docx + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", // .xlsx + "application/vnd.openxmlformats-officedocument.presentationml.presentation", // .pptx + + // Archives + "application/zip", + "application/x-rar-compressed", + "application/x-7z-compressed", + "application/x-tar", + "application/x-bzip", + "application/x-bzip2", + "application/x-gzip", + + // Executables and binaries + "application/octet-stream", // General binary type (often default for unknown binary files) + "application/x-msdownload", // Executables + "application/x-shockwave-flash", // SWF + "application/java-archive", // JAR (Java) + + // Others + "application/vnd.google-earth.kml+xml", // KML (though XML based, often treated as binary in context of HTTP) + "application/vnd.android.package-archive", // APK (Android package) + "application/x-iso9660-image", // ISO images + "application/vnd.apple.installer+xml", // Apple Installer Package (though XML, often handled as binary) +] \ No newline at end of file diff --git a/packages/core/src/file.ts b/packages/core/src/file.ts index 5ddd110280..9c4d04bad1 100644 --- a/packages/core/src/file.ts +++ b/packages/core/src/file.ts @@ -7,10 +7,10 @@ import { DOCXTryParse } from "./docx" import { readText } from "./fs" import { lookupMime } from "./mime" -import { isBinaryMimeType } from "./parser" +import { isBinaryMimeType } from "./binary" import { createFetch } from "./fetch" import { fileTypeFromBuffer } from "file-type" -import { toBase64 } from "./util" +import { fromBase64, toBase64 } from "./base64" import { host } from "./host" import { TraceOptions } from "./trace" import { parsePdf } from "./pdf" @@ -18,9 +18,12 @@ import { XLSXParse } from "./xlsx" import { CSVToMarkdown, CSVTryParse } from "./csv" import { CSV_REGEX, + DOCX_MIME_TYPE, DOCX_REGEX, HTTPS_REGEX, + PDF_MIME_TYPE, PDF_REGEX, + XLSX_MIME_TYPE, XLSX_REGEX, } from "./constants" import { UrlAdapter, defaultUrlAdapters } from "./urlAdapters" @@ -37,8 +40,23 @@ export async function resolveFileContent( options?: TraceOptions ) { const { trace } = options || {} - const { filename } = file + // decode known files + if (file.encoding === "base64") { + const bytes = fromBase64(file.content) + if (file.type === PDF_MIME_TYPE) { + const { content } = await parsePdf(bytes, options) + delete file.encoding + file.content = content + } else if (file.type === XLSX_MIME_TYPE) { + const sheets = await XLSXParse(bytes) + delete file.encoding + file.content = JSON.stringify(sheets, null, 2) + } + return file + } + + const { filename } = file // If file content is already available or filename is missing, return the file as is. if (file.content) return file if (!filename) return file @@ -68,32 +86,43 @@ export async function resolveFileContent( trace?.itemValue(`status`, `${resp.status}, ${resp.statusText}`) // Set file content based on response and adapter type - if (resp.ok) + if (resp.ok) { + file.type = resp.headers.get("Content-Type") file.content = adapter?.contentType === "application/json" ? adapter.adapter(await resp.json()) : await resp.text() + } } // Handle PDF files else if (PDF_REGEX.test(filename)) { const { content } = await parsePdf(filename, options) + file.type = PDF_MIME_TYPE file.content = content } // Handle DOCX files else if (DOCX_REGEX.test(filename)) { + file.type = DOCX_MIME_TYPE file.content = await DOCXTryParse(filename, options) } // Handle XLSX files else if (XLSX_REGEX.test(filename)) { const bytes = await host.readFile(filename) const sheets = await XLSXParse(bytes) + file.type = XLSX_MIME_TYPE file.content = JSON.stringify(sheets, null, 2) } // Handle other file types else { - const mime = lookupMime(filename) + const mime = file.type || lookupMime(filename) const isBinary = isBinaryMimeType(mime) + file.type = mime if (!isBinary) file.content = await readText(filename) + else { + const bytes: Uint8Array = await host.readFile(filename) + file.encoding = "base64" + file.content = toBase64(bytes) + } } return file diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index cd53f3f57e..13f0ff27c9 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -11,6 +11,7 @@ import { GenerationStats } from "./usage" // Represents a code fragment with associated files export interface Fragment { files: string[] // Array of file paths or names + workspaceFiles?: WorkspaceFile[] // Array of workspace files } // Options for configuring the generation process, extending multiple other options diff --git a/packages/core/src/parser.ts b/packages/core/src/parser.ts index 2f087b8c3d..e549c5418f 100644 --- a/packages/core/src/parser.ts +++ b/packages/core/src/parser.ts @@ -22,52 +22,6 @@ export function stringToPos(str: string): CharPosition { return [str.replace(/[^\n]/g, "").length, str.replace(/[^]*\n/, "").length] } -/** - * Determines if a given MIME type is binary. - * Checks against common and additional specified binary types. - * @param mimeType - The MIME type to check. - * @returns boolean - True if the MIME type is binary, otherwise false. - */ -export function isBinaryMimeType(mimeType: string) { - return ( - /^(image|audio|video)\//.test(mimeType) || // Common binary types - BINARY_MIME_TYPES.includes(mimeType) // Additional specified binary types - ) -} - -// List of known binary MIME types -const BINARY_MIME_TYPES = [ - // Documents - PDF_MIME_TYPE, - "application/msword", - "application/vnd.ms-excel", - "application/vnd.ms-powerpoint", - DOCX_MIME_TYPE, // .docx - XLSX_MIME_TYPE, // .xlsx - "application/vnd.openxmlformats-officedocument.presentationml.presentation", // .pptx - - // Archives - "application/zip", - "application/x-rar-compressed", - "application/x-7z-compressed", - "application/x-tar", - "application/x-bzip", - "application/x-bzip2", - "application/x-gzip", - - // Executables and binaries - "application/octet-stream", // General binary type (often default for unknown binary files) - "application/x-msdownload", // Executables - "application/x-shockwave-flash", // SWF - "application/java-archive", // JAR (Java) - - // Others - "application/vnd.google-earth.kml+xml", // KML (though XML based, often treated as binary in context of HTTP) - "application/vnd.android.package-archive", // APK (Android package) - "application/x-iso9660-image", // ISO images - "application/vnd.apple.installer+xml", // Apple Installer Package (though XML, often handled as binary) -] - /** * Parses a project based on provided script files. * Initializes a project, reads scripts, and updates with parsed templates. diff --git a/packages/core/src/pdf.ts b/packages/core/src/pdf.ts index 5641083f11..9e30e6fe49 100644 --- a/packages/core/src/pdf.ts +++ b/packages/core/src/pdf.ts @@ -222,11 +222,17 @@ function PDFPagesToString(pages: PDFPage[]) { * @returns A promise resolving to the parsed pages and concatenated content */ export async function parsePdf( - filename: string, + filenameOrBuffer: string | Uint8Array, options?: ParsePDFOptions & TraceOptions ): Promise<{ pages: PDFPage[]; content: string }> { const { filter } = options || {} - let { pages, ok } = await PDFTryParse(filename, undefined, options) + const filename = + typeof filenameOrBuffer === "string" ? filenameOrBuffer : undefined + const bytes = + typeof filenameOrBuffer === "string" + ? undefined + : (filenameOrBuffer as Uint8Array) + let { pages, ok } = await PDFTryParse(filename, bytes, options) if (!ok) return { pages: [], content: "" } // Apply filter if provided diff --git a/packages/core/src/promptrunner.ts b/packages/core/src/promptrunner.ts index f91b740425..0d46370f0a 100644 --- a/packages/core/src/promptrunner.ts +++ b/packages/core/src/promptrunner.ts @@ -24,7 +24,7 @@ import { resolveLanguageModel } from "./lm" * @param project The project context. * @param trace The markdown trace for logging. * @param template The prompt script template. - * @param frag The fragment containing files and metadata. + * @param fragment The fragment containing files and metadata. * @param vars The user-provided variables. * @returns An object containing resolved variables. */ @@ -32,15 +32,14 @@ async function resolveExpansionVars( project: Project, trace: MarkdownTrace, template: PromptScript, - frag: Fragment, + fragment: Fragment, vars: Record ) { const root = runtimeHost.projectFolder() const files: WorkspaceFile[] = [] - const fr = frag const templateFiles = arrayify(template.files) - const referenceFiles = fr.files.slice(0) + const referenceFiles = fragment.files.slice(0) const filenames = await expandFiles( referenceFiles?.length ? referenceFiles : templateFiles ) @@ -54,6 +53,14 @@ async function resolveExpansionVars( files.push(file) } + if (fragment.workspaceFiles?.length) + for (const wf of fragment.workspaceFiles) { + if (!files.find((f) => f.filename === wf.filename)) { + await resolveFileContent(wf) + files.push(wf) + } + } + // Parse and obtain attributes from prompt parameters const attrs = parsePromptParameters(project, template, vars) const secrets: Record = {} diff --git a/packages/core/src/types/prompt_template.d.ts b/packages/core/src/types/prompt_template.d.ts index 6f23f4bbfe..bc36749c78 100644 --- a/packages/core/src/types/prompt_template.d.ts +++ b/packages/core/src/types/prompt_template.d.ts @@ -539,6 +539,16 @@ interface WorkspaceFile { */ filename: string + /** + * Content mime-type if known + */ + type?: string + + /** + * Encoding of the content + */ + encoding?: 'base64' + /** * Content of the file. */ diff --git a/packages/core/src/util.ts b/packages/core/src/util.ts index 97b7f3378f..5e1037b9ad 100644 --- a/packages/core/src/util.ts +++ b/packages/core/src/util.ts @@ -133,34 +133,6 @@ export function utf8Decode(buf: Uint8Array) { return host.createUTF8Decoder().decode(buf) } -// this will take lower 8 bits from each character -export function stringToUint8Array(input: string) { - const len = input.length - const res = new Uint8Array(len) - for (let i = 0; i < len; ++i) res[i] = input.charCodeAt(i) & 0xff - return res -} - -export function uint8ArrayToString(input: ArrayLike) { - const len = input.length - let res = "" - for (let i = 0; i < len; ++i) res += String.fromCharCode(input[i]) - return res -} - -declare var Buffer: any -export function fromBase64(encoded: string): Uint8Array { - if (typeof Buffer == "function" && typeof Buffer.from == "function") - return new Uint8Array(Buffer.from(encoded, "base64")) - else return stringToUint8Array(atob(encoded)) -} - -export function toBase64(data: Uint8Array): string { - if (typeof Buffer == "function" && typeof Buffer.from == "function") - return Buffer.from(data).toString("base64") - else return btoa(uint8ArrayToString(data)) -} - export function dotGenaiscriptPath(...segments: string[]) { return host.resolvePath( host.projectFolder(), diff --git a/packages/core/src/zip.ts b/packages/core/src/zip.ts index b7ee22cd67..adbc96ec53 100644 --- a/packages/core/src/zip.ts +++ b/packages/core/src/zip.ts @@ -1,8 +1,9 @@ import { unzipSync } from "fflate" import { lookupMime } from "./mime" -import { isBinaryMimeType } from "./parser" +import { isBinaryMimeType } from "./binary" import { host } from "./host" import { isGlobMatch } from "./glob" +import { toBase64 } from "./base64" export async function unzip( data: Uint8Array, @@ -20,7 +21,11 @@ export async function unzip( return Object.entries(res).map(([filename, data]) => { const mime = lookupMime(filename) if (isBinaryMimeType(mime)) - return { filename } // TODO bytes support + return { + filename, + encoding: "base64", + content: toBase64(data), + } // bytes support else return { filename, content: decoder.decode(data) } }) } diff --git a/packages/web/src/App.tsx b/packages/web/src/App.tsx index d76a06947b..348ba8eac0 100644 --- a/packages/web/src/App.tsx +++ b/packages/web/src/App.tsx @@ -53,6 +53,8 @@ import prettyBytes from "pretty-bytes" import { renderMessagesToMarkdown } from "../../core/src/chatrender" import { stringify as YAMLStringify } from "yaml" import { fenceMD } from "../../core/src/mkmd" +import { isBinaryMimeType } from "../../core/src/binary" +import { toBase64 } from "../../core/src/base64" const urlParams = new URLSearchParams(window.location.hash) const apiKey = urlParams.get("api-key") @@ -92,6 +94,7 @@ class RunClient extends EventTarget { constructor( readonly script: string, readonly files: string[], + readonly workspaceFiles: WorkspaceFile[], readonly options: any ) { super() @@ -109,7 +112,10 @@ class RunClient extends EventTarget { runId: this.runId, script, files: this.files, - options: this.options, + options: { + ...(this.options || {}), + workspaceFiles: this.workspaceFiles, + }, } satisfies PromptScriptStart) ) }, @@ -323,7 +329,13 @@ const RunnerContext = createContext<{ } | null>(null) function RunnerProvider({ children }: { children: React.ReactNode }) { - const { scriptid, files = [], options, parameters } = useApi() + const { + scriptid, + files = [], + importedFiles = [], + options, + parameters, + } = useApi() const [runner, setRunner] = useState(undefined) useEffect(() => { @@ -331,12 +343,32 @@ function RunnerProvider({ children }: { children: React.ReactNode }) { setRunner(undefined) }, [scriptid]) - const run = () => { + const run = async () => { runner?.close() if (!scriptid) return - console.log(`run: start ${scriptid}`, { files, parameters, options }) - const client = new RunClient(scriptid, files.slice(0), { + console.log(`run: start ${scriptid}`, { + files, + importedFiles, + parameters, + options, + }) + const workspaceFiles = await Promise.all( + importedFiles.map(async (f) => { + const binary = isBinaryMimeType(f.type) + const buffer = binary + ? new Uint8Array(await f.arrayBuffer()) + : undefined + const content = buffer ? toBase64(buffer) : await f.text() + return { + filename: f.path || f.relativePath, + type: f.type, + encoding: binary ? "base64" : undefined, + content, + } satisfies WorkspaceFile + }) + ) + const client = new RunClient(scriptid, files.slice(0), workspaceFiles, { parameters, ...options, }) @@ -863,17 +895,6 @@ function toStringList(...token: (string | undefined | null)[]) { return md } -function ScriptFormHelper() { - const script = useScript() - return ( - - {script - ? toStringList(script.title, script.description) - : `Select a GenAIScript to run`} - - ) -} - function FilesDropZone() { const { acceptedFiles, isDragActive, getRootProps, getInputProps } = useDropzone() @@ -883,7 +904,7 @@ function FilesDropZone() { return ( <> - + {!!acceptedFiles?.length && ( Files - - - - {isDragActive - ? `Drop the files here ...` - : `Drag 'n' drop some files here, or click to select files`} - - - - - ) -} - -function FilesForm() { - const { files, importedFiles } = useApi() - - const n = (files?.length || 0) + (importedFiles?.length || 0) - return ( - - {n > 0 && ( - - {n} - )} - - - + + + + {isDragActive + ? `Drop the files here ...` + : `Drag 'n' drop some files here, or click to select files`} + + + ) } @@ -964,6 +968,7 @@ function GlobsForm() { function ScriptSelect() { const scripts = useScripts() const { scriptid, setScriptid } = useApi() + const script = useScript() return ( @@ -989,7 +994,11 @@ function ScriptSelect() { ))} - + {script && ( + + {toStringList(script.title, script.description)} + + )} ) } @@ -999,6 +1008,7 @@ function ScriptForm() { + @@ -1133,7 +1143,6 @@ function RunForm() { return (
- From 3c01b9557cd297d4a7a740303e7f1a5788b5200a Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Sat, 4 Jan 2025 19:28:33 +0000 Subject: [PATCH 2/5] =?UTF-8?q?refactor:=20=E2=99=BB=EF=B8=8F=20remove=20r?= =?UTF-8?q?edundant=20check=20and=20add=20required=20prop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/web/src/App.tsx | 49 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/packages/web/src/App.tsx b/packages/web/src/App.tsx index 348ba8eac0..74f2e18f98 100644 --- a/packages/web/src/App.tsx +++ b/packages/web/src/App.tsx @@ -904,31 +904,29 @@ function FilesDropZone() { return ( <> - {!!acceptedFiles?.length && ( - - Files - { - e.preventDefault() - const target = e.target as HTMLSelectElement - const value = target.value as string - setImportedFiles( - acceptedFiles.filter((f) => f.path === value) - ) - }} - > - {acceptedFiles.map((file) => ( - - {file.name} ({prettyBytes(file.size)}) - - ))} - - - )} + + Files + { + e.preventDefault() + const target = e.target as HTMLSelectElement + const value = target.value as string + setImportedFiles( + acceptedFiles.filter((f) => f.path === value) + ) + }} + > + {acceptedFiles.map((file) => ( + + {file.name} ({prettyBytes(file.size)}) + + ))} + + { From 853eaa0499d3571f5d82769d9012b1dfcd4a0b7a Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Sat, 4 Jan 2025 19:32:40 +0000 Subject: [PATCH 3/5] updated deps --- THIRD_PARTY_LICENSES.md | 48 +- docs/package.json | 4 +- .../content/docs/reference/cli/commands.md | 578 ------------------ docs/yarn.lock | 144 ++--- packages/cli/package.json | 12 +- packages/core/package.json | 12 +- packages/sample/package.json | 2 +- packages/web/package.json | 2 +- slides/yarn.lock | 154 ++--- yarn.lock | 204 ++++--- 10 files changed, 322 insertions(+), 838 deletions(-) diff --git a/THIRD_PARTY_LICENSES.md b/THIRD_PARTY_LICENSES.md index 55f07b785d..fa9df0ab4f 100644 --- a/THIRD_PARTY_LICENSES.md +++ b/THIRD_PARTY_LICENSES.md @@ -3,7 +3,7 @@ https://www.npmjs.com/package/generate-license-file The following npm package may be included in this product: - - pdfjs-dist@4.9.155 + - pdfjs-dist@4.10.38 This package contains the following license: @@ -1098,9 +1098,11 @@ Apache License The following npm packages may be included in this product: + - @grpc/grpc-js@1.12.5 + - @grpc/proto-loader@0.7.13 - detect-libc@2.0.3 - - docker-modem@5.0.3 - - dockerode@4.0.2 + - docker-modem@5.0.5 + - dockerode@4.0.3 These packages each contain the following license: @@ -2828,7 +2830,7 @@ The following npm packages may be included in this product: - @types/node-fetch@2.6.12 - @types/node@16.9.1 - @types/node@18.19.69 - - @types/node@22.10.4 + - @types/node@22.10.5 - @types/turndown@5.0.5 - @types/uuid@9.0.8 - @types/yauzl@2.10.3 @@ -6909,6 +6911,7 @@ THE SOFTWARE. The following npm packages may be included in this product: + - lodash.camelcase@4.3.0 - lodash.get@4.4.2 - lodash.includes@4.3.0 - lodash.isinteger@4.0.4 @@ -8754,6 +8757,36 @@ SOFTWARE. ----------- +The following npm package may be included in this product: + + - @js-sdsl/ordered-map@4.4.2 + +This package contains the following license: + +MIT License + +Copyright (c) 2021 Zilong Yao + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------- + The following npm package may be included in this product: - simple-xml-to-json@1.2.3 @@ -8906,7 +8939,7 @@ SOFTWARE. The following npm package may be included in this product: - - fast-content-type-parse@2.0.0 + - fast-content-type-parse@2.0.1 This package contains the following license: @@ -8969,7 +9002,7 @@ SOFTWARE. The following npm package may be included in this product: - - @modelcontextprotocol/sdk@1.0.4 + - @modelcontextprotocol/sdk@1.1.0 This package contains the following license: @@ -10410,7 +10443,7 @@ THE SOFTWARE. The following npm packages may be included in this product: - @octokit/auth-token@5.1.1 - - @octokit/core@6.1.2 + - @octokit/core@6.1.3 - @octokit/request-error@6.1.6 These packages each contain the following license: @@ -10627,6 +10660,7 @@ THE SOFTWARE. The following npm packages may be included in this product: + - uuid@10.0.0 - uuid@8.3.2 - uuid@9.0.1 diff --git a/docs/package.json b/docs/package.json index f0695e8e76..8ea329dc06 100644 --- a/docs/package.json +++ b/docs/package.json @@ -22,11 +22,11 @@ "devDependencies": { "@astrojs/check": "^0.9.4", "@astrojs/starlight": "^0.30.3", - "astro": "^5.1.1", + "astro": "^5.1.2", "rehype-mermaid": "^3.0.0", "starlight-blog": "^0.16.1", "starlight-links-validator": "^0.14.1", - "starlight-package-managers": "^0.8.1", + "starlight-package-managers": "^0.9.0", "typescript": "5.7.2", "zx": "^8.3.0" } diff --git a/docs/src/content/docs/reference/cli/commands.md b/docs/src/content/docs/reference/cli/commands.md index 24f21bad3f..e69de29bb2 100644 --- a/docs/src/content/docs/reference/cli/commands.md +++ b/docs/src/content/docs/reference/cli/commands.md @@ -1,578 +0,0 @@ ---- -title: Commands -description: List of all CLI commands -sidebar: - order: 100 ---- - - -A full list of the CLI command and its respective help text. - -## `run` - -``` -Usage: genaiscript run [options]