feat: Add Be and tbd skill, also added Roadmap file

This commit is contained in:
2026-05-10 16:32:12 -04:00
parent 3500ade13f
commit 0bb8885802
29587 changed files with 10611695 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import { InteractionMemory, StorageOptions, InteractionDescription, InteractionEvent } from './im/InteractionMemory';
/**
* Initialized the InteractionMemory Singleton. Requires a Jibo object
* @param {jibo} jibo runtime
* @param {StorageOptions} options for interaction memory
*/
export declare function init(jibo: any, storageOptions?: StorageOptions): void;
/**
* Store the event
* @param {InteractionDescription} description
* @returns {PromiseLike<TResult>|Promise<TResult>}
*/
export declare function noteEvent(description: InteractionDescription): Promise<InteractionEvent>;
/**
*
* @param {InteractionDescription} queryDesc - an InteractionDescription to be matched
* @param compare - a function returning true when two InteractionDescriptions are considered a match, false otherwise
* @param {Date|null} startTime - optional start time of search window; i.e., when we stop searching backwards in time
* @param {Date} [refDate] - optional, a reference date to compute against. If not provided the current time (as per InteractionMemory's dateProvider) will be used.
* @returns number of milliseconds since a matching event, or Number.POSITIVE_INFINITY to indicate no match
*/
export declare function getTimeSinceLast(queryDesc: InteractionDescription, compare?: typeof InteractionMemory.compareUser, startTime?: Date, refDate?: Date): Promise<number>;
/**
* Returns a static compare method to be used in interaction memory queries
* Every person mentioned in the query should be included in the candidate
* @returns compare function
*/
export declare const compareUser: typeof InteractionMemory.compareUser;
/**
* Returns a static compare method to be used in interaction memory queries
* Every property specified in the query must match; additional properties in the candidate are okay.
* @returns compare function
*/
export declare const compareQueryFields: typeof InteractionMemory.compareQueryFields;

View File

