@rizom/brain 0.2.0-alpha.46 → 0.2.0-alpha.47
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/brain.js +511 -511
- package/dist/entities.d.ts +1 -1
- package/dist/index.js +82 -82
- package/dist/index.js.map +7 -7
- package/dist/interfaces.d.ts +1 -1
- package/dist/interfaces.js +2 -2
- package/dist/interfaces.js.map +3 -3
- package/dist/plugins.d.ts +166 -22
- package/dist/plugins.js +2 -2
- package/dist/plugins.js.map +3 -3
- package/dist/services.d.ts +1 -1
- package/dist/services.js +2 -2
- package/dist/services.js.map +3 -3
- package/dist/site.js +6 -6
- package/dist/site.js.map +3 -3
- package/dist/templates.d.ts +1 -1
- package/package.json +1 -5
- package/dist/utils.d.ts +0 -133
- package/dist/utils.js +0 -174
- package/dist/utils.js.map +0 -211
package/dist/templates.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rizom/brain",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.47",
|
|
4
4
|
"description": "Brain runtime + CLI — scaffold, run, and manage AI brain instances",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -32,10 +32,6 @@
|
|
|
32
32
|
"types": "./dist/templates.d.ts",
|
|
33
33
|
"import": "./dist/templates.js"
|
|
34
34
|
},
|
|
35
|
-
"./utils": {
|
|
36
|
-
"types": "./dist/utils.d.ts",
|
|
37
|
-
"import": "./dist/utils.js"
|
|
38
|
-
},
|
|
39
35
|
"./site": {
|
|
40
36
|
"types": "./dist/site.d.ts",
|
|
41
37
|
"import": "./dist/site.js"
|
package/dist/utils.d.ts
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
export namespace z {
|
|
2
|
-
export interface SafeParseSuccess<T> {
|
|
3
|
-
success: true;
|
|
4
|
-
data: T;
|
|
5
|
-
}
|
|
6
|
-
export interface SafeParseError {
|
|
7
|
-
success: false;
|
|
8
|
-
error: ZodError;
|
|
9
|
-
}
|
|
10
|
-
export type SafeParseReturnType<T> = SafeParseSuccess<T> | SafeParseError;
|
|
11
|
-
export interface ZodType<T = unknown> {
|
|
12
|
-
parse(data: unknown): T;
|
|
13
|
-
safeParse(data: unknown): SafeParseReturnType<T>;
|
|
14
|
-
}
|
|
15
|
-
export type ZodSchema<T = unknown> = ZodType<T>;
|
|
16
|
-
export type ZodTypeAny = ZodType<unknown>;
|
|
17
|
-
export type ZodRawShape = Record<string, ZodTypeAny>;
|
|
18
|
-
export type infer<T extends ZodTypeAny> =
|
|
19
|
-
T extends ZodType<infer Output> ? Output : never;
|
|
20
|
-
export type input<T extends ZodTypeAny> =
|
|
21
|
-
T extends ZodType<infer Output> ? Output : never;
|
|
22
|
-
export type output<T extends ZodTypeAny> =
|
|
23
|
-
T extends ZodType<infer Output> ? Output : never;
|
|
24
|
-
export interface ZodObject<
|
|
25
|
-
TShape extends ZodRawShape = ZodRawShape,
|
|
26
|
-
> extends ZodType<Record<keyof TShape, unknown>> {
|
|
27
|
-
shape: TShape;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export const z: {
|
|
32
|
-
object<TShape extends z.ZodRawShape>(shape: TShape): z.ZodObject<TShape>;
|
|
33
|
-
string(): z.ZodType<string>;
|
|
34
|
-
number(): z.ZodType<number>;
|
|
35
|
-
boolean(): z.ZodType<boolean>;
|
|
36
|
-
unknown(): z.ZodType<unknown>;
|
|
37
|
-
array<T extends z.ZodTypeAny>(schema: T): z.ZodType<Array<z.infer<T>>>;
|
|
38
|
-
record<T extends z.ZodTypeAny>(
|
|
39
|
-
schema: T,
|
|
40
|
-
): z.ZodType<Record<string, z.infer<T>>>;
|
|
41
|
-
enum<T extends readonly [string, ...string[]]>(
|
|
42
|
-
values: T,
|
|
43
|
-
): z.ZodType<T[number]>;
|
|
44
|
-
optional<T extends z.ZodTypeAny>(
|
|
45
|
-
schema: T,
|
|
46
|
-
): z.ZodType<z.infer<T> | undefined>;
|
|
47
|
-
};
|
|
48
|
-
export class ZodError extends Error {}
|
|
49
|
-
export type ZodType<T = unknown> = z.ZodType<T>;
|
|
50
|
-
export type ZodSchema<T = unknown> = z.ZodSchema<T>;
|
|
51
|
-
export type ZodRawShape = z.ZodRawShape;
|
|
52
|
-
export type ZodTypeAny = z.ZodTypeAny;
|
|
53
|
-
export type ZodInfer<T extends z.ZodTypeAny> = z.infer<T>;
|
|
54
|
-
export type ZodInput<T extends z.ZodTypeAny> = z.input<T>;
|
|
55
|
-
export type ZodOutput<T extends z.ZodTypeAny> = z.output<T>;
|
|
56
|
-
|
|
57
|
-
export enum LogLevel {
|
|
58
|
-
DEBUG = "debug",
|
|
59
|
-
INFO = "info",
|
|
60
|
-
WARN = "warn",
|
|
61
|
-
ERROR = "error",
|
|
62
|
-
}
|
|
63
|
-
export type LogFormat = "pretty" | "json";
|
|
64
|
-
export interface LoggerOptions {
|
|
65
|
-
context?: string;
|
|
66
|
-
level?: LogLevel | string;
|
|
67
|
-
format?: LogFormat;
|
|
68
|
-
}
|
|
69
|
-
export class Logger {
|
|
70
|
-
static createFresh(options?: LoggerOptions): Logger;
|
|
71
|
-
debug(message: string, data?: unknown): void;
|
|
72
|
-
info(message: string, data?: unknown): void;
|
|
73
|
-
warn(message: string, data?: unknown): void;
|
|
74
|
-
error(message: string, data?: unknown): void;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function getErrorMessage(error: unknown): string;
|
|
78
|
-
export function toError(error: unknown): Error;
|
|
79
|
-
export function createId(): string;
|
|
80
|
-
export function createPrefixedId(prefix: string): string;
|
|
81
|
-
export function createBatchId(): string;
|
|
82
|
-
export function slugify(text: string): string;
|
|
83
|
-
export function generateIdFromText(text: string): string;
|
|
84
|
-
export function pluralize(word: string): string;
|
|
85
|
-
export function toDisplayName(value: string): string;
|
|
86
|
-
export function formatLabel(value: string): string;
|
|
87
|
-
export function truncateText(text: string, maxLength: number): string;
|
|
88
|
-
export function calculateReadingTime(text: string): number;
|
|
89
|
-
export function interpolateEnvVar(
|
|
90
|
-
value: string,
|
|
91
|
-
env?: Record<string, string | undefined>,
|
|
92
|
-
): string;
|
|
93
|
-
export function interpolateEnv<T>(
|
|
94
|
-
value: T,
|
|
95
|
-
env?: Record<string, string | undefined>,
|
|
96
|
-
): T;
|
|
97
|
-
|
|
98
|
-
export interface ParsedMarkdown {
|
|
99
|
-
content: string;
|
|
100
|
-
data: Record<string, unknown>;
|
|
101
|
-
}
|
|
102
|
-
export function parseMarkdown(markdown: string): ParsedMarkdown;
|
|
103
|
-
export function generateMarkdown(
|
|
104
|
-
content: string,
|
|
105
|
-
data?: Record<string, unknown>,
|
|
106
|
-
): string;
|
|
107
|
-
export function extractTitle(markdown: string): string | undefined;
|
|
108
|
-
export function markdownToHtml(markdown: string): string | Promise<string>;
|
|
109
|
-
export function stripMarkdown(markdown: string): string;
|
|
110
|
-
export function toYaml(value: unknown): string;
|
|
111
|
-
export function fromYaml<T = unknown>(yaml: string): T;
|
|
112
|
-
export function isValidYaml(yaml: string): boolean;
|
|
113
|
-
export function parseYamlDocument<T = unknown>(yaml: string): T;
|
|
114
|
-
|
|
115
|
-
export interface ProgressNotification {
|
|
116
|
-
progress?: number;
|
|
117
|
-
total?: number;
|
|
118
|
-
message?: string;
|
|
119
|
-
}
|
|
120
|
-
export type ProgressCallback = (
|
|
121
|
-
notification: ProgressNotification,
|
|
122
|
-
) => void | Promise<void>;
|
|
123
|
-
export interface IJobProgressMonitor {
|
|
124
|
-
report(notification: ProgressNotification): Promise<void>;
|
|
125
|
-
}
|
|
126
|
-
export class ProgressReporter {
|
|
127
|
-
static from(callback: ProgressCallback): ProgressReporter;
|
|
128
|
-
report(notification: ProgressNotification): Promise<void>;
|
|
129
|
-
}
|
|
130
|
-
export class JobResult {
|
|
131
|
-
static success<T = unknown>(data?: T): T;
|
|
132
|
-
static failure(message: string): never;
|
|
133
|
-
}
|