@rizom/brain 0.2.0-alpha.50 → 0.2.0-alpha.52
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 +895 -793
- package/dist/entities.d.ts +51 -11
- package/dist/entities.js +108 -108
- package/dist/entities.js.map +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/interfaces.d.ts +19 -13
- package/dist/interfaces.js +68 -68
- package/dist/interfaces.js.map +5 -7
- package/dist/plugins.d.ts +104 -29
- package/dist/plugins.js +109 -109
- package/dist/plugins.js.map +21 -21
- package/dist/services.d.ts +51 -11
- package/dist/services.js +98 -98
- package/dist/services.js.map +5 -5
- package/dist/site.js +118 -116
- package/dist/site.js.map +70 -67
- package/dist/themes.js +9 -5
- package/dist/themes.js.map +2 -2
- package/package.json +1 -1
- package/templates/deploy/scripts/update-dns.ts +14 -4
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function t(i){return i}var e={name:"@rizom/brain",version:"0.2.0-alpha.
|
|
2
|
+
function t(i){return i}var e={name:"@rizom/brain",version:"0.2.0-alpha.52",description:"Brain runtime + CLI \u2014 scaffold, run, and manage AI brain instances",type:"module",bin:{brain:"./dist/brain.js"},exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js"},"./cli":"./dist/brain.js","./plugins":{types:"./dist/plugins.d.ts",import:"./dist/plugins.js"},"./entities":{types:"./dist/entities.d.ts",import:"./dist/entities.js"},"./services":{types:"./dist/services.d.ts",import:"./dist/services.js"},"./interfaces":{types:"./dist/interfaces.d.ts",import:"./dist/interfaces.js"},"./templates":{types:"./dist/templates.d.ts",import:"./dist/templates.js"},"./site":{types:"./dist/site.d.ts",import:"./dist/site.js"},"./themes":{types:"./dist/themes.d.ts",import:"./dist/themes.js"},"./deploy":{types:"./dist/deploy.d.ts",import:"./dist/deploy.js"},"./tsconfig.instance.json":"./tsconfig.instance.json"},files:["dist","templates","tsconfig.instance.json"],scripts:{build:"bun scripts/build.ts",prepublishOnly:"bun scripts/build.ts","dev:start":"bun dist/brain.js start",typecheck:"tsc --noEmit",test:"bun test",lint:"eslint . --ext .ts"},dependencies:{"@clack/prompts":"^0.11.0","@modelcontextprotocol/sdk":"^1.24.0","@tailwindcss/postcss":"^4.1.13","@tailwindcss/typography":"^0.5.19",postcss:"^8.5.6",preact:"^10.27.2","preact-render-to-string":"^6.3.1",tailwindcss:"^4.1.11"},optionalDependencies:{"@bitwarden/sdk-napi":"^1.0.0","@libsql/client":"^0.15.7","@tailwindcss/oxide":"^4.1.4","better-sqlite3":"^11.8.1",lightningcss:"^1.29.2","react-devtools-core":"^6.1.1",sharp:"^0.34.5"},devDependencies:{"@brains/app":"workspace:*","@brains/deploy-templates":"workspace:*","@brains/eslint-config":"workspace:*","@brains/mcp-service":"workspace:*","@brains/plugins":"workspace:*","@brains/ranger":"workspace:*","@brains/relay":"workspace:*","@brains/rover":"workspace:*","@brains/site-composition":"workspace:*","@brains/site-default":"workspace:*","@brains/site-personal":"workspace:*","@brains/site-professional":"workspace:*","@brains/theme-default":"workspace:*","@brains/theme-rizom":"workspace:*","@brains/typescript-config":"workspace:*","@brains/utils":"workspace:*","@types/bun":"latest",rollup:"^4.60.2","rollup-plugin-dts":"^6.4.1",typescript:"^5.3.3"},publishConfig:{access:"public"},repository:{type:"git",url:"https://github.com/rizom-ai/brains.git",directory:"packages/brain-cli"},license:"Apache-2.0",author:"Yeehaa <yeehaa@rizom.ai> (https://rizom.ai)",homepage:"https://github.com/rizom-ai/brains/tree/main/packages/brain-cli#readme",bugs:"https://github.com/rizom-ai/brains/issues",engines:{bun:">=1.3.3"},keywords:["brain","ai","cli","mcp","agent","personal-ai","knowledge-management"]};var n=e.version;export{t as defineBrain,n as PLUGIN_API_VERSION};
|
|
3
3
|
|
|
4
|
-
//# debugId=
|
|
4
|
+
//# debugId=19EEC3BE94ED73C264756E2164756E21
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../shell/app/src/contracts/brain-definition.ts", "../src/plugin-api-version.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"/** Public brain definition contract for external authors. */\n\nexport type BrainEnvironment = Record<string, string | undefined>;\nexport type PluginConfig = Record<string, unknown>;\n\nexport interface Plugin {\n readonly id: string;\n readonly version: string;\n readonly type: \"core\" | \"entity\" | \"service\" | \"interface\";\n readonly packageName: string;\n readonly description?: string;\n readonly dependencies?: string[];\n ready?(): Promise<void>;\n shutdown?(): Promise<void>;\n requiresDaemonStartup?(): boolean;\n}\n\nexport type CapabilityConfig =\n | PluginConfig\n | ((env: BrainEnvironment) => PluginConfig)\n | undefined;\n\nexport type PluginFactory = (config: PluginConfig) => Plugin | Plugin[];\n\nexport type CapabilityEntry = [\n id: string,\n factory: PluginFactory,\n config: CapabilityConfig,\n];\n\nexport type InterfaceConstructor = new (config: PluginConfig) => Plugin;\n\nexport type InterfaceEntry = [\n id: string,\n constructor: InterfaceConstructor,\n envMapper: (env: BrainEnvironment) => PluginConfig | null,\n];\n\nexport type PresetName = \"core\" | \"default\" | \"full\";\nexport type BrainMode = \"eval\";\n\nexport interface BrainIdentity {\n characterName: string;\n role: string;\n purpose: string;\n values: string[];\n}\n\nexport interface BrainDefinition {\n name: string;\n version: string;\n model?: string;\n identity?: BrainIdentity;\n site?: unknown;\n theme?: string;\n capabilities: CapabilityEntry[];\n interfaces: InterfaceEntry[];\n presets?: Partial<Record<PresetName, string[]>>;\n defaultPreset?: PresetName;\n permissions?: unknown;\n deployment?: unknown;\n evalDisable?: string[];\n extra?: Record<string, unknown>;\n}\n\nexport function defineBrain(definition: BrainDefinition): BrainDefinition {\n return definition;\n}\n",
|
|
5
|
+
"/** Public brain definition contract for external authors. */\n\nexport type BrainEnvironment = Record<string, string | undefined>;\nexport type PluginConfig = Record<string, unknown>;\n\nexport interface Plugin {\n readonly id: string;\n readonly version: string;\n readonly type: \"core\" | \"entity\" | \"service\" | \"interface\";\n readonly packageName: string;\n readonly description?: string;\n readonly dependencies?: string[];\n ready?(): Promise<void>;\n shutdown?(): Promise<void>;\n requiresDaemonStartup?(): boolean;\n}\n\nexport type CapabilityConfig =\n | PluginConfig\n | ((env: BrainEnvironment) => PluginConfig)\n | undefined;\n\nexport type PluginFactory = (config: PluginConfig) => Plugin | Plugin[];\n\nexport type CapabilityEntry = [\n id: string,\n factory: PluginFactory,\n config: CapabilityConfig,\n];\n\nexport type InterfaceConstructor = new (config: PluginConfig) => Plugin;\n\nexport type InterfaceEntry = [\n id: string,\n constructor: InterfaceConstructor,\n envMapper: (env: BrainEnvironment) => PluginConfig | null,\n];\n\nexport type PresetName = \"core\" | \"default\" | \"full\";\nexport type BrainMode = \"eval\";\n\nexport interface BrainIdentity {\n characterName: string;\n role: string;\n purpose: string;\n values: string[];\n}\n\nexport interface BrainDefinition {\n name: string;\n version: string;\n model?: string;\n identity?: BrainIdentity;\n agentInstructions?: string[];\n site?: unknown;\n theme?: string;\n capabilities: CapabilityEntry[];\n interfaces: InterfaceEntry[];\n presets?: Partial<Record<PresetName, string[]>>;\n defaultPreset?: PresetName;\n permissions?: unknown;\n deployment?: unknown;\n evalDisable?: string[];\n extra?: Record<string, unknown>;\n}\n\nexport function defineBrain(definition: BrainDefinition): BrainDefinition {\n return definition;\n}\n",
|
|
6
6
|
"import packageJson from \"../package.json\" with { type: \"json\" };\n\n/**\n * Pre-v1 external plugin API marker.\n *\n * During alpha, the external plugin API compatibility marker tracks the\n * published @rizom/brain package version. Once the plugin API is declared\n * stable, this can move to an independent semver contract such as 1.0.0.\n */\nexport const PLUGIN_API_VERSION = packageJson.version;\n"
|
|
7
7
|
],
|
|
8
|
-
"mappings": ";
|
|
9
|
-
"debugId": "
|
|
8
|
+
"mappings": ";AAkEO,SAAS,CAAW,CAAC,EAA8C,CACxE,OAAO,moFC1DF,IAAM,EAAqB,EAAY",
|
|
9
|
+
"debugId": "19EEC3BE94ED73C264756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Best-effort extension metadata carried across public DTO boundaries.
|
|
5
|
+
*
|
|
6
|
+
* Individual keys are not stable public API. When a metadata value becomes a
|
|
7
|
+
* documented contract, hoist it to a typed top-level field on the owning DTO
|
|
8
|
+
* schema and keep this bag only as optional extension data.
|
|
9
|
+
*/
|
|
10
|
+
declare const ExtensionMetadataSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
11
|
+
|
|
3
12
|
declare const MessageResponseSchema: z.ZodUnion<[z.ZodObject<{
|
|
4
13
|
success: z.ZodBoolean;
|
|
5
14
|
data: z.ZodOptional<z.ZodUnknown>;
|
|
@@ -54,9 +63,15 @@ type MessageWithPayload<T = unknown> = BaseMessage & {
|
|
|
54
63
|
payload: T;
|
|
55
64
|
};
|
|
56
65
|
interface MessageSendOptions {
|
|
66
|
+
target?: string;
|
|
67
|
+
metadata?: z.infer<typeof ExtensionMetadataSchema>;
|
|
57
68
|
broadcast?: boolean;
|
|
58
69
|
}
|
|
59
|
-
|
|
70
|
+
interface MessageSendRequest<T = unknown> extends MessageSendOptions {
|
|
71
|
+
type: string;
|
|
72
|
+
payload: T;
|
|
73
|
+
}
|
|
74
|
+
type MessageSender<T = unknown, R = unknown> = (request: MessageSendRequest<T>) => Promise<MessageResponse<R>>;
|
|
60
75
|
interface MessageContext {
|
|
61
76
|
userId?: string;
|
|
62
77
|
channelId?: string;
|
|
@@ -710,21 +725,12 @@ declare const GetRoutePayloadSchema: z.ZodObject<{
|
|
|
710
725
|
}, {
|
|
711
726
|
path: string;
|
|
712
727
|
}>;
|
|
713
|
-
/** Navigation item
|
|
714
|
-
|
|
715
|
-
label: z.ZodString;
|
|
716
|
-
href: z.ZodString;
|
|
717
|
-
priority: z.ZodNumber;
|
|
718
|
-
}, "strip", z.ZodTypeAny, {
|
|
728
|
+
/** Navigation item interface for extracted navigation data. */
|
|
729
|
+
interface NavigationItem {
|
|
719
730
|
label: string;
|
|
720
|
-
priority: number;
|
|
721
731
|
href: string;
|
|
722
|
-
}, {
|
|
723
|
-
label: string;
|
|
724
732
|
priority: number;
|
|
725
|
-
|
|
726
|
-
}>;
|
|
727
|
-
type NavigationItem = z.infer<typeof NavigationItemSchema>;
|
|
733
|
+
}
|
|
728
734
|
|
|
729
735
|
declare const apiRouteDefinitionSchema: z.ZodObject<{
|
|
730
736
|
/** Path suffix (prefixed with /api/{pluginId}) */
|