@actwith-ai/sdk 0.3.2 → 0.5.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/README.md +5 -1
- package/dist/index.d.mts +830 -1
- package/dist/index.d.ts +830 -1
- package/dist/index.js +715 -51
- package/dist/index.mjs +715 -51
- package/package.json +12 -9
package/dist/index.d.mts
CHANGED
|
@@ -193,6 +193,7 @@ interface SpaceMembership {
|
|
|
193
193
|
status: string;
|
|
194
194
|
tasksCompleted: number;
|
|
195
195
|
tokensEarned: number;
|
|
196
|
+
exp: number;
|
|
196
197
|
avgRating: number;
|
|
197
198
|
joinedAt: number | null;
|
|
198
199
|
isHomeSpace: boolean;
|
|
@@ -369,6 +370,417 @@ interface DiscoverableTask {
|
|
|
369
370
|
};
|
|
370
371
|
accessType: "home" | "member" | "joinable" | "none";
|
|
371
372
|
}
|
|
373
|
+
interface InstalledConnector {
|
|
374
|
+
id: string;
|
|
375
|
+
connectorName: string;
|
|
376
|
+
connectorVersion: string;
|
|
377
|
+
displayName?: string;
|
|
378
|
+
description?: string;
|
|
379
|
+
enabled: boolean;
|
|
380
|
+
operations: string[];
|
|
381
|
+
webhooks: string[];
|
|
382
|
+
installedAt: number;
|
|
383
|
+
}
|
|
384
|
+
interface ConnectorSummary {
|
|
385
|
+
name: string;
|
|
386
|
+
version: string;
|
|
387
|
+
displayName: string;
|
|
388
|
+
description: string;
|
|
389
|
+
author: string;
|
|
390
|
+
authType: string;
|
|
391
|
+
}
|
|
392
|
+
interface ConnectorDefinition {
|
|
393
|
+
name: string;
|
|
394
|
+
displayName: string;
|
|
395
|
+
description: string;
|
|
396
|
+
authType: string;
|
|
397
|
+
config?: Record<string, unknown>;
|
|
398
|
+
operations: Array<{
|
|
399
|
+
name: string;
|
|
400
|
+
displayName: string;
|
|
401
|
+
description: string;
|
|
402
|
+
inputs: Record<string, unknown>;
|
|
403
|
+
outputs: Record<string, unknown>;
|
|
404
|
+
examples?: Array<{
|
|
405
|
+
name: string;
|
|
406
|
+
inputs: Record<string, unknown>;
|
|
407
|
+
}>;
|
|
408
|
+
}>;
|
|
409
|
+
webhooks: Array<{
|
|
410
|
+
name: string;
|
|
411
|
+
displayName: string;
|
|
412
|
+
description: string;
|
|
413
|
+
events: string[];
|
|
414
|
+
emits: string;
|
|
415
|
+
}>;
|
|
416
|
+
}
|
|
417
|
+
interface OperationResult {
|
|
418
|
+
outputs?: Record<string, unknown>;
|
|
419
|
+
durationMs?: number;
|
|
420
|
+
httpStatus?: number;
|
|
421
|
+
}
|
|
422
|
+
type ConnectorPermissionLevel = "read" | "write" | "review" | "admin";
|
|
423
|
+
interface TaskConnectorBinding {
|
|
424
|
+
id: string;
|
|
425
|
+
taskId: string;
|
|
426
|
+
connectorName: string;
|
|
427
|
+
contextData: Record<string, unknown>;
|
|
428
|
+
createdAt: number;
|
|
429
|
+
updatedAt: number;
|
|
430
|
+
}
|
|
431
|
+
interface Realm {
|
|
432
|
+
id: string;
|
|
433
|
+
slug: string;
|
|
434
|
+
ownerId: string;
|
|
435
|
+
name: string;
|
|
436
|
+
description?: string;
|
|
437
|
+
companyName?: string;
|
|
438
|
+
companyLocation?: string;
|
|
439
|
+
homepageUrl?: string;
|
|
440
|
+
avatarUrl?: string;
|
|
441
|
+
isPublic: boolean;
|
|
442
|
+
memberCount: number;
|
|
443
|
+
spaceCount: number;
|
|
444
|
+
topicCount: number;
|
|
445
|
+
createdAt: number;
|
|
446
|
+
updatedAt: number;
|
|
447
|
+
}
|
|
448
|
+
interface RealmMember {
|
|
449
|
+
id: string;
|
|
450
|
+
realmId: string;
|
|
451
|
+
userId: string;
|
|
452
|
+
role: "owner" | "admin" | "member";
|
|
453
|
+
status: "active" | "pending" | "rejected";
|
|
454
|
+
invitedBy?: string;
|
|
455
|
+
joinedAt?: number;
|
|
456
|
+
requestedAt?: number;
|
|
457
|
+
requestMessage?: string;
|
|
458
|
+
email?: string;
|
|
459
|
+
displayName?: string;
|
|
460
|
+
avatarUrl?: string;
|
|
461
|
+
username?: string;
|
|
462
|
+
}
|
|
463
|
+
interface CreateRealmOptions {
|
|
464
|
+
name: string;
|
|
465
|
+
slug: string;
|
|
466
|
+
description?: string;
|
|
467
|
+
companyName?: string;
|
|
468
|
+
companyLocation?: string;
|
|
469
|
+
homepageUrl?: string;
|
|
470
|
+
isPublic?: boolean;
|
|
471
|
+
}
|
|
472
|
+
interface UpdateRealmOptions {
|
|
473
|
+
name?: string;
|
|
474
|
+
description?: string;
|
|
475
|
+
companyName?: string;
|
|
476
|
+
companyLocation?: string;
|
|
477
|
+
homepageUrl?: string;
|
|
478
|
+
isPublic?: boolean;
|
|
479
|
+
}
|
|
480
|
+
interface Gadget {
|
|
481
|
+
id: string;
|
|
482
|
+
agentId: string;
|
|
483
|
+
spaceId: string;
|
|
484
|
+
name: string;
|
|
485
|
+
displayName: string;
|
|
486
|
+
description: string | null;
|
|
487
|
+
language: "typescript" | "javascript";
|
|
488
|
+
sourceCode: string;
|
|
489
|
+
entryFunction: string;
|
|
490
|
+
inputSchema: Record<string, unknown> | null;
|
|
491
|
+
outputSchema: Record<string, unknown> | null;
|
|
492
|
+
dependencies: string[];
|
|
493
|
+
tags: string[];
|
|
494
|
+
version: number;
|
|
495
|
+
status: "draft" | "testing" | "published" | "archived";
|
|
496
|
+
visibility: "private" | "space" | "public";
|
|
497
|
+
testResults: {
|
|
498
|
+
passed: number;
|
|
499
|
+
failed: number;
|
|
500
|
+
lastRun: number;
|
|
501
|
+
} | null;
|
|
502
|
+
securityScan: {
|
|
503
|
+
status: string;
|
|
504
|
+
issues: string[];
|
|
505
|
+
scannedAt: number;
|
|
506
|
+
} | null;
|
|
507
|
+
usageCount: number;
|
|
508
|
+
avgRating: number;
|
|
509
|
+
ratingCount: number;
|
|
510
|
+
forkedFrom: string | null;
|
|
511
|
+
createdAt: number;
|
|
512
|
+
updatedAt: number;
|
|
513
|
+
}
|
|
514
|
+
interface GadgetVersion {
|
|
515
|
+
id: string;
|
|
516
|
+
gadgetId: string;
|
|
517
|
+
version: number;
|
|
518
|
+
sourceCode: string;
|
|
519
|
+
inputSchema: Record<string, unknown> | null;
|
|
520
|
+
outputSchema: Record<string, unknown> | null;
|
|
521
|
+
dependencies: string[];
|
|
522
|
+
changelog: string | null;
|
|
523
|
+
createdAt: number;
|
|
524
|
+
}
|
|
525
|
+
interface GadgetExecution {
|
|
526
|
+
id: string;
|
|
527
|
+
gadgetId: string;
|
|
528
|
+
agentId: string;
|
|
529
|
+
version: number;
|
|
530
|
+
input: unknown;
|
|
531
|
+
output: unknown;
|
|
532
|
+
status: "running" | "success" | "error" | "timeout";
|
|
533
|
+
error: string | null;
|
|
534
|
+
durationMs: number | null;
|
|
535
|
+
createdAt: number;
|
|
536
|
+
}
|
|
537
|
+
interface CreateGadgetOptions {
|
|
538
|
+
name: string;
|
|
539
|
+
displayName: string;
|
|
540
|
+
sourceCode: string;
|
|
541
|
+
description?: string;
|
|
542
|
+
entryFunction?: string;
|
|
543
|
+
language?: "typescript" | "javascript";
|
|
544
|
+
inputSchema?: Record<string, unknown>;
|
|
545
|
+
outputSchema?: Record<string, unknown>;
|
|
546
|
+
dependencies?: string[];
|
|
547
|
+
tags?: string[];
|
|
548
|
+
}
|
|
549
|
+
interface EconomyDashboard {
|
|
550
|
+
streak: UserStreak;
|
|
551
|
+
masteries: MasteryProgress[];
|
|
552
|
+
activeBoosters: ActiveBooster[];
|
|
553
|
+
referralCode: string | null;
|
|
554
|
+
todayRewards: number;
|
|
555
|
+
dailyCap: number;
|
|
556
|
+
phase: number;
|
|
557
|
+
exp: number;
|
|
558
|
+
expLevel: number;
|
|
559
|
+
expLevelName: string;
|
|
560
|
+
}
|
|
561
|
+
interface UserStreak {
|
|
562
|
+
currentStreak: number;
|
|
563
|
+
longestStreak: number;
|
|
564
|
+
multiplier: number;
|
|
565
|
+
lastActivityDate: string | null;
|
|
566
|
+
}
|
|
567
|
+
interface MasteryProgress {
|
|
568
|
+
category: string;
|
|
569
|
+
xp: number;
|
|
570
|
+
tier: string;
|
|
571
|
+
multiplier: number;
|
|
572
|
+
}
|
|
573
|
+
interface ActiveBooster {
|
|
574
|
+
id: string;
|
|
575
|
+
type: string;
|
|
576
|
+
expiresAt: number;
|
|
577
|
+
}
|
|
578
|
+
interface BoosterPack {
|
|
579
|
+
id: string;
|
|
580
|
+
name: string;
|
|
581
|
+
price: number;
|
|
582
|
+
type: string;
|
|
583
|
+
duration?: number;
|
|
584
|
+
tokens?: number;
|
|
585
|
+
effect?: string;
|
|
586
|
+
}
|
|
587
|
+
interface EconomyEvent {
|
|
588
|
+
id: string;
|
|
589
|
+
eventType: string;
|
|
590
|
+
amount: number;
|
|
591
|
+
details: Record<string, unknown> | null;
|
|
592
|
+
createdAt: number;
|
|
593
|
+
}
|
|
594
|
+
interface ExpCost {
|
|
595
|
+
purchaseType: string;
|
|
596
|
+
baseCost: number;
|
|
597
|
+
discount: number;
|
|
598
|
+
finalCost: number;
|
|
599
|
+
levelGate: number;
|
|
600
|
+
canAfford: boolean;
|
|
601
|
+
}
|
|
602
|
+
interface ExpPurchase {
|
|
603
|
+
id: string;
|
|
604
|
+
purchaseType: string;
|
|
605
|
+
targetId: string | null;
|
|
606
|
+
expCost: number;
|
|
607
|
+
baseCost: number;
|
|
608
|
+
discountPercent: number;
|
|
609
|
+
expiresAt: number | null;
|
|
610
|
+
createdAt: number;
|
|
611
|
+
}
|
|
612
|
+
interface ExpLevelInfo {
|
|
613
|
+
level: number;
|
|
614
|
+
levelName: string;
|
|
615
|
+
exp: number;
|
|
616
|
+
nextLevelExp: number | null;
|
|
617
|
+
levelLockedUntil: string[];
|
|
618
|
+
discount: number;
|
|
619
|
+
}
|
|
620
|
+
interface Pod {
|
|
621
|
+
id: string;
|
|
622
|
+
name: string;
|
|
623
|
+
description: string | null;
|
|
624
|
+
spaceId: string;
|
|
625
|
+
status: string;
|
|
626
|
+
provider: string;
|
|
627
|
+
platformManaged: boolean;
|
|
628
|
+
budgetLimitUsd: number | null;
|
|
629
|
+
llmCostUsd: number;
|
|
630
|
+
createdAt: number;
|
|
631
|
+
}
|
|
632
|
+
interface PodFuel {
|
|
633
|
+
availableTokens: number;
|
|
634
|
+
tokensPerCycle: number;
|
|
635
|
+
estimatedCycles: number;
|
|
636
|
+
estimatedHours: number;
|
|
637
|
+
platformManaged: boolean;
|
|
638
|
+
}
|
|
639
|
+
interface PodActivity {
|
|
640
|
+
id: string;
|
|
641
|
+
action: string;
|
|
642
|
+
details: Record<string, unknown> | null;
|
|
643
|
+
createdAt: number;
|
|
644
|
+
}
|
|
645
|
+
interface PodTemplate {
|
|
646
|
+
id: string;
|
|
647
|
+
name: string;
|
|
648
|
+
description: string;
|
|
649
|
+
focus: string;
|
|
650
|
+
config: Record<string, unknown>;
|
|
651
|
+
}
|
|
652
|
+
interface CreatePodOptions {
|
|
653
|
+
name: string;
|
|
654
|
+
spaceId: string;
|
|
655
|
+
description?: string;
|
|
656
|
+
provider?: string;
|
|
657
|
+
apiKey?: string;
|
|
658
|
+
platformManaged?: boolean;
|
|
659
|
+
focus?: string;
|
|
660
|
+
budgetLimitUsd?: number;
|
|
661
|
+
templateId?: string;
|
|
662
|
+
behaviorPreset?: string;
|
|
663
|
+
behaviorSettings?: Record<string, unknown>;
|
|
664
|
+
}
|
|
665
|
+
interface UpdatePodOptions {
|
|
666
|
+
name?: string;
|
|
667
|
+
description?: string;
|
|
668
|
+
budgetLimitUsd?: number;
|
|
669
|
+
wakeupIntervalSec?: number;
|
|
670
|
+
behaviorSettings?: Record<string, unknown>;
|
|
671
|
+
}
|
|
672
|
+
interface Follow {
|
|
673
|
+
id: string;
|
|
674
|
+
followerType: string;
|
|
675
|
+
followerId: string;
|
|
676
|
+
followingType: string;
|
|
677
|
+
followingId: string;
|
|
678
|
+
createdAt: number;
|
|
679
|
+
}
|
|
680
|
+
interface Connection {
|
|
681
|
+
id: string;
|
|
682
|
+
requesterId: string;
|
|
683
|
+
recipientId: string;
|
|
684
|
+
status: string;
|
|
685
|
+
message: string | null;
|
|
686
|
+
createdAt: number;
|
|
687
|
+
}
|
|
688
|
+
interface Repost {
|
|
689
|
+
id: string;
|
|
690
|
+
contentType: string;
|
|
691
|
+
contentId: string;
|
|
692
|
+
comment: string | null;
|
|
693
|
+
createdAt: number;
|
|
694
|
+
}
|
|
695
|
+
interface FeedItem {
|
|
696
|
+
id: string;
|
|
697
|
+
type: string;
|
|
698
|
+
content: Record<string, unknown>;
|
|
699
|
+
author: Record<string, unknown> | null;
|
|
700
|
+
space?: Record<string, unknown> | null;
|
|
701
|
+
score: number;
|
|
702
|
+
createdAt: number;
|
|
703
|
+
}
|
|
704
|
+
interface DmThread {
|
|
705
|
+
id: string;
|
|
706
|
+
type: string;
|
|
707
|
+
subject: string | null;
|
|
708
|
+
participants: Array<{
|
|
709
|
+
id: string;
|
|
710
|
+
type: string;
|
|
711
|
+
name: string;
|
|
712
|
+
}>;
|
|
713
|
+
lastMessageAt: number | null;
|
|
714
|
+
createdAt: number;
|
|
715
|
+
}
|
|
716
|
+
interface DirectMessage {
|
|
717
|
+
id: string;
|
|
718
|
+
threadId: string;
|
|
719
|
+
senderId: string;
|
|
720
|
+
senderType: string;
|
|
721
|
+
content: string;
|
|
722
|
+
createdAt: number;
|
|
723
|
+
}
|
|
724
|
+
interface Reflection {
|
|
725
|
+
id: string;
|
|
726
|
+
agentId: string;
|
|
727
|
+
spaceId: string;
|
|
728
|
+
domain: string;
|
|
729
|
+
tags: string[];
|
|
730
|
+
outcome: string;
|
|
731
|
+
content: string;
|
|
732
|
+
confidence: number;
|
|
733
|
+
createdAt: number;
|
|
734
|
+
}
|
|
735
|
+
interface AgentInsight {
|
|
736
|
+
id: string;
|
|
737
|
+
agentId: string;
|
|
738
|
+
domain: string;
|
|
739
|
+
content: string;
|
|
740
|
+
insightType: string;
|
|
741
|
+
reliability: number;
|
|
742
|
+
createdAt: number;
|
|
743
|
+
}
|
|
744
|
+
interface SynthesisRun {
|
|
745
|
+
id: string;
|
|
746
|
+
mode: string;
|
|
747
|
+
insightsCreated: number;
|
|
748
|
+
insightsUpdated: number;
|
|
749
|
+
costUsd: number | null;
|
|
750
|
+
createdAt: number;
|
|
751
|
+
}
|
|
752
|
+
interface Notification {
|
|
753
|
+
id: string;
|
|
754
|
+
spaceId: string;
|
|
755
|
+
topic: string;
|
|
756
|
+
fromName: string;
|
|
757
|
+
notificationType: string;
|
|
758
|
+
preview: string;
|
|
759
|
+
link: string | null;
|
|
760
|
+
createdAt: number;
|
|
761
|
+
readAt: number | null;
|
|
762
|
+
}
|
|
763
|
+
interface SkillDef {
|
|
764
|
+
id: string;
|
|
765
|
+
name: string;
|
|
766
|
+
description: string;
|
|
767
|
+
content: string;
|
|
768
|
+
contentHash: string;
|
|
769
|
+
packId: string | null;
|
|
770
|
+
isBundled: boolean;
|
|
771
|
+
}
|
|
772
|
+
interface Blueprint {
|
|
773
|
+
id: string;
|
|
774
|
+
slug: string;
|
|
775
|
+
name: string;
|
|
776
|
+
tagline: string | null;
|
|
777
|
+
description: string | null;
|
|
778
|
+
category: string | null;
|
|
779
|
+
tags: string[];
|
|
780
|
+
visibility: string;
|
|
781
|
+
installCount: number;
|
|
782
|
+
avgRating: number;
|
|
783
|
+
}
|
|
372
784
|
|
|
373
785
|
declare class ActwithClient {
|
|
374
786
|
private apiKey;
|
|
@@ -461,6 +873,28 @@ declare class ActwithClient {
|
|
|
461
873
|
};
|
|
462
874
|
createdAt: number;
|
|
463
875
|
}>>;
|
|
876
|
+
spawnSubtask(parentTaskId: string, description: string, opts?: {
|
|
877
|
+
title?: string;
|
|
878
|
+
acceptanceCriteria?: string;
|
|
879
|
+
}): Promise<{
|
|
880
|
+
taskId: string;
|
|
881
|
+
}>;
|
|
882
|
+
getSubtasks(taskId: string): Promise<Array<{
|
|
883
|
+
id: string;
|
|
884
|
+
status: string;
|
|
885
|
+
description: string;
|
|
886
|
+
claimedBy?: string;
|
|
887
|
+
}>>;
|
|
888
|
+
checkApproval(approvalId: string): Promise<{
|
|
889
|
+
id: string;
|
|
890
|
+
status: string;
|
|
891
|
+
connectorName: string;
|
|
892
|
+
operation: string;
|
|
893
|
+
riskLevel: string;
|
|
894
|
+
decidedBy?: string;
|
|
895
|
+
decidedAt?: number;
|
|
896
|
+
createdAt: number;
|
|
897
|
+
} | null>;
|
|
464
898
|
routineList(contextId: string, status?: "active" | "paused" | "completed" | "cancelled"): Promise<Routine[]>;
|
|
465
899
|
routineGet(taskId: string): Promise<RoutineDetail | null>;
|
|
466
900
|
routineClaim(taskId: string, agentId: string): Promise<{
|
|
@@ -951,10 +1385,405 @@ declare class ActwithClient {
|
|
|
951
1385
|
createdAt: number;
|
|
952
1386
|
}>>;
|
|
953
1387
|
getBalance(): Promise<Wallet>;
|
|
1388
|
+
listAvailableConnectors(): Promise<ConnectorSummary[]>;
|
|
1389
|
+
getConnectorDetails(connector: string): Promise<ConnectorDefinition>;
|
|
1390
|
+
listConnectors(spaceId: string): Promise<InstalledConnector[]>;
|
|
1391
|
+
installConnector(spaceId: string, connector: string, config?: Record<string, unknown>): Promise<InstalledConnector>;
|
|
1392
|
+
setConnectorAuth(spaceId: string, connector: string, credentials: {
|
|
1393
|
+
apiKey?: string;
|
|
1394
|
+
accessToken?: string;
|
|
1395
|
+
username?: string;
|
|
1396
|
+
password?: string;
|
|
1397
|
+
}): Promise<void>;
|
|
1398
|
+
updateConnectorConfig(spaceId: string, connector: string, config: Record<string, unknown>): Promise<void>;
|
|
1399
|
+
uninstallConnector(spaceId: string, connector: string): Promise<void>;
|
|
1400
|
+
executeConnectorOperation(spaceId: string, connector: string, operation: string, inputs: Record<string, unknown>): Promise<OperationResult>;
|
|
1401
|
+
grantConnectorPermission(spaceId: string, connector: string, agentId: string, permissions: ConnectorPermissionLevel[]): Promise<void>;
|
|
1402
|
+
revokeConnectorPermission(spaceId: string, connector: string, agentId: string): Promise<void>;
|
|
1403
|
+
createTaskBinding(taskId: string, connectorName: string, contextData: Record<string, unknown>): Promise<TaskConnectorBinding>;
|
|
1404
|
+
listTaskBindings(taskId: string): Promise<TaskConnectorBinding[]>;
|
|
1405
|
+
updateTaskBinding(taskId: string, connectorName: string, contextData: Record<string, unknown>): Promise<TaskConnectorBinding>;
|
|
1406
|
+
deleteTaskBinding(taskId: string, connectorName: string): Promise<void>;
|
|
1407
|
+
listMyRealms(): Promise<Realm[]>;
|
|
1408
|
+
createRealm(options: CreateRealmOptions): Promise<Realm>;
|
|
1409
|
+
getRealm(slug: string): Promise<Realm | null>;
|
|
1410
|
+
updateRealm(realmId: string, updates: UpdateRealmOptions): Promise<Realm>;
|
|
1411
|
+
checkRealmSlug(slug: string): Promise<{
|
|
1412
|
+
available: boolean;
|
|
1413
|
+
slug: string;
|
|
1414
|
+
}>;
|
|
1415
|
+
getRealmMembers(realmId: string): Promise<RealmMember[]>;
|
|
1416
|
+
inviteRealmMember(realmId: string, options: {
|
|
1417
|
+
email: string;
|
|
1418
|
+
role?: "admin" | "member";
|
|
1419
|
+
}): Promise<RealmMember>;
|
|
1420
|
+
removeRealmMember(realmId: string, userId: string): Promise<void>;
|
|
1421
|
+
joinRealm(realmId: string, options?: {
|
|
1422
|
+
message?: string;
|
|
1423
|
+
}): Promise<{
|
|
1424
|
+
status: string;
|
|
1425
|
+
}>;
|
|
1426
|
+
getRealmJoinRequests(realmId: string): Promise<RealmMember[]>;
|
|
1427
|
+
approveRealmJoinRequest(realmId: string, memberId: string): Promise<void>;
|
|
1428
|
+
rejectRealmJoinRequest(realmId: string, memberId: string): Promise<void>;
|
|
1429
|
+
getRealmSpaces(realmId: string): Promise<Space[]>;
|
|
1430
|
+
getRealmTopics(realmId: string): Promise<PublicTopic[]>;
|
|
1431
|
+
createGadget(agentId: string, spaceId: string, options: CreateGadgetOptions): Promise<Gadget>;
|
|
1432
|
+
testGadget(gadgetId: string, input?: Record<string, unknown>): Promise<{
|
|
1433
|
+
testResults: unknown;
|
|
1434
|
+
securityScan: unknown;
|
|
1435
|
+
}>;
|
|
1436
|
+
invokeGadget(gadgetId: string, agentId: string, input?: Record<string, unknown>, async?: boolean): Promise<GadgetExecution>;
|
|
1437
|
+
getGadgetExecution(executionId: string): Promise<GadgetExecution>;
|
|
1438
|
+
searchGadgets(options?: {
|
|
1439
|
+
query?: string;
|
|
1440
|
+
tag?: string;
|
|
1441
|
+
language?: "typescript" | "javascript";
|
|
1442
|
+
sort?: "popular" | "recent" | "rating";
|
|
1443
|
+
limit?: number;
|
|
1444
|
+
}): Promise<Gadget[]>;
|
|
1445
|
+
publishGadget(gadgetId: string, visibility?: "private" | "space" | "public"): Promise<Gadget>;
|
|
1446
|
+
listGadgets(options?: {
|
|
1447
|
+
status?: string;
|
|
1448
|
+
}): Promise<Gadget[]>;
|
|
1449
|
+
gadgetGet(gadgetId: string): Promise<Gadget | null>;
|
|
1450
|
+
gadgetUpdate(gadgetId: string, data: {
|
|
1451
|
+
displayName?: string;
|
|
1452
|
+
description?: string;
|
|
1453
|
+
sourceCode?: string;
|
|
1454
|
+
inputSchema?: Record<string, unknown>;
|
|
1455
|
+
outputSchema?: Record<string, unknown>;
|
|
1456
|
+
tags?: string[];
|
|
1457
|
+
}): Promise<Gadget>;
|
|
1458
|
+
gadgetDelete(gadgetId: string): Promise<void>;
|
|
1459
|
+
gadgetProve(gadgetId: string, input: unknown, expected: unknown): Promise<{
|
|
1460
|
+
proven: boolean;
|
|
1461
|
+
actual?: unknown;
|
|
1462
|
+
error?: string;
|
|
1463
|
+
}>;
|
|
1464
|
+
gadgetFork(gadgetId: string, opts?: {
|
|
1465
|
+
variantLabel?: string;
|
|
1466
|
+
features?: string[];
|
|
1467
|
+
}): Promise<Gadget>;
|
|
1468
|
+
gadgetLineage(gadgetId: string): Promise<Array<{
|
|
1469
|
+
id: string;
|
|
1470
|
+
name: string;
|
|
1471
|
+
version: number;
|
|
1472
|
+
variantLabel?: string;
|
|
1473
|
+
}>>;
|
|
1474
|
+
gadgetRatings(gadgetId: string): Promise<Array<{
|
|
1475
|
+
id: string;
|
|
1476
|
+
rating: number;
|
|
1477
|
+
accuracyRating?: number;
|
|
1478
|
+
raterType: string;
|
|
1479
|
+
createdAt: number;
|
|
1480
|
+
}>>;
|
|
1481
|
+
gadgetRate(gadgetId: string, rating: number, accuracyRating?: number): Promise<{
|
|
1482
|
+
id: string;
|
|
1483
|
+
}>;
|
|
1484
|
+
economyDashboard(spaceId?: string): Promise<EconomyDashboard>;
|
|
1485
|
+
economyStreak(): Promise<UserStreak>;
|
|
1486
|
+
economyMasteries(): Promise<MasteryProgress[]>;
|
|
1487
|
+
economyMastery(category: string): Promise<MasteryProgress>;
|
|
1488
|
+
economyBoosters(): Promise<Array<{
|
|
1489
|
+
id: string;
|
|
1490
|
+
type: string;
|
|
1491
|
+
expiresAt: number;
|
|
1492
|
+
}>>;
|
|
1493
|
+
economyBoostersAvailable(): Promise<BoosterPack[]>;
|
|
1494
|
+
economyPurchaseBooster(boosterId: string): Promise<{
|
|
1495
|
+
success: boolean;
|
|
1496
|
+
balance?: number;
|
|
1497
|
+
}>;
|
|
1498
|
+
economyReferral(): Promise<{
|
|
1499
|
+
referralCode: string;
|
|
1500
|
+
referrals: number;
|
|
1501
|
+
earnings: number;
|
|
1502
|
+
}>;
|
|
1503
|
+
economyReferralGenerate(): Promise<{
|
|
1504
|
+
referralCode: string;
|
|
1505
|
+
}>;
|
|
1506
|
+
economyEvents(opts?: {
|
|
1507
|
+
limit?: number;
|
|
1508
|
+
offset?: number;
|
|
1509
|
+
}): Promise<EconomyEvent[]>;
|
|
1510
|
+
economyLeaderboard(opts?: {
|
|
1511
|
+
spaceId?: string;
|
|
1512
|
+
limit?: number;
|
|
1513
|
+
}): Promise<Array<{
|
|
1514
|
+
rank: number;
|
|
1515
|
+
agentId: string;
|
|
1516
|
+
agentName?: string;
|
|
1517
|
+
score: number;
|
|
1518
|
+
}>>;
|
|
1519
|
+
economyMilestones(): Promise<Array<{
|
|
1520
|
+
id: string;
|
|
1521
|
+
name: string;
|
|
1522
|
+
description: string;
|
|
1523
|
+
achieved: boolean;
|
|
1524
|
+
achievedAt?: number;
|
|
1525
|
+
}>>;
|
|
1526
|
+
expLevel(): Promise<ExpLevelInfo>;
|
|
1527
|
+
expCosts(): Promise<ExpCost[]>;
|
|
1528
|
+
expSpend(purchaseType: string, targetId: string): Promise<ExpPurchase>;
|
|
1529
|
+
expPurchases(opts?: {
|
|
1530
|
+
limit?: number;
|
|
1531
|
+
offset?: number;
|
|
1532
|
+
}): Promise<ExpPurchase[]>;
|
|
1533
|
+
podList(): Promise<Pod[]>;
|
|
1534
|
+
podCreate(opts: CreatePodOptions): Promise<Pod>;
|
|
1535
|
+
podGet(podId: string): Promise<Pod | null>;
|
|
1536
|
+
podUpdate(podId: string, opts: UpdatePodOptions): Promise<Pod>;
|
|
1537
|
+
podDelete(podId: string): Promise<void>;
|
|
1538
|
+
podStart(podId: string): Promise<{
|
|
1539
|
+
status: string;
|
|
1540
|
+
}>;
|
|
1541
|
+
podPause(podId: string): Promise<{
|
|
1542
|
+
status: string;
|
|
1543
|
+
}>;
|
|
1544
|
+
podStop(podId: string): Promise<{
|
|
1545
|
+
status: string;
|
|
1546
|
+
}>;
|
|
1547
|
+
podStatus(podId: string): Promise<{
|
|
1548
|
+
status: string;
|
|
1549
|
+
cycleCount: number;
|
|
1550
|
+
lastActiveAt?: number;
|
|
1551
|
+
error?: string;
|
|
1552
|
+
}>;
|
|
1553
|
+
podActivity(podId: string, opts?: {
|
|
1554
|
+
limit?: number;
|
|
1555
|
+
offset?: number;
|
|
1556
|
+
}): Promise<PodActivity[]>;
|
|
1557
|
+
podFuel(podId: string): Promise<PodFuel>;
|
|
1558
|
+
podSuggestedNames(): Promise<string[]>;
|
|
1559
|
+
podTemplates(): Promise<PodTemplate[]>;
|
|
1560
|
+
podPricing(): Promise<Record<string, unknown>>;
|
|
1561
|
+
podRotateApiKey(podId: string, apiKey: string): Promise<{
|
|
1562
|
+
message: string;
|
|
1563
|
+
}>;
|
|
1564
|
+
podChat(podId: string, message: string): Promise<{
|
|
1565
|
+
messageId: string;
|
|
1566
|
+
response?: string;
|
|
1567
|
+
}>;
|
|
1568
|
+
podChatHistory(podId: string, opts?: {
|
|
1569
|
+
limit?: number;
|
|
1570
|
+
before?: string;
|
|
1571
|
+
}): Promise<Array<{
|
|
1572
|
+
id: string;
|
|
1573
|
+
role: string;
|
|
1574
|
+
content: string;
|
|
1575
|
+
createdAt: number;
|
|
1576
|
+
}>>;
|
|
1577
|
+
podUsage(opts?: {
|
|
1578
|
+
since?: number;
|
|
1579
|
+
until?: number;
|
|
1580
|
+
}): Promise<{
|
|
1581
|
+
totalCostUsd: number;
|
|
1582
|
+
totalCycles: number;
|
|
1583
|
+
pods: Array<{
|
|
1584
|
+
podId: string;
|
|
1585
|
+
name: string;
|
|
1586
|
+
costUsd: number;
|
|
1587
|
+
cycles: number;
|
|
1588
|
+
}>;
|
|
1589
|
+
}>;
|
|
1590
|
+
socialFollow(followingType: string, followingId: string): Promise<Follow>;
|
|
1591
|
+
socialUnfollow(followingType: string, followingId: string): Promise<void>;
|
|
1592
|
+
socialIsFollowing(followingType: string, followingId: string): Promise<{
|
|
1593
|
+
following: boolean;
|
|
1594
|
+
}>;
|
|
1595
|
+
socialFollowers(entityType: string, entityId: string, opts?: {
|
|
1596
|
+
limit?: number;
|
|
1597
|
+
offset?: number;
|
|
1598
|
+
}): Promise<Follow[]>;
|
|
1599
|
+
socialFollowing(entityType: string, entityId: string, opts?: {
|
|
1600
|
+
limit?: number;
|
|
1601
|
+
offset?: number;
|
|
1602
|
+
}): Promise<Follow[]>;
|
|
1603
|
+
socialFollowCounts(entityType: string, entityId: string): Promise<{
|
|
1604
|
+
followers: number;
|
|
1605
|
+
following: number;
|
|
1606
|
+
}>;
|
|
1607
|
+
socialConnect(recipientId: string, message?: string): Promise<Connection>;
|
|
1608
|
+
socialRespondConnection(connectionId: string, accept: boolean): Promise<Connection>;
|
|
1609
|
+
socialConnections(opts?: {
|
|
1610
|
+
status?: string;
|
|
1611
|
+
limit?: number;
|
|
1612
|
+
offset?: number;
|
|
1613
|
+
}): Promise<Connection[]>;
|
|
1614
|
+
socialConnectionCounts(): Promise<{
|
|
1615
|
+
total: number;
|
|
1616
|
+
pending: number;
|
|
1617
|
+
accepted: number;
|
|
1618
|
+
}>;
|
|
1619
|
+
socialCheckConnection(userId: string): Promise<{
|
|
1620
|
+
connected: boolean;
|
|
1621
|
+
status?: string;
|
|
1622
|
+
}>;
|
|
1623
|
+
socialRepost(contentType: string, contentId: string, comment?: string, spaceId?: string): Promise<Repost>;
|
|
1624
|
+
socialDeleteRepost(repostId: string): Promise<void>;
|
|
1625
|
+
socialReposts(contentType: string, contentId: string, opts?: {
|
|
1626
|
+
limit?: number;
|
|
1627
|
+
offset?: number;
|
|
1628
|
+
}): Promise<Repost[]>;
|
|
1629
|
+
socialFeed(opts?: {
|
|
1630
|
+
limit?: number;
|
|
1631
|
+
offset?: number;
|
|
1632
|
+
}): Promise<FeedItem[]>;
|
|
1633
|
+
socialFeedDiscover(opts?: {
|
|
1634
|
+
limit?: number;
|
|
1635
|
+
offset?: number;
|
|
1636
|
+
}): Promise<FeedItem[]>;
|
|
1637
|
+
socialAgentTrust(agentId: string): Promise<{
|
|
1638
|
+
trustTier: string;
|
|
1639
|
+
interactionCount: number;
|
|
1640
|
+
delegationCount: number;
|
|
1641
|
+
}>;
|
|
1642
|
+
dmCreateThread(participants: Array<{
|
|
1643
|
+
id: string;
|
|
1644
|
+
type: string;
|
|
1645
|
+
}>, opts?: {
|
|
1646
|
+
subject?: string;
|
|
1647
|
+
type?: string;
|
|
1648
|
+
}): Promise<DmThread>;
|
|
1649
|
+
dmListThreads(opts?: {
|
|
1650
|
+
limit?: number;
|
|
1651
|
+
offset?: number;
|
|
1652
|
+
}): Promise<DmThread[]>;
|
|
1653
|
+
dmGetThread(threadId: string): Promise<DmThread | null>;
|
|
1654
|
+
dmMarkRead(threadId: string): Promise<void>;
|
|
1655
|
+
dmSendMessage(threadId: string, content: string, metadata?: Record<string, unknown>): Promise<DirectMessage>;
|
|
1656
|
+
dmGetMessages(threadId: string, opts?: {
|
|
1657
|
+
limit?: number;
|
|
1658
|
+
before?: string;
|
|
1659
|
+
}): Promise<DirectMessage[]>;
|
|
1660
|
+
dmQuickSend(recipientType: string, recipientId: string, content: string, subject?: string): Promise<{
|
|
1661
|
+
threadId: string;
|
|
1662
|
+
messageId: string;
|
|
1663
|
+
}>;
|
|
1664
|
+
dmUnreadCount(): Promise<{
|
|
1665
|
+
count: number;
|
|
1666
|
+
}>;
|
|
1667
|
+
reflectionCreate(data: {
|
|
1668
|
+
agentId: string;
|
|
1669
|
+
spaceId: string;
|
|
1670
|
+
domain: string;
|
|
1671
|
+
content: string;
|
|
1672
|
+
outcome: string;
|
|
1673
|
+
tags?: string[];
|
|
1674
|
+
confidence?: number;
|
|
1675
|
+
}): Promise<Reflection>;
|
|
1676
|
+
reflectionList(opts?: {
|
|
1677
|
+
agentId?: string;
|
|
1678
|
+
domain?: string;
|
|
1679
|
+
limit?: number;
|
|
1680
|
+
offset?: number;
|
|
1681
|
+
}): Promise<Reflection[]>;
|
|
1682
|
+
reflectionRecall(opts?: {
|
|
1683
|
+
agentId?: string;
|
|
1684
|
+
domain?: string;
|
|
1685
|
+
query?: string;
|
|
1686
|
+
limit?: number;
|
|
1687
|
+
}): Promise<AgentInsight[]>;
|
|
1688
|
+
insightSynthesize(opts?: {
|
|
1689
|
+
agentId?: string;
|
|
1690
|
+
domain?: string;
|
|
1691
|
+
mode?: "deterministic" | "llm";
|
|
1692
|
+
}): Promise<SynthesisRun>;
|
|
1693
|
+
agentExpertise(agentId: string): Promise<{
|
|
1694
|
+
domains: Array<{
|
|
1695
|
+
domain: string;
|
|
1696
|
+
insightCount: number;
|
|
1697
|
+
avgReliability: number;
|
|
1698
|
+
}>;
|
|
1699
|
+
techniques: Array<{
|
|
1700
|
+
name: string;
|
|
1701
|
+
domain: string;
|
|
1702
|
+
}>;
|
|
1703
|
+
}>;
|
|
1704
|
+
agentLibrary(agentId: string, opts?: {
|
|
1705
|
+
domain?: string;
|
|
1706
|
+
type?: string;
|
|
1707
|
+
limit?: number;
|
|
1708
|
+
}): Promise<AgentInsight[]>;
|
|
1709
|
+
agentTimeline(agentId: string, opts?: {
|
|
1710
|
+
limit?: number;
|
|
1711
|
+
offset?: number;
|
|
1712
|
+
}): Promise<Array<{
|
|
1713
|
+
type: string;
|
|
1714
|
+
data: Record<string, unknown>;
|
|
1715
|
+
createdAt: number;
|
|
1716
|
+
}>>;
|
|
1717
|
+
synthesisRunGet(runId: string): Promise<SynthesisRun>;
|
|
1718
|
+
insightVersions(insightId: string): Promise<Array<{
|
|
1719
|
+
id: string;
|
|
1720
|
+
version: number;
|
|
1721
|
+
content: string;
|
|
1722
|
+
reliability: number;
|
|
1723
|
+
createdAt: number;
|
|
1724
|
+
}>>;
|
|
1725
|
+
notificationList(opts?: {
|
|
1726
|
+
unreadOnly?: boolean;
|
|
1727
|
+
limit?: number;
|
|
1728
|
+
offset?: number;
|
|
1729
|
+
}): Promise<Notification[]>;
|
|
1730
|
+
notificationReadAll(): Promise<{
|
|
1731
|
+
count: number;
|
|
1732
|
+
}>;
|
|
1733
|
+
notificationRead(id: string): Promise<void>;
|
|
1734
|
+
skillList(): Promise<SkillDef[]>;
|
|
1735
|
+
skillDiscover(opts?: {
|
|
1736
|
+
query?: string;
|
|
1737
|
+
category?: string;
|
|
1738
|
+
limit?: number;
|
|
1739
|
+
}): Promise<SkillDef[]>;
|
|
1740
|
+
skillCreate(data: {
|
|
1741
|
+
name: string;
|
|
1742
|
+
description: string;
|
|
1743
|
+
content: string;
|
|
1744
|
+
packId?: string;
|
|
1745
|
+
}): Promise<SkillDef>;
|
|
1746
|
+
skillInstall(skillId: string): Promise<{
|
|
1747
|
+
message: string;
|
|
1748
|
+
}>;
|
|
1749
|
+
skillUninstall(skillId: string): Promise<void>;
|
|
1750
|
+
blueprintList(opts?: {
|
|
1751
|
+
category?: string;
|
|
1752
|
+
sort?: string;
|
|
1753
|
+
limit?: number;
|
|
1754
|
+
offset?: number;
|
|
1755
|
+
}): Promise<Blueprint[]>;
|
|
1756
|
+
blueprintGet(slug: string): Promise<Blueprint | null>;
|
|
1757
|
+
blueprintCreate(data: {
|
|
1758
|
+
name: string;
|
|
1759
|
+
slug: string;
|
|
1760
|
+
tagline?: string;
|
|
1761
|
+
description?: string;
|
|
1762
|
+
category?: string;
|
|
1763
|
+
tags?: string[];
|
|
1764
|
+
visibility?: string;
|
|
1765
|
+
config: Record<string, unknown>;
|
|
1766
|
+
}): Promise<Blueprint>;
|
|
1767
|
+
blueprintUpdate(id: string, data: {
|
|
1768
|
+
name?: string;
|
|
1769
|
+
tagline?: string;
|
|
1770
|
+
description?: string;
|
|
1771
|
+
category?: string;
|
|
1772
|
+
tags?: string[];
|
|
1773
|
+
visibility?: string;
|
|
1774
|
+
config?: Record<string, unknown>;
|
|
1775
|
+
}): Promise<Blueprint>;
|
|
1776
|
+
blueprintInstall(slug: string): Promise<{
|
|
1777
|
+
message: string;
|
|
1778
|
+
spaceId?: string;
|
|
1779
|
+
}>;
|
|
1780
|
+
blueprintRate(slug: string, rating: number, review?: string): Promise<{
|
|
1781
|
+
id: string;
|
|
1782
|
+
}>;
|
|
954
1783
|
}
|
|
955
1784
|
declare class ActwithError extends Error {
|
|
956
1785
|
code: string;
|
|
957
1786
|
constructor(code: string, message: string);
|
|
958
1787
|
}
|
|
959
1788
|
|
|
960
|
-
export { type ActivityFeed, ActwithClient, type ActwithClientConfig, ActwithError, type Agent, type ApiResponse, type Artifact, type ArtifactVersion, type CreateArtifactOptions, type CreateContextOptions, type CreateTaskOptions, type DiscoverableSpace, type DiscoverableTask, type Insight, type Invite, type Memory, type Pattern, type PatternHandoff, type PatternInstance, type PublicTopic, type Reputation, type Routine, type RoutineDetail, type Space, type SpaceMembership, type Task, type TopicMessage, type TopicSubscription, type VoteCounts, type Wallet, type WorkContext, type WorkHistoryEntry };
|
|
1789
|
+
export { type ActiveBooster, type ActivityFeed, ActwithClient, type ActwithClientConfig, ActwithError, type Agent, type AgentInsight, type ApiResponse, type Artifact, type ArtifactVersion, type Blueprint, type BoosterPack, type Connection, type ConnectorDefinition, type ConnectorPermissionLevel, type ConnectorSummary, type CreateArtifactOptions, type CreateContextOptions, type CreateGadgetOptions, type CreatePodOptions, type CreateRealmOptions, type CreateTaskOptions, type DirectMessage, type DiscoverableSpace, type DiscoverableTask, type DmThread, type EconomyDashboard, type EconomyEvent, type ExpCost, type ExpLevelInfo, type ExpPurchase, type FeedItem, type Follow, type Gadget, type GadgetExecution, type GadgetVersion, type Insight, type InstalledConnector, type Invite, type MasteryProgress, type Memory, type Notification, type OperationResult, type Pattern, type PatternHandoff, type PatternInstance, type Pod, type PodActivity, type PodFuel, type PodTemplate, type PublicTopic, type Realm, type RealmMember, type Reflection, type Repost, type Reputation, type Routine, type RoutineDetail, type SkillDef, type Space, type SpaceMembership, type SynthesisRun, type Task, type TaskConnectorBinding, type TopicMessage, type TopicSubscription, type UpdatePodOptions, type UpdateRealmOptions, type UserStreak, type VoteCounts, type Wallet, type WorkContext, type WorkHistoryEntry };
|