- Updated version to `0.9.18` in `package.json`, `cli-package/package.json`, and `src/utils/version.ts`. - Updated npm badge in `README.md` to reflect version `0.9.18`. - Adjusted `publish-cli.js` to synchronize publishing of the main and CLI packages with enhanced build steps. - Introduced `tsconfig.json` updates to include type paths (`types.d.ts`) in CLI for better type handling. - Refined CLI scripts for improved TypeScript annotations and better code structure. - Removed `@types/omelette` and `omelette` dependencies along with associated CLI configurations to simplify the codebase. - Updated `.gitignore` to exclude CLI `dist` directory for cleaner repository management. - Added `deploy:both` npm script for combined publishing of main and CLI packages. This release ensures version consistency, improves CLI workflows, and enhances type handling while decluttering unused dependencies.
90 lines
1.9 KiB
TypeScript
90 lines
1.9 KiB
TypeScript
// Type declarations for @soulcraft/brainy
|
|
declare module '@soulcraft/brainy' {
|
|
// Core types
|
|
export class BrainyData {
|
|
constructor(config?: any)
|
|
|
|
init(): Promise<void>
|
|
|
|
add(text: string, metadata?: any): Promise<string>
|
|
|
|
get(id: string): Promise<any>
|
|
|
|
delete(id: string): Promise<void>
|
|
|
|
search(query: string, limit?: number, options?: any): Promise<any[]>
|
|
|
|
searchText(query: string, limit?: number, options?: any): Promise<any[]>
|
|
|
|
addVerb(
|
|
sourceId: string,
|
|
targetId: string,
|
|
text?: string,
|
|
options?: any
|
|
): Promise<string>
|
|
|
|
getVerbsBySource(sourceId: string): Promise<any[]>
|
|
|
|
getVerbsByTarget(targetId: string): Promise<any[]>
|
|
|
|
status(): Promise<any>
|
|
|
|
clear(): Promise<void>
|
|
|
|
backup(): Promise<any>
|
|
|
|
restore(data: any, options?: any): Promise<any>
|
|
|
|
importSparseData(data: any, options?: any): Promise<any>
|
|
|
|
generateRandomGraph(options?: any): Promise<any>
|
|
}
|
|
|
|
export class FileSystemStorage {
|
|
constructor(dataDir: string)
|
|
}
|
|
|
|
// Pipelines
|
|
export const sequentialPipeline: any
|
|
export const augmentationPipeline: any
|
|
|
|
// Enums
|
|
export enum NounType {
|
|
Person = 'Person',
|
|
Place = 'Place',
|
|
Thing = 'Thing',
|
|
Event = 'Event',
|
|
Concept = 'Concept',
|
|
Content = 'Content'
|
|
}
|
|
|
|
export enum VerbType {
|
|
RelatedTo = 'RelatedTo',
|
|
PartOf = 'PartOf',
|
|
HasA = 'HasA',
|
|
UsedFor = 'UsedFor',
|
|
CapableOf = 'CapableOf',
|
|
AtLocation = 'AtLocation',
|
|
Causes = 'Causes',
|
|
HasProperty = 'HasProperty',
|
|
Owns = 'Owns',
|
|
CreatedBy = 'CreatedBy'
|
|
}
|
|
|
|
export enum ExecutionMode {
|
|
SEQUENTIAL = 'sequential',
|
|
PARALLEL = 'parallel',
|
|
THREADED = 'threaded'
|
|
}
|
|
|
|
export enum AugmentationType {
|
|
SENSE = 'sense',
|
|
MEMORY = 'memory',
|
|
COGNITION = 'cognition',
|
|
CONDUIT = 'conduit',
|
|
ACTIVATION = 'activation',
|
|
PERCEPTION = 'perception',
|
|
DIALOG = 'dialog',
|
|
WEBSOCKET = 'websocket'
|
|
}
|
|
}
|