@poe-platform/safe-bash 0.1.796 → 0.1.798

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.
Files changed (47) hide show
  1. package/dist/pdf/index.d.ts +1 -1
  2. package/dist/pdf/model.d.ts +7 -2
  3. package/dist/safe-bash/chunks/{chunk-TGOF7VO5.js → chunk-AMTCC256.js} +1 -1
  4. package/dist/safe-bash/chunks/{chunk-TCWZNUVP.js → chunk-CSNXID73.js} +1 -1
  5. package/dist/safe-bash/chunks/{chunk-C2NYCU7O.js → chunk-JSVX4VIA.js} +5 -1
  6. package/dist/safe-bash/chunks/{chunk-ZXKVOJNL.js → chunk-V3VEATEA.js} +6 -5
  7. package/dist/safe-bash/chunks/{chunk-D2XB7XIC.js → chunk-XH26YVGW.js} +6 -0
  8. package/dist/safe-bash/command-chunks/{chunk-A7RIYQIF.js → chunk-DDLQ5YDB.js} +172 -167
  9. package/dist/safe-bash/command-chunks/{chunk-C2DUYVYZ.js → chunk-ESMCX3YV.js} +138 -36
  10. package/dist/safe-bash/command-chunks/chunk-EZ7D6DXC.js +6 -0
  11. package/dist/safe-bash/command-chunks/{chunk-ECAK3JHR.js → chunk-QRRYN2KO.js} +21 -12
  12. package/dist/safe-bash/command-chunks/{chunk-UUR2S7AD.js → chunk-Y6TUZWPS.js} +28 -1
  13. package/dist/safe-bash/command-chunks/{pptx-KY2OJWZW-76LBHCHD.js → pptx-GBPNWNEP-7EQEVXV5.js} +8 -2
  14. package/dist/safe-bash/commands/llm/index.browser.js +9 -1
  15. package/dist/safe-bash/commands/llm/providers/index.browser.js +6 -2
  16. package/dist/safe-bash/core.browser.js +1 -1
  17. package/dist/safe-bash/core.d.ts +5 -1
  18. package/dist/safe-bash/core.js +5 -1
  19. package/dist/safe-bash/full-core.browser.js +134 -5
  20. package/dist/safe-bash/lazy-optional.d.ts +13 -0
  21. package/dist/safe-bash/lazy-optional.js +118 -0
  22. package/dist/safe-bash/plugins/index.browser.js +3 -3
  23. package/dist/safe-bash/registry-entry.browser.js +2 -2
  24. package/dist/safe-bash/shell/env-warning.js +3 -2
  25. package/dist/safe-bash/shell/runtime.js +2 -2
  26. package/dist/safe-bash/shell-entry.browser.js +2 -2
  27. package/dist/safe-bash-command-csvkit/index.js +528 -498
  28. package/dist/safe-bash-command-git/git_rust.wasm +0 -0
  29. package/dist/safe-bash-command-git/wasm.generated.js +1 -1
  30. package/dist/safe-bash-command-llm/base64-stream.d.ts +2 -0
  31. package/dist/safe-bash-command-llm/chat-json.d.ts +10 -0
  32. package/dist/safe-bash-command-llm/index.d.ts +2 -1
  33. package/dist/safe-bash-command-llm/index.js +11 -2
  34. package/dist/safe-bash-command-llm/json-string.d.ts +2 -0
  35. package/dist/safe-bash-command-llm/json-value.d.ts +2 -0
  36. package/dist/safe-bash-command-llm/openai.d.ts +1 -0
  37. package/dist/safe-bash-command-llm/openai.js +4 -2
  38. package/dist/safe-bash-command-llm/provider-serialization.d.ts +6 -0
  39. package/dist/safe-bash-command-llm/providers/index.d.ts +2 -1
  40. package/dist/safe-bash-command-llm/providers/index.js +12 -3
  41. package/dist/safe-bash-command-llm/providers/openai.d.ts +1 -1
  42. package/dist/safe-bash-command-llm/providers/openai.js +4 -2
  43. package/dist/safe-bash-command-pandoc/citeproc-filters.js +1 -1
  44. package/dist/safe-bash-command-pandoc/command.js +3 -3
  45. package/dist/safe-bash-command-pandoc/index.js +3 -3
  46. package/dist/safe-bash-command-ssconvert/index.js +1 -1
  47. package/package.json +5 -4
