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,121 @@
/**
* Enum of radio media types.
* @typedef MediaType
* @prop Music
* @prop Talk
* @prop Other
*/
/**
* @interface SongData
* @prop [mediaType] {MediaType}
* @prop [artist] {string}
* @prop [title] {string}
* @prop [artworkUrl] {string}
* @prop [length] {string}
*/
/**
* @interface StationData
* @prop band {string}
* @prop callLetters {string}
* @prop description {string}
* @prop frequency {string}
* @prop logoUrl {string}
* @prop name {string}
* @prop website {string}
*/
/**
* Enum of supported localities when searching for live stations
* @typedef Locality
* @prop Local
* @prop National
*/
/**
* Options provided to RadioPlayer#getStations
* @interface GetStationsOptions
* @prop [genreName] {string} The name of the genre for filteriing the station results
* @prop [locality] {Locality} Limit the results to national or local stations
* @prop [limit] {number} Limit the results to this amount
* @prop [preferredStation] {string} The call letters of the station preferred by the end-user, or the default station for the genre
*/
/**
* This is an abstract base class, which cannot be instantiated directly;
* instead, use an implementation of this class, like IHeartPlayer
* @class RadioPlayer
*/
/**
* Initialize the RadioPlayer: implementations can override this, but must
* call super.init() to ensure this code runs
* @param {string} serialNumber Pass in the result from jibo.systemManager.getIdentity()
* @param {string} releaseVersion Pass in jibo.versions.release
* @param {string} country Pass in jibo.utils.Location.jiboHome.country;
* @param {number} lat Pass in jibo.utils.Location.jiboHome.lat
* @param {number} lng Pass in jibo.utils.Location.jiboHome.lng
* @param {ListenEvents} listenEvents Pass in jibo.gl.events
* @param {VolumePlugin} volumePlugin Pass in jibo.volume
* @return {Promise<void>} Resolves when all init steps are complete
*/
/**
* Get a list of stations matching the options provided
* @method RadioPlayer#getStations
* @param {GetStationsOptions} options The search options to use
* @return {Promise<StationData[]>} Resolves to a list of stations matching the options provided
*/
/**
* Play the provided radio station; call letters may be retrieved from
* getStations() results. Abstract method must be implemented;
* implementations must call _streamHLS, _streamShoutcast, or _streamPLS
* @method RadioPlayer#play
* @param {string} callLetters The call letters of the station to play
* @return {Promise<void>} Resolves when the station actually starts streaming
*/
/**
* Replace a URL to artwork with one that will resize the artwork to the
* dimension provided. Implementations can override this; the default
* behavior simply returns the provided URL back, unaltered.
* @method RadioPlayer#resizeArtwork
* @param {string} url
* @param {number} width
* @return {string}
*/
/**
* Pauses the current stream; not expected to be overridden
* @method RadioPlayer#pause
* @return {Promise<void>}
*/
/**
* Begin playing the current stream, or resume the paused stream
* @method RadioPlayer#resume
* @return {Promise<void>}
*/
/**
* Stop a stream, cancel related Promises and timers, remove related event
* listeners, and release all related resources for garbage collection.
* An implementation may override this, but must await super.stop().
* @method RadioPlayer#stop
* @return {Promise<void>}
*/
/**
* Cancel all Promises and event listenrs and release all used memory
* @method RadioPlayer#destroy
* @return {void}
*/
/**
* Stop any current stream, cancel Promises and event listeners, and
* release all memory used by the RadioPlayer for garbage collection
* @method RadioPlayer#stopAndDestroy
* @return {Promise<void>}
*/

0
Skills/@be/node_modules/jibo-radio/lib/dts/Api.d.ts generated vendored Normal file
View File

View File

