@alfe.ai/openclaw-sync 0.3.12 → 0.3.13

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
@@ -780,6 +780,168 @@ declare class VoiceApi extends ApiBase {
780
780
  }
781
781
  //# sourceMappingURL=voice.d.ts.map
782
782
  //#endregion
783
+ //#region src/domains/identity.d.ts
784
+ type IdentityStatus = "anonymous" | "partial" | "identified" | "verified";
785
+ interface IdentityDirectoryEntry {
786
+ identityId: string;
787
+ status: IdentityStatus;
788
+ displayName: string;
789
+ name?: string;
790
+ avatarUrl?: string;
791
+ lastSeenAt: string;
792
+ lastSeenProvider?: string;
793
+ messageable: boolean;
794
+ }
795
+ declare class IdentityApi extends ApiBase {
796
+ /**
797
+ * Returns the calling agent's own identity context — `{ agentId, tenantId }`
798
+ * decoded server-side from the agent API token. Used by the
799
+ * `@alfe.ai/openclaw-identity` plugin to bootstrap context when the
800
+ * OpenClaw daemon doesn't plumb `ctx.agentId` through to plugin hooks.
801
+ * Plugins should cache this for the daemon's lifetime (single-agent-per-
802
+ * process invariant). One HTTP round-trip per process activate; not for
803
+ * per-call use.
804
+ */
805
+ whoami(): Promise<{
806
+ agentId: string;
807
+ tenantId: string;
808
+ }>;
809
+ resolveIdentity(args: {
810
+ provider: string;
811
+ platformId: string;
812
+ kind?: "user" | "agent" | "service" | "bot" | "workspace";
813
+ displayName?: string;
814
+ }): Promise<{
815
+ identityId: string | null;
816
+ status: string;
817
+ created?: boolean;
818
+ reason?: string;
819
+ /**
820
+ * Flattened auriclabs permission strings for the resolved identity
821
+ * (scope-prefixed where applicable). Empty array on miss / org service
822
+ * outage — the runtime gate fails closed in that case.
823
+ */
824
+ permissions: string[];
825
+ }>;
826
+ searchIdentities(args?: {
827
+ q?: string;
828
+ status?: string;
829
+ limit?: number;
830
+ }): Promise<{
831
+ identities: unknown[];
832
+ }>;
833
+ listIdentities(args?: {
834
+ status?: IdentityStatus;
835
+ limit?: number;
836
+ cursor?: string;
837
+ }): Promise<{
838
+ identities: IdentityDirectoryEntry[];
839
+ cursor: string | null;
840
+ }>;
841
+ getIdentityContext(identityId: string): Promise<{
842
+ context: unknown;
843
+ }>;
844
+ mergeIdentities(survivorId: string, args: {
845
+ mergedId: string;
846
+ }): Promise<{
847
+ ok: boolean;
848
+ error?: string;
849
+ }>;
850
+ unmergeIdentity(identityId: string): Promise<{
851
+ ok: boolean;
852
+ error?: string;
853
+ }>;
854
+ addIdentityNote(identityId: string, args: {
855
+ content: string;
856
+ category?: string;
857
+ }): Promise<{
858
+ noteId: string | null;
859
+ }>;
860
+ tagIdentity(identityId: string, args: {
861
+ tag: string;
862
+ action: "add" | "remove";
863
+ }): Promise<{
864
+ ok: boolean;
865
+ }>;
866
+ getIdentityChangelog(identityId: string, args?: {
867
+ limit?: number;
868
+ cursor?: string;
869
+ }): Promise<{
870
+ entries: unknown[];
871
+ cursor: string | null;
872
+ }>;
873
+ rollbackIdentity(identityId: string, args: {
874
+ targetVersion: number;
875
+ }): Promise<{
876
+ ok: boolean;
877
+ entry?: unknown;
878
+ }>;
879
+ requestIdentityVerification(args: {
880
+ claimedIdentityId: string;
881
+ requestingIdentityId: string;
882
+ requestingProvider: string;
883
+ requestingPlatformId: string;
884
+ preferredChannel?: "mobile" | "email";
885
+ /**
886
+ * Phase 2: agent-supplied contact endpoint. When provided, the top-level
887
+ * `preferredChannel` is ignored — the contact's channel wins.
888
+ */
889
+ contact?: {
890
+ channel: "email" | "mobile";
891
+ value: string;
892
+ };
893
+ }): Promise<{
894
+ verificationId: string;
895
+ channel: string;
896
+ deliveredTo: string;
897
+ expiresAt: string;
898
+ availableChannels: {
899
+ channel: string;
900
+ deliveredTo: string;
901
+ }[];
902
+ } | {
903
+ error: string;
904
+ }>;
905
+ confirmIdentityVerification(args: {
906
+ claimedIdentityId: string;
907
+ verificationId: string;
908
+ phrase: string;
909
+ }): Promise<{
910
+ verified: boolean;
911
+ identityId?: string;
912
+ /** Phase 2: how the confirm resolved — Scenario A vs B. */
913
+ action?: "merged" | "contact_verified" | "already_confirmed";
914
+ error?: string;
915
+ }>;
916
+ /**
917
+ * Update display-shape fields on an Identity. Body excludes `email` /
918
+ * `phone` / `title` / `company` / `metadata` per Section D4 — contacts go
919
+ * via the verify flow, title/company live on OrgMembership, metadata is
920
+ * not agent-writable.
921
+ */
922
+ updateIdentity(identityId: string, args: {
923
+ name?: string;
924
+ avatarUrl?: string;
925
+ timezone?: string;
926
+ locale?: string;
927
+ }): Promise<{
928
+ ok: boolean;
929
+ }>;
930
+ /**
931
+ * Phase 2 (Section H): server-side verification of a Google Chat sender via
932
+ * the agent's existing Google OAuth credentials. Returns the resolved
933
+ * identity (created or matched via Scenario-B email enrichment).
934
+ */
935
+ resolveGoogleChatSender(args: {
936
+ senderUserId: string;
937
+ spaceId?: string;
938
+ }): Promise<{
939
+ identityId: string | null;
940
+ status: string;
941
+ }>;
942
+ }
943
+ //# sourceMappingURL=identity.d.ts.map
944
+ //#endregion
783
945
  //#region src/domains/search.d.ts
