@alfe.ai/openclaw-sync 0.3.11 → 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;
@@ -899,6 +1069,7 @@ declare class ChatApi extends ApiBase {
899
1069
  attachments: {
900
1070
  id: string;
901
1071
  uploadUrl: string;
1072
+ uploadHeaders: Record<string, string>;
902
1073
  downloadUrl: string;
903
1074
  s3Key: string;
904
1075
  expiresAt: string;
@@ -1542,149 +1713,6 @@ declare class DatabaseApi extends ApiBase {
1542
1713
  }
1543
1714
  //# sourceMappingURL=database.d.ts.map
1544
1715
  //#endregion
1545
- //#region src/domains/identity.d.ts
1546
- declare class IdentityApi extends ApiBase {
1547
- /**
1548
- * Returns the calling agent's own identity context — `{ agentId, tenantId }`
1549
- * decoded server-side from the agent API token. Used by the
1550
- * `@alfe.ai/openclaw-identity` plugin to bootstrap context when the
1551
- * OpenClaw daemon doesn't plumb `ctx.agentId` through to plugin hooks.
1552
- * Plugins should cache this for the daemon's lifetime (single-agent-per-
1553
- * process invariant). One HTTP round-trip per process activate; not for
1554
- * per-call use.
1555
- */
1556
- whoami(): Promise<{
1557
- agentId: string;
1558
- tenantId: string;
1559
- }>;
1560
- resolveIdentity(args: {
1561
- provider: string;
1562
- platformId: string;
1563
- kind?: "user" | "agent" | "service" | "bot" | "workspace";
1564
- displayName?: string;
1565
- }): Promise<{
1566
- identityId: string | null;
1567
- status: string;
1568
- created?: boolean;
1569
- reason?: string;
1570
- /**
1571
- * Flattened auriclabs permission strings for the resolved identity
1572
- * (scope-prefixed where applicable). Empty array on miss / org service
1573
- * outage — the runtime gate fails closed in that case.
1574
- */
1575
- permissions: string[];
1576
- }>;
1577
- searchIdentities(args?: {
1578
- q?: string;
1579
- status?: string;
1580
- limit?: number;
1581
- }): Promise<{
1582
- identities: unknown[];
1583
- }>;
1584
- getIdentityContext(identityId: string): Promise<{
1585
- context: unknown;
1586
- }>;
1587
- mergeIdentities(survivorId: string, args: {
1588
- mergedId: string;
1589
- }): Promise<{
1590
- ok: boolean;
1591
- error?: string;
1592
- }>;
1593
- unmergeIdentity(identityId: string): Promise<{
1594
- ok: boolean;
1595
- error?: string;
1596
- }>;
1597
- addIdentityNote(identityId: string, args: {
1598
- content: string;
1599
- category?: string;
1600
- }): Promise<{
1601
- noteId: string | null;
1602
- }>;
1603
- tagIdentity(identityId: string, args: {
1604
- tag: string;
1605
- action: "add" | "remove";
1606
- }): Promise<{
1607
- ok: boolean;
1608
- }>;
1609
- getIdentityChangelog(identityId: string, args?: {
1610
- limit?: number;
1611
- cursor?: string;
1612
- }): Promise<{
1613
- entries: unknown[];
1614
- cursor: string | null;
1615
- }>;
1616
- rollbackIdentity(identityId: string, args: {
1617
- targetVersion: number;
1618
- }): Promise<{
1619
- ok: boolean;
1620
- entry?: unknown;
1621
- }>;
1622
- requestIdentityVerification(args: {
1623
- claimedIdentityId: string;
1624
- requestingIdentityId: string;
1625
- requestingProvider: string;
1626
- requestingPlatformId: string;
1627
- preferredChannel?: "mobile" | "email";
1628
- /**
1629
- * Phase 2: agent-supplied contact endpoint. When provided, the top-level
1630
- * `preferredChannel` is ignored — the contact's channel wins.
1631
- */
1632
- contact?: {
1633
- channel: "email" | "mobile";
1634
- value: string;
1635
- };
1636
- }): Promise<{
1637
- verificationId: string;
1638
- channel: string;
1639
- deliveredTo: string;
1640
- expiresAt: string;
1641
- availableChannels: {
1642
- channel: string;
1643
- deliveredTo: string;
1644
- }[];
1645
- } | {
1646
- error: string;
1647
- }>;
1648
- confirmIdentityVerification(args: {
1649
- claimedIdentityId: string;
1650
- verificationId: string;
1651
- phrase: string;
1652
- }): Promise<{
1653
- verified: boolean;
1654
- identityId?: string;
1655
- /** Phase 2: how the confirm resolved — Scenario A vs B. */
1656
- action?: "merged" | "contact_verified" | "already_confirmed";
1657
- error?: string;
1658
- }>;
1659
- /**
1660
- * Update display-shape fields on an Identity. Body excludes `email` /
1661
- * `phone` / `title` / `company` / `metadata` per Section D4 — contacts go
1662
- * via the verify flow, title/company live on OrgMembership, metadata is
1663
- * not agent-writable.
1664
- */
1665
- updateIdentity(identityId: string, args: {
1666
- name?: string;
1667
- avatarUrl?: string;
1668
- timezone?: string;
1669
- locale?: string;
1670
- }): Promise<{
1671
- ok: boolean;
1672
- }>;
1673
- /**
1674
- * Phase 2 (Section H): server-side verification of a Google Chat sender via
1675
- * the agent's existing Google OAuth credentials. Returns the resolved
1676
- * identity (created or matched via Scenario-B email enrichment).
1677
- */
1678
- resolveGoogleChatSender(args: {
1679
- senderUserId: string;
1680
- spaceId?: string;
1681
- }): Promise<{
1682
- identityId: string | null;
1683
- status: string;
1684
- }>;
1685
- }
1686
- //# sourceMappingURL=identity.d.ts.map
1687
- //#endregion
1688
1716
  //#region src/domains/images.d.ts
1689
1717
  declare class ImagesApi extends ApiBase {
1690
1718
  /**