@@ -0,0 +1,273 @@
/// <reference types="node" />
import { CancelTokenSession } from 'jibo-cai-utils';
import { Event } from 'jibo-typed-events';
import { EventEmitter } from 'events';
import HLS = require('hls.js');
import { Log } from 'jibo-log';
/**
* Enum of radio media types.
* @typedef MediaType
* @prop Music
* @prop Talk
* @prop Other
*/
export declare enum MediaType {
Music = "Music",
Talk = "Talk",
Other = "Other",
}
/**
* @interface SongData
* @prop [mediaType] {MediaType}
* @prop [artist] {string}
* @prop [title] {string}
* @prop [artworkUrl] {string}
* @prop [length] {string}
*/
export interface SongData {
mediaType?: MediaType;
artist?: string;
title?: string;
artworkUrl?: string;
length?: string;
}
/**
* @interface StationData
* @prop band {string}
* @prop callLetters {string}
* @prop description {string}
* @prop frequency {string}
* @prop logoUrl {string}
* @prop name {string}
* @prop website {string}
*/
export interface StationData {
band: string;
callLetters: string;
description: string;
frequency: string;
logoUrl: string;
name: string;
website: string;
}
/**
* Enum of radio-play modes
* @typedef Mode
* @prop HLS
* @prop Shoutcast
* @prop PLS
* @intdocs
*/
export declare enum Mode {
HLS = "HLS",
Shoutcast = "Shoutcast",
PLS = "PLS",
}
/**
* Enum of supported localities when searching for live stations
* @typedef Locality
* @prop Local
* @prop National
*/
export declare enum Locality {
Local = "Local",
National = "National",
}
/**
* Options provided to RadioPlayer#getStations
* @interface GetStationsOptions
* @prop [genreName] {string} The name of the genre for filteriing the station results
* @prop [locality] {Locality} Limit the results to national or local stations
* @prop [limit] {number} Limit the results to this amount
* @prop [preferredStation] {string} The call letters of the station preferred by the end-user, or the default station for the genre
*/
export interface GetStationsOptions {
genreName?: string;
locality?: Locality;
limit?: number;
preferredStation?: string;
}
/**
* Generic interface of jibo.volume properties that we use
* @interface VolumePlugin
* @prop currentVolume {number}
* @intdocs
*/
export interface VolumePlugin extends EventEmitter {
currentVolume: number;
}
/**
* Generic interface of websocket responses emitted from jibo.gl.events.noMatch
* @interface WSResponse<T = any>
* @prop status {string}
* @prop message {string}
* @prop id {string}
* @prop result {T}
* @prop moreinfo {string}
* @intdocs
*/
export interface WSResponse<T = any> {
status: string;
message: string;
id: string;
result: T;
moreinfo: string;
}
/**
* Generic interface of the jibo.jetstream.events and jibo.globalEvents used in RadioPlayer
* @interface ListenEvents
* @prop hjHeard {Event<void>}
* @prop hjOnly {Event<void>}
* @prop noMatch {Event<WSResponse<jibo.gl.NoMatchResults>>}
* @prop noGlobalMatch {Event<any>}
* @prop nonInterruptingGlobal {Event<void>}
* @intdocs
*/
export interface ListenEvents {
hjHeard: Event<void>;
hjOnly: Event<any>;
noGlobalMatch: Event<any>;
nonInterruptingGlobal: Event<void>;
}
/**
* This is an abstract base class, which cannot be instantiated directly;
* instead, use an implementation of this class, like IHeartPlayer
* @class RadioPlayer
*/
export default abstract class RadioPlayer extends EventEmitter {
protected static _hash(name: string): string;
private static _songDataDifferent(left, right);
private static _promiseTimeout<T>(promise, millis);
protected _deviceId: string;
protected _lat: number;
protected _lng: number;
protected _log: Log;
protected _mediaTagPlayPromise: Promise<void>;
protected _mode: Mode;
protected _promises: CancelTokenSession;
protected _releaseVersion: string;
private _audio;
private _country;
private _hls;
private _hlsURI;
private _icecastClient;
private _isCurrentlySpeaking;
private _lastSongData;
private _listenEvents;
private _playPromise;
private _playReject;
private _playResolve;
private _plsStreams;
private _plsStreamFirstIndex;
private _plsStreamIndex;
private _pollSongData;
private _recoveringMedia;
private _shoutcastServer;
private _songDataSession;
private _songDataTimers;
private _swappingAudioCodec;
private _video;
private _volumePlugin;
constructor();
/**
* Initialize the RadioPlayer: implementations can override this, but must
* call super.init() to ensure this code runs
* @param {string} serialNumber Pass in the result from jibo.systemManager.getIdentity()
* @param {string} releaseVersion Pass in jibo.versions.release
* @param {string} country Pass in jibo.utils.Location.jiboHome.country;
* @param {number} lat Pass in jibo.utils.Location.jiboHome.lat
* @param {number} lng Pass in jibo.utils.Location.jiboHome.lng
* @param {ListenEvents} listenEvents Pass in jibo.gl.events
* @param {VolumePlugin} volumePlugin Pass in jibo.volume
* @return {Promise<void>} Resolves when all init steps are complete
*/
init(serialNumber: string, releaseVersion: string, country: string, lat: number, lng: number, listenEvents: ListenEvents, volumePlugin: VolumePlugin): Promise<void>;
getCountry(): Promise<string>;
/**
* Get a list of stations matching the options provided
* @method RadioPlayer#getStations
* @param {GetStationsOptions} options The search options to use
* @return {Promise<StationData[]>} Resolves to a list of stations matching the options provided
*/
abstract getStations(options: GetStationsOptions): Promise<StationData[]>;
/**
* Play the provided radio station; call letters may be retrieved from
* getStations() results. Abstract method must be implemented;
* implementations must call _streamHLS, _streamShoutcast, or _streamPLS
* @method RadioPlayer#play
* @param {string} callLetters The call letters of the station to play
* @return {Promise<void>} Resolves when the station actually starts streaming
*/
abstract play(callLetters: string): Promise<void>;
/**
* Replace a URL to artwork with one that will resize the artwork to the
* dimension provided. Implementations can override this; the default
* behavior simply returns the provided URL back, unaltered.
* @method RadioPlayer#resizeArtwork
* @param {string} url
* @param {number} width
* @return {string}
*/
resizeArtwork(uri: string, width: number): string;
/**
* Pauses the current stream; not expected to be overridden
* @method RadioPlayer#pause
* @return {Promise<void>}
*/
pause(): Promise<void>;
/**
* Begin playing the current stream, or resume the paused stream
* @method RadioPlayer#resume
* @return {Promise<void>}
*/
resume(): Promise<void>;
/**
* Stop a stream, cancel related Promises and timers, remove related event
* listeners, and release all related resources for garbage collection.
* An implementation may override this, but must await super.stop().
* @method RadioPlayer#stop
* @return {Promise<void>}
*/
stop(): Promise<void>;
/**
* Cancel all Promises and event listenrs and release all used memory
* @method RadioPlayer#destroy
* @return {void}
*/
destroy(): void;
/**
* Stop any current stream, cancel Promises and event listeners, and
* release all memory used by the RadioPlayer for garbage collection
* @method RadioPlayer#stopAndDestroy
* @return {Promise<void>}
*/
stopAndDestroy(): Promise<void>;
protected abstract _processHLSMetadata(titleField: string): SongData;
protected abstract _processShoutcastMetadata(titleField: string): SongData;
protected abstract _getSidebandData: () => Promise<SongData>;
protected _handleStreamError(err?: any): void;
protected _streamHLS(uri: string, config?: HLS.OptionalConfig, failover?: boolean): Promise<void>;
private _fillMissingSongData(songData);
private _emitSongData(songData, fromSideband?);
protected _streamShoutcast(uri: string, failover?: boolean): Promise<void>;
protected _streamPLS(uri: string, failover?: boolean): Promise<void>;
protected _streamStarted(): void;
setCurrentlySpeaking(isCurrentlySpeaking: boolean): void;
private _volume;
private _hjHeard;
private _listenFinished;
private _volumeChanged;
private _playPLSStream();
private _nextPLSStream(data?);
private _hlsMediaAttached;
private _hlsManifestParsed;
private _hlsFragParsing;
private _handleHLSErrors;
private _handleMediaPlaying;
private _handleAudioError;
private _handleVideoError;
private static _getMediaError(code);
private _setStreamPromiseHandlers(startStream);
private _resolveStreamPromise();
private _rejectOrEmit(reason?);
}

View File

@@ -0,0 +1,223 @@
export interface GenreToID {
[genre: string]: number;
}
export declare const IHeartGenres: GenreToID;
export interface ResultWithHits<T> {
duration: number;
total: number;
hits: T[];
}
export interface IHeartError {
code: number;
debugInfo: any;
description: string;
httpCode: number;
}
export interface ClientConfigResult {
clientConfigData?: ClientConfig;
duration: number;
errors?: IHeartError[];
firstError?: IHeartError;
}
export interface ClientConfig {
amp_version: string;
billing_detail_url: string;
current_url: string;
download_url: string;
genre_url: string;
host_name: string;
image_server: string;
need_upgrade: boolean;
subscribe_upgrade: any;
tc_url: string;
tour_url: string;
transform_prefix: string;
tutorial1_url: string;
tutorial2_url: string;
tutorial3_url: string;
use_cdn: boolean;
royalty_report_time: any;
create_account_url: string;
use_create_account_url: boolean;
faq_url: string;
privacy_policy_url: string;
}
export interface OAuth {
oauthUuid: string;
type: string;
}
export interface Session {
accountType: string;
countryCode: string;
duration: number;
errors: IHeartError[];
firstError: IHeartError;
newUser: boolean;
oauths: OAuth[];
profileId: number;
sessionId: string;
success: boolean;
}
export interface Country {
abbreviation: string;
id: string;
name: string;
stationCount: number;
}
export interface State {
abbreviation: string;
id: string;
name: string;
country: Country;
stationCount: number;
}
export interface City {
id: string;
abbreviation: string;
name: string;
state: State;
stationCount: number;
}
export interface Location {
lat: number;
lon: number;
}
export interface LocationConfig {
apiUrl: string;
hostName: string;
terminalId: number;
}
export interface GetLocationConfigResponse {
config: LocationConfig;
countryCode: string;
}
export interface Market {
city: string;
countryAbbreviation: string;
countryId: string;
countryName: string;
loc: Location;
marketId: number;
name: string;
stateAbbreviation: string;
stateId: string;
stateName: string;
stationCount: number;
}
export interface IHeartGenre {
id: number;
name: string;
count: number;
rank: any;
}
export interface Adswizz {
adswizzHost: string;
enableAdswizzTargeting: string;
publisher_id: string;
}
export interface AdswizzZones {
"audio-exchange-zone": string;
"audio-fill-zone": string;
"audio-zone": string;
"display-zone": string;
"optimized-audio-fill-zone": string;
}
export interface StationFeeds {
feed: string;
site_id: string;
}
export interface StationGenre {
id: number;
name: string;
primary: boolean;
sortIndex: boolean;
}
export interface StationMarket {
city: string;
cityId: number;
country: string;
countryId: number;
marketId: string;
name: string;
origin: boolean;
primary: boolean;
sortIndex: number;
stateAbbreviation: string;
stateId: number;
}
export interface StationSocial {
facebook: string;
instagram: string;
twitter: string;
}
export interface StationStreams {
hls_stream: string;
pls_stream: string;
secure_hls_stream: string;
secure_pls_stream: string;
secure_rtmp_stream: string;
secure_shoutcast_stream: string;
shoutcast_stream: string;
}
export interface IHeartStation {
adswizz: Adswizz;
adswizzZones: AdswizzZones;
band: string;
callLetterAlias: string;
callLetterRoaylty: string;
callLetters: string;
countries: string;
cume: number;
description: string;
esid: string;
feeds: StationFeeds;
format: string;
freq: string;
genres: StationGenre[];
id: number;
isActive: boolean;
logo: string;
markets: StationMarket[];
modified: string;
name: string;
provider: string;
rds: string;
responseType: string;
score: number;
social: StationSocial;
streams: StationStreams;
website: string;
}
export interface FragmentParse {
frag: Fragment;
id: string;
samples: FragSample[];
}
export interface Fragment {
autoLevel: boolean;
baseurl: string;
bitrateTest: boolean;
cc: number;
duration: number;
endDTS: number;
endPTS: number;
level: number;
loadCounter: number;
loadIdx: number;
loaded: number;
maxStartPTS: number;
relurl: string;
sn: number;
start: number;
startDTS: number;
startPTS: number;
tagList: string[][];
title: string;
type: string;
url: string;
}
export interface FragSample {
data: Uint8Array;
dts: number;
pts: number;
}

