@2060.io/vs-agent-model v1.3.0
@2060.io/vs-agent-model
VS Agent Model
This package provides the data models used by VS Agent and its related services and libraries within the @2060.io
ecosystem. These models are essential for chatbot development and facilitate integration with the broader system.
Packages Using This Library
The models in this package are used by the following services and libraries:
- @2060.io/vs-agent-main – The core VS Agent.
- @2060.io/vs-agent-nestjs-client – A NestJS client for interacting with VS Agent.
- @2060.io/vs-agent-client – A general-purpose api client for VS Agent.
Usage
This package defines essential models that support structured communication and event handling within the VS Agent ecosystem. It is designed to be used by chatbot services and other integrations that rely on a standardized message format.
How to work
@startuml
package "2060 Ecosystem" {
package "VS Agent (VS-A)" {
class VsAgent {
+ Handles DIDComm communication
+ Manages agent wallet and credentials
+ Exposes API for client interactions
}
}
package "Libraries" {
class NestJSClient {
+ Plug-and-play integration
+ Selectable modules for various services
+ Modules:
-- MessageEventOptions: Configures message event handling
-- ConnectionEventOptions: Configures connection event handling
-- CredentialOptions: Configures credential management
}
class Client {
+ Directly manages requests to SA
+ Facilitates reception of requests from modules
+ Provides an abstraction for service communication
+ Interfaces:
-- messages
-- credentialTypes
-- revocationRegistries
-- invitations
}
class ModelLibrary ##red {
+ Defines required data models
+ Ensures type safety across services
}
}
}
NestJSClient --> VsAgent : Uses
Client --> VsAgent : Sends requests
Client --> VsAgent : Receives requests
Client --> ModelLibrary : Uses models
ModelLibrary --> VsAgent : Provides data models
NestJSClient --> ModelLibrary : Uses models
@enduml
Installation
npm install @2060.io/vs-agent-model
or
yarn add @2060.io/vs-agent-model
or
```bash
pnpm add @2060.io/vs-agent-model
Example
Importing and using a message model:
import { CallOfferRequestMessage } from '@2060.io/vs-agent-model';
const callOffer = new CallOfferRequestMessage({
connectionId: 'connectionId',
description: 'Start call',
parameters: { wsUrl, roomId, peerId },
});
console.log(callOffer);
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago