@asiyst/sdk 0.1.25 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -93,6 +93,18 @@ interface AsiystEventMap {
93
93
  reason: string;
94
94
  status?: string;
95
95
  };
96
+ "asiyst:config:updated": {
97
+ config: ProjectConfig;
98
+ previousVersion?: number;
99
+ };
100
+ "asiyst:animation:played": {
101
+ name: string;
102
+ intent?: string;
103
+ };
104
+ "asiyst:animation:error": {
105
+ name: string;
106
+ error: string;
107
+ };
96
108
  "asiyst:error": {
97
109
  code: string;
98
110
  message: string;
@@ -269,6 +281,8 @@ declare const Asiyst: {
269
281
  open(): void;
270
282
  close(): void;
271
283
  getConfig(): ProjectConfig;
284
+ reloadConfig(): Promise<ProjectConfig>;
285
+ updateConfig(partial: Partial<ProjectConfig>): Promise<void>;
272
286
  getConnectionStatus(): "connected" | "disconnected" | "offline";
273
287
  getVerificationStatus(): "connected" | "inactive" | "not_detected" | "error";
274
288
  isRuntimeConnected(): boolean;
@@ -281,6 +295,9 @@ declare const Asiyst: {
281
295
  speak(message: string): void;
282
296
  think(): void;
283
297
  celebrate(): void;
298
+ playAnimation(nameOrIntent: string, options?: {
299
+ loopMode?: string;
300
+ }): boolean;
284
301
  setPosition(x: number, y: number): void;
285
302
  };
286
303
  task: {
@@ -443,10 +460,13 @@ type LoadedAvatarAsset = LoadedFbxAsset | LoadedGlbAsset | LoadedImageAsset | Lo
443
460
  declare class AssetLoader {
444
461
  private inFlightController;
445
462
  private readonly createdObjectUrls;
463
+ private readonly inFlightLoads;
464
+ private readonly cachedAssets;
446
465
  load(assetUrl: string, options?: {
447
466
  signal?: AbortSignal;
448
467
  timeoutMs?: number;
449
468
  }): Promise<LoadedAvatarAsset>;
469
+ private performLoad;
450
470
  isFbxBuffer(buffer: ArrayBuffer): boolean;
451
471
  parseFbxHeader(buffer: ArrayBuffer): {
452
472
  isBinary: boolean;
@@ -495,8 +515,11 @@ declare class FbxRenderer {
495
515
  private scene;
496
516
  private camera;
497
517
  private modelRoot;
518
+ private rawObject;
498
519
  private mixer;
499
520
  private allAnimations;
521
+ private readonly animationMetadataList;
522
+ private readonly assetLoader;
500
523
  private currentAction;
501
524
  private animFrameId;
502
525
  private lastTime;
@@ -507,6 +530,9 @@ declare class FbxRenderer {
507
530
  mount(container: HTMLElement, asset: LoadedFbxAsset | LoadedGlbAsset, options?: FbxMountOptions): Promise<FbxRenderMetrics>;
508
531
  setFacing(direction: "left" | "right"): void;
509
532
  setPose(pose: AvatarPose): void;
533
+ loadExternalAnimations(animations: AvatarAnimation[]): Promise<void>;
534
+ retargetClip(clip: THREE.AnimationClip, targetObject: THREE.Object3D): THREE.AnimationClip | null;
535
+ playAnimation(nameOrIntent: string, loopMode?: string, crossFadeDuration?: number): boolean;
510
536
  isRendered(): boolean;
511
537
  validateGeometry(rawObject: THREE.Object3D): {
512
538
  meshCount: number;
@@ -538,6 +564,7 @@ declare class CssAvatarRenderer implements AvatarRenderer {
538
564
  private accentColor;
539
565
  private avatarName;
540
566
  private isPanelOpen;
567
+ private has3dAssetConfigured;
541
568
  onOpenChat?: () => void;
542
569
  private readonly assetLoader;
543
570
  private fbxRenderer;
@@ -564,6 +591,7 @@ declare class CssAvatarRenderer implements AvatarRenderer {
564
591
  width: number;
565
592
  height: number;
566
593
  };
594
+ playAnimation(nameOrIntent: string, loopMode?: string): boolean;
567
595
  setHidden(hidden: boolean): void;
568
596
  isHidden(): boolean;
569
597
  getRenderState(): AvatarRenderState;
package/dist/index.d.ts CHANGED
@@ -93,6 +93,18 @@ interface AsiystEventMap {
93
93
  reason: string;
94
94
  status?: string;
95
95
  };
96
+ "asiyst:config:updated": {
97
+ config: ProjectConfig;
98
+ previousVersion?: number;
99
+ };
100
+ "asiyst:animation:played": {
101
+ name: string;
102
+ intent?: string;
103
+ };
104
+ "asiyst:animation:error": {
105
+ name: string;
106
+ error: string;
107
+ };
96
108
  "asiyst:error": {
97
109
  code: string;
98
110
  message: string;
@@ -269,6 +281,8 @@ declare const Asiyst: {
269
281
  open(): void;
270
282
  close(): void;
271
283
  getConfig(): ProjectConfig;
284
+ reloadConfig(): Promise<ProjectConfig>;
285
+ updateConfig(partial: Partial<ProjectConfig>): Promise<void>;
272
286
  getConnectionStatus(): "connected" | "disconnected" | "offline";
273
287
  getVerificationStatus(): "connected" | "inactive" | "not_detected" | "error";
274
288
  isRuntimeConnected(): boolean;
@@ -281,6 +295,9 @@ declare const Asiyst: {
281
295
  speak(message: string): void;
282
296
  think(): void;
283
297
  celebrate(): void;
298
+ playAnimation(nameOrIntent: string, options?: {
299
+ loopMode?: string;
300
+ }): boolean;
284
301
  setPosition(x: number, y: number): void;
285
302
  };
286
303
  task: {
@@ -443,10 +460,13 @@ type LoadedAvatarAsset = LoadedFbxAsset | LoadedGlbAsset | LoadedImageAsset | Lo
443
460
  declare class AssetLoader {
444
461
  private inFlightController;
445
462
  private readonly createdObjectUrls;
463
+ private readonly inFlightLoads;
464
+ private readonly cachedAssets;
446
465
  load(assetUrl: string, options?: {
447
466
  signal?: AbortSignal;
448
467
  timeoutMs?: number;
449
468
  }): Promise<LoadedAvatarAsset>;
469
+ private performLoad;
450
470
  isFbxBuffer(buffer: ArrayBuffer): boolean;
451
471
  parseFbxHeader(buffer: ArrayBuffer): {
452
472
  isBinary: boolean;
@@ -495,8 +515,11 @@ declare class FbxRenderer {
495
515
  private scene;
496
516
  private camera;
497
517
  private modelRoot;
518
+ private rawObject;
498
519
  private mixer;
499
520
  private allAnimations;
521
+ private readonly animationMetadataList;
522
+ private readonly assetLoader;
500
523
  private currentAction;
501
524
  private animFrameId;
502
525
  private lastTime;
@@ -507,6 +530,9 @@ declare class FbxRenderer {
507
530
  mount(container: HTMLElement, asset: LoadedFbxAsset | LoadedGlbAsset, options?: FbxMountOptions): Promise<FbxRenderMetrics>;
508
531
  setFacing(direction: "left" | "right"): void;
509
532
  setPose(pose: AvatarPose): void;
533
+ loadExternalAnimations(animations: AvatarAnimation[]): Promise<void>;
534
+ retargetClip(clip: THREE.AnimationClip, targetObject: THREE.Object3D): THREE.AnimationClip | null;
535
+ playAnimation(nameOrIntent: string, loopMode?: string, crossFadeDuration?: number): boolean;
510
536
  isRendered(): boolean;
511
537
  validateGeometry(rawObject: THREE.Object3D): {
512
538
  meshCount: number;
@@ -538,6 +564,7 @@ declare class CssAvatarRenderer implements AvatarRenderer {
538
564
  private accentColor;
539
565
  private avatarName;
540
566
  private isPanelOpen;
567
+ private has3dAssetConfigured;
541
568
  onOpenChat?: () => void;
542
569
  private readonly assetLoader;
543
570
  private fbxRenderer;
@@ -564,6 +591,7 @@ declare class CssAvatarRenderer implements AvatarRenderer {
564
591
  width: number;
565
592
  height: number;
566
593
  };
594
+ playAnimation(nameOrIntent: string, loopMode?: string): boolean;
567
595
  setHidden(hidden: boolean): void;
568
596
  isHidden(): boolean;
569
597
  getRenderState(): AvatarRenderState;