@@ -0,0 +1,2 @@
1
+ /** Base64 an injected byte source without retaining its complete contents. */
2
+ export declare function base64Stream(source: AsyncIterable<Uint8Array>, signal: AbortSignal): AsyncIterable<string>;
@@ -0,0 +1,10 @@
1
+ import type { LlmSourceRequest } from "./types.js";
2
+ /** Sources are borrowed; the caller owns their leases and provider admission. */
3
+ export type OpenAiChatSourceRequest = Omit<LlmSourceRequest, "options"> & {
4
+ readonly options: Readonly<Record<string, unknown>>;
5
+ };
6
+ /** Encode admitted OpenAI-compatible controls and UTF-8/binary sources into a
7
+ * backpressured HTTP body. Does not dispose leases or translate model options.
8
+ * Keep request metadata stable until consumption finishes. maxBytes includes
9
+ * JSON escaping and base64; Infinity explicitly opts out of wire accounting. */
10
+ export declare function chatJson(request: OpenAiChatSourceRequest, limit: number): AsyncIterable<Uint8Array>;
@@ -1,7 +1,8 @@
1
+ export * from "./provider-serialization.js";
1
2
  export { createLlmCommand, createLlmCommands, llmCommands } from "./command.js";
2
3
  export { createLlmService, type LlmService, type LlmServiceOptions, type LlmServiceModel, type LlmStreamEvent, type LlmServiceRequest, type LlmServiceSourceRequest } from "./service.js";
3
4
  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 { serializeOpenAiChatRequest, type OpenAiChatSourceRequest, createOpenAiProvider, type OpenAiModel, type OpenAiProviderOptions } from "./openai.js";
5
6
  export { createElevenLabsProvider, type ElevenLabsModel, type ElevenLabsProviderOptions } from "./elevenlabs.js";
6
7
  export type { LlmProviderLimits } from "./providers/shared.js";
7
8
  export { createLlmConfiguration, type LlmConfiguration } from "./configuration.js";
@@ -1,13 +1,18 @@
1
1
  import {
2
2
  templateYaml
3
3
  } from "../safe-bash/command-chunks/chunk-2C5YZOMI.js";
4
+ import "../safe-bash/command-chunks/chunk-EZ7D6DXC.js";
4
5
  import {
5
6
  createElevenLabsProvider
6
7
  } from "../safe-bash/command-chunks/chunk-K2GDEMEU.js";
7
8
  import "../safe-bash/command-chunks/chunk-LPZXFCTC.js";
8
9
  import {
9
- createOpenAiProvider
10
- } from "../safe-bash/command-chunks/chunk-A7RIYQIF.js";
10
+ base64Stream,
11
+ chatJson,
12
+ createOpenAiProvider,
13
+ jsonString,
14
+ jsonValue
15
+ } from "../safe-bash/command-chunks/chunk-DDLQ5YDB.js";
11
16
  import "../safe-bash/command-chunks/chunk-ENFNMTTP.js";
12
17
  import "../safe-bash/command-chunks/chunk-2KG2QLJE.js";
