Metatell AI Bot - v0.0.10
    Preparing search index...

    Module @metatell/bot-core

    @metatell/bot-core

    MetaTell Bot SDKのコアライブラリ。

    • Node.js 20 以上(推奨: 22+)
    • TypeScript 5.0+
    npm install @metatell/bot-core
    # または
    pnpm add @metatell/bot-core
    # または
    yarn add @metatell/bot-core
    import { CoreServiceFactory } from '@metatell/bot-core';

    const factory = new CoreServiceFactory({
    organizationId: 'your-org-id',
    hubId: 'your-hub-id',
    avatarData: {
    displayName: 'MyBot',
    avatarUrl: 'https://example.com/avatar.vrm'
    }
    });

    イベントの発行と購読を管理します。

    const eventBus = container.get(EventBus);

    // イベントの購読
    eventBus.on('custom.event', (data) => {
    console.log('イベントを受信:', data);
    });

    // イベントの発行
    eventBus.emit('custom.event', { message: 'Hello' });

    eventBus.on(SystemEvents.AVATAR_SPAWNED, (avatar) => {
    console.log('アバターがスポーンされました:', avatar.id);
    });

    ボットアバターの管理とアニメーション制御。

    const avatarController = container.get(AvatarController);

    // アバターをスポーン
    await avatarController.spawn();

    // アニメーション再生
    await avatarController.playAnimation(PresetAnimationId.WAVE);

    // 移動
    await avatarController.setPosition({ x: 10, y: 0, z: 5 });
    • AnimationService: VRMアニメーションの管理
    • MessageService: NAFプロトコルメッセージの送受信
    • PresenceManager: ユーザープレゼンスの追跡
    • AuthenticationService: 認証処理
    • ConfigurationProvider: 設定管理

    MIT

    Modules

    <internal>

    Enumerations

    AnimationLoopBehavior
    NafComponentId
    PresetAnimationId
    SystemEvents

    Classes

    AnimationNotFoundError
    AnimationPlaybackError
    AnimationService
    AppSettings
    AuthenticationError
    AuthenticationService
    AvatarController
    AvatarNotSpawnedError
    ChannelService
    ConfigurationProvider
    ConnectionManager
    CoreServiceFactory
    DefaultLoggerProvider
    EventBus
    MessageService
    MetatellClientImpl
    MetatellError
    NafMessageBuilder
    OrganizationService
    PresenceManager
    ProtocolError
    RateLimitedError
    ServiceContainer
    ServiceIdentifier
    TimeoutError
    TransportError
    UserAvatarManager

    Interfaces

    Animation
    AnimationConfig
    AnimationEvent
    AnimationNAFMessage
    AnimationPlaybackResult
    AnimationPlayOptions
    AvatarAsset
    AvatarComponentData
    AvatarState
    BotConfiguration
    BotContext
    BotInfo
    BotProfile
    BotVoiceConfig
    CreateClientOptions
    Euler
    EulerRotation
    IAnimationService
    IAppSettings
    IAuthenticationService
    IAvatarController
    IChannelService
    IConfigurationProvider
    IConnectionManager
    IEventBus
    IMessageService
    IOrganizationService
    IPresenceManager
    IUserAvatarManager
    IWebSocketConnectionManager
    MetatellClient
    MetatellClientEvents
    NafAvatarConfig
    NAFComponentMap
    NAFCreateMessage
    NAFEntityData
    NafMessage
    NAFMultiUpdateMessage
    NAFRemoveMessage
    OrganizationAvatar
    OrganizationInfo
    PcmInputOptions
    PlaybackControls
    Position3D
    PresenceUser
    Quaternion
    Scale3D
    User
    UserAvatar
    Vec3
    VoiceCapableClient
    VRMAnimation
    WebSocketState

    Type Aliases

    NafDataType
    ServiceKey
    ServiceType
    TypedNAFMessage
    UserAvatarEvent

    Functions

    createMetatellClient
    extractAvatarData
    extractBodyRotation
    extractPosition
    getLoggerProvider
    isMetatellError
    isNAFCreateMessage
    isNAFMultiUpdateMessage
    isNAFRemoveMessage
    isRetryableError
    isTypedNAFMessage
    registerLoggerProvider