View File

@@ -0,0 +1,38 @@
import RadioPlayer, { GetStationsOptions, ListenEvents, SongData, StationData, VolumePlugin } from '../RadioPlayer';
export default class IHeartPlayer extends RadioPlayer {
private _countryCode;
private _iHeartBaseURI;
private _iHeartHostname;
private _iHeartLog;
private _iHeartTerminal;
private _initError;
private _initPromise;
private _locationConfigError;
private _locationConfigPromise;
private _session;
private _station;
private _stationCache;
private static _getMediaType(fromIHeart);
init(serialNumber: string, releaseVersion: string, country: string, lat: number, lng: number, listenEvents: ListenEvents, volumePlugin: VolumePlugin): Promise<void>;
getCountry(): Promise<string>;
getStations(options?: GetStationsOptions): Promise<StationData[]>;
play(callLetters: string): Promise<void>;
resizeArtwork(uri: string, width: number): string;
destroy(): void;
protected _processHLSMetadata(titleField: string): SongData;
protected _processShoutcastMetadata(metadata: any): SongData;
protected _getSidebandData: () => Promise<SongData>;
protected _handleStreamError(data?: any): void;
protected _streamStarted(): void;
private _init();
private _getLocation();
private _getURI(endpoint);
private _login();
private _get<T>(endpoint, options?);
private _getHits<T>(endpoint, options?);
private _post<T>(endpoint, data?, options?);
private _getLiveStations(params?);
private _getSongData(params?);
private _streamStation();
private _iHeartStreamHLS(stream);
}

View File

@@ -0,0 +1,2 @@
import IHeartPlayer from './IHeartPlayer';
export { IHeartPlayer };

View File