13
18
  import {
@@ -46,6 +51,7 @@ export {
46
51
  createLlmService,
47
52
  createLlmTemplateStore,
48
53
  createOpenAiProvider,
54
+ base64Stream as encodeLlmBase64,
49
55
  evaluateLlmTemplate,
50
56
  findExtractedRange,
51
57
  getLlmModelAliases,
@@ -54,6 +60,9 @@ export {
54
60
  parseLlmSchemaDsl,
55
61
  resolveLlmSchemaInput,
56
62
  selectLlmModelByQuery,
63
+ jsonString as serializeLlmJsonString,
64
+ jsonValue as serializeLlmJsonValue,
65
+ chatJson as serializeOpenAiChatRequest,
57
66
  templateYaml,
58
67
  validateLlmTemplateParameters,
59
68
  validateModelOptions
@@ -0,0 +1,2 @@
1
+ /** Encode a UTF-8 byte source as one JSON string with bounded decoding state. */
2
+ export declare function jsonString(source: AsyncIterable<Uint8Array>, signal: AbortSignal): AsyncIterable<Uint8Array>;
@@ -0,0 +1,2 @@
1
+ /** Serialize JSON data without retaining a complete encoded control payload. */
2
+ export declare function jsonValue(value: unknown, signal: AbortSignal): AsyncIterable<Uint8Array>;
@@ -1,3 +1,4 @@
1
+ export { chatJson as serializeOpenAiChatRequest, type OpenAiChatSourceRequest } from "./chat-json.js";
1
2
  import type { HttpTransport } from "../safe-bash-contracts/http.js";
2
3
  import type { LlmModel, LlmProvider } from "./types.js";
3
4
  import { type LlmProviderLimits } from "./providers/shared.js";
@@ -1,6 +1,7 @@
1
1
  import {
2
+ chatJson,
2
3
  createOpenAiProvider
3
- } from "../safe-bash/command-chunks/chunk-A7RIYQIF.js";
4
+ } from "../safe-bash/command-chunks/chunk-DDLQ5YDB.js";
4
5
  import "../safe-bash/command-chunks/chunk-ENFNMTTP.js";
5
6
  import "../safe-bash/command-chunks/chunk-2KG2QLJE.js";
6
7
  import "../safe-bash/command-chunks/chunk-56W542VW.js";
@@ -8,5 +9,6 @@ import "../safe-bash/command-chunks/chunk-OMH6Z4BN.js";
8
9
  import "../safe-bash/command-chunks/chunk-PHFOL7T3.js";
9
10
  import "../safe-bash/command-chunks/chunk-HX3SHTCE.js";
10
11
  export {
11
- createOpenAiProvider
12
+ createOpenAiProvider,
13
+ chatJson as serializeOpenAiChatRequest
12
14
  };
@@ -0,0 +1,6 @@
1
+ /** Compose provider-native request bodies from borrowed sources. These helpers
2
+ * perform no model admission or transport and never dispose input leases.
3
+ * The host accounts for the complete wire body after escaping and base64. */
4
+ export { jsonString as serializeLlmJsonString } from './json-string.js';
5
+ export { jsonValue as serializeLlmJsonValue } from './json-value.js';
6
+ export { base64Stream as encodeLlmBase64 } from './base64-stream.js';
@@ -1,3 +1,4 @@
1
- export { createOpenAiProvider, type OpenAiProviderOptions, type OpenAiModel } from "./openai.js";
1
+ export * from "../provider-serialization.js";
2
+ export { serializeOpenAiChatRequest, type OpenAiChatSourceRequest, createOpenAiProvider, type OpenAiProviderOptions, type OpenAiModel } from "./openai.js";
2
3
  export { createElevenLabsProvider, type ElevenLabsProviderOptions, type ElevenLabsModel } from "./elevenlabs.js";
3
4
  export type { LlmProviderLimits } from "./shared.js";
@@ -1,12 +1,17 @@
1
1
  import "../../safe-bash/command-chunks/chunk-76F4WURZ.js";
2
2
  import "../../safe-bash/command-chunks/chunk-KSZLEZI6.js";
3
+ import "../../safe-bash/command-chunks/chunk-EZ7D6DXC.js";
3
4
  import {
4
5
  createElevenLabsProvider
5
6
  } from "../../safe-bash/command-chunks/chunk-K2GDEMEU.js";
6
7
  import "../../safe-bash/command-chunks/chunk-LPZXFCTC.js";
7
8
  import {
8
- createOpenAiProvider
9
- } from "../../safe-bash/command-chunks/chunk-A7RIYQIF.js";
9
+ base64Stream,
10
+ chatJson,
11
+ createOpenAiProvider,
12
+ jsonString,
13
+ jsonValue
14
+ } from "../../safe-bash/command-chunks/chunk-DDLQ5YDB.js";
10
15
  import "../../safe-bash/command-chunks/chunk-ENFNMTTP.js";
11
16
  import "../../safe-bash/command-chunks/chunk-2KG2QLJE.js";
12
17
  import "../../safe-bash/command-chunks/chunk-56W542VW.js";
@@ -20,5 +25,9 @@ import {
20
25
  init_buffer();
21
26
  export {
22
27
  createElevenLabsProvider,
23
- createOpenAiProvider
28
+ createOpenAiProvider,
29
+ base64Stream as encodeLlmBase64,
30
+ jsonString as serializeLlmJsonString,
31
+ jsonValue as serializeLlmJsonValue,
32
+ chatJson as serializeOpenAiChatRequest
24
33
  };
@@ -1 +1 @@
1
- export { createOpenAiProvider, type OpenAiProviderOptions, type OpenAiModel } from "../openai.js";
1
+ export { serializeOpenAiChatRequest, type OpenAiChatSourceRequest, createOpenAiProvider, type OpenAiProviderOptions, type OpenAiModel } from "../openai.js";
@@ -1,7 +1,8 @@
1
1
  import "../../safe-bash/command-chunks/chunk-KSZLEZI6.js";
2
2
  import {
3
+ chatJson,
3
4
  createOpenAiProvider
4
- } from "../../safe-bash/command-chunks/chunk-A7RIYQIF.js";
5
+ } from "../../safe-bash/command-chunks/chunk-DDLQ5YDB.js";
5
6
  import "../../safe-bash/command-chunks/chunk-ENFNMTTP.js";
6
7
  import "../../safe-bash/command-chunks/chunk-2KG2QLJE.js";
7
8
  import "../../safe-bash/command-chunks/chunk-56W542VW.js";
@@ -9,5 +10,6 @@ import "../../safe-bash/command-chunks/chunk-OMH6Z4BN.js";
9
10
  import "../../safe-bash/command-chunks/chunk-PHFOL7T3.js";
10
11
  import "../../safe-bash/command-chunks/chunk-HX3SHTCE.js";
11
12
  export {
12
- createOpenAiProvider
13
+ createOpenAiProvider,
14
+ chatJson as serializeOpenAiChatRequest
13
15
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createCiteprocFilterCapability
3
- } from "../safe-bash/command-chunks/chunk-UUR2S7AD.js";
3
+ } from "../safe-bash/command-chunks/chunk-Y6TUZWPS.js";
4
4
  import "../safe-bash/command-chunks/chunk-7OKDCM5U.js";
