@alfe.ai/mcp-server 0.2.8 → 0.2.10

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
@@ -668,6 +668,168 @@ declare class VoiceApi extends ApiBase {
668
668
  }
669
669
  //# sourceMappingURL=voice.d.ts.map
670
670
  //#endregion
671
+ //#region src/domains/identity.d.ts
672
+ type IdentityStatus = "anonymous" | "partial" | "identified" | "verified";
673
+ interface IdentityDirectoryEntry {
674
+ identityId: string;
675
+ status: IdentityStatus;
676
+ displayName: string;
677
+ name?: string;
678
+ avatarUrl?: string;
679
+ lastSeenAt: string;
680
+ lastSeenProvider?: string;
681
+ messageable: boolean;
682
+ }
683
+ declare class IdentityApi extends ApiBase {
684
+ /**
685
+ * Returns the calling agent's own identity context — `{ agentId, tenantId }`
686
+ * decoded server-side from the agent API token. Used by the
687
+ * `@alfe.ai/openclaw-identity` plugin to bootstrap context when the
688
+ * OpenClaw daemon doesn't plumb `ctx.agentId` through to plugin hooks.
689
+ * Plugins should cache this for the daemon's lifetime (single-agent-per-
690
+ * process invariant). One HTTP round-trip per process activate; not for
691
+ * per-call use.
692
+ */
693
+ whoami(): Promise<{
694
+ agentId: string;
695
+ tenantId: string;
696
+ }>;
697
+ resolveIdentity(args: {
698
+ provider: string;
699
+ platformId: string;
700
+ kind?: "user" | "agent" | "service" | "bot" | "workspace";
701
+ displayName?: string;
702
+ }): Promise<{
703
+ identityId: string | null;
704
+ status: string;
705
+ created?: boolean;
706
+ reason?: string;
707
+ /**
708
+ * Flattened auriclabs permission strings for the resolved identity
709
+ * (scope-prefixed where applicable). Empty array on miss / org service
710
+ * outage — the runtime gate fails closed in that case.
711
+ */
712
+ permissions: string[];
713
+ }>;
714
+ searchIdentities(args?: {
715
+ q?: string;
716
+ status?: string;
717
+ limit?: number;
718
+ }): Promise<{
719
+ identities: unknown[];
720
+ }>;
721
+ listIdentities(args?: {
722
+ status?: IdentityStatus;
723
+ limit?: number;
724
+ cursor?: string;
725
+ }): Promise<{
726
+ identities: IdentityDirectoryEntry[];
727
+ cursor: string | null;
728
+ }>;
729
+ getIdentityContext(identityId: string): Promise<{
730
+ context: unknown;
731
+ }>;
732
+ mergeIdentities(survivorId: string, args: {
733
+ mergedId: string;
734
+ }): Promise<{
735
+ ok: boolean;
736
+ error?: string;
737
+ }>;
738
+ unmergeIdentity(identityId: string): Promise<{
739
+ ok: boolean;
740
+ error?: string;
741
+ }>;
742
+ addIdentityNote(identityId: string, args: {
743
+ content: string;
744
+ category?: string;
745
+ }): Promise<{
746
+ noteId: string | null;
747
+ }>;
748
+ tagIdentity(identityId: string, args: {
749
+ tag: string;
750
+ action: "add" | "remove";
751
+ }): Promise<{
752
+ ok: boolean;
753
+ }>;
754
+ getIdentityChangelog(identityId: string, args?: {
755
+ limit?: number;
756
+ cursor?: string;
757
+ }): Promise<{
758
+ entries: unknown[];
759
+ cursor: string | null;
760
+ }>;
761
+ rollbackIdentity(identityId: string, args: {
762
+ targetVersion: number;
763
+ }): Promise<{
764
+ ok: boolean;
765
+ entry?: unknown;
766
+ }>;
767
+ requestIdentityVerification(args: {
768
+ claimedIdentityId: string;
769
+ requestingIdentityId: string;
770
+ requestingProvider: string;
771
+ requestingPlatformId: string;
772
+ preferredChannel?: "mobile" | "email";
773
+ /**
774
+ * Phase 2: agent-supplied contact endpoint. When provided, the top-level
775
+ * `preferredChannel` is ignored — the contact's channel wins.
776
+ */
777
+ contact?: {
778
+ channel: "email" | "mobile";
779
+ value: string;
780
+ };
781
+ }): Promise<{
782
+ verificationId: string;
783
+ channel: string;
784
+ deliveredTo: string;
785
+ expiresAt: string;
786
+ availableChannels: {
787
+ channel: string;
788
+ deliveredTo: string;
789
+ }[];
790
+ } | {
791
+ error: string;
792
+ }>;
793
+ confirmIdentityVerification(args: {
794
+ claimedIdentityId: string;
795
+ verificationId: string;
796
+ phrase: string;
797
+ }): Promise<{
798
+ verified: boolean;
799
+ identityId?: string;
800
+ /** Phase 2: how the confirm resolved — Scenario A vs B. */
801
+ action?: "merged" | "contact_verified" | "already_confirmed";
802
+ error?: string;
803
+ }>;
804
+ /**
805
+ * Update display-shape fields on an Identity. Body excludes `email` /
806
+ * `phone` / `title` / `company` / `metadata` per Section D4 — contacts go
807
+ * via the verify flow, title/company live on OrgMembership, metadata is
808
+ * not agent-writable.
809
+ */
810
+ updateIdentity(identityId: string, args: {
811
+ name?: string;
812
+ avatarUrl?: string;
813
+ timezone?: string;
814
+ locale?: string;
815
+ }): Promise<{
816
+ ok: boolean;
817
+ }>;
818
+ /**
819
+ * Phase 2 (Section H): server-side verification of a Google Chat sender via
820
+ * the agent's existing Google OAuth credentials. Returns the resolved
821
+ * identity (created or matched via Scenario-B email enrichment).
822
+ */
823
+ resolveGoogleChatSender(args: {
824
+ senderUserId: string;
825
+ spaceId?: string;
826
+ }): Promise<{
827
+ identityId: string | null;
828
+ status: string;
829
+ }>;
830
+ }
831
+ //# sourceMappingURL=identity.d.ts.map
832
+ //#endregion
671
833
  //#region src/domains/search.d.ts