@@ -0,0 +1,157 @@
export interface StorageOptions {
storageFolder: string;
}
export interface InteractionDescription {
personIDs?: string[];
skillName?: string;
}
export declare class InteractionEvent {
description: InteractionDescription;
timestamp: Date;
constructor(description: InteractionDescription, timestamp: Date);
}
export interface DateProvider {
getDate: () => Date;
}
export declare class DefaultDateProvider implements DateProvider {
getDate(): Date;
}
export declare const DEFAULT_STORAGE_OPTIONS: {
storageFolder: string;
};
export declare type EventFilter = (event: InteractionEvent) => boolean;
export interface UnivariateMeanAndVariance {
mu: number;
sigmasq: number;
}
export declare class InteractionMemory {
private _kbModel;
private _dateProvider;
private log;
static HISTORY_SIZE_LIMIT: number;
static HISTORY_SIZE_DECREMENT: number;
constructor(jibo: any, options?: StorageOptions);
/**
* Set a date provider for Interaction Memory to use to create dates
* @param {Object} dateProvider
*/
setDateProvider(dateProvider: DateProvider): void;
/**
* create an InteractionEvent with a timestamp aligned with InteractionMemory's dateProvider.
* @param description
* @returns {InteractionEvent}
*/
createEvent(description: InteractionDescription): InteractionEvent;
private _getOrInitializeHistory();
private _getOrInitializeStats();
/**
* Store the event
* @param {InteractionDescription} description
* @returns {Promise<InteractionEvent>}
*/
noteEvent(description: InteractionDescription): Promise<InteractionEvent>;
/**
* default EventDescription comparison function
* if present, every person mentioned in the query should be included in the candidate
* @param {InteractionDescription} query
* @param {InteractionDescription} candidate
* @returns {boolean}
*/
static compareUser(query: InteractionDescription, candidate: InteractionDescription): boolean;
/**
* every person mentioned in the query should be included in the candidate
* skillName should match
* both must be present
* @param {InteractionDescription} query
* @param {InteractionDescription} candidate
* @returns {boolean}
*/
static compareUserAndSkill(query: InteractionDescription, candidate: InteractionDescription): boolean;
/**
* Every property specified in the query must match; additional properties in the candidate are okay.
* @param query
* @param candidate
* @returns {boolean}
*/
static compareQueryFields(query: InteractionDescription, candidate: InteractionDescription): boolean;
/**
*
* @param {InteractionDescription} queryDesc - an InteractionDescription to be matched
* @param compare - a function returning true when two InteractionDescriptions are considered a match, false otherwise
* @param {Date|null} startTime - optional start time of search window; i.e., when we stop searching backwards in time
* @param {Date} [refDate] - optional, a reference date to compute against. If not provided the current time (as per InteractionMemory's dateProvider) will be used.
* @returns number of milliseconds since a matching event, or Number.POSITIVE_INFINITY to indicate no match
*/
getTimeSinceLast(queryDesc: InteractionDescription, compare?: typeof InteractionMemory.compareUser, startTime?: Date, refDate?: Date): Promise<number>;
/**
* returns promise of number of milliseconds since last observed interaction event, or Number.POSITIVE_INFINITY to indicate no events in history
* @param {Date} [refTime] Reference time (defaults to current time as set by dateProvider)
* @returns {Promise<number>}
*/
getTimeSinceLastInteraction(refTime?: Date): Promise<number>;
/**
* returns promise of number of times user userID has launched skill skillName
* @param {string} userID
* @param {string} skillName
* @returns {Promise<number>}
*/
getUserSkillCount(userID: string, skillName: string): Promise<Number>;
/**
* get all events matching a query
* @intdocs
* @param {EventFilter} filter Functor determining desired events
* @param {Date} [startTime] start of chronological window of interest
* @param {Date} [endTime] end of chronological window of interest
*/
getEventsMatchingFilter(filter: EventFilter, startTime?: Date, endTime?: Date): Promise<Array<InteractionEvent>>;
/**
* Compute the univariate mean and variance of univariate data set.
* @param {number[]} data
* @returns {UnivariateMeanAndVariance}
* @intdocs
* @static
*/
static univariateMeanAndVariance(data: number[]): UnivariateMeanAndVariance;
/**
* compute mean and variance for the time of day (as minutes after 0:00 midnight) of a set of events
* @static
* @param {InteractionEvent[]} events
* @returns {UnivariateMeanAndVariance}
* @intdocs
* @memberOf InteractionMemory
*/
static getTimeOfDaySummaryStatistics(events: InteractionEvent[]): UnivariateMeanAndVariance;
/**
* Clear the history.
* @returns {Promise<void>}
* @intdocs
*/
_clear(): Promise<void>;
_getHistory(): Promise<InteractionEvent[]>;
/**
* Load a history or stats node from the root node, or create one
* and attach it to the root node if it doesn't already exist.
* @param {string} edge Name of edge to follow or create. Also
* serves as node type.
* @returns {Promise<Node>}
*/
private _getOrCreateNode(edge);
/**
* A promise wrapper around the jibo.kb.Model#_loadRoot call. Loads the
* root node for the interaction memory KB model.
* @returns {Promise<Node>} The root node for the interaction memory model.
*/
private _loadRoot();
/**
* A promise wrapper around the jibo.kb.Node#_save call.
* @param {Node} The node to be saved.
* @returns {Promise}
*/
private _saveNode(node);
/**
* A promise wrapper around the jibo.kb.Model#_load call.
* @param {string} id ID of node to load.
* @returns {Promise<Node>}
*/
private _loadNode(id);
}

View File

@@ -0,0 +1,2 @@
export * from './InteractionMemory';
export { };

View File

@@ -0,0 +1,3 @@
import * as im from './im';
import * as api from './api';
export { im, api };