784
946
  /**
785
947
  * The broad-news providers behind the metered `services/news` Lambda. The
@@ -891,6 +1053,14 @@ declare class WebhooksApi extends ApiBase {
891
1053
  //#endregion
892
1054
  //#region src/domains/chat.d.ts
893
1055
  declare class ChatApi extends ApiBase {
1056
+ ensureDirectConversation(identityId: string): Promise<{
1057
+ conversationId: string;
1058
+ identityId: string;
1059
+ tenantId: string;
1060
+ userId: string;
1061
+ displayName: string;
1062
+ created: boolean;
1063
+ }>;
894
1064
  presignAttachments(files: {
895
1065
  filename: string;
896
1066
  mimeType: string;
@@ -1543,149 +1713,6 @@ declare class DatabaseApi extends ApiBase {
1543
1713
  }
1544
1714
  //# sourceMappingURL=database.d.ts.map
1545
1715
  //#endregion
1546
- //#region src/domains/identity.d.ts
1547
- declare class IdentityApi extends ApiBase {
1548
- /**
1549
- * Returns the calling agent's own identity context — `{ agentId, tenantId }`
1550
- * decoded server-side from the agent API token. Used by the
1551
- * `@alfe.ai/openclaw-identity` plugin to bootstrap context when the
1552
- * OpenClaw daemon doesn't plumb `ctx.agentId` through to plugin hooks.
1553
- * Plugins should cache this for the daemon's lifetime (single-agent-per-
1554
- * process invariant). One HTTP round-trip per process activate; not for
1555
- * per-call use.
1556
- */
1557
- whoami(): Promise<{
1558
- agentId: string;
1559
- tenantId: string;
1560
- }>;
1561
- resolveIdentity(args: {
1562
- provider: string;
1563
- platformId: string;
1564
- kind?: "user" | "agent" | "service" | "bot" | "workspace";
1565
- displayName?: string;
1566
- }): Promise<{
1567
- identityId: string | null;
1568
- status: string;
1569
- created?: boolean;
1570
- reason?: string;
1571
- /**
1572
- * Flattened auriclabs permission strings for the resolved identity
1573
- * (scope-prefixed where applicable). Empty array on miss / org service
1574
- * outage — the runtime gate fails closed in that case.
1575
- */
1576
- permissions: string[];
1577
- }>;
1578
- searchIdentities(args?: {
1579
- q?: string;
1580
- status?: string;
1581
- limit?: number;
1582
- }): Promise<{
1583
- identities: unknown[];
1584
- }>;
1585
- getIdentityContext(identityId: string): Promise<{
1586
- context: unknown;
1587
- }>;
1588
- mergeIdentities(survivorId: string, args: {
1589
- mergedId: string;
1590
- }): Promise<{
1591
- ok: boolean;
1592
- error?: string;
1593
- }>;
1594
- unmergeIdentity(identityId: string): Promise<{
1595
- ok: boolean;
1596
- error?: string;
1597
- }>;
1598
- addIdentityNote(identityId: string, args: {
1599
- content: string;
1600
- category?: string;
1601
- }): Promise<{
1602
- noteId: string | null;
1603
- }>;
1604
- tagIdentity(identityId: string, args: {
1605
- tag: string;
1606
- action: "add" | "remove";
1607
- }): Promise<{
1608
- ok: boolean;
1609
- }>;
1610
- getIdentityChangelog(identityId: string, args?: {
1611
- limit?: number;
1612
- cursor?: string;
1613
- }): Promise<{
1614
- entries: unknown[];
1615
- cursor: string | null;
1616
- }>;
1617
- rollbackIdentity(identityId: string, args: {
1618
- targetVersion: number;
1619
- }): Promise<{
1620
- ok: boolean;
1621
- entry?: unknown;
1622
- }>;
1623
- requestIdentityVerification(args: {
1624
- claimedIdentityId: string;
1625
- requestingIdentityId: string;
1626
- requestingProvider: string;
1627
- requestingPlatformId: string;
1628
- preferredChannel?: "mobile" | "email";
1629
- /**
1630
- * Phase 2: agent-supplied contact endpoint. When provided, the top-level
1631
- * `preferredChannel` is ignored — the contact's channel wins.
1632
- */
1633
- contact?: {
1634
- channel: "email" | "mobile";
1635
- value: string;
1636
- };
1637
- }): Promise<{
1638
- verificationId: string;
1639
- channel: string;
1640
- deliveredTo: string;
1641
- expiresAt: string;
1642
- availableChannels: {
1643
- channel: string;
1644
- deliveredTo: string;
1645
- }[];
1646
- } | {
1647
- error: string;
1648
- }>;
1649
- confirmIdentityVerification(args: {
1650
- claimedIdentityId: string;
1651
- verificationId: string;
1652
- phrase: string;
1653
- }): Promise<{
1654
- verified: boolean;
1655
- identityId?: string;
1656
- /** Phase 2: how the confirm resolved — Scenario A vs B. */
1657
- action?: "merged" | "contact_verified" | "already_confirmed";
1658
- error?: string;
1659
- }>;
1660
- /**
1661
- * Update display-shape fields on an Identity. Body excludes `email` /
1662
- * `phone` / `title` / `company` / `metadata` per Section D4 — contacts go
1663
- * via the verify flow, title/company live on OrgMembership, metadata is
1664
- * not agent-writable.
1665
- */
1666
- updateIdentity(identityId: string, args: {
1667
- name?: string;
1668
- avatarUrl?: string;
1669
- timezone?: string;
1670
- locale?: string;
1671
- }): Promise<{
1672
- ok: boolean;
1673
- }>;
1674
- /**
1675
- * Phase 2 (Section H): server-side verification of a Google Chat sender via
1676
- * the agent's existing Google OAuth credentials. Returns the resolved
1677
- * identity (created or matched via Scenario-B email enrichment).
1678
- */
1679
- resolveGoogleChatSender(args: {
1680
- senderUserId: string;
1681
- spaceId?: string;
1682
- }): Promise<{
1683
- identityId: string | null;
1684
- status: string;
1685
- }>;
1686
- }
1687
- //# sourceMappingURL=identity.d.ts.map
1688
- //#endregion
1689
1716
  //#region src/domains/images.d.ts
1690
1717
  declare class ImagesApi extends ApiBase {
1691
1718
  /**