@jazzmind/busibox-app 3.0.55 → 3.0.57
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/components/chat/ChatContainer.d.ts.map +1 -1
- package/dist/components/chat/ChatContainer.js +1 -0
- package/dist/components/chat/ChatContainer.js.map +1 -1
- package/dist/components/chat/MessageList.d.ts.map +1 -1
- package/dist/components/chat/MessageList.js +11 -4
- package/dist/components/chat/MessageList.js.map +1 -1
- package/dist/platform/adapters/busibox/ai.d.ts +31 -0
- package/dist/platform/adapters/busibox/ai.d.ts.map +1 -0
- package/dist/platform/adapters/busibox/ai.js +198 -0
- package/dist/platform/adapters/busibox/ai.js.map +1 -0
- package/dist/platform/adapters/busibox/auth.d.ts +25 -0
- package/dist/platform/adapters/busibox/auth.d.ts.map +1 -0
- package/dist/platform/adapters/busibox/auth.js +76 -0
- package/dist/platform/adapters/busibox/auth.js.map +1 -0
- package/dist/platform/adapters/busibox/data.d.ts +30 -0
- package/dist/platform/adapters/busibox/data.d.ts.map +1 -0
- package/dist/platform/adapters/busibox/data.js +163 -0
- package/dist/platform/adapters/busibox/data.js.map +1 -0
- package/dist/platform/adapters/busibox/index.d.ts +36 -0
- package/dist/platform/adapters/busibox/index.d.ts.map +1 -0
- package/dist/platform/adapters/busibox/index.js +66 -0
- package/dist/platform/adapters/busibox/index.js.map +1 -0
- package/dist/platform/adapters/busibox/search.d.ts +21 -0
- package/dist/platform/adapters/busibox/search.d.ts.map +1 -0
- package/dist/platform/adapters/busibox/search.js +62 -0
- package/dist/platform/adapters/busibox/search.js.map +1 -0
- package/dist/platform/adapters/busibox/storage.d.ts +28 -0
- package/dist/platform/adapters/busibox/storage.d.ts.map +1 -0
- package/dist/platform/adapters/busibox/storage.js +107 -0
- package/dist/platform/adapters/busibox/storage.js.map +1 -0
- package/dist/platform/adapters/vercel/ai.d.ts +36 -0
- package/dist/platform/adapters/vercel/ai.d.ts.map +1 -0
- package/dist/platform/adapters/vercel/ai.js +150 -0
- package/dist/platform/adapters/vercel/ai.js.map +1 -0
- package/dist/platform/adapters/vercel/auth.d.ts +22 -0
- package/dist/platform/adapters/vercel/auth.d.ts.map +1 -0
- package/dist/platform/adapters/vercel/auth.js +75 -0
- package/dist/platform/adapters/vercel/auth.js.map +1 -0
- package/dist/platform/adapters/vercel/data.d.ts +25 -0
- package/dist/platform/adapters/vercel/data.d.ts.map +1 -0
- package/dist/platform/adapters/vercel/data.js +194 -0
- package/dist/platform/adapters/vercel/data.js.map +1 -0
- package/dist/platform/adapters/vercel/index.d.ts +43 -0
- package/dist/platform/adapters/vercel/index.d.ts.map +1 -0
- package/dist/platform/adapters/vercel/index.js +44 -0
- package/dist/platform/adapters/vercel/index.js.map +1 -0
- package/dist/platform/adapters/vercel/search.d.ts +27 -0
- package/dist/platform/adapters/vercel/search.d.ts.map +1 -0
- package/dist/platform/adapters/vercel/search.js +140 -0
- package/dist/platform/adapters/vercel/search.js.map +1 -0
- package/dist/platform/adapters/vercel/storage.d.ts +30 -0
- package/dist/platform/adapters/vercel/storage.d.ts.map +1 -0
- package/dist/platform/adapters/vercel/storage.js +82 -0
- package/dist/platform/adapters/vercel/storage.js.map +1 -0
- package/dist/platform/config.d.ts +17 -0
- package/dist/platform/config.d.ts.map +1 -0
- package/dist/platform/config.js +32 -0
- package/dist/platform/config.js.map +1 -0
- package/dist/platform/index.d.ts +21 -0
- package/dist/platform/index.d.ts.map +1 -0
- package/dist/platform/index.js +41 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/platform/interfaces/ai.d.ts +74 -0
- package/dist/platform/interfaces/ai.d.ts.map +1 -0
- package/dist/platform/interfaces/ai.js +2 -0
- package/dist/platform/interfaces/ai.js.map +1 -0
- package/dist/platform/interfaces/auth.d.ts +21 -0
- package/dist/platform/interfaces/auth.d.ts.map +1 -0
- package/dist/platform/interfaces/auth.js +2 -0
- package/dist/platform/interfaces/auth.js.map +1 -0
- package/dist/platform/interfaces/data.d.ts +49 -0
- package/dist/platform/interfaces/data.d.ts.map +1 -0
- package/dist/platform/interfaces/data.js +2 -0
- package/dist/platform/interfaces/data.js.map +1 -0
- package/dist/platform/interfaces/index.d.ts +6 -0
- package/dist/platform/interfaces/index.d.ts.map +1 -0
- package/dist/platform/interfaces/index.js +2 -0
- package/dist/platform/interfaces/index.js.map +1 -0
- package/dist/platform/interfaces/search.d.ts +19 -0
- package/dist/platform/interfaces/search.d.ts.map +1 -0
- package/dist/platform/interfaces/search.js +2 -0
- package/dist/platform/interfaces/search.js.map +1 -0
- package/dist/platform/interfaces/storage.d.ts +25 -0
- package/dist/platform/interfaces/storage.d.ts.map +1 -0
- package/dist/platform/interfaces/storage.js +2 -0
- package/dist/platform/interfaces/storage.js.map +1 -0
- package/package.json +59 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export function detectPlatform() {
|
|
2
|
+
if (process.env.BUSIBOX_PLATFORM) {
|
|
3
|
+
return process.env.BUSIBOX_PLATFORM;
|
|
4
|
+
}
|
|
5
|
+
if (process.env.AGENT_API_URL || process.env.DATA_API_URL)
|
|
6
|
+
return 'busibox';
|
|
7
|
+
if (process.env.DATABASE_URL || process.env.VERCEL)
|
|
8
|
+
return 'vercel';
|
|
9
|
+
return 'vercel';
|
|
10
|
+
}
|
|
11
|
+
export function getPlatformConfig() {
|
|
12
|
+
return {
|
|
13
|
+
type: detectPlatform(),
|
|
14
|
+
overrides: parseOverrides(),
|
|
15
|
+
options: {},
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function parseOverrides() {
|
|
19
|
+
const overrides = {};
|
|
20
|
+
if (process.env.BUSIBOX_PLATFORM_AI)
|
|
21
|
+
overrides.ai = process.env.BUSIBOX_PLATFORM_AI;
|
|
22
|
+
if (process.env.BUSIBOX_PLATFORM_DATA)
|
|
23
|
+
overrides.data = process.env.BUSIBOX_PLATFORM_DATA;
|
|
24
|
+
if (process.env.BUSIBOX_PLATFORM_SEARCH)
|
|
25
|
+
overrides.search = process.env.BUSIBOX_PLATFORM_SEARCH;
|
|
26
|
+
if (process.env.BUSIBOX_PLATFORM_STORAGE)
|
|
27
|
+
overrides.storage = process.env.BUSIBOX_PLATFORM_STORAGE;
|
|
28
|
+
if (process.env.BUSIBOX_PLATFORM_AUTH)
|
|
29
|
+
overrides.auth = process.env.BUSIBOX_PLATFORM_AUTH;
|
|
30
|
+
return Object.keys(overrides).length > 0 ? overrides : undefined;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/platform/config.ts"],"names":[],"mappings":"AAgBA,MAAM,UAAU,cAAc;IAC5B,IAAI,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;QACjC,OAAO,OAAO,CAAC,GAAG,CAAC,gBAAgC,CAAC;IACtD,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY;QAAE,OAAO,SAAS,CAAC;IAC5E,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM;QAAE,OAAO,QAAQ,CAAC;IACpE,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL,IAAI,EAAE,cAAc,EAAE;QACtB,SAAS,EAAE,cAAc,EAAE;QAC3B,OAAO,EAAE,EAAE;KACZ,CAAC;AACJ,CAAC;AAED,SAAS,cAAc;IACrB,MAAM,SAAS,GAAgC,EAAE,CAAC;IAClD,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB;QAAE,SAAS,CAAC,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmC,CAAC;IACpG,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB;QAAE,SAAS,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqC,CAAC;IAC1G,IAAI,OAAO,CAAC,GAAG,CAAC,uBAAuB;QAAE,SAAS,CAAC,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuC,CAAC;IAChH,IAAI,OAAO,CAAC,GAAG,CAAC,wBAAwB;QAAE,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwC,CAAC;IACnH,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB;QAAE,SAAS,CAAC,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqC,CAAC;IAC1G,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AIAdapter } from './interfaces/ai';
|
|
2
|
+
import type { DataAdapter } from './interfaces/data';
|
|
3
|
+
import type { SearchAdapter } from './interfaces/search';
|
|
4
|
+
import type { StorageAdapter } from './interfaces/storage';
|
|
5
|
+
import type { AuthAdapter } from './interfaces/auth';
|
|
6
|
+
import { type PlatformConfig, type PlatformType } from './config';
|
|
7
|
+
export interface Platform {
|
|
8
|
+
readonly type: PlatformType;
|
|
9
|
+
readonly ai: AIAdapter;
|
|
10
|
+
readonly data: DataAdapter;
|
|
11
|
+
readonly search: SearchAdapter;
|
|
12
|
+
readonly storage: StorageAdapter;
|
|
13
|
+
readonly auth: AuthAdapter;
|
|
14
|
+
}
|
|
15
|
+
export declare function getPlatform(): Platform;
|
|
16
|
+
export declare function resetPlatform(): void;
|
|
17
|
+
export declare function createPlatform(config: PlatformConfig): Platform;
|
|
18
|
+
export declare function registerAdapter(platform: PlatformType, service: string, adapter: unknown): void;
|
|
19
|
+
export * from './interfaces';
|
|
20
|
+
export { detectPlatform, getPlatformConfig, type PlatformConfig, type PlatformType } from './config';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAqB,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAErF,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;CAC5B;AAID,wBAAgB,WAAW,IAAI,QAAQ,CAKtC;AAED,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,QAAQ,CAY/D;AAKD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAG/F;AAcD,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getPlatformConfig } from './config';
|
|
2
|
+
let _instance = null;
|
|
3
|
+
export function getPlatform() {
|
|
4
|
+
if (!_instance) {
|
|
5
|
+
_instance = createPlatform(getPlatformConfig());
|
|
6
|
+
}
|
|
7
|
+
return _instance;
|
|
8
|
+
}
|
|
9
|
+
export function resetPlatform() {
|
|
10
|
+
_instance = null;
|
|
11
|
+
}
|
|
12
|
+
export function createPlatform(config) {
|
|
13
|
+
const adapterType = (service) => config.overrides?.[service] ?? config.type;
|
|
14
|
+
return {
|
|
15
|
+
type: config.type,
|
|
16
|
+
get ai() { return loadAdapter('ai', adapterType('ai')); },
|
|
17
|
+
get data() { return loadAdapter('data', adapterType('data')); },
|
|
18
|
+
get search() { return loadAdapter('search', adapterType('search')); },
|
|
19
|
+
get storage() { return loadAdapter('storage', adapterType('storage')); },
|
|
20
|
+
get auth() { return loadAdapter('auth', adapterType('auth')); },
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
// Adapter registry — populated by adapter packages via registerAdapter()
|
|
24
|
+
const registry = {};
|
|
25
|
+
export function registerAdapter(platform, service, adapter) {
|
|
26
|
+
if (!registry[platform])
|
|
27
|
+
registry[platform] = {};
|
|
28
|
+
registry[platform][service] = adapter;
|
|
29
|
+
}
|
|
30
|
+
function loadAdapter(service, platform) {
|
|
31
|
+
const adapter = registry[platform]?.[service];
|
|
32
|
+
if (!adapter) {
|
|
33
|
+
throw new Error(`No ${service} adapter registered for platform "${platform}". ` +
|
|
34
|
+
`Import "@jazzmind/busibox-app/platform/${platform}" to register adapters.`);
|
|
35
|
+
}
|
|
36
|
+
return adapter;
|
|
37
|
+
}
|
|
38
|
+
// Re-export all interfaces
|
|
39
|
+
export * from './interfaces';
|
|
40
|
+
export { detectPlatform, getPlatformConfig } from './config';
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/platform/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAA0C,MAAM,UAAU,CAAC;AAWrF,IAAI,SAAS,GAAoB,IAA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AAC,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;AACxC,CAAC;AAED,SAAS,WAAW,CAAI,OAAe,EAAE,QAAsB;IAC7D,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;IAC9C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CACb,MAAM,OAAO,qCAAqC,QAAQ,KAAK;YAC/D,0CAA0C,QAAQ,yBAAyB,CAC5E,CAAC;IACJ,CAAC;IACD,OAAO,OAAY,CAAC;AACtB,CAAC;AAED,2BAA2B;AAC3B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAA0C,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ZodSchema } from 'zod';
|
|
2
|
+
export interface StreamEvent {
|
|
3
|
+
type: 'text-delta' | 'tool-call' | 'tool-result' | 'error' | 'done';
|
|
4
|
+
/** Incremental text chunk (type=text-delta) */
|
|
5
|
+
content?: string;
|
|
6
|
+
/** Tool call metadata (type=tool-call) */
|
|
7
|
+
toolCall?: {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
args: Record<string, unknown>;
|
|
11
|
+
};
|
|
12
|
+
/** Tool result (type=tool-result) */
|
|
13
|
+
toolResult?: {
|
|
14
|
+
id: string;
|
|
15
|
+
result: unknown;
|
|
16
|
+
};
|
|
17
|
+
/** Error message (type=error) */
|
|
18
|
+
error?: string;
|
|
19
|
+
/** Usage stats (type=done) */
|
|
20
|
+
usage?: {
|
|
21
|
+
inputTokens: number;
|
|
22
|
+
outputTokens: number;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface Message {
|
|
26
|
+
role: 'user' | 'assistant' | 'system';
|
|
27
|
+
content: string;
|
|
28
|
+
toolCalls?: Array<{
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
args: Record<string, unknown>;
|
|
32
|
+
}>;
|
|
33
|
+
toolResults?: Array<{
|
|
34
|
+
id: string;
|
|
35
|
+
result: unknown;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
export interface ToolDef {
|
|
39
|
+
name: string;
|
|
40
|
+
description: string;
|
|
41
|
+
parameters: ZodSchema;
|
|
42
|
+
}
|
|
43
|
+
export interface AgentDefinition {
|
|
44
|
+
name: string;
|
|
45
|
+
displayName: string;
|
|
46
|
+
instructions: string;
|
|
47
|
+
model?: string;
|
|
48
|
+
tools?: string[];
|
|
49
|
+
scopes?: string[];
|
|
50
|
+
}
|
|
51
|
+
export interface ModelInfo {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
provider: string;
|
|
55
|
+
capabilities: ('chat' | 'structured' | 'vision' | 'tools')[];
|
|
56
|
+
}
|
|
57
|
+
export interface AIAdapter {
|
|
58
|
+
streamChat(params: {
|
|
59
|
+
messages: Message[];
|
|
60
|
+
agent?: string;
|
|
61
|
+
model?: string;
|
|
62
|
+
tools?: ToolDef[];
|
|
63
|
+
systemPrompt?: string;
|
|
64
|
+
}): Promise<ReadableStream<StreamEvent>>;
|
|
65
|
+
invoke<T>(params: {
|
|
66
|
+
agent?: string;
|
|
67
|
+
input: Record<string, unknown>;
|
|
68
|
+
responseSchema: ZodSchema<T>;
|
|
69
|
+
model?: string;
|
|
70
|
+
}): Promise<T>;
|
|
71
|
+
syncAgents?(definitions: AgentDefinition[]): Promise<void>;
|
|
72
|
+
listModels?(): Promise<ModelInfo[]>;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=ai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../../src/platform/interfaces/ai.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,YAAY,GA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KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,CAAC,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC,EAAE,CAAC;CAC9D;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,MAAM,EAAE;QACjB,QAAQ,EAAE,OAAO,EAAE,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC;QAClB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CAAC;IAEzC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC/B,cAAc,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC;QAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAEf,UAAU,CAAC,CAAC,WAAW,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,UAAU,CAAC,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;CACrC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.js","sourceRoot":"","sources":["../../../src/platform/interfaces/ai.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface PlatformUser {
|
|
2
|
+
id: string;
|
|
3
|
+
email: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
role?: string;
|
|
6
|
+
metadata?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export interface TokenClaims {
|
|
9
|
+
sub: string;
|
|
10
|
+
aud?: string;
|
|
11
|
+
exp: number;
|
|
12
|
+
scopes?: string[];
|
|
13
|
+
[key: string]: unknown;
|
|
14
|
+
}
|
|
15
|
+
export interface AuthAdapter {
|
|
16
|
+
getCurrentUser(request: Request): Promise<PlatformUser | null>;
|
|
17
|
+
getServiceToken?(audience: string): Promise<string>;
|
|
18
|
+
validateToken?(token: string): Promise<TokenClaims | null>;
|
|
19
|
+
requireAuth?(request: Request): Promise<PlatformUser>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/platform/interfaces/auth.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAC/D,eAAe,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpD,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC3D,WAAW,CAAC,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;CACvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/platform/interfaces/auth.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type FilterOp = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'contains' | 'startsWith';
|
|
2
|
+
export interface Filter {
|
|
3
|
+
field: string;
|
|
4
|
+
op: FilterOp;
|
|
5
|
+
value: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface SortField {
|
|
8
|
+
field: string;
|
|
9
|
+
direction: 'asc' | 'desc';
|
|
10
|
+
}
|
|
11
|
+
export interface FieldDef {
|
|
12
|
+
name: string;
|
|
13
|
+
type: 'text' | 'integer' | 'float' | 'boolean' | 'timestamp' | 'json' | 'uuid';
|
|
14
|
+
nullable?: boolean;
|
|
15
|
+
default?: unknown;
|
|
16
|
+
primaryKey?: boolean;
|
|
17
|
+
unique?: boolean;
|
|
18
|
+
references?: {
|
|
19
|
+
collection: string;
|
|
20
|
+
field: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface CollectionSchema {
|
|
24
|
+
fields: FieldDef[];
|
|
25
|
+
indexes?: Array<{
|
|
26
|
+
fields: string[];
|
|
27
|
+
unique?: boolean;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
export interface QueryResult<T = Record<string, unknown>> {
|
|
31
|
+
records: T[];
|
|
32
|
+
total: number;
|
|
33
|
+
}
|
|
34
|
+
export interface DataAdapter {
|
|
35
|
+
query<T = Record<string, unknown>>(collection: string, params?: {
|
|
36
|
+
filters?: Filter[];
|
|
37
|
+
sort?: SortField[];
|
|
38
|
+
limit?: number;
|
|
39
|
+
offset?: number;
|
|
40
|
+
}): Promise<QueryResult<T>>;
|
|
41
|
+
get<T = Record<string, unknown>>(collection: string, id: string): Promise<T | null>;
|
|
42
|
+
insert(collection: string, records: Record<string, unknown>[]): Promise<string[]>;
|
|
43
|
+
update(collection: string, filters: Filter[], data: Record<string, unknown>): Promise<number>;
|
|
44
|
+
delete(collection: string, filters: Filter[]): Promise<number>;
|
|
45
|
+
ensureCollection(collection: string, schema: CollectionSchema): Promise<void>;
|
|
46
|
+
/** Optional transaction support (Vercel/Neon supports it; Busibox data-api does not) */
|
|
47
|
+
transaction?<T>(fn: (tx: DataAdapter) => Promise<T>): Promise<T>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../src/platform/interfaces/data.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,UAAU,GAAG,YAAY,CAAC;AAErG,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,QAAQ,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE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AAC;IAE9F,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE/D,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9E,wFAAwF;IACxF,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CAClE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../src/platform/interfaces/data.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { AIAdapter, StreamEvent, Message, ToolDef, AgentDefinition, ModelInfo } from './ai';
|
|
2
|
+
export type { DataAdapter, Filter, FilterOp, SortField, FieldDef, CollectionSchema, QueryResult } from './data';
|
|
3
|
+
export type { SearchAdapter, SearchResult } from './search';
|
|
4
|
+
export type { StorageAdapter, UploadResult } from './storage';
|
|
5
|
+
export type { AuthAdapter, PlatformUser, TokenClaims } from './auth';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/platform/interfaces/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjG,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAChH,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC5D,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9D,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/interfaces/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Filter } from './data';
|
|
2
|
+
export interface SearchResult {
|
|
3
|
+
id: string;
|
|
4
|
+
collection?: string;
|
|
5
|
+
content: string;
|
|
6
|
+
score: number;
|
|
7
|
+
metadata?: Record<string, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export interface SearchAdapter {
|
|
10
|
+
search(params: {
|
|
11
|
+
query: string;
|
|
12
|
+
collections?: string[];
|
|
13
|
+
mode?: 'hybrid' | 'semantic' | 'keyword';
|
|
14
|
+
limit?: number;
|
|
15
|
+
filters?: Filter[];
|
|
16
|
+
}): Promise<SearchResult[]>;
|
|
17
|
+
embed?(texts: string[]): Promise<number[][]>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/platform/interfaces/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,MAAM,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;QACzC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;KACpB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAE5B,KAAK,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;CAC9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/platform/interfaces/search.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface UploadResult {
|
|
2
|
+
id: string;
|
|
3
|
+
url: string;
|
|
4
|
+
size: number;
|
|
5
|
+
contentType: string;
|
|
6
|
+
}
|
|
7
|
+
export interface StorageAdapter {
|
|
8
|
+
upload(file: File | Buffer | ReadableStream, options: {
|
|
9
|
+
filename: string;
|
|
10
|
+
contentType?: string;
|
|
11
|
+
visibility?: 'private' | 'public';
|
|
12
|
+
metadata?: Record<string, string>;
|
|
13
|
+
}): Promise<UploadResult>;
|
|
14
|
+
download(id: string): Promise<ReadableStream>;
|
|
15
|
+
delete(id: string): Promise<void>;
|
|
16
|
+
getUrl(id: string, options?: {
|
|
17
|
+
expiresIn?: number;
|
|
18
|
+
}): Promise<string>;
|
|
19
|
+
list?(prefix?: string): Promise<Array<{
|
|
20
|
+
id: string;
|
|
21
|
+
filename: string;
|
|
22
|
+
size: number;
|
|
23
|
+
}>>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/platform/interfaces/storage.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,cAAc,EAAE,OAAO,EAAE;QACpD,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;QAClC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACnC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAE1B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACtE,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;CACxF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/platform/interfaces/storage.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jazzmind/busibox-app",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.57",
|
|
4
4
|
"description": "Reusable components for Busibox applications",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -69,6 +69,14 @@
|
|
|
69
69
|
"types": "./dist/lib/search/*.d.ts",
|
|
70
70
|
"default": "./dist/lib/search/*.js"
|
|
71
71
|
},
|
|
72
|
+
"./lib/config": {
|
|
73
|
+
"types": "./dist/lib/config/index.d.ts",
|
|
74
|
+
"default": "./dist/lib/config/index.js"
|
|
75
|
+
},
|
|
76
|
+
"./lib/config/*": {
|
|
77
|
+
"types": "./dist/lib/config/*.d.ts",
|
|
78
|
+
"default": "./dist/lib/config/*.js"
|
|
79
|
+
},
|
|
72
80
|
"./lib/deploy/*": {
|
|
73
81
|
"types": "./dist/lib/deploy/*.d.ts",
|
|
74
82
|
"default": "./dist/lib/deploy/*.js"
|
|
@@ -116,6 +124,22 @@
|
|
|
116
124
|
"./components/account/*": {
|
|
117
125
|
"types": "./dist/components/account/*.d.ts",
|
|
118
126
|
"default": "./dist/components/account/*.js"
|
|
127
|
+
},
|
|
128
|
+
"./platform": {
|
|
129
|
+
"types": "./dist/platform/index.d.ts",
|
|
130
|
+
"default": "./dist/platform/index.js"
|
|
131
|
+
},
|
|
132
|
+
"./platform/interfaces": {
|
|
133
|
+
"types": "./dist/platform/interfaces/index.d.ts",
|
|
134
|
+
"default": "./dist/platform/interfaces/index.js"
|
|
135
|
+
},
|
|
136
|
+
"./platform/busibox": {
|
|
137
|
+
"types": "./dist/platform/adapters/busibox/index.d.ts",
|
|
138
|
+
"default": "./dist/platform/adapters/busibox/index.js"
|
|
139
|
+
},
|
|
140
|
+
"./platform/vercel": {
|
|
141
|
+
"types": "./dist/platform/adapters/vercel/index.d.ts",
|
|
142
|
+
"default": "./dist/platform/adapters/vercel/index.js"
|
|
119
143
|
}
|
|
120
144
|
},
|
|
121
145
|
"files": [
|
|
@@ -125,7 +149,29 @@
|
|
|
125
149
|
"peerDependencies": {
|
|
126
150
|
"next": "^16.0.10",
|
|
127
151
|
"react": "^19.0.0",
|
|
128
|
-
"react-dom": "^19.0.0"
|
|
152
|
+
"react-dom": "^19.0.0",
|
|
153
|
+
"ai": ">=7.0.0",
|
|
154
|
+
"@ai-sdk/anthropic": ">=4.0.0",
|
|
155
|
+
"@ai-sdk/openai": ">=4.0.0",
|
|
156
|
+
"@neondatabase/serverless": ">=1.0.0",
|
|
157
|
+
"@vercel/blob": ">=2.0.0"
|
|
158
|
+
},
|
|
159
|
+
"peerDependenciesMeta": {
|
|
160
|
+
"ai": {
|
|
161
|
+
"optional": true
|
|
162
|
+
},
|
|
163
|
+
"@ai-sdk/anthropic": {
|
|
164
|
+
"optional": true
|
|
165
|
+
},
|
|
166
|
+
"@ai-sdk/openai": {
|
|
167
|
+
"optional": true
|
|
168
|
+
},
|
|
169
|
+
"@neondatabase/serverless": {
|
|
170
|
+
"optional": true
|
|
171
|
+
},
|
|
172
|
+
"@vercel/blob": {
|
|
173
|
+
"optional": true
|
|
174
|
+
}
|
|
129
175
|
},
|
|
130
176
|
"dependencies": {
|
|
131
177
|
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
@@ -158,11 +204,16 @@
|
|
|
158
204
|
"zod": "^4.1.12"
|
|
159
205
|
},
|
|
160
206
|
"devDependencies": {
|
|
207
|
+
"@ai-sdk/anthropic": "^4.0.1",
|
|
208
|
+
"@ai-sdk/openai": "^4.0.2",
|
|
209
|
+
"@neondatabase/serverless": "^1.1.0",
|
|
161
210
|
"@types/jest": "^29.5.12",
|
|
162
211
|
"@types/node": "^20",
|
|
163
212
|
"@types/react": "^19",
|
|
164
213
|
"@types/react-dom": "^19",
|
|
165
214
|
"@types/ssh2": "^1.15.1",
|
|
215
|
+
"@vercel/blob": "^2.5.0",
|
|
216
|
+
"ai": "^7.0.4",
|
|
166
217
|
"dotenv": "^16.4.5",
|
|
167
218
|
"jest": "^29.7.0",
|
|
168
219
|
"next": "^16.0.10",
|
|
@@ -170,7 +221,8 @@
|
|
|
170
221
|
"react-dom": "^19.2.3",
|
|
171
222
|
"tailwindcss": "^4",
|
|
172
223
|
"ts-jest": "^29.1.2",
|
|
173
|
-
"typescript": "^5"
|
|
224
|
+
"typescript": "^5",
|
|
225
|
+
"vitest": "^4.1.9"
|
|
174
226
|
},
|
|
175
227
|
"publishConfig": {
|
|
176
228
|
"registry": "https://registry.npmjs.org",
|
|
@@ -196,6 +248,9 @@
|
|
|
196
248
|
"type-check": "tsc --noEmit",
|
|
197
249
|
"test": "jest",
|
|
198
250
|
"test:watch": "jest --watch",
|
|
199
|
-
"test:coverage": "jest --coverage"
|
|
251
|
+
"test:coverage": "jest --coverage",
|
|
252
|
+
"test:platform": "vitest run --config tests/platform/vitest.config.ts",
|
|
253
|
+
"test:platform:watch": "vitest --config tests/platform/vitest.config.ts",
|
|
254
|
+
"test:platform:coverage": "vitest run --config tests/platform/vitest.config.ts --coverage"
|
|
200
255
|
}
|
|
201
256
|
}
|