5
5
  import "../safe-bash/command-chunks/chunk-VIVYKW7Q.js";
6
6
  import "../safe-bash/command-chunks/chunk-X4P42NYK.js";
@@ -2,13 +2,13 @@ import {
2
2
  createPandocCommand,
3
3
  createPandocCommands,
4
4
  pandocCommands
5
- } from "../safe-bash/command-chunks/chunk-C2DUYVYZ.js";
6
- import "../safe-bash/command-chunks/chunk-ECAK3JHR.js";
5
+ } from "../safe-bash/command-chunks/chunk-ESMCX3YV.js";
6
+ import "../safe-bash/command-chunks/chunk-QRRYN2KO.js";
7
7
  import "../safe-bash/command-chunks/chunk-MKQVQMXO.js";
8
8
  import "../safe-bash/command-chunks/chunk-RDV7UCYZ.js";
9
9
  import "../safe-bash/command-chunks/chunk-YG4EPFWC.js";
10
10
  import "../safe-bash/command-chunks/chunk-BIXLZ3OG.js";
11
- import "../safe-bash/command-chunks/chunk-UUR2S7AD.js";
11
+ import "../safe-bash/command-chunks/chunk-Y6TUZWPS.js";
12
12
  import "../safe-bash/command-chunks/chunk-7OKDCM5U.js";
