@easbot/utils 0.2.5 → 0.2.7

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/index.d.cts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ChildProcess } from 'node:child_process';
1
2
  import z, { z as z$1 } from 'zod';
2
3
  export { z } from 'zod';
3
4
  import { statSync } from 'node:fs';
@@ -12,7 +13,6 @@ import { ServerType } from '@hono/node-server';
12
13
  import { cors } from 'hono/cors';
13
14
  export { cors } from 'hono/cors';
14
15
  import { GlobOptions } from 'glob';
15
- import { ChildProcess } from 'node:child_process';
16
16
  export { HTTPException } from 'hono/http-exception';
17
17
  import { ShellExpression, EasbotShellPromise, EasbotShell } from '@easbot/types';
18
18
  export { SSEStreamingApi } from 'hono/streaming';
@@ -69,6 +69,76 @@ declare namespace TruncateContent {
69
69
  function formatHint(result: Result): string;
70
70
  }
71
71
 
72
+ interface ShellItem {
73
+ path: string;
74
+ name: string;
75
+ acceptable: boolean;
76
+ }
77
+ declare namespace Shell {
78
+ interface Meta {
79
+ deny?: boolean;
80
+ login?: boolean;
81
+ posix?: boolean;
82
+ ps?: boolean;
83
+ }
84
+ interface KillTreeOptions {
85
+ exited?: () => boolean;
86
+ }
87
+ interface SelectOptions {
88
+ acceptable?: boolean;
89
+ }
90
+ function killTree(proc: ChildProcess, opts?: KillTreeOptions): Promise<void>;
91
+ const defaultPreferred: {
92
+ (): string | undefined;
93
+ reset(): void;
94
+ };
95
+ const defaultAcceptable: {
96
+ (): string | undefined;
97
+ reset(): void;
98
+ };
99
+ function gitbash(): string | undefined;
100
+ function name(file: string): string;
101
+ function login(file: string): boolean;
102
+ function posix(file: string): boolean;
103
+ function ps(file: string): boolean;
104
+ function args(file: string, command: string, cwd: string): string[];
105
+ function preferred(configShell?: string): string | undefined;
106
+ function acceptable(configShell?: string): string | undefined;
107
+ function reset(): void;
108
+ function list(): Promise<ShellItem[]>;
109
+ function metaInfo(file: string): Meta | undefined;
110
+ function needsShell(command: string): boolean;
111
+ function platformShells(): string[];
112
+ function isValid(file: string): boolean;
113
+ function version(file: string): Promise<string | undefined>;
114
+ interface RunOptions {
115
+ cwd?: string;
116
+ env?: Record<string, string | undefined>;
117
+ timeout?: number;
118
+ signal?: AbortSignal;
119
+ windowsHide?: boolean;
120
+ shell?: boolean;
121
+ }
122
+ interface SpawnOptions extends RunOptions {
123
+ stdout?: 'pipe' | 'inherit' | 'null';
124
+ stderr?: 'pipe' | 'inherit' | 'null';
125
+ stdin?: 'pipe' | 'inherit' | 'null';
126
+ }
127
+ function run(shell: string, command: string, options?: RunOptions): Promise<{
128
+ code: number;
129
+ stdout: string;
130
+ stderr: string;
131
+ }>;
132
+ function spawn(shell: string, command: string, options?: SpawnOptions): {
133
+ stdout: any;
134
+ stderr: any;
135
+ stdin: any;
136
+ pid: number;
137
+ exited: Promise<number>;
138
+ kill: (signal?: string | number) => boolean;
139
+ };
140
+ }
141
+
72
142
  declare function formatLocalISO(date: Date | number, includeMilliseconds?: boolean): string;
73
143
  declare function formatLocalISOCompact(date: Date | number): string;
74
144
  declare function now(): number;
@@ -780,6 +850,8 @@ interface NodeSpawnOptions {
780
850
  stdin?: 'pipe' | 'inherit' | 'null';
781
851
  signal?: AbortSignal;
782
852
  timeout?: number | false;
853
+ windowsHide?: boolean;
854
+ shell?: boolean;
783
855
  }
