@poe-platform/safe-bash 0.1.789 → 0.1.790
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/image-ast/index.browser.js +147 -80
- package/dist/image-ast/index.js +147 -80
- package/dist/mp4-ast/mp4.d.ts +2 -0
- package/dist/pdf-ast/cos/parser.d.ts +1 -0
- package/dist/pdf-ast/cos/security.d.ts +2 -0
- package/dist/pdf-ast/cos/writer.d.ts +1 -0
- package/dist/pdf-ast/document.d.ts +3 -0
- package/dist/pdf-ast/edit/forms.d.ts +1 -0
- package/dist/pdf-ast/index.js +171 -82
- package/dist/safe-bash/chunks/{chunk-L5QQLNTO.js → chunk-22PI65AH.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-KHJGUF2W.js → chunk-2TAGYMPK.js} +43 -42
- package/dist/safe-bash/chunks/{chunk-D4PHJK4T.js → chunk-2W4HTMEK.js} +52 -48
- package/dist/safe-bash/chunks/{chunk-FFZXP6ZC.js → chunk-3M7L7XU2.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-XNODZRVD.js → chunk-3QAO6UYS.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-YPETOVQU.js → chunk-3VKFK3NF.js} +2 -2
- package/dist/safe-bash/chunks/chunk-5OST7NOX.js +42 -0
- package/dist/safe-bash/chunks/{chunk-KEBSX2AX.js → chunk-6HLURHVU.js} +2 -2
- package/dist/safe-bash/chunks/chunk-DYEUZE6Z.js +19 -0
- package/dist/safe-bash/chunks/{chunk-T2TGCHKE.js → chunk-FM3WBSZT.js} +2 -2
- package/dist/safe-bash/chunks/chunk-GAYRKQM6.js +22 -0
- package/dist/safe-bash/chunks/{chunk-Q45QCA4J.js → chunk-I3KSESCR.js} +0 -7
- package/dist/safe-bash/chunks/{chunk-OSKDIBQS.js → chunk-JLIMK5TD.js} +1 -1
- package/dist/safe-bash/chunks/{chunk-2AYZCT5X.js → chunk-JQ2FAJJT.js} +27 -23
- package/dist/safe-bash/chunks/{chunk-QA3NVP43.js → chunk-JRE6Z3T7.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-DC5EHLKS.js → chunk-NDIL6T7Y.js} +5 -5
- package/dist/safe-bash/chunks/{chunk-747G42FY.js → chunk-OPR4UAIT.js} +2 -2
- package/dist/safe-bash/chunks/chunk-OSMQCYSP.js +19 -0
- package/dist/safe-bash/chunks/chunk-OYB332PQ.js +17 -0
- package/dist/safe-bash/chunks/{chunk-X5ZCECM6.js → chunk-QTIH2AFE.js} +77 -69
- package/dist/safe-bash/chunks/{chunk-CTUHLNJM.js → chunk-SBESXWT2.js} +43 -44
- package/dist/safe-bash/chunks/{chunk-4FDQJUFW.js → chunk-SDEPGTOF.js} +1 -1
- package/dist/safe-bash/chunks/chunk-UZU5BIJI.js +32 -0
- package/dist/safe-bash/chunks/{chunk-BI6JV62X.js → chunk-VCCMROTL.js} +7 -10
- package/dist/safe-bash/chunks/chunk-W47GHRRF.js +13 -0
- package/dist/safe-bash/chunks/{chunk-NPMQWZUZ.js → chunk-WS7KZIUM.js} +2 -2
- package/dist/safe-bash/chunks/{chunk-3PZYHMGM.js → chunk-YYAERCWS.js} +7 -7
- package/dist/safe-bash/chunks/{chunk-5U7JECDB.js → chunk-ZPGVEUKF.js} +8 -7
- package/dist/safe-bash/chunks/{csvkit-K55OYAQC.js → csvkit-USUJG62I.js} +65 -11
- package/dist/safe-bash/chunks/{ffmpeg-BEFTQ6DZ.js → ffmpeg-KRGG5DLH.js} +21 -10
- package/dist/safe-bash/chunks/{gh-HQWOWLWE.js → gh-UCFDUZCX.js} +16 -8
- package/dist/safe-bash/chunks/{git-HO7WDPHZ.js → git-LPAF6KDG.js} +7 -9
- package/dist/safe-bash/chunks/{imagemagick-53BMHH6D.js → imagemagick-KGREKK4G.js} +38 -7
- package/dist/safe-bash/chunks/{implementation-QUTAAYMT.js → implementation-FXDRYS5A.js} +34 -8
- package/dist/safe-bash/chunks/{pdfimages-4OYI6FLG.js → pdfimages-UADCF4G4.js} +12 -8
- package/dist/safe-bash/chunks/{pdfinfo-I7U6TQPP.js → pdfinfo-O7UWPF4W.js} +38 -13
- package/dist/safe-bash/chunks/{pdftk-SUA6FMHI.js → pdftk-AERXIJTN.js} +13 -8
- package/dist/safe-bash/chunks/{pdftoppm-4C5DGEWX.js → pdftoppm-L466JQKI.js} +17 -10
- package/dist/safe-bash/chunks/{pdftotext-Y4WI225Y.js → pdftotext-SUSI4WXS.js} +19 -9
- package/dist/safe-bash/chunks/{qpdf-IORB4RV5.js → qpdf-YL24KVRH.js} +14 -8
- package/dist/safe-bash/chunks/{sips-WHAMJFEU.js → sips-QXEQZERX.js} +14 -7
- package/dist/safe-bash/chunks/{soffice-SYEK6WJS.js → soffice-TBITRML3.js} +16 -8
- package/dist/safe-bash/chunks/{wkhtmltopdf-ZIICWJLF.js → wkhtmltopdf-NJA2THRC.js} +27 -7
- package/dist/safe-bash/command-chunks/chunk-2C5BEBPY.js +1388 -0
- package/dist/safe-bash/command-chunks/{chunk-2VTMZTV3.js → chunk-2EXV2ZLV.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-UJOO6DKY.js → chunk-6EASC5EC.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-ZF3ZVGQC.js → chunk-7JRITHKW.js} +150 -80
- package/dist/safe-bash/{chunks/chunk-LD76P7AG.js → command-chunks/chunk-AKDMCNX4.js} +74 -39
- package/dist/safe-bash/command-chunks/{chunk-6F7QJMJ3.js → chunk-CBDVLMJB.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-H4LWTITX.js +169 -0
- package/dist/safe-bash/command-chunks/chunk-I2MQNBGR.js +145 -0
- package/dist/safe-bash/command-chunks/{chunk-5GRLAARV.js → chunk-IOXI5ZAJ.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-XNHSCU6I.js → chunk-MDPIOQUD.js} +6 -6
- package/dist/safe-bash/command-chunks/chunk-QI4MGIN6.js +6 -0
- package/dist/safe-bash/command-chunks/chunk-QTYZAWSB.js +91 -0
- package/dist/safe-bash/command-chunks/chunk-SNK7K3XW.js +90 -0
- package/dist/safe-bash/command-chunks/chunk-T5OLGM43.js +314 -0
- package/dist/safe-bash/command-chunks/chunk-TB7IFMUZ.js +802 -0
- package/dist/safe-bash/command-chunks/{chunk-AT6ZSOE6.js → chunk-TPPBPIWL.js} +1 -1
- package/dist/safe-bash/command-chunks/chunk-VMK4XVKO.js +82 -0
- package/dist/safe-bash/command-chunks/chunk-VNSJKXDU.js +130 -0
- package/dist/safe-bash/command-chunks/chunk-YFNTMH6Z.js +6 -0
- package/dist/safe-bash/commands/csplit/index.browser.js +2 -2
- package/dist/safe-bash/commands/docx/index.browser.js +2 -2
- package/dist/safe-bash/commands/factor/index.browser.js +2 -2
- package/dist/safe-bash/commands/getopt/index.browser.js +2 -2
- package/dist/safe-bash/commands/hexdump/index.browser.js +2 -2
- package/dist/safe-bash/commands/iconv/index.browser.js +2 -2
- package/dist/safe-bash/commands/line-endings/index.browser.js +2 -2
- package/dist/safe-bash/commands/llm/command.d.ts +1 -4
- package/dist/safe-bash/commands/llm/command.js +1 -248
- package/dist/safe-bash/commands/llm/elevenlabs-stream.d.ts +1 -2
- package/dist/safe-bash/commands/llm/elevenlabs-stream.js +1 -117
- package/dist/safe-bash/commands/llm/elevenlabs.d.ts +1 -15
- package/dist/safe-bash/commands/llm/elevenlabs.js +1 -123
- package/dist/safe-bash/commands/llm/index.browser.js +20 -15
- package/dist/safe-bash/commands/llm/index.d.ts +1 -6
- package/dist/safe-bash/commands/llm/index.js +1 -4
- package/dist/safe-bash/commands/llm/mime.d.ts +1 -2
- package/dist/safe-bash/commands/llm/mime.js +1 -136
- package/dist/safe-bash/commands/llm/openai-http.d.ts +1 -8
- package/dist/safe-bash/commands/llm/openai-http.js +1 -143
- package/dist/safe-bash/commands/llm/openai-sse.d.ts +1 -3
- package/dist/safe-bash/commands/llm/openai-sse.js +1 -78
- package/dist/safe-bash/commands/llm/openai.d.ts +1 -14
- package/dist/safe-bash/commands/llm/openai.js +1 -288
- package/dist/safe-bash/commands/llm/providers/elevenlabs.d.ts +1 -1
- package/dist/safe-bash/commands/llm/providers/elevenlabs.js +1 -1
- package/dist/safe-bash/commands/llm/providers/index.browser.js +6 -6
- package/dist/safe-bash/commands/llm/providers/index.d.ts +1 -3
- package/dist/safe-bash/commands/llm/providers/index.js +1 -2
- package/dist/safe-bash/commands/llm/providers/openai.d.ts +1 -1
- package/dist/safe-bash/commands/llm/providers/openai.js +1 -1
- package/dist/safe-bash/commands/llm/providers/shared.d.ts +1 -23
- package/dist/safe-bash/commands/llm/providers/shared.js +1 -65
- package/dist/safe-bash/commands/llm/service.d.ts +1 -37
- package/dist/safe-bash/commands/llm/service.js +1 -151
- package/dist/safe-bash/commands/llm/types.d.ts +1 -52
- package/dist/safe-bash/commands/llm/types.js +1 -1
- package/dist/safe-bash/commands/mdq/index.browser.js +3 -3
- package/dist/safe-bash/commands/media/index.browser.js +1 -1
- package/dist/safe-bash/commands/network/index.browser.js +9 -9
- package/dist/safe-bash/commands/network/types.d.ts +2 -40
- package/dist/safe-bash/commands/node/index.browser.js +6 -8
- package/dist/safe-bash/commands/op/index.browser.js +3 -3
- package/dist/safe-bash/commands/op/index.js +12 -28
- package/dist/safe-bash/commands/pr/index.browser.js +2 -2
- package/dist/safe-bash/commands/python/index.browser.js +8 -8
- package/dist/safe-bash/commands/python/worker.browser.js +2 -2
- package/dist/safe-bash/commands/tsort/index.browser.js +2 -2
- package/dist/safe-bash/commands/xml/index.browser.js +2 -2
- package/dist/safe-bash/commands/yq/index.browser.js +3 -3
- package/dist/safe-bash/core.browser.js +9775 -10975
- package/dist/safe-bash/core.d.ts +0 -1
- package/dist/safe-bash/core.js +0 -1
- package/dist/safe-bash/jobs.browser.js +5 -4
- package/dist/safe-bash/optional-host.browser.js +61 -88
- package/dist/safe-bash/shell/runtime.js +34 -12
- package/dist/safe-bash/yq-browser/index.js +1 -1
- package/dist/safe-bash-command-ffmpeg/index.js +8130 -8011
- package/dist/safe-bash-command-git/git_rust.wasm +0 -0
- package/dist/safe-bash-command-git/wasm.generated.js +1 -1
- package/dist/safe-bash-command-imagemagick/index.js +2 -2
- package/dist/safe-bash-command-llm/LICENSE +21 -0
- package/dist/safe-bash-command-llm/command.d.ts +5 -0
- package/dist/safe-bash-command-llm/command.js +14 -0
- package/dist/safe-bash-command-llm/configuration.d.ts +18 -0
- package/dist/safe-bash-command-llm/elevenlabs-stream.d.ts +2 -0
- package/dist/safe-bash-command-llm/elevenlabs-stream.js +7 -0
- package/dist/safe-bash-command-llm/elevenlabs.d.ts +15 -0
- package/dist/safe-bash-command-llm/elevenlabs.js +10 -0
- package/dist/safe-bash-command-llm/index.d.ts +10 -0
- package/dist/safe-bash-command-llm/index.js +46 -0
- package/dist/safe-bash-command-llm/mime.d.ts +2 -0
- package/dist/safe-bash-command-llm/mime.js +9 -0
- package/dist/safe-bash-command-llm/model-options.d.ts +3 -0
- package/dist/safe-bash-command-llm/openai-http.d.ts +8 -0
- package/dist/safe-bash-command-llm/openai-http.js +17 -0
- package/dist/safe-bash-command-llm/openai-sse.d.ts +3 -0
- package/dist/safe-bash-command-llm/openai-sse.js +8 -0
- package/dist/safe-bash-command-llm/openai.d.ts +14 -0
- package/dist/safe-bash-command-llm/openai.js +12 -0
- package/dist/safe-bash-command-llm/providers/elevenlabs.d.ts +1 -0
- package/dist/safe-bash-command-llm/providers/elevenlabs.js +11 -0
- package/dist/safe-bash-command-llm/providers/index.d.ts +3 -0
- package/dist/safe-bash-command-llm/providers/index.js +24 -0
- package/dist/safe-bash-command-llm/providers/openai.d.ts +1 -0
- package/dist/safe-bash-command-llm/providers/openai.js +13 -0
- package/dist/safe-bash-command-llm/providers/shared.d.ts +23 -0
- package/dist/safe-bash-command-llm/providers/shared.js +13 -0
- package/dist/safe-bash-command-llm/schemas.d.ts +2 -0
- package/dist/safe-bash-command-llm/service.d.ts +42 -0
- package/dist/safe-bash-command-llm/service.js +9 -0
- package/dist/safe-bash-command-llm/templates.d.ts +27 -0
- package/dist/safe-bash-command-llm/types.d.ts +87 -0
- package/dist/safe-bash-command-llm/types.js +6 -0
- package/dist/safe-bash-command-mmdc/command.d.ts +4 -0
- package/dist/safe-bash-command-mmdc/index.d.ts +1 -1
- package/dist/safe-bash-command-mmdc/index.js +7084 -6687
- package/dist/safe-bash-command-mmdc/layout.d.ts +1 -0
- package/dist/safe-bash-command-mmdc/parser.d.ts +1 -0
- package/dist/safe-bash-command-mmdc/png.d.ts +3 -0
- package/dist/safe-bash-command-mmdc/raster.d.ts +1 -0
- package/dist/safe-bash-command-pandoc/command.js +3 -3
- package/dist/safe-bash-command-pandoc/index.js +3 -3
- package/dist/safe-bash-command-pdfimages/index.js +147 -80
- package/dist/safe-bash-command-pdfinfo/index.js +147 -80
- package/dist/safe-bash-command-pdftk/index.js +147 -80
- package/dist/safe-bash-command-pdftoppm/index.js +147 -80
- package/dist/safe-bash-command-pdftotext/index.js +147 -80
- package/dist/safe-bash-command-qpdf/index.js +174 -101
- package/dist/safe-bash-command-sips/index.js +2 -2
- package/dist/safe-bash-command-soffice/index.js +1 -1
- package/dist/safe-bash-command-ssconvert/index.js +147 -80
- package/dist/safe-bash-command-wkhtmltopdf/index.js +147 -80
- package/dist/safe-bash-contracts/default-executor.d.ts +5 -0
- package/dist/safe-bash-contracts/default-executor.js +37 -0
- package/dist/safe-bash-contracts/http.d.ts +41 -0
- package/dist/safe-bash-contracts/http.js +6 -0
- package/dist/safe-bash-io-engine/commands/search/requirements.js +3 -3
- package/dist/safe-bash-io-engine/commands/text-programs/shared.js +3 -3
- package/dist/safe-bash-io-engine/gnu-information.d.ts +1 -1
- package/dist/safe-bash-io-engine/gnu-information.js +1 -1
- package/dist/safe-bash-io-engine/internal.js +2 -2
- package/dist/safe-bash-query-engine/index.js +3 -3
- package/dist/safe-bash-query-engine/interpreter.js +2 -2
- package/dist/safe-bash-query-engine/query-core.js +3 -3
- package/package.json +2 -2
- package/dist/safe-bash/chunks/chunk-2G2T5MEM.js +0 -14
- package/dist/safe-bash/chunks/chunk-2MUJ7RLZ.js +0 -409
- package/dist/safe-bash/chunks/chunk-GJWUEOT6.js +0 -14
- package/dist/safe-bash/chunks/chunk-H7MMJS26.js +0 -37
- package/dist/safe-bash/chunks/chunk-LAPF2XE6.js +0 -14
- package/dist/safe-bash/chunks/chunk-S2LSZFZ6.js +0 -758
- package/dist/safe-bash/chunks/chunk-T3VDYWKZ.js +0 -21
- package/dist/safe-bash/chunks/chunk-VUVKC6HV.js +0 -81
- package/dist/safe-bash/chunks/chunk-VYW4Q6KF.js +0 -12
- package/dist/safe-bash/command-chunks/{chunk-BJ6DGYJA.js → chunk-KNI4GRXF.js} +3 -3
|
@@ -28,8 +28,8 @@ import {
|
|
|
28
28
|
thresholdImage,
|
|
29
29
|
tintImage,
|
|
30
30
|
trimImage
|
|
31
|
-
} from "../safe-bash/command-chunks/chunk-
|
|
32
|
-
import "../safe-bash/command-chunks/chunk-
|
|
31
|
+
} from "../safe-bash/command-chunks/chunk-IOXI5ZAJ.js";
|
|
32
|
+
import "../safe-bash/command-chunks/chunk-7JRITHKW.js";
|
|
33
33
|
import {
|
|
34
34
|
init_buffer
|
|
35
35
|
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Poe Platform
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type CommandDefinition, type VirtualShellPlugin } from "../safe-bash-contracts/index.js";
|
|
2
|
+
import type { LlmCommandsOptions } from "./types.js";
|
|
3
|
+
export declare function createLlmCommand(options?: LlmCommandsOptions): CommandDefinition;
|
|
4
|
+
export declare function createLlmCommands(options?: LlmCommandsOptions): readonly CommandDefinition[];
|
|
5
|
+
export declare function llmCommands(options?: LlmCommandsOptions): VirtualShellPlugin;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createLlmCommand,
|
|
3
|
+
createLlmCommands,
|
|
4
|
+
llmCommands
|
|
5
|
+
} from "../safe-bash/command-chunks/chunk-2C5BEBPY.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-T5OLGM43.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-VMK4XVKO.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-AKDMCNX4.js";
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
10
|
+
export {
|
|
11
|
+
createLlmCommand,
|
|
12
|
+
createLlmCommands,
|
|
13
|
+
llmCommands
|
|
14
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type CommandContext } from "../safe-bash-contracts/index.js";
|
|
2
|
+
type Context = Pick<CommandContext, "fs" | "cwd" | "env" | "signal">;
|
|
3
|
+
type Options = Record<string, Record<string, string>>;
|
|
4
|
+
export interface LlmConfiguration {
|
|
5
|
+
readonly directory: string;
|
|
6
|
+
aliases(): Promise<Record<string, string>>;
|
|
7
|
+
resolveAlias(name: string): Promise<string>;
|
|
8
|
+
setAlias(name: string, model: string): Promise<void>;
|
|
9
|
+
removeAlias(name: string): Promise<void>;
|
|
10
|
+
defaultModel(): Promise<string | undefined>;
|
|
11
|
+
setDefaultModel(model: string): Promise<void>;
|
|
12
|
+
allModelOptions(): Promise<Options>;
|
|
13
|
+
modelOptions(model: string): Promise<Record<string, string>>;
|
|
14
|
+
setModelOption(model: string, name: string, value: string): Promise<void>;
|
|
15
|
+
clearModelOption(model: string, name?: string): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
export declare function createLlmConfiguration(context: Context): LlmConfiguration;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { HttpTransport } from "../safe-bash-contracts/http.js";
|
|
2
|
+
import type { LlmModel, LlmProvider } from "./types.js";
|
|
3
|
+
import { type LlmProviderLimits } from "./providers/shared.js";
|
|
4
|
+
export interface ElevenLabsModel extends LlmModel {
|
|
5
|
+
readonly endpoint: "tts" | "music";
|
|
6
|
+
readonly defaultVoiceId?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ElevenLabsProviderOptions {
|
|
9
|
+
readonly transport: HttpTransport;
|
|
10
|
+
readonly apiKey: string;
|
|
11
|
+
readonly baseUrl?: string;
|
|
12
|
+
readonly models: readonly ElevenLabsModel[];
|
|
13
|
+
readonly limits?: Partial<LlmProviderLimits>;
|
|
14
|
+
}
|
|
15
|
+
export declare function createElevenLabsProvider(options: ElevenLabsProviderOptions): LlmProvider;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createElevenLabsProvider
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-I2MQNBGR.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-VNSJKXDU.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-QTYZAWSB.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-AKDMCNX4.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
|
+
export {
|
|
9
|
+
createElevenLabsProvider
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { createLlmCommand, createLlmCommands, llmCommands } from "./command.js";
|
|
2
|
+
export { createLlmService, type LlmService, type LlmServiceOptions, type LlmServiceModel, type LlmStreamEvent, type LlmServiceRequest, type LlmServiceSourceRequest } from "./service.js";
|
|
3
|
+
export type { LlmInputSource, LlmSourceRequest, LlmModelOption, LlmOption, LlmCapability, LlmResponseMetadata, LlmEmbeddingRequest, LlmEmbeddingResponse, LlmLimits, LlmCommandsOptions, LlmProvider, LlmModel, LlmRequest } from "./types.js";
|
|
4
|
+
export { createOpenAiProvider, type OpenAiModel, type OpenAiProviderOptions } from "./openai.js";
|
|
5
|
+
export { createElevenLabsProvider, type ElevenLabsModel, type ElevenLabsProviderOptions } from "./elevenlabs.js";
|
|
6
|
+
export type { LlmProviderLimits } from "./providers/shared.js";
|
|
7
|
+
export { createLlmConfiguration, type LlmConfiguration } from "./configuration.js";
|
|
8
|
+
export { validateModelOptions } from "./model-options.js";
|
|
9
|
+
export { createLlmTemplateStore, evaluateLlmTemplate, validateLlmTemplateParameters, type LlmTemplate } from "./templates.js";
|
|
10
|
+
export { parseLlmSchemaDsl } from "./schemas.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createElevenLabsProvider
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-I2MQNBGR.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-VNSJKXDU.js";
|
|
5
|
+
import {
|
|
6
|
+
createOpenAiProvider
|
|
7
|
+
} from "../safe-bash/command-chunks/chunk-TB7IFMUZ.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-SNK7K3XW.js";
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-QTYZAWSB.js";
|
|
10
|
+
import {
|
|
11
|
+
createLlmCommand,
|
|
12
|
+
createLlmCommands,
|
|
13
|
+
createLlmConfiguration,
|
|
14
|
+
createLlmTemplateStore,
|
|
15
|
+
evaluateLlmTemplate,
|
|
16
|
+
llmCommands,
|
|
17
|
+
parseLlmSchemaDsl,
|
|
18
|
+
validateLlmTemplateParameters
|
|
19
|
+
} from "../safe-bash/command-chunks/chunk-2C5BEBPY.js";
|
|
20
|
+
import {
|
|
21
|
+
createLlmService,
|
|
22
|
+
validateModelOptions
|
|
23
|
+
} from "../safe-bash/command-chunks/chunk-T5OLGM43.js";
|
|
24
|
+
import "../safe-bash/command-chunks/chunk-VMK4XVKO.js";
|
|
25
|
+
import "../safe-bash/command-chunks/chunk-H4LWTITX.js";
|
|
26
|
+
import "../safe-bash/command-chunks/chunk-AKDMCNX4.js";
|
|
27
|
+
import {
|
|
28
|
+
init_buffer
|
|
29
|
+
} from "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
30
|
+
|
|
31
|
+
// packages/safe-bash-command-llm/dist/index.js
|
|
32
|
+
init_buffer();
|
|
33
|
+
export {
|
|
34
|
+
createElevenLabsProvider,
|
|
35
|
+
createLlmCommand,
|
|
36
|
+
createLlmCommands,
|
|
37
|
+
createLlmConfiguration,
|
|
38
|
+
createLlmService,
|
|
39
|
+
createLlmTemplateStore,
|
|
40
|
+
createOpenAiProvider,
|
|
41
|
+
evaluateLlmTemplate,
|
|
42
|
+
llmCommands,
|
|
43
|
+
parseLlmSchemaDsl,
|
|
44
|
+
validateLlmTemplateParameters,
|
|
45
|
+
validateModelOptions
|
|
46
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { LlmModel, LlmOption } from "./types.js";
|
|
2
|
+
/** Validate and translate declared options before storage or provider execution. */
|
|
3
|
+
export declare function validateModelOptions(model: LlmModel, values: Readonly<Record<string, LlmOption>>): Record<string, LlmOption>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ByteSource } from "../safe-bash-contracts/index.js";
|
|
2
|
+
import type { HttpRequest, HttpResponse, HttpTransport } from "../safe-bash-contracts/http.js";
|
|
3
|
+
export declare function openAiAbortable<Value>(pending: PromiseLike<Value>, signal: AbortSignal): Promise<Value>;
|
|
4
|
+
export declare function openAiBytes(source: ByteSource, signal: AbortSignal, limit?: number): ByteSource;
|
|
5
|
+
export declare function openAiJson(response: HttpResponse, signal: AbortSignal, maxBytes?: number): Promise<Record<string, unknown>>;
|
|
6
|
+
export declare function openAiRecord(value: unknown): value is Record<string, unknown>;
|
|
7
|
+
export declare function openAiError(value: unknown): string | undefined;
|
|
8
|
+
export declare function openAiResponse(transport: HttpTransport, input: HttpRequest, maxResponseBytes: number): AsyncIterable<HttpResponse>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
openAiAbortable,
|
|
3
|
+
openAiBytes,
|
|
4
|
+
openAiError,
|
|
5
|
+
openAiJson,
|
|
6
|
+
openAiRecord,
|
|
7
|
+
openAiResponse
|
|
8
|
+
} from "../safe-bash/command-chunks/chunk-H4LWTITX.js";
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
10
|
+
export {
|
|
11
|
+
openAiAbortable,
|
|
12
|
+
openAiBytes,
|
|
13
|
+
openAiError,
|
|
14
|
+
openAiJson,
|
|
15
|
+
openAiRecord,
|
|
16
|
+
openAiResponse
|
|
17
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { LlmResponseMetadata } from "./types.js";
|
|
2
|
+
import type { ByteSource } from "../safe-bash-contracts/index.js";
|
|
3
|
+
export declare function openAiChat(source: ByteSource, signal: AbortSignal, limit?: number, responseLimit?: number): AsyncGenerator<string, LlmResponseMetadata>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HttpTransport } from "../safe-bash-contracts/http.js";
|
|
2
|
+
import type { LlmModel, LlmProvider } from "./types.js";
|
|
3
|
+
import { type LlmProviderLimits } from "./providers/shared.js";
|
|
4
|
+
export interface OpenAiModel extends LlmModel {
|
|
5
|
+
readonly endpoint: "chat" | "images" | "videos" | "embeddings";
|
|
6
|
+
}
|
|
7
|
+
export interface OpenAiProviderOptions {
|
|
8
|
+
readonly transport: HttpTransport;
|
|
9
|
+
readonly apiKey: string;
|
|
10
|
+
readonly baseUrl?: string;
|
|
11
|
+
readonly models: readonly OpenAiModel[];
|
|
12
|
+
readonly limits?: Partial<LlmProviderLimits>;
|
|
13
|
+
}
|
|
14
|
+
export declare function createOpenAiProvider(options: OpenAiProviderOptions): LlmProvider;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createOpenAiProvider
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-TB7IFMUZ.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-SNK7K3XW.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-QTYZAWSB.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-VMK4XVKO.js";
|
|
7
|
+
import "../safe-bash/command-chunks/chunk-H4LWTITX.js";
|
|
8
|
+
import "../safe-bash/command-chunks/chunk-AKDMCNX4.js";
|
|
9
|
+
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
10
|
+
export {
|
|
11
|
+
createOpenAiProvider
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createElevenLabsProvider, type ElevenLabsProviderOptions, type ElevenLabsModel } from "../elevenlabs.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "../../safe-bash/command-chunks/chunk-QI4MGIN6.js";
|
|
2
|
+
import {
|
|
3
|
+
createElevenLabsProvider
|
|
4
|
+
} from "../../safe-bash/command-chunks/chunk-I2MQNBGR.js";
|
|
5
|
+
import "../../safe-bash/command-chunks/chunk-VNSJKXDU.js";
|
|
6
|
+
import "../../safe-bash/command-chunks/chunk-QTYZAWSB.js";
|
|
7
|
+
import "../../safe-bash/command-chunks/chunk-AKDMCNX4.js";
|
|
8
|
+
import "../../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
9
|
+
export {
|
|
10
|
+
createElevenLabsProvider
|
|
11
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "../../safe-bash/command-chunks/chunk-QI4MGIN6.js";
|
|
2
|
+
import "../../safe-bash/command-chunks/chunk-YFNTMH6Z.js";
|
|
3
|
+
import {
|
|
4
|
+
createElevenLabsProvider
|
|
5
|
+
} from "../../safe-bash/command-chunks/chunk-I2MQNBGR.js";
|
|
6
|
+
import "../../safe-bash/command-chunks/chunk-VNSJKXDU.js";
|
|
7
|
+
import {
|
|
8
|
+
createOpenAiProvider
|
|
9
|
+
} from "../../safe-bash/command-chunks/chunk-TB7IFMUZ.js";
|
|
10
|
+
import "../../safe-bash/command-chunks/chunk-SNK7K3XW.js";
|
|
11
|
+
import "../../safe-bash/command-chunks/chunk-QTYZAWSB.js";
|
|
12
|
+
import "../../safe-bash/command-chunks/chunk-VMK4XVKO.js";
|
|
13
|
+
import "../../safe-bash/command-chunks/chunk-H4LWTITX.js";
|
|
14
|
+
import "../../safe-bash/command-chunks/chunk-AKDMCNX4.js";
|
|
15
|
+
import {
|
|
16
|
+
init_buffer
|
|
17
|
+
} from "../../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
18
|
+
|
|
19
|
+
// packages/safe-bash-command-llm/dist/providers/index.js
|
|
20
|
+
init_buffer();
|
|
21
|
+
export {
|
|
22
|
+
createElevenLabsProvider,
|
|
23
|
+
createOpenAiProvider
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createOpenAiProvider, type OpenAiProviderOptions, type OpenAiModel } from "../openai.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../../safe-bash/command-chunks/chunk-YFNTMH6Z.js";
|
|
2
|
+
import {
|
|
3
|
+
createOpenAiProvider
|
|
4
|
+
} from "../../safe-bash/command-chunks/chunk-TB7IFMUZ.js";
|
|
5
|
+
import "../../safe-bash/command-chunks/chunk-SNK7K3XW.js";
|
|
6
|
+
import "../../safe-bash/command-chunks/chunk-QTYZAWSB.js";
|
|
7
|
+
import "../../safe-bash/command-chunks/chunk-VMK4XVKO.js";
|
|
8
|
+
import "../../safe-bash/command-chunks/chunk-H4LWTITX.js";
|
|
9
|
+
import "../../safe-bash/command-chunks/chunk-AKDMCNX4.js";
|
|
10
|
+
import "../../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
11
|
+
export {
|
|
12
|
+
createOpenAiProvider
|
|
13
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ByteSource } from "../../safe-bash-contracts/io.js";
|
|
2
|
+
import type { HttpHeaders } from "../../safe-bash-contracts/http.js";
|
|
3
|
+
export interface LlmProviderLimits {
|
|
4
|
+
readonly maxRequestBytes: number;
|
|
5
|
+
readonly maxResponseBytes: number;
|
|
6
|
+
readonly maxEventBytes: number;
|
|
7
|
+
readonly maxPolls: number;
|
|
8
|
+
readonly pollIntervalMs: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function providerLimits(input?: Partial<LlmProviderLimits>): LlmProviderLimits;
|
|
11
|
+
export declare function credential(value: string): string;
|
|
12
|
+
export declare function jsonBody(value: unknown, limit: number): {
|
|
13
|
+
body: ByteSource;
|
|
14
|
+
headers: HttpHeaders;
|
|
15
|
+
};
|
|
16
|
+
export declare function multipart(options: Record<string, unknown>, files: readonly {
|
|
17
|
+
field: string;
|
|
18
|
+
mimeType: string;
|
|
19
|
+
bytes: Uint8Array;
|
|
20
|
+
}[], limit: number): {
|
|
21
|
+
body: ByteSource;
|
|
22
|
+
headers: HttpHeaders;
|
|
23
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
credential,
|
|
3
|
+
jsonBody,
|
|
4
|
+
multipart,
|
|
5
|
+
providerLimits
|
|
6
|
+
} from "../../safe-bash/command-chunks/chunk-QTYZAWSB.js";
|
|
7
|
+
import "../../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
8
|
+
export {
|
|
9
|
+
credential,
|
|
10
|
+
jsonBody,
|
|
11
|
+
multipart,
|
|
12
|
+
providerLimits
|
|
13
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { LlmModel, LlmProvider, LlmRequest, LlmEmbeddingRequest, LlmEmbeddingResponse, LlmResponseMetadata, LlmSourceRequest } from "./types.js";
|
|
2
|
+
export interface LlmServiceOptions {
|
|
3
|
+
readonly providers: readonly LlmProvider[];
|
|
4
|
+
readonly defaultModel?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface LlmServiceModel {
|
|
7
|
+
readonly provider: LlmProvider;
|
|
8
|
+
readonly model: LlmModel;
|
|
9
|
+
}
|
|
10
|
+
export interface LlmServiceRequest extends Omit<LlmRequest, "model"> {
|
|
11
|
+
readonly model?: string;
|
|
12
|
+
readonly maxOutputBytes?: number;
|
|
13
|
+
}
|
|
14
|
+
export interface LlmServiceSourceRequest extends Omit<LlmSourceRequest, "model"> {
|
|
15
|
+
readonly model?: string;
|
|
16
|
+
readonly maxOutputBytes?: number;
|
|
17
|
+
}
|
|
18
|
+
export type LlmStreamEvent = {
|
|
19
|
+
readonly type: "text";
|
|
20
|
+
readonly text: string;
|
|
21
|
+
} | {
|
|
22
|
+
readonly type: "bytes";
|
|
23
|
+
readonly data: Uint8Array;
|
|
24
|
+
} | {
|
|
25
|
+
readonly type: "response";
|
|
26
|
+
readonly response: LlmResponseMetadata & {
|
|
27
|
+
readonly model: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
/** Structured host API shared by shell and other language front ends. */
|
|
31
|
+
export interface LlmService {
|
|
32
|
+
readonly version: 1;
|
|
33
|
+
readonly models: readonly LlmServiceModel[];
|
|
34
|
+
resolve(model?: string): LlmServiceModel;
|
|
35
|
+
complete(request: LlmServiceRequest): AsyncIterable<string | Uint8Array, LlmResponseMetadata | void>;
|
|
36
|
+
stream(request: LlmServiceRequest): AsyncIterable<LlmStreamEvent>;
|
|
37
|
+
streamSources?(request: LlmServiceSourceRequest): AsyncIterable<LlmStreamEvent>;
|
|
38
|
+
embed(request: Omit<LlmEmbeddingRequest, "model"> & {
|
|
39
|
+
readonly model?: string;
|
|
40
|
+
}): Promise<LlmEmbeddingResponse>;
|
|
41
|
+
}
|
|
42
|
+
export declare function createLlmService(options: LlmServiceOptions): LlmService;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createLlmService
|
|
3
|
+
} from "../safe-bash/command-chunks/chunk-T5OLGM43.js";
|
|
4
|
+
import "../safe-bash/command-chunks/chunk-VMK4XVKO.js";
|
|
5
|
+
import "../safe-bash/command-chunks/chunk-AKDMCNX4.js";
|
|
6
|
+
import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
|
|
7
|
+
export {
|
|
8
|
+
createLlmService
|
|
9
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type CommandContext } from "../safe-bash-contracts/index.js";
|
|
2
|
+
export interface LlmTemplate {
|
|
3
|
+
name: string;
|
|
4
|
+
prompt?: string;
|
|
5
|
+
system?: string;
|
|
6
|
+
model?: string;
|
|
7
|
+
defaults?: Record<string, string>;
|
|
8
|
+
options?: Record<string, string>;
|
|
9
|
+
attachments?: string[];
|
|
10
|
+
attachment_types?: {
|
|
11
|
+
type: string;
|
|
12
|
+
value: string;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
export declare function validateLlmTemplateParameters(value: LlmTemplate, params: Record<string, string>): void;
|
|
16
|
+
/** Reference Template.vars() includes named placeholders, excluding braced and escaped forms. */
|
|
17
|
+
export declare function llmTemplateUsesInput(value: LlmTemplate): boolean;
|
|
18
|
+
export declare function evaluateLlmTemplate(value: LlmTemplate, input: string, params: Record<string, string>): {
|
|
19
|
+
prompt: string;
|
|
20
|
+
system?: string;
|
|
21
|
+
};
|
|
22
|
+
export declare function createLlmTemplateStore(context: CommandContext): {
|
|
23
|
+
directory: string;
|
|
24
|
+
load: (name: string) => Promise<LlmTemplate>;
|
|
25
|
+
save(name: string, value: Omit<LlmTemplate, "name">): Promise<void>;
|
|
26
|
+
command(args: readonly string[], output: (text: string) => Promise<void>): Promise<void>;
|
|
27
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { ByteSource } from "../safe-bash-contracts/index.js";
|
|
2
|
+
import type { LlmService } from "./service.js";
|
|
3
|
+
export type LlmOption = string | number | boolean | null;
|
|
4
|
+
export type LlmCapability = "messages" | "schema" | "embed";
|
|
5
|
+
export interface LlmResponseMetadata {
|
|
6
|
+
readonly usage?: Readonly<Record<string, unknown>>;
|
|
7
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
8
|
+
}
|
|
9
|
+
export interface LlmProvider {
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly models: readonly LlmModel[];
|
|
12
|
+
complete(request: LlmRequest): AsyncIterable<string | Uint8Array, LlmResponseMetadata | void>;
|
|
13
|
+
completeSources?(request: LlmSourceRequest): AsyncIterable<string | Uint8Array, LlmResponseMetadata | void>;
|
|
14
|
+
embed?(request: LlmEmbeddingRequest): Promise<LlmEmbeddingResponse>;
|
|
15
|
+
}
|
|
16
|
+
export interface LlmModelOption {
|
|
17
|
+
readonly description?: string;
|
|
18
|
+
readonly type: "number" | "integer" | "boolean" | "string";
|
|
19
|
+
readonly minimum?: number;
|
|
20
|
+
readonly maximum?: number;
|
|
21
|
+
readonly nullable?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface LlmModel {
|
|
24
|
+
/** Source input support for this model; otherwise inferred from the provider hook. */
|
|
25
|
+
readonly inputSources?: boolean;
|
|
26
|
+
readonly id: string;
|
|
27
|
+
readonly aliases?: readonly string[];
|
|
28
|
+
readonly attachmentTypes?: readonly string[];
|
|
29
|
+
readonly outputType?: string;
|
|
30
|
+
readonly options?: Readonly<Record<string, LlmModelOption>>;
|
|
31
|
+
readonly capabilities?: readonly LlmCapability[];
|
|
32
|
+
}
|
|
33
|
+
export interface LlmEmbeddingRequest {
|
|
34
|
+
readonly model: string;
|
|
35
|
+
readonly inputs: readonly string[];
|
|
36
|
+
readonly options: Readonly<Record<string, LlmOption>>;
|
|
37
|
+
readonly signal: AbortSignal;
|
|
38
|
+
}
|
|
39
|
+
export interface LlmEmbeddingResponse extends LlmResponseMetadata {
|
|
40
|
+
readonly model: string;
|
|
41
|
+
readonly vectors: readonly (readonly number[])[];
|
|
42
|
+
}
|
|
43
|
+
export interface LlmRequest {
|
|
44
|
+
model: string;
|
|
45
|
+
prompt: string;
|
|
46
|
+
system?: string;
|
|
47
|
+
messages?: readonly {
|
|
48
|
+
readonly role: "system" | "user" | "assistant";
|
|
49
|
+
readonly content: string;
|
|
50
|
+
}[];
|
|
51
|
+
schema?: Readonly<Record<string, unknown>>;
|
|
52
|
+
attachments: readonly {
|
|
53
|
+
mimeType: string;
|
|
54
|
+
bytes: Uint8Array;
|
|
55
|
+
}[];
|
|
56
|
+
options: Readonly<Record<string, LlmOption>>;
|
|
57
|
+
signal: AbortSignal;
|
|
58
|
+
}
|
|
59
|
+
export interface LlmLimits {
|
|
60
|
+
readonly maxInputBytes: number;
|
|
61
|
+
readonly maxOutputBytes: number;
|
|
62
|
+
}
|
|
63
|
+
export interface LlmCommandsOptions {
|
|
64
|
+
readonly limits?: Partial<LlmLimits>;
|
|
65
|
+
readonly service?: LlmService;
|
|
66
|
+
readonly providers?: readonly LlmProvider[];
|
|
67
|
+
readonly defaultModel?: string;
|
|
68
|
+
readonly replace?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/** A caller-owned input lease. Disposal must release resources independently of pending reads. */
|
|
71
|
+
export interface LlmInputSource {
|
|
72
|
+
readonly bytes: ByteSource;
|
|
73
|
+
dispose(): Promise<void>;
|
|
74
|
+
}
|
|
75
|
+
/** Control data is borrowed; callers keep options/schema stable until sources are disposed. */
|
|
76
|
+
export interface LlmSourceRequest extends Omit<LlmRequest, "prompt" | "system" | "messages" | "attachments"> {
|
|
77
|
+
readonly prompt: LlmInputSource;
|
|
78
|
+
readonly system?: LlmInputSource;
|
|
79
|
+
readonly messages?: readonly {
|
|
80
|
+
readonly role: "system" | "user" | "assistant";
|
|
81
|
+
readonly content: LlmInputSource;
|
|
82
|
+
}[];
|
|
83
|
+
readonly attachments: readonly {
|
|
84
|
+
readonly mimeType: string;
|
|
85
|
+
readonly source: LlmInputSource;
|
|
86
|
+
}[];
|
|
87
|
+
}
|
|
@@ -26,7 +26,9 @@ export interface MmdcResult {
|
|
|
26
26
|
readonly accounting: MermaidAccounting;
|
|
27
27
|
}
|
|
28
28
|
export type MmdcPlugin = VirtualShellPlugin & readonly CommandDefinition[];
|
|
29
|
+
export declare function renderMermaidSvgSteps(source: string, options?: MermaidRenderOptions): Generator<void, MermaidSvgResult, void>;
|
|
29
30
|
export declare function renderMermaidSvg(source: string, options?: MermaidRenderOptions): MermaidSvgResult;
|
|
31
|
+
export declare function renderMermaidPngSteps(source: string, options?: MermaidPngRenderOptions): Generator<void, MermaidPngResult, void>;
|
|
30
32
|
export declare function renderMermaidPng(source: string, options?: MermaidPngRenderOptions): MermaidPngResult;
|
|
31
33
|
export declare function runMmdc(context: CommandContext, options?: MmdcRunOptions): Promise<MmdcResult>;
|
|
32
34
|
export declare function createMmdcCommand(settings?: MmdcSettings): CommandDefinition;
|
|
@@ -34,3 +36,5 @@ export declare const mmdcCommand: CommandDefinition;
|
|
|
34
36
|
export declare function mmdcCommands(settings?: MmdcSettings): MmdcPlugin;
|
|
35
37
|
export type MmdcCommandsOptions = MmdcSettings;
|
|
36
38
|
export declare function createMmdcCommands(options?: MmdcCommandsOptions): readonly CommandDefinition[];
|
|
39
|
+
export declare function renderMermaidPngAsync(source: string, options?: MermaidPngRenderOptions): Promise<MermaidPngResult>;
|
|
40
|
+
export declare function renderMermaidSvgAsync(source: string, options?: MermaidRenderOptions): Promise<MermaidSvgResult>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { admitMermaidLimits, defaultMermaidLimits, MermaidBudget, MermaidError, type CompartmentMember, type DiagramFamily, type DocumentEdge, type DocumentGroup, type DocumentNode, type DocumentNote, type EdgeLineStyle, type EdgeMarkerKind, type FlowDirection, type MermaidAccounting, type MermaidDocument, type MermaidErrorCode, type MermaidLayoutOptions, type MermaidLimits, type MermaidParseOptions, type MermaidPngRenderOptions, type MermaidPngResult, type MermaidRenderOptions, type MermaidScene, type MermaidSourceSpan, type MermaidSvgResult, type MermaidThemeMode, type MermaidThemeTokens, type MmdcSettings, type NodeShape, type PathSegment, type Point, type Rect, type SceneActivation, type SceneBadge, type SceneDivider, type SceneEdge, type SceneGroup, type SceneLabelPill, type SceneLifeline, type SceneMarker, type SceneNode, type SceneNote, type SceneTextLine, type SequenceActivationEvent } from "./contracts.js";
|
|
2
2
|
export { MMDC_HELP_TEXT, MMDC_VERSION, parseMmdcArguments, type MmdcOutputFormat, type MmdcParsedArguments } from "./arguments.js";
|
|
3
|
-
export { createMmdcCommand, mmdcCommand, mmdcCommands, renderMermaidPng, renderMermaidSvg, runMmdc, type MmdcPlugin, type MmdcResult, type MmdcRunOptions } from "./command.js";
|
|
3
|
+
export { createMmdcCommand, mmdcCommand, mmdcCommands, renderMermaidPng, renderMermaidPngAsync, renderMermaidSvg, renderMermaidSvgAsync, runMmdc, type MmdcPlugin, type MmdcResult, type MmdcRunOptions } from "./command.js";
|
|
4
4
|
export { getEmbeddedFont, getGlyphOutline, type EmbeddedFont, type GlyphOutline } from "./font.js";
|
|
5
5
|
export { verifySceneGeometry, type GeometryReport } from "./geometry.js";
|
|
6
6
|
export { layoutMermaid } from "./layout.js";
|