13
13
  import "../safe-bash/command-chunks/chunk-VIVYKW7Q.js";
14
14
  import "../safe-bash/command-chunks/chunk-X4P42NYK.js";
@@ -21,8 +21,8 @@ import {
21
21
  readDocument,
22
22
  resolveConversionArgs,
23
23
  writeDocument
24
- } from "../safe-bash/command-chunks/chunk-C2DUYVYZ.js";
25
- import "../safe-bash/command-chunks/chunk-ECAK3JHR.js";
24
+ } from "../safe-bash/command-chunks/chunk-ESMCX3YV.js";
25
+ import "../safe-bash/command-chunks/chunk-QRRYN2KO.js";
26
26
  import "../safe-bash/command-chunks/chunk-MKQVQMXO.js";
27
27
  import "../safe-bash/command-chunks/chunk-RDV7UCYZ.js";
28
28
  import "../safe-bash/command-chunks/chunk-YG4EPFWC.js";
@@ -31,7 +31,7 @@ import {
31
31
  } from "../safe-bash/command-chunks/chunk-BIXLZ3OG.js";
32
32
  import {
33
33
  createCiteprocFilterCapability
34
- } from "../safe-bash/command-chunks/chunk-UUR2S7AD.js";
34
+ } from "../safe-bash/command-chunks/chunk-Y6TUZWPS.js";
35
35
  import {
36
36
  AstError,
37
37
  PandocError
@@ -162,7 +162,7 @@ import {
162
162
  decodePng,
163
163
  serializePdf,
164
164
  suppliedDefaultFont
165
- } from "../safe-bash/command-chunks/chunk-ECAK3JHR.js";
165
+ } from "../safe-bash/command-chunks/chunk-QRRYN2KO.js";
166
166
  import "../safe-bash/command-chunks/chunk-MKQVQMXO.js";
167
167
  import "../safe-bash/command-chunks/chunk-RDV7UCYZ.js";
168
168
  import {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poe-platform/safe-bash",
3
- "version": "0.1.796",
3
+ "version": "0.1.798",
4
4
  "description": "Extensible virtual shell with pluggable filesystems and streaming commands",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -869,11 +869,12 @@
869
869
  "access": "public"
870
870
  },
871
871
  "dependencies": {
872
- "@poe-platform/safe-fs": "0.1.796",
872
+ "@poe-platform/safe-fs": "0.1.798",
873
873
  "pdf-lib": "1.17.1",
874
874
  "@noble/hashes": "2.4.0",
875
875
  "pako": "3.0.1",
876
876
  "@types/node": "^25.2.2",
877
+ "@sqlite.org/sqlite-wasm": "3.50.4-build1",
877
878
  "htmlparser2": "^10.0.0",
878
879
  "@pdf-lib/fontkit": "1.1.1",
879
880
  "@noble/ciphers": "2.4.0",
@@ -1384,10 +1385,10 @@
1384
1385
  "./dist/safe-bash-xml-engine/limits.js",
1385
1386
  "./dist/safe-bash-xml-engine/query.js",
1386
1387
  "./dist/safe-bash/chunks/chunk-6IBTC4YL.js",
1387
- "./dist/safe-bash/chunks/chunk-D2XB7XIC.js",
1388
+ "./dist/safe-bash/chunks/chunk-CSNXID73.js",
1388
1389
  "./dist/safe-bash/chunks/chunk-KV7PKOHV.js",
1389
1390
  "./dist/safe-bash/chunks/chunk-NX2SQVON.js",
1390
- "./dist/safe-bash/chunks/chunk-TCWZNUVP.js",
1391
+ "./dist/safe-bash/chunks/chunk-XH26YVGW.js",
1391
1392
  "./dist/safe-bash/chunks/chunk-ZW6K2J7P.js",
1392
1393
  "./dist/safe-bash/commands/apply-patch/index.js",
1393
1394
  "./dist/safe-bash/commands/archive/index.js",