784
856
  interface NodeSpawnObjectArgs {
785
857
  cmd: string[];
@@ -790,6 +862,8 @@ interface NodeSpawnObjectArgs {
790
862
  stdin?: 'pipe' | 'inherit' | 'null';
791
863
  signal?: AbortSignal;
792
864
  timeout?: number | false;
865
+ windowsHide?: boolean;
866
+ shell?: boolean;
793
867
  }
794
868
  interface NodeSpawnResult {
795
869
  stdout: stream.Readable;
@@ -832,6 +906,8 @@ declare namespace PKG {
832
906
  cwd?: string;
833
907
  env?: Record<string, string | undefined>;
834
908
  timeout?: number;
909
+ windowsHide?: boolean;
910
+ shell?: boolean;
835
911
  }): Promise<{
836
912
  code: number;
837
913
  stdout: string;
@@ -1170,6 +1246,19 @@ declare namespace PackageRegistry {
1170
1246
  function isOutdated(pkg: string, cachedVersion: string, cwd?: string): Promise<boolean>;
1171
1247
  }
1172
1248
 
1249
+ interface ParseCommandResult {
1250
+ command: string;
1251
+ args: string[];
1252
+ options?: Record<string, unknown>;
1253
+ }
1254
+ declare function parseCommand(command: string): string[];
1255
+ declare function needsShellExecution(command: string): boolean;
1256
+ declare function parseCommandWithOptions(command: string): ParseCommandResult;
1257
+ declare function escapeCommandArg(arg: string, platform?: 'windows' | 'unix'): string;
1258
+ declare function escapeCommandArgSafe(arg: string, platform?: 'windows' | 'unix'): string;
1259
+ declare function detectPlatform(): 'windows' | 'unix';
1260
+ declare function joinCommandArgs(command: string, args: string[], platform?: 'windows' | 'unix'): string;
1261
+
1173
1262
  declare namespace Identifier {
1174
1263
  const prefixes: {
1175
1264
  readonly event: "evt";
@@ -1301,48 +1390,6 @@ declare namespace Lock {
1301
1390
  function write(key: string): Promise<Disposable>;
1302
1391
  }
1303
1392
 
1304
- declare namespace Process {
1305
- type Stdio = 'inherit' | 'pipe' | 'ignore';
1306
- type Shell = boolean | string;
1307
- interface Options {
1308
- cwd?: string;
1309
- env?: NodeJS.ProcessEnv | null;
1310
- stdin?: Stdio;
1311
- stdout?: Stdio;
1312
- stderr?: Stdio;
1313
- shell?: Shell;
1314
- abort?: AbortSignal;
1315
- kill?: NodeJS.Signals | number;
1316
- timeout?: number;
1317
- }
1318
- interface RunOptions extends Omit<Options, 'stdout' | 'stderr'> {
1319
- nothrow?: boolean;
1320
- }
1321
- interface Result {
1322
- code: number;
1323
- stdout: Buffer;
1324
- stderr: Buffer;
1325
- }
1326
- interface TextResult extends Result {
1327
- text: string;
1328
- }
1329
- class RunFailedError extends Error {
1330
- readonly cmd: string[];
1331
- readonly code: number;
1332
- readonly stdout: Buffer;
1333
- readonly stderr: Buffer;
1334
- constructor(cmd: string[], code: number, stdout: Buffer, stderr: Buffer);
1335
- }
1336
- type Child = ChildProcess & {
1337
- exited: Promise<number>;
1338
- };
1339
- function spawn(cmd: string[], opts?: Options): Child;
1340
- function run(cmd: string[], opts?: RunOptions): Promise<Result>;
1341
- function stop(proc: ChildProcess): Promise<void>;
1342
- function text(cmd: string[], opts?: RunOptions): Promise<TextResult>;
1343
- function lines(cmd: string[], opts?: RunOptions): Promise<string[]>;
1344
- }
1345
-
1346
1393
  declare function proxied(): boolean;
1347
1394
 
1348
1395
  declare class AsyncQueue<T> implements AsyncIterable<T> {
@@ -1395,4 +1442,4 @@ declare function initLog(options: {
1395
1442
  level?: 'DEBUG' | 'INFO' | 'WARN' | 'ERROR';
1396
1443
  }): Promise<void>;
1397
1444
 
1398
- export { $, Archive, AsyncQueue, Binary, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, type EasServer, Encode, EventLoop, type FenceSpan$1 as FenceSpan, Filesystem, Fn, type FormatOptions, type GitResult, Glob, Identifier, Ignore, type InlineCodeState$1 as InlineCodeState, Keybind, Lazy, Locale, Lock, Markdown, type MarkdownConfig, type MarkdownIR, type MarkdownLinkSpan, type MarkdownParseOptions, type MarkdownStyle, type MarkdownStyleSpan, type MarkdownTableMode, type MiddlewareDefinition, NamedError, type NodeSpawnObjectArgs, type NodeSpawnOptions, type NodeSpawnResult, type NodeWhichOptions, PKG, PackageRegistry, type ParsedFrontmatter, type ParsedVersion, PkgShell, Process, type RPCMethod, type RenderLink, type RenderOptions, type RouteDefinition, type SSEHandler, Semver, type ServerOptions, Slug, type StreamHandler, type StyleMarker, Token, TruncateContent, type WebSocketHandler, type WebSocketRouteDefinition, Wildcard, abortAfter, abortAfterAny, buildCodeSpanIndex, chunkMarkdownIR, chunkText, chunkTextByBreakResolver, convertMarkdownTables, createInlineCodeState, createPkgShell, createRESTServer, createRPCServer, createServer, createStreamingServer, createWebSocketServer, defer, extractFrontmatter, findFenceSpanAt, findLast, fn, formatDuration, formatLocalISO, formatLocalISOCompact, formatLogTime, formatMarkdown, getDirectory, getFileExtension, getFilename, getFilenameTruncated, getTimezoneOffset, git, iife, initLog, isSafeFenceBreak, lazy, lazyAsync, loadEnv, loadTextFile, loadTextFileAsync, markdownToIR, markdownToIRWithMeta, now, nowLocalISO, parseFenceSpans, parseFrontmatterBlock, parseLocalISO, parseModelId, proxied, readableStreamToText, renderMarkdown, renderMarkdownWithMarkers, retry, scanParenAwareBreakpoints, serializeFrontmatter, shell, signal, startServer, truncateMiddle, updateSchema, whichSync, withTimeout, work };
1445
+ export { $, Archive, AsyncQueue, Binary, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, type EasServer, Encode, EventLoop, type FenceSpan$1 as FenceSpan, Filesystem, Fn, type FormatOptions, type GitResult, Glob, Identifier, Ignore, type InlineCodeState$1 as InlineCodeState, Keybind, Lazy, Locale, Lock, Markdown, type MarkdownConfig, type MarkdownIR, type MarkdownLinkSpan, type MarkdownParseOptions, type MarkdownStyle, type MarkdownStyleSpan, type MarkdownTableMode, type MiddlewareDefinition, NamedError, type NodeSpawnObjectArgs, type NodeSpawnOptions, type NodeSpawnResult, type NodeWhichOptions, PKG, PackageRegistry, type ParseCommandResult, type ParsedFrontmatter, type ParsedVersion, PkgShell, type RPCMethod, type RenderLink, type RenderOptions, type RouteDefinition, type SSEHandler, Semver, type ServerOptions, Shell, Slug, type StreamHandler, type StyleMarker, Token, TruncateContent, type WebSocketHandler, type WebSocketRouteDefinition, Wildcard, abortAfter, abortAfterAny, buildCodeSpanIndex, chunkMarkdownIR, chunkText, chunkTextByBreakResolver, convertMarkdownTables, createInlineCodeState, createPkgShell, createRESTServer, createRPCServer, createServer, createStreamingServer, createWebSocketServer, defer, detectPlatform, escapeCommandArg, escapeCommandArgSafe, extractFrontmatter, findFenceSpanAt, findLast, fn, formatDuration, formatLocalISO, formatLocalISOCompact, formatLogTime, formatMarkdown, getDirectory, getFileExtension, getFilename, getFilenameTruncated, getTimezoneOffset, git, iife, initLog, isSafeFenceBreak, joinCommandArgs, lazy, lazyAsync, loadEnv, loadTextFile, loadTextFileAsync, markdownToIR, markdownToIRWithMeta, needsShellExecution, now, nowLocalISO, parseCommand, parseCommandWithOptions, parseFenceSpans, parseFrontmatterBlock, parseLocalISO, parseModelId, proxied, readableStreamToText, renderMarkdown, renderMarkdownWithMarkers, retry, scanParenAwareBreakpoints, serializeFrontmatter, shell, signal, startServer, truncateMiddle, updateSchema, whichSync, withTimeout, work };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ChildProcess } from 'node:child_process';
1
2
  import z, { z as z$1 } from 'zod';
2
3
  export { z } from 'zod';
3
4
  import { statSync } from 'node:fs';
@@ -12,7 +13,6 @@ import { ServerType } from '@hono/node-server';
12
13
  import { cors } from 'hono/cors';
13
14
  export { cors } from 'hono/cors';
14
15
  import { GlobOptions } from 'glob';
15
- import { ChildProcess } from 'node:child_process';
16
16
  export { HTTPException } from 'hono/http-exception';
17
17
  import { ShellExpression, EasbotShellPromise, EasbotShell } from '@easbot/types';
18
18
  export { SSEStreamingApi } from 'hono/streaming';
@@ -69,6 +69,76 @@ declare namespace TruncateContent {
69
69
  function formatHint(result: Result): string;
70
70
  }
71
71
 
72
+ interface ShellItem {
73
+ path: string;
74
+ name: string;
75
+ acceptable: boolean;
76
+ }
77
+ declare namespace Shell {
78
+ interface Meta {
79
+ deny?: boolean;
80
+ login?: boolean;
81
+ posix?: boolean;
82
+ ps?: boolean;
83
+ }
84
+ interface KillTreeOptions {
85
+ exited?: () => boolean;
86
+ }
87
+ interface SelectOptions {
88
+ acceptable?: boolean;
89
+ }
90
+ function killTree(proc: ChildProcess, opts?: KillTreeOptions): Promise<void>;
91
+ const defaultPreferred: {
92
+ (): string | undefined;
93
+ reset(): void;
94
+ };
95
+ const defaultAcceptable: {
96
+ (): string | undefined;
97
+ reset(): void;
98
+ };
99
+ function gitbash(): string | undefined;
100
+ function name(file: string): string;
101
+ function login(file: string): boolean;
102
+ function posix(file: string): boolean;
103
+ function ps(file: string): boolean;
104
+ function args(file: string, command: string, cwd: string): string[];
105
+ function preferred(configShell?: string): string | undefined;
106
+ function acceptable(configShell?: string): string | undefined;
107
+ function reset(): void;
108
+ function list(): Promise<ShellItem[]>;
109
+ function metaInfo(file: string): Meta | undefined;
110
+ function needsShell(command: string): boolean;
111
+ function platformShells(): string[];
112
+ function isValid(file: string): boolean;
113
+ function version(file: string): Promise<string | undefined>;
114
+ interface RunOptions {
115
+ cwd?: string;
116
+ env?: Record<string, string | undefined>;
117
+ timeout?: number;
118
+ signal?: AbortSignal;
119
+ windowsHide?: boolean;
120
+ shell?: boolean;
121
+ }
122
+ interface SpawnOptions extends RunOptions {
123
+ stdout?: 'pipe' | 'inherit' | 'null';
124
+ stderr?: 'pipe' | 'inherit' | 'null';
125
+ stdin?: 'pipe' | 'inherit' | 'null';
126
+ }
127
+ function run(shell: string, command: string, options?: RunOptions): Promise<{
128
+ code: number;
129
+ stdout: string;
130
+ stderr: string;
131
+ }>;
132
+ function spawn(shell: string, command: string, options?: SpawnOptions): {
133
+ stdout: any;
134
+ stderr: any;
135
+ stdin: any;
136
+ pid: number;
137
+ exited: Promise<number>;
138
+ kill: (signal?: string | number) => boolean;
139
+ };
140
+ }
141
+
72
142
  declare function formatLocalISO(date: Date | number, includeMilliseconds?: boolean): string;
73
143
  declare function formatLocalISOCompact(date: Date | number): string;
74
144
  declare function now(): number;
@@ -780,6 +850,8 @@ interface NodeSpawnOptions {
780
850
  stdin?: 'pipe' | 'inherit' | 'null';
781
851
  signal?: AbortSignal;
782
852
  timeout?: number | false;
853
+ windowsHide?: boolean;
854
+ shell?: boolean;
783
855
  }
784
856
  interface NodeSpawnObjectArgs {
785
857
  cmd: string[];
@@ -790,6 +862,8 @@ interface NodeSpawnObjectArgs {
790
862
  stdin?: 'pipe' | 'inherit' | 'null';
791
863
  signal?: AbortSignal;
792
864
  timeout?: number | false;
865
+ windowsHide?: boolean;
866
+ shell?: boolean;
793
867
  }
794
868
  interface NodeSpawnResult {
795
869
  stdout: stream.Readable;
@@ -832,6 +906,8 @@ declare namespace PKG {
832
906
  cwd?: string;
833
907
  env?: Record<string, string | undefined>;
834
908
  timeout?: number;
909
+ windowsHide?: boolean;
910
+ shell?: boolean;
835
911
  }): Promise<{
836
912
  code: number;
837
913
  stdout: string;
@@ -1170,6 +1246,19 @@ declare namespace PackageRegistry {
1170
1246
  function isOutdated(pkg: string, cachedVersion: string, cwd?: string): Promise<boolean>;
1171
1247
  }
1172
1248
 
1249
+ interface ParseCommandResult {
1250
+ command: string;
1251
+ args: string[];
1252
+ options?: Record<string, unknown>;
1253
+ }
1254
+ declare function parseCommand(command: string): string[];
1255
+ declare function needsShellExecution(command: string): boolean;
1256
+ declare function parseCommandWithOptions(command: string): ParseCommandResult;
1257
+ declare function escapeCommandArg(arg: string, platform?: 'windows' | 'unix'): string;
1258
+ declare function escapeCommandArgSafe(arg: string, platform?: 'windows' | 'unix'): string;
1259
+ declare function detectPlatform(): 'windows' | 'unix';
1260
+ declare function joinCommandArgs(command: string, args: string[], platform?: 'windows' | 'unix'): string;
1261
+
1173
1262
  declare namespace Identifier {
1174
1263
  const prefixes: {
1175
1264
  readonly event: "evt";
@@ -1301,48 +1390,6 @@ declare namespace Lock {
1301
1390
  function write(key: string): Promise<Disposable>;
1302
1391
  }
1303
1392
 
1304
- declare namespace Process {
1305
- type Stdio = 'inherit' | 'pipe' | 'ignore';
1306
- type Shell = boolean | string;
1307
- interface Options {
1308
- cwd?: string;
1309
- env?: NodeJS.ProcessEnv | null;
1310
- stdin?: Stdio;
1311
- stdout?: Stdio;
1312
- stderr?: Stdio;
1313
- shell?: Shell;
1314
- abort?: AbortSignal;
1315
- kill?: NodeJS.Signals | number;
1316
- timeout?: number;
1317
- }
1318
- interface RunOptions extends Omit<Options, 'stdout' | 'stderr'> {
1319
- nothrow?: boolean;
1320
- }
1321
- interface Result {
1322
- code: number;
1323
- stdout: Buffer;
1324
- stderr: Buffer;
1325
- }
1326
- interface TextResult extends Result {
1327
- text: string;
1328
- }
1329
- class RunFailedError extends Error {
1330
- readonly cmd: string[];
1331
- readonly code: number;
1332
- readonly stdout: Buffer;
1333
- readonly stderr: Buffer;
1334
- constructor(cmd: string[], code: number, stdout: Buffer, stderr: Buffer);
1335
- }
1336
- type Child = ChildProcess & {
1337
- exited: Promise<number>;
1338
- };
1339
- function spawn(cmd: string[], opts?: Options): Child;
1340
- function run(cmd: string[], opts?: RunOptions): Promise<Result>;
1341
- function stop(proc: ChildProcess): Promise<void>;
1342
- function text(cmd: string[], opts?: RunOptions): Promise<TextResult>;
1343
- function lines(cmd: string[], opts?: RunOptions): Promise<string[]>;
1344
- }
1345
-
1346
1393
  declare function proxied(): boolean;
1347
1394
 
1348
1395
  declare class AsyncQueue<T> implements AsyncIterable<T> {
@@ -1395,4 +1442,4 @@ declare function initLog(options: {
1395
1442
  level?: 'DEBUG' | 'INFO' | 'WARN' | 'ERROR';
1396
1443
  }): Promise<void>;
1397
1444
 
1398
- export { $, Archive, AsyncQueue, Binary, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, type EasServer, Encode, EventLoop, type FenceSpan$1 as FenceSpan, Filesystem, Fn, type FormatOptions, type GitResult, Glob, Identifier, Ignore, type InlineCodeState$1 as InlineCodeState, Keybind, Lazy, Locale, Lock, Markdown, type MarkdownConfig, type MarkdownIR, type MarkdownLinkSpan, type MarkdownParseOptions, type MarkdownStyle, type MarkdownStyleSpan, type MarkdownTableMode, type MiddlewareDefinition, NamedError, type NodeSpawnObjectArgs, type NodeSpawnOptions, type NodeSpawnResult, type NodeWhichOptions, PKG, PackageRegistry, type ParsedFrontmatter, type ParsedVersion, PkgShell, Process, type RPCMethod, type RenderLink, type RenderOptions, type RouteDefinition, type SSEHandler, Semver, type ServerOptions, Slug, type StreamHandler, type StyleMarker, Token, TruncateContent, type WebSocketHandler, type WebSocketRouteDefinition, Wildcard, abortAfter, abortAfterAny, buildCodeSpanIndex, chunkMarkdownIR, chunkText, chunkTextByBreakResolver, convertMarkdownTables, createInlineCodeState, createPkgShell, createRESTServer, createRPCServer, createServer, createStreamingServer, createWebSocketServer, defer, extractFrontmatter, findFenceSpanAt, findLast, fn, formatDuration, formatLocalISO, formatLocalISOCompact, formatLogTime, formatMarkdown, getDirectory, getFileExtension, getFilename, getFilenameTruncated, getTimezoneOffset, git, iife, initLog, isSafeFenceBreak, lazy, lazyAsync, loadEnv, loadTextFile, loadTextFileAsync, markdownToIR, markdownToIRWithMeta, now, nowLocalISO, parseFenceSpans, parseFrontmatterBlock, parseLocalISO, parseModelId, proxied, readableStreamToText, renderMarkdown, renderMarkdownWithMarkers, retry, scanParenAwareBreakpoints, serializeFrontmatter, shell, signal, startServer, truncateMiddle, updateSchema, whichSync, withTimeout, work };
1445
+ export { $, Archive, AsyncQueue, Binary, type CodeSpanIndex$1 as CodeSpanIndex, Color, Context, type EasServer, Encode, EventLoop, type FenceSpan$1 as FenceSpan, Filesystem, Fn, type FormatOptions, type GitResult, Glob, Identifier, Ignore, type InlineCodeState$1 as InlineCodeState, Keybind, Lazy, Locale, Lock, Markdown, type MarkdownConfig, type MarkdownIR, type MarkdownLinkSpan, type MarkdownParseOptions, type MarkdownStyle, type MarkdownStyleSpan, type MarkdownTableMode, type MiddlewareDefinition, NamedError, type NodeSpawnObjectArgs, type NodeSpawnOptions, type NodeSpawnResult, type NodeWhichOptions, PKG, PackageRegistry, type ParseCommandResult, type ParsedFrontmatter, type ParsedVersion, PkgShell, type RPCMethod, type RenderLink, type RenderOptions, type RouteDefinition, type SSEHandler, Semver, type ServerOptions, Shell, Slug, type StreamHandler, type StyleMarker, Token, TruncateContent, type WebSocketHandler, type WebSocketRouteDefinition, Wildcard, abortAfter, abortAfterAny, buildCodeSpanIndex, chunkMarkdownIR, chunkText, chunkTextByBreakResolver, convertMarkdownTables, createInlineCodeState, createPkgShell, createRESTServer, createRPCServer, createServer, createStreamingServer, createWebSocketServer, defer, detectPlatform, escapeCommandArg, escapeCommandArgSafe, extractFrontmatter, findFenceSpanAt, findLast, fn, formatDuration, formatLocalISO, formatLocalISOCompact, formatLogTime, formatMarkdown, getDirectory, getFileExtension, getFilename, getFilenameTruncated, getTimezoneOffset, git, iife, initLog, isSafeFenceBreak, joinCommandArgs, lazy, lazyAsync, loadEnv, loadTextFile, loadTextFileAsync, markdownToIR, markdownToIRWithMeta, needsShellExecution, now, nowLocalISO, parseCommand, parseCommandWithOptions, parseFenceSpans, parseFrontmatterBlock, parseLocalISO, parseModelId, proxied, readableStreamToText, renderMarkdown, renderMarkdownWithMarkers, retry, scanParenAwareBreakpoints, serializeFrontmatter, shell, signal, startServer, truncateMiddle, updateSchema, whichSync, withTimeout, work };