672
834
  /**
673
835
  * The broad-news providers behind the metered `services/news` Lambda. The
@@ -779,6 +941,14 @@ declare class WebhooksApi extends ApiBase {
779
941
  //#endregion
780
942
  //#region src/domains/chat.d.ts
781
943
  declare class ChatApi extends ApiBase {
944
+ ensureDirectConversation(identityId: string): Promise<{
945
+ conversationId: string;
946
+ identityId: string;
947
+ tenantId: string;
948
+ userId: string;
949
+ displayName: string;
950
+ created: boolean;
951
+ }>;
782
952
  presignAttachments(files: {
783
953
  filename: string;
784
954
  mimeType: string;
@@ -787,6 +957,7 @@ declare class ChatApi extends ApiBase {
787
957
  attachments: {
788
958
  id: string;
789
959
  uploadUrl: string;
960
+ uploadHeaders: Record<string, string>;
790
961
  downloadUrl: string;
791
962
  s3Key: string;
792
963
  expiresAt: string;
@@ -1430,149 +1601,6 @@ declare class DatabaseApi extends ApiBase {
1430
1601
  }
1431
1602
  //# sourceMappingURL=database.d.ts.map
1432
1603
  //#endregion
1433
- //#region src/domains/identity.d.ts
1434
- declare class IdentityApi extends ApiBase {
1435
- /**
1436
- * Returns the calling agent's own identity context — `{ agentId, tenantId }`
1437
- * decoded server-side from the agent API token. Used by the
1438
- * `@alfe.ai/openclaw-identity` plugin to bootstrap context when the
1439
- * OpenClaw daemon doesn't plumb `ctx.agentId` through to plugin hooks.
1440
- * Plugins should cache this for the daemon's lifetime (single-agent-per-
1441
- * process invariant). One HTTP round-trip per process activate; not for
1442
- * per-call use.
1443
- */
1444
- whoami(): Promise<{
1445
- agentId: string;
1446
- tenantId: string;
1447
- }>;
1448
- resolveIdentity(args: {
1449
- provider: string;
1450
- platformId: string;
1451
- kind?: "user" | "agent" | "service" | "bot" | "workspace";
1452
- displayName?: string;
1453
- }): Promise<{
1454
- identityId: string | null;
1455
- status: string;
1456
- created?: boolean;
1457
- reason?: string;
1458
- /**
1459
- * Flattened auriclabs permission strings for the resolved identity
1460
- * (scope-prefixed where applicable). Empty array on miss / org service
1461
- * outage — the runtime gate fails closed in that case.
1462
- */
1463
- permissions: string[];
1464
- }>;
1465
- searchIdentities(args?: {
1466
- q?: string;
1467
- status?: string;
1468
- limit?: number;
1469
- }): Promise<{
1470
- identities: unknown[];
1471
- }>;
1472
- getIdentityContext(identityId: string): Promise<{
1473
- context: unknown;
1474
- }>;
1475
- mergeIdentities(survivorId: string, args: {
1476
- mergedId: string;
1477
- }): Promise<{
1478
- ok: boolean;
1479
- error?: string;
1480
- }>;
1481
- unmergeIdentity(identityId: string): Promise<{
1482
- ok: boolean;
1483
- error?: string;
1484
- }>;
1485
- addIdentityNote(identityId: string, args: {
1486
- content: string;
1487
- category?: string;
1488
- }): Promise<{
1489
- noteId: string | null;
1490
- }>;
1491
- tagIdentity(identityId: string, args: {
1492
- tag: string;
1493
- action: "add" | "remove";
1494
- }): Promise<{
1495
- ok: boolean;
1496
- }>;
1497
- getIdentityChangelog(identityId: string, args?: {
1498
- limit?: number;
1499
- cursor?: string;
1500
- }): Promise<{
1501
- entries: unknown[];
1502
- cursor: string | null;
1503
- }>;
1504
- rollbackIdentity(identityId: string, args: {
1505
- targetVersion: number;
1506
- }): Promise<{
1507
- ok: boolean;
1508
- entry?: unknown;
1509
- }>;
1510
- requestIdentityVerification(args: {
1511
- claimedIdentityId: string;
1512
- requestingIdentityId: string;
1513
- requestingProvider: string;
1514
- requestingPlatformId: string;
1515
- preferredChannel?: "mobile" | "email";
1516
- /**
1517
- * Phase 2: agent-supplied contact endpoint. When provided, the top-level
1518
- * `preferredChannel` is ignored — the contact's channel wins.
1519
- */
1520
- contact?: {
1521
- channel: "email" | "mobile";
1522
- value: string;
1523
- };
1524
- }): Promise<{
1525
- verificationId: string;
1526
- channel: string;
1527
- deliveredTo: string;
1528
- expiresAt: string;
1529
- availableChannels: {
1530
- channel: string;
1531
- deliveredTo: string;
1532
- }[];
1533
- } | {
1534
- error: string;
1535
- }>;
1536
- confirmIdentityVerification(args: {
1537
- claimedIdentityId: string;
1538
- verificationId: string;
1539
- phrase: string;
1540
- }): Promise<{
1541
- verified: boolean;
1542
- identityId?: string;
1543
- /** Phase 2: how the confirm resolved — Scenario A vs B. */
1544
- action?: "merged" | "contact_verified" | "already_confirmed";
1545
- error?: string;
1546
- }>;
1547
- /**
1548
- * Update display-shape fields on an Identity. Body excludes `email` /
1549
- * `phone` / `title` / `company` / `metadata` per Section D4 — contacts go
1550
- * via the verify flow, title/company live on OrgMembership, metadata is
1551
- * not agent-writable.
1552
- */
1553
- updateIdentity(identityId: string, args: {
1554
- name?: string;
1555
- avatarUrl?: string;
1556
- timezone?: string;
1557
- locale?: string;
1558
- }): Promise<{
1559
- ok: boolean;
1560
- }>;
1561
- /**
1562
- * Phase 2 (Section H): server-side verification of a Google Chat sender via
1563
- * the agent's existing Google OAuth credentials. Returns the resolved
1564
- * identity (created or matched via Scenario-B email enrichment).
1565
- */
1566
- resolveGoogleChatSender(args: {
1567
- senderUserId: string;
1568
- spaceId?: string;
1569
- }): Promise<{
1570
- identityId: string | null;
1571
- status: string;
1572
- }>;
1573
- }
1574
- //# sourceMappingURL=identity.d.ts.map
1575
- //#endregion
1576
1604
  //#region src/domains/images.d.ts
1577
1605
  declare class ImagesApi extends ApiBase {
1578
1606
  /**