mnemospark 0.1.21 → 0.2.0

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.ts CHANGED
@@ -142,6 +142,9 @@ type PluginCommandResult = {
142
142
  type PluginCommandHandler = (ctx: PluginCommandContext) => PluginCommandResult | Promise<PluginCommandResult>;
143
143
  type OpenClawPluginCommandDefinition = {
144
144
  name: string;
145
+ nativeNames?: Partial<Record<string, string>> & {
146
+ default?: string;
147
+ };
145
148
  description: string;
146
149
  acceptsArgs?: boolean;
147
150
  requireAuth?: boolean;
@@ -456,6 +459,11 @@ declare function fetchWithRetry(fetchFn: (url: string, init?: RequestInit) => Pr
456
459
  */
457
460
  declare function isRetryable(errorOrResponse: Error | Response, config?: Partial<RetryConfig>): boolean;
458
461
 
462
+ type RequestCorrelation = {
463
+ traceId?: string;
464
+ operationId?: string;
465
+ };
466
+
459
467
  type PriceStorageQuoteRequest = {
460
468
  wallet_address: string;
461
469
  object_id: string;
@@ -518,16 +526,19 @@ type FetchLike$2 = (input: RequestInfo | URL, init?: RequestInit) => Promise<Res
518
526
  type ProxyQuoteOptions = {
519
527
  proxyBaseUrl?: string;
520
528
  fetchImpl?: FetchLike$2;
529
+ correlation?: RequestCorrelation;
521
530
  };
522
531
  type ProxyUploadOptions = {
523
532
  proxyBaseUrl?: string;
524
533
  fetchImpl?: FetchLike$2;
525
534
  idempotencyKey?: string;
526
535
  maxRetries?: number;
536
+ correlation?: RequestCorrelation;
527
537
  };
528
538
  type ProxyUploadConfirmOptions = {
529
539
  proxyBaseUrl?: string;
530
540
  fetchImpl?: FetchLike$2;
541
+ correlation?: RequestCorrelation;
531
542
  };
532
543
 
533
544
  type StorageObjectRequest = {
@@ -557,6 +568,7 @@ type FetchLike$1 = (input: RequestInfo | URL, init?: RequestInit) => Promise<Res
557
568
  type ProxyStorageOptions = {
558
569
  proxyBaseUrl?: string;
559
570
  fetchImpl?: FetchLike$1;
571
+ correlation?: RequestCorrelation;
560
572
  };
561
573
 
562
574
  type FetchLike = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
@@ -575,6 +587,53 @@ type BackupObjectResult = {
575
587
  archivePath: string;
576
588
  objectLogPath: string;
577
589
  };
590
+ type MnemosparkSubagentTaskV1 = {
591
+ schema: "mnemospark.subagent-task.v1";
592
+ operationId: string;
593
+ traceId: string;
594
+ command: "upload" | "download" | "backup";
595
+ args: string;
596
+ timeoutSeconds?: number;
597
+ requestedBy: {
598
+ pluginCommand: "mnemospark_cloud";
599
+ chatId?: string;
600
+ senderId?: string;
601
+ };
602
+ };
603
+ type MnemosparkSubagentDispatchHooks = {
604
+ onRunning?: (sessionId: string) => Promise<void> | void;
605
+ onProgress?: (sessionId: string, message: string) => Promise<void> | void;
606
+ onCompleted?: (sessionId: string, result: {
607
+ text: string;
608
+ isError?: boolean;
609
+ }) => Promise<void> | void;
610
+ onFailed?: (sessionId: string, details: {
611
+ code: string;
612
+ message: string;
613
+ }) => Promise<void> | void;
614
+ onCancelled?: (sessionId: string, reason?: string) => Promise<void> | void;
615
+ onTimedOut?: (sessionId: string) => Promise<void> | void;
616
+ };
617
+ type MnemosparkSubagentDispatchInput = {
618
+ task: MnemosparkSubagentTaskV1;
619
+ timeoutSeconds?: number;
620
+ runTask: () => Promise<{
621
+ text: string;
622
+ isError?: boolean;
623
+ }>;
624
+ hooks?: MnemosparkSubagentDispatchHooks;
625
+ };
626
+ type MnemosparkSubagentDispatchResult = {
627
+ sessionId: string;
628
+ };
629
+ type MnemosparkSubagentCancelResult = {
630
+ accepted: boolean;
631
+ alreadyTerminal?: boolean;
632
+ };
633
+ type MnemosparkSubagentOrchestrator = {
634
+ dispatch: (input: MnemosparkSubagentDispatchInput) => Promise<MnemosparkSubagentDispatchResult>;
635
+ cancel: (sessionId: string, reason?: string) => Promise<MnemosparkSubagentCancelResult>;
636
+ };
578
637
  type CreateCloudCommandOptions = {
579
638
  backupOptions?: BackupObjectOptions;
580
639
  buildBackupObjectFn?: (targetPath: string, options?: BackupObjectOptions) => Promise<BackupObjectResult>;
@@ -592,6 +651,7 @@ type CreateCloudCommandOptions = {
592
651
  requestStorageLsFn?: (request: StorageObjectRequest, options?: ProxyStorageOptions) => Promise<StorageLsResponse>;
593
652
  requestStorageDownloadFn?: (request: StorageObjectRequest, options?: ProxyStorageOptions) => Promise<StorageDownloadProxyResponse>;
594
653
  requestStorageDeleteFn?: (request: StorageObjectRequest, options?: ProxyStorageOptions) => Promise<StorageDeleteResponse>;
654
+ subagentOrchestrator?: MnemosparkSubagentOrchestrator;
595
655
  proxyStorageOptions?: ProxyStorageOptions;
596
656
  objectLogHomeDir?: string;
597
657
  };