@@ -0,0 +1,3 @@
import RadioPlayer, { Locality, MediaType, SongData, StationData } from './RadioPlayer';
export { Locality, MediaType, RadioPlayer, SongData, StationData };
export declare function createRadio(): RadioPlayer;

1029
Skills/@be/node_modules/jibo-radio/lib/jibo-radio.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation. All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE

View File

@@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/node`
# Summary
This package contains type definitions for Node.js (http://nodejs.org/).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v6
Additional Details
* Last updated: Fri, 05 Jan 2018 15:44:40 GMT
* Dependencies: none
* Global values: Buffer, NodeJS, SlowBuffer, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, require, setImmediate, setInterval, setTimeout
# Credits
These definitions were written by Microsoft TypeScript <http://typescriptlang.org>, DefinitelyTyped <https://github.com/DefinitelyTyped/DefinitelyTyped>, Wilco Bakker <https://github.com/WilcoBakker>, Thomas Bouldin <https://github.com/inlined>, Sebastian Silbermann <https://github.com/eps1lon>.

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
{
"name": "@types/node",
"version": "6.0.96",
"description": "TypeScript definitions for Node.js",
"license": "MIT",
"contributors": [
{
"name": "Microsoft TypeScript",
"url": "http://typescriptlang.org"
},
{
"name": "DefinitelyTyped",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped"
},
{
"name": "Wilco Bakker",
"url": "https://github.com/WilcoBakker",
"githubUsername": "WilcoBakker"
},
{
"name": "Thomas Bouldin",
"url": "https://github.com/inlined",
"githubUsername": "inlined"
},
{
"name": "Sebastian Silbermann",
"url": "https://github.com/eps1lon",
"githubUsername": "eps1lon"
}
],
"main": "",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "9e78049833a500ac45115cc4c6c9d78d37b5b5962aba4fb90301febdd82f399d",
"typeScriptVersion": "2.0"
}

46
Skills/@be/node_modules/jibo-radio/package.json generated vendored Normal file
View File

@@ -0,0 +1,46 @@
{
"name": "jibo-radio",
"version": "2.0.6",
"description": "Streaming radio player plugin",
"main": "lib/jibo-radio.js",
"typings": "lib/dts/index.d.ts",
"scripts": {
"test": "gulp test && istanbul report && npm run coverage:check",
"test:report": "gulp test-report",
"coverage:check": "istanbul check-coverage --statements 0 --branches 0 --functions 0 --lines 0",
"build": "gulp debug",
"build:release": "gulp",
"clean": "gulp clean-all",
"watch": "gulp watch",
"docs": "gulp docs",
"docs:public": "gulp docs-public"
},
"engines": {
"node": ">=6.0"
},
"dependencies": {
"@types/node": "^6.0.0",
"axios": "mividtim/axios#jibo",
"hls.js": "^0.8.7",
"icecast": "^1.3.1",
"jibo-cai-utils": "^6.0.0",
"jibo-common-types": "^4.0.0",
"jibo-log": "^5.0.0",
"jibo-typed-events": "^6.0.0"
},
"devDependencies": {
"@types/hls.js": "^0.7.7",
"gulp": "^3.9.1",
"istanbul": "^0.4.5",
"jibo-gulp": "^8.0.0"
},
"repository": {
"type": "git",
"url": "git@github.jibo.com:sdk/sdk.git"
},
"files": [
"lib",
"dts"
],
"license": "ISC"
}

2
Skills/@be/node_modules/jibo-radio/readme.md generated vendored Normal file
View File

@@ -0,0 +1,2 @@
A generic radio player library for streaming live radio on a Jibo.
* Currently includes and defaults to an iHeart Radio implementation

17
Skills/@be/node_modules/jibo-radio/tsconfig-exp.json generated vendored Normal file
View File

@@ -0,0 +1,17 @@
{
"compilerOptions": {
"target": "es6",
"allowJs": false,
"module": "commonjs",
"moduleResolution": "node",
"experimentalDecorators": true
},
"compileOnSave": false,
"include": [
"src/index.ts",
"src/utils/ServiceOwner.ts",
"src/utils/Types.ts",
"src/services/LPSService.ts",
"typings/index.d.ts"
]
}

14
Skills/@be/node_modules/jibo-radio/tsconfig.json generated vendored Normal file
View File

@@ -0,0 +1,14 @@
{
"compilerOptions": {
"target": "es6",
"allowJs": false,
"module": "commonjs",
"moduleResolution": "node",
"experimentalDecorators": true
},
"compileOnSave": false,
"include": [
"src/**/*.ts",
"typings/index.d.ts"
]
}

3
Skills/@be/node_modules/jibo-radio/tslint.json generated vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": "../../tslint_base.json"
}