@native-engagement/sdk 0.10.0 → 0.11.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
@@ -1,18 +1,5 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
- declare const installationModuleIds: readonly [
4
- "android.wechat",
5
- "android.whatsapp",
6
- "bridge.wechat",
7
- "bridge.mail",
8
- "bridge.browser",
9
- "api.youtube",
10
- "api.tiktok",
11
- "browser.xiaohongshu",
12
- "browser.douyin",
13
- "browser.tiktok"
14
- ];
15
- export type InstallationModuleId = typeof installationModuleIds[number];
16
3
  export type ContractRisk = "READ_ONLY" | "DOMAIN_WRITE" | "REVIEW_REQUIRED" | "EXTERNAL_ACTION" | "ADMINISTRATION";
17
4
  export type ContractKind = "SCHEMA" | "QUERY" | "COMMAND" | "SEARCH" | "ENQUIRY" | "EVENT" | "CAPABILITY";
18
5
  export type ContractAvailability = "AVAILABLE" | "PLANNED";
@@ -77,6 +64,172 @@ export interface McpToolDefinition {
77
64
  readonly annotations?: unknown;
78
65
  readonly _meta?: unknown;
79
66
  }
67
+ declare const installationModuleIds: readonly [
68
+ "android.wechat",
69
+ "android.whatsapp",
70
+ "bridge.wechat",
71
+ "bridge.mail",
72
+ "bridge.browser",
73
+ "api.youtube",
74
+ "api.tiktok",
75
+ "browser.xiaohongshu",
76
+ "browser.douyin",
77
+ "browser.tiktok"
78
+ ];
79
+ export type InstallationModuleId = typeof installationModuleIds[number];
80
+ declare const WEIXIN_CONTENT_WRITE_OPERATIONS: readonly ("draft.create" | "draft.update" | "draft.delete" | "image.delete")[];
81
+ export type WeixinContentWriteOperation = typeof WEIXIN_CONTENT_WRITE_OPERATIONS[number];
82
+ export type ArticleFields = {
83
+ title: string;
84
+ content: string;
85
+ author?: string;
86
+ digest?: string;
87
+ content_source_url?: string;
88
+ need_open_comment?: 0 | 1;
89
+ only_fans_can_comment?: 0 | 1;
90
+ };
91
+ export type WeixinArticle = ArticleFields & ({
92
+ article_type: "news";
93
+ thumb_media_id: string;
94
+ } | {
95
+ article_type: "newspic";
96
+ image_info: {
97
+ image_list: {
98
+ image_media_id: string;
99
+ }[];
100
+ };
101
+ });
102
+ export interface Inputs {
103
+ "draft.create": {
104
+ articles: WeixinArticle[];
105
+ };
106
+ "draft.update": {
107
+ media_id: string;
108
+ index: number;
109
+ articles: WeixinArticle;
110
+ };
111
+ "draft.delete": {
112
+ media_id: string;
113
+ };
114
+ "image.delete": {
115
+ media_id: string;
116
+ };
117
+ }
118
+ export type WeixinContentIntent = {
119
+ profileRef: string;
120
+ expectedConfigurationRevision: number;
121
+ sourceReadRefs: string[];
122
+ } & {
123
+ [K in keyof Inputs]: {
124
+ operation: K;
125
+ input: Inputs[K];
126
+ };
127
+ }[keyof Inputs];
128
+ export type WeixinRuntimeWriteRequest = WeixinContentIntent & {
129
+ idempotencyKey: string;
130
+ interactionRef: string;
131
+ expectedRequestDigest: string;
132
+ };
133
+ export interface WeixinWriteView {
134
+ tenantId: string;
135
+ kind: "WEIXIN_WRITE";
136
+ profileRef: string;
137
+ dispatchRef: string;
138
+ interactionRef: string;
139
+ configurationRevision: number;
140
+ operation: WeixinContentWriteOperation;
141
+ state: string;
142
+ resultJson: string | null;
143
+ reasonCode: string | null;
144
+ platformAcceptance: "NOT_PROVEN";
145
+ recoveryDispatchRef: string | null;
146
+ }
147
+ declare const WEIXIN_COMMENT_OPERATIONS: readonly ("comment.open" | "comment.close" | "comment.feature" | "comment.unfeature" | "comment.delete" | "comment.reply" | "comment.reply.delete")[];
148
+ export type WeixinCommentOperation = typeof WEIXIN_COMMENT_OPERATIONS[number];
149
+ export type Target = {
150
+ msg_data_id: string;
151
+ index: number;
152
+ };
153
+ type Comment$1 = Target & {
154
+ user_comment_id: number;
155
+ };
156
+ type Inputs$1 = {
157
+ "comment.open": Target;
158
+ "comment.close": Target;
159
+ "comment.feature": Comment$1;
160
+ "comment.unfeature": Comment$1;
161
+ "comment.delete": Comment$1;
162
+ "comment.reply": Comment$1 & {
163
+ content: string;
164
+ };
165
+ "comment.reply.delete": Comment$1;
166
+ };
167
+ export type WeixinCommentIntent = {
168
+ profileRef: string;
169
+ expectedConfigurationRevision: number;
170
+ sourceReadRef: string;
171
+ } & {
172
+ [K in WeixinCommentOperation]: {
173
+ operation: K;
174
+ input: Inputs$1[K];
175
+ };
176
+ }[WeixinCommentOperation];
177
+ export type WeixinCommentRequest = WeixinCommentIntent & {
178
+ idempotencyKey: string;
179
+ interactionRef: string;
180
+ expectedRequestDigest: string;
181
+ };
182
+ export type WeixinCommentView = Omit<WeixinWriteView, "kind" | "operation"> & {
183
+ kind: "WEIXIN_COMMENT";
184
+ operation: WeixinCommentOperation;
185
+ };
186
+ export interface WeixinCommentBasisView {
187
+ tenantId: string;
188
+ profileRef: string;
189
+ configurationRevision: number;
190
+ sourceReadRef: string;
191
+ operation: WeixinCommentOperation;
192
+ target: Target;
193
+ observedAt: string;
194
+ comment: {
195
+ userCommentId: number;
196
+ author: string;
197
+ content: string;
198
+ reply: string | null;
199
+ } | null;
200
+ }
201
+ export interface WeixinUploadAsset {
202
+ assetRef: string;
203
+ digest: string;
204
+ sourceVersion: string;
205
+ mediaType: "image/png" | "image/jpeg";
206
+ byteLength: number;
207
+ filename: string;
208
+ }
209
+ export interface WeixinUploadIntent {
210
+ profileRef: string;
211
+ expectedConfigurationRevision: number;
212
+ asset: WeixinUploadAsset;
213
+ }
214
+ export type WeixinUploadRequest = WeixinUploadIntent & {
215
+ idempotencyKey: string;
216
+ interactionRef: string;
217
+ expectedRequestDigest: string;
218
+ };
219
+ export interface WeixinUploadView {
220
+ tenantId: string;
221
+ kind: "WEIXIN_UPLOAD";
222
+ profileRef: string;
223
+ dispatchRef: string;
224
+ interactionRef: string;
225
+ configurationRevision: number;
226
+ operation: "image.upload";
227
+ state: string;
228
+ resultJson: string | null;
229
+ reasonCode: string | null;
230
+ recoveryDispatchRef: string | null;
231
+ platformAcceptance: "NOT_PROVEN";
232
+ }
80
233
  export type InteractionMailProvider = "ALIMAIL" | "TENCENT_EXMAIL" | "GMAIL" | "ICLOUD" | "ZOHO" | "MICROSOFT" | "CUSTOM";
81
234
  export interface InteractionMailEndpoint {
82
235
  host: string;
@@ -142,8 +295,64 @@ export interface InteractionAccountSetup {
142
295
  expectedNodeGeneration?: number;
143
296
  expectedFingerprint?: string;
144
297
  }
298
+ /** 便携配置输入与 canonical ProcessingDefinition schema 对齐,应用仍由原 Account Owner 完成。 */
299
+ export interface InteractionVoiceProfileBinding {
300
+ accountRef: string;
301
+ expectedVersion: number;
302
+ definition: {
303
+ processingRef: string;
304
+ profileRefs: readonly string[];
305
+ enabled: boolean;
306
+ assignments: readonly {
307
+ assignmentRef: string;
308
+ providerRef: string;
309
+ executionProfileRef: string;
310
+ selector: {
311
+ kind: "PROFILE";
312
+ profileRef: string;
313
+ } | {
314
+ kind: "POLICY_RULE";
315
+ profileRef: string;
316
+ policyRef: string;
317
+ ruleRef: string;
318
+ } | {
319
+ kind: "CONVERSATION";
320
+ profileRef: string;
321
+ engagementRef: string;
322
+ conversationRef: string;
323
+ };
324
+ presetSnapshot?: {
325
+ ownerRef: string;
326
+ presetRef: string;
327
+ version: number;
328
+ digest: string;
329
+ };
330
+ voiceProfile?: {
331
+ ownerSystem: string;
332
+ ownerTenantRef: string;
333
+ voiceProfileRef: string;
334
+ version: string;
335
+ digest: string;
336
+ };
337
+ }[];
338
+ };
339
+ audition?: {
340
+ assetRef: string;
341
+ digest: string;
342
+ sourceVersion: string;
343
+ };
344
+ }
145
345
  /** 公开参数表达闭合的窄意图,既不接收秘密,也不允许调用者选择任意业务合同。 */
146
346
  export type InteractionOperation = {
347
+ type: "WEIXIN_COMMENT_WRITE";
348
+ payload: WeixinCommentIntent;
349
+ } | {
350
+ type: "WEIXIN_IMAGE_UPLOAD";
351
+ payload: WeixinUploadIntent;
352
+ } | {
353
+ type: "WEIXIN_CONTENT_WRITE";
354
+ payload: WeixinContentIntent;
355
+ } | {
147
356
  type: "MAIL_CONFIGURATION";
148
357
  payload: InteractionMailConfiguration;
149
358
  } | {
@@ -173,6 +382,9 @@ export type InteractionOperation = {
173
382
  } | {
174
383
  type: "ACCOUNT_CONNECTION";
175
384
  payload: InteractionAccountConnection;
385
+ } | {
386
+ type: "VOICE_PROFILE_BINDING";
387
+ payload: InteractionVoiceProfileBinding;
176
388
  } | {
177
389
  type: "FEEDBACK";
178
390
  payload: {
@@ -342,148 +554,493 @@ declare const BROWSER_SOCIAL_PLATFORMS: readonly [
342
554
  "DOUYIN",
343
555
  "TIKTOK"
344
556
  ];
345
- /** Browser-safe shared approval representation; no host paths, locators or bytes. */
346
- export interface MessageAttachment {
347
- readonly assetRef: string;
348
- readonly sourceVersion: string;
349
- readonly digest: string;
350
- readonly mediaType: string;
351
- readonly byteLength: number;
352
- readonly filename: string;
353
- readonly presentation?: "VOICE_NOTE" | "IMAGE" | "VIDEO";
557
+ declare const WEIXIN_READ_INPUT_SCHEMAS: {
558
+ readonly "draft.count": Readonly<Record<string, unknown>>;
559
+ readonly "draft.list": Readonly<Record<string, unknown>>;
560
+ readonly "draft.get": Readonly<Record<string, unknown>>;
561
+ readonly "image.list": Readonly<Record<string, unknown>>;
562
+ readonly "publication.list": Readonly<Record<string, unknown>>;
563
+ readonly "publication.get": Readonly<Record<string, unknown>>;
564
+ readonly "comment.list": Readonly<Record<string, unknown>>;
565
+ };
566
+ declare const WEIXIN_READ_OPERATIONS: (keyof typeof WEIXIN_READ_INPUT_SCHEMAS)[];
567
+ declare const implemented: readonly [
568
+ {
569
+ readonly operation: "draft.list";
570
+ readonly endpoint: "draft/batchget";
571
+ readonly effect: "READ";
572
+ },
573
+ {
574
+ readonly operation: "draft.count";
575
+ readonly endpoint: "draft/count";
576
+ readonly effect: "READ";
577
+ },
578
+ {
579
+ readonly operation: "draft.get";
580
+ readonly endpoint: "draft/get";
581
+ readonly effect: "READ";
582
+ },
583
+ {
584
+ readonly operation: "draft.create";
585
+ readonly endpoint: "draft/add";
586
+ readonly effect: "WRITE";
587
+ },
588
+ {
589
+ readonly operation: "draft.update";
590
+ readonly endpoint: "draft/update";
591
+ readonly effect: "WRITE";
592
+ },
593
+ {
594
+ readonly operation: "draft.delete";
595
+ readonly endpoint: "draft/delete";
596
+ readonly effect: "WRITE";
597
+ },
598
+ {
599
+ readonly operation: "image.list";
600
+ readonly endpoint: "material/batchget_material";
601
+ readonly effect: "READ";
602
+ },
603
+ {
604
+ readonly operation: "image.upload";
605
+ readonly endpoint: "material/add_material";
606
+ readonly effect: "WRITE";
607
+ },
608
+ {
609
+ readonly operation: "image.delete";
610
+ readonly endpoint: "material/del_material";
611
+ readonly effect: "WRITE";
612
+ },
613
+ {
614
+ readonly operation: "publication.list";
615
+ readonly endpoint: "freepublish/batchget";
616
+ readonly effect: "READ";
617
+ },
618
+ {
619
+ readonly operation: "publication.get";
620
+ readonly endpoint: "freepublish/getarticle";
621
+ readonly effect: "READ";
622
+ },
623
+ {
624
+ readonly operation: "comment.list";
625
+ readonly endpoint: "comment/list";
626
+ readonly effect: "READ";
627
+ },
628
+ {
629
+ readonly operation: "comment.open";
630
+ readonly endpoint: "comment/open";
631
+ readonly effect: "WRITE";
632
+ },
633
+ {
634
+ readonly operation: "comment.close";
635
+ readonly endpoint: "comment/close";
636
+ readonly effect: "WRITE";
637
+ },
638
+ {
639
+ readonly operation: "comment.feature";
640
+ readonly endpoint: "comment/markelect";
641
+ readonly effect: "WRITE";
642
+ },
643
+ {
644
+ readonly operation: "comment.unfeature";
645
+ readonly endpoint: "comment/unmarkelect";
646
+ readonly effect: "WRITE";
647
+ },
648
+ {
649
+ readonly operation: "comment.delete";
650
+ readonly endpoint: "comment/delete";
651
+ readonly effect: "WRITE";
652
+ },
653
+ {
654
+ readonly operation: "comment.reply";
655
+ readonly endpoint: "comment/reply/add";
656
+ readonly effect: "WRITE";
657
+ },
658
+ {
659
+ readonly operation: "comment.reply.delete";
660
+ readonly endpoint: "comment/reply/delete";
661
+ readonly effect: "WRITE";
662
+ }
663
+ ];
664
+ export type WeixinHostOperation = typeof implemented[number]["operation"];
665
+ export interface ApiCapabilitiesView {
666
+ readonly tenantId: string;
667
+ readonly profileRef: string;
668
+ readonly accountRef: string;
669
+ readonly provider: "WEIXIN_OFFICIAL";
670
+ readonly configuration: {
671
+ readonly revision: number;
672
+ readonly enabled: boolean;
673
+ readonly credentialState: "MISSING" | "CONFIGURED" | "REVOKED";
674
+ } | null;
675
+ readonly catalogSource: "REPOSITORY_IMPLEMENTATION";
676
+ readonly officialCoverage: "NOT_PROVEN";
677
+ readonly invokesRemote: false;
678
+ readonly operations: readonly {
679
+ readonly operation: WeixinHostOperation;
680
+ readonly effect: "READ" | "WRITE";
681
+ readonly hostImplementation: "IMPLEMENTED";
682
+ readonly managementRequestContract: "execution.node.weixin.read.request" | null;
683
+ readonly managementResultContract: "execution.node.weixin.read.get" | null;
684
+ readonly runtimeBusinessContract: string | null;
685
+ readonly accountPermission: "UNKNOWN";
686
+ readonly platformAcceptance: "NOT_PROVEN";
687
+ }[];
354
688
  }
355
- type MessageAttachmentChoice = Pick<MessageAttachment, "assetRef" | "filename" | "presentation">;
356
- /** 由已安装适配器协商的宿主需求;业务身份、设备检查及资源租约仍各自生效。 */
357
- export interface NodeExecutionRequirements {
358
- readonly protocol: 1;
359
- readonly hostSleepMonitor: boolean;
360
- readonly hostDisplay: boolean;
361
- readonly hostDesktopSession: boolean;
689
+ export type Page = {
690
+ offset: number;
691
+ count: number;
692
+ };
693
+ export interface ReadInputs {
694
+ "draft.count": Record<string, never>;
695
+ "draft.list": Page & {
696
+ no_content?: 0 | 1;
697
+ };
698
+ "draft.get": {
699
+ media_id: string;
700
+ };
701
+ "image.list": Page;
702
+ "publication.list": Page & {
703
+ no_content?: 0 | 1;
704
+ };
705
+ "publication.get": {
706
+ article_id: string;
707
+ };
708
+ "comment.list": {
709
+ msg_data_id: string;
710
+ index: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7;
711
+ begin: number;
712
+ count: number;
713
+ type: 0 | 1 | 2;
714
+ };
362
715
  }
363
- /** The exact accessible display belongs to its outer source row, without author or parent identity. */
364
- export interface NativeQuotedDisplay {
365
- readonly schemaVersion: 1;
366
- readonly text: string;
367
- readonly basis: "WECHAT_NATIVE_QUOTE_ROW" | "WECHAT_DESKTOP_CLIPBOARD_QUOTE" | "WECHAT_DESKTOP_RENDERED_QUOTE";
368
- readonly displayCoverage: "CURRENT_ACCESSIBLE_DISPLAY" | "CURRENT_CLIPBOARD_DISPLAY" | "CURRENT_RENDERED_VIEW";
369
- readonly displayTruncated: false;
370
- readonly originalContentCompleteness: "NOT_ATTESTED";
371
- readonly authorIdentity: "NOT_ATTESTED";
372
- readonly parentMessageIdentity: "NOT_ATTESTED";
716
+ export type WeixinRuntimeReadRequest = {
717
+ idempotencyKey: string;
718
+ profileRef: string;
719
+ expectedConfigurationRevision: number;
720
+ } & {
721
+ [K in keyof ReadInputs]: {
722
+ operation: K;
723
+ input: ReadInputs[K];
724
+ };
725
+ }[keyof ReadInputs];
726
+ declare const PRESENTATION_PROTOCOL: "native-engagement.presentation/1";
727
+ declare const PRESENTATION_HEADER = "x-native-engagement-presentation";
728
+ declare const PRESENTATION_SCOPE_HEADER = "x-native-engagement-expected-scope";
729
+ declare const PRESENTATION_SCOPE_ACK_HEADER = "x-native-engagement-scope-verified";
730
+ declare const PRESENTATION_LIMITS: {
731
+ readonly resources: 16;
732
+ readonly nextActions: 8;
733
+ readonly bytes: 16384;
734
+ };
735
+ export interface PresentationScope {
736
+ tenantId: string;
737
+ projectRef: string | null;
738
+ workspaceRef: string | null;
373
739
  }
374
- /** The occurrence is observed; its human identity has not been established.
375
- * This is never a Participant, membership proof or permission to act for a person. */
376
- export interface NativeGroupAuthorResolution {
377
- readonly schemaVersion: 1;
378
- readonly state: "UNRESOLVED";
379
- readonly basis: "CURRENT_RENDERED_OCCURRENCE";
380
- readonly evidenceDigest: string;
740
+ export type PresentationResourceKind = "INTERACTION" | "ASSET";
741
+ export type PresentationLink = {
742
+ rel: "review" | "preview";
743
+ audience: "HUMAN";
744
+ url: string;
745
+ } | {
746
+ rel: "query";
747
+ audience: "AGENT";
748
+ url: string;
749
+ method: "POST";
750
+ };
751
+ export interface PresentationResource {
752
+ kind: PresentationResourceKind;
753
+ ref: string;
754
+ links: PresentationLink[];
755
+ revision?: number;
756
+ requestDigest?: string;
757
+ state?: string;
758
+ digest?: string;
759
+ sourceVersion?: string;
760
+ }
761
+ export interface PresentationAction {
762
+ kind: "HUMAN_REVIEW" | "HUMAN_CONFIGURATION" | "HUMAN_AUTHENTICATION" | "WAIT" | "READ_RESULT";
763
+ resource: {
764
+ kind: PresentationResourceKind;
765
+ ref: string;
766
+ };
381
767
  }
382
- /** Accessible card/quote text is an observation, never a filename, MIME, URL or original bytes. */
383
- export interface NativeRenderedMedia {
384
- readonly schemaVersion: 1;
385
- readonly kind: "SHARED_VIDEO_CARD" | "QUOTED_MEDIA_DISPLAY" | "NATIVE_FILE_DISPLAY" | "NATIVE_IMAGE_DISPLAY" | "NATIVE_VIDEO_DISPLAY" | "NATIVE_INBOUND_VOICE_DISPLAY";
386
- readonly displayText: string;
387
- readonly coverage: "RENDERED_CARD_ONLY" | "RENDERED_QUOTE_ONLY" | "RENDERED_NATIVE_MEDIA_ONLY";
388
- readonly originalBytes: "NOT_ACQUIRED";
389
- readonly originalContentCompleteness: "NOT_ATTESTED";
390
- readonly authorIdentity: "NOT_ATTESTED";
391
- readonly parentMessageIdentity: "NOT_ATTESTED";
768
+ export type PresentationResume = {
769
+ kind: "QUERY";
770
+ version: string;
771
+ context: PresentationScope;
772
+ } & ({
773
+ name: "engagement.interaction.get";
774
+ payload: {
775
+ interactionRef: string;
776
+ };
777
+ } | {
778
+ name: "asset.get";
779
+ payload: {
780
+ assetRef: string;
781
+ };
782
+ });
783
+ export interface ResponsePresentation {
784
+ protocol: typeof PRESENTATION_PROTOCOL;
785
+ scope: PresentationScope;
786
+ resources: PresentationResource[];
787
+ nextActions: PresentationAction[];
788
+ resume: PresentationResume;
789
+ }
790
+ export interface PresentationCapabilities {
791
+ protocol: typeof PRESENTATION_PROTOCOL;
792
+ requestHeader: typeof PRESENTATION_HEADER;
793
+ scopeHeader: typeof PRESENTATION_SCOPE_HEADER;
794
+ scopeAckHeader: typeof PRESENTATION_SCOPE_ACK_HEADER;
795
+ limits: typeof PRESENTATION_LIMITS;
796
+ frontendOrigin?: string;
797
+ apiOrigin?: string;
798
+ }
799
+ export interface PresentedEnvelope<T> {
800
+ ok: true;
801
+ contractName: string;
802
+ contractVersion: string;
803
+ resolvedTenantId?: string;
804
+ result: T;
805
+ presentation?: ResponsePresentation;
806
+ }
807
+ export type PresentationMode = "auto" | "off";
808
+ export interface PresentationRequest {
809
+ mode?: PresentationMode;
810
+ expectedScope?: PresentationScope;
811
+ expectedVersion?: string;
812
+ }
813
+ declare const BROWSER_UPLOAD_ACTIONS: readonly [
814
+ "MATERIALIZE",
815
+ "PREPARE",
816
+ "OBSERVE",
817
+ "PAUSE",
818
+ "RESUME",
819
+ "CANCEL"
820
+ ];
821
+ export type BrowserUploadAction = (typeof BROWSER_UPLOAD_ACTIONS)[number];
822
+ export interface BrowserUploadProgress {
823
+ readonly protocol: 1;
824
+ readonly revision: number;
825
+ readonly stage: "MATERIAL" | "BROWSER";
826
+ readonly phase: "MATERIALIZING" | "MATERIAL_READY" | "PREPARATION_REQUIRED" | "UPLOADING" | "VERIFYING" | "PAUSED" | "RETRY_REQUIRED" | "READY" | "CANCELLED" | "UNKNOWN";
827
+ readonly manifestDigest: string;
828
+ readonly materializedBytes: number;
829
+ readonly verifiedBytes: number;
830
+ readonly totalBytes: number;
831
+ /** 平台未展示准确字节量时为 null;百分比不得冒充已确认分片字节。 */
832
+ readonly uploadedBytes: number | null;
833
+ /** 页面百分比向下取整;不据此制造已确认字节数。 */
834
+ readonly progressPercent: number | null;
835
+ readonly uploadSessionRef: string | null;
836
+ readonly preparationState: "NOT_INVOKED" | "INVOKED" | "UNKNOWN";
837
+ readonly submitState: "NOT_INVOKED" | "INVOKED" | "UNKNOWN";
838
+ readonly canPause: boolean;
839
+ readonly canResume: boolean;
840
+ readonly canCancel: boolean;
841
+ readonly reasonCode: string | null;
842
+ readonly observedAt: string;
392
843
  }
393
- export interface AgentStackScope {
394
- readonly authorityRef: string;
395
- readonly sourcePrincipal: Readonly<{
396
- issuer: string;
397
- subject: string;
398
- }>;
844
+ export interface BrowserUploadView {
399
845
  readonly tenantId: string;
400
- readonly workspaceId: string;
401
- readonly projectId: string;
402
- readonly businessAgentId: string;
403
- readonly businessAgentVersionId: string;
404
- /** 经签名的上游服务凭据租约 ID;正式生产端配对要求此字段以隔离轮换后的旧断言。 */
405
- readonly sourceCredentialId?: string;
846
+ readonly profileRef: string;
847
+ readonly engagementRef: string;
848
+ readonly conversationRef: string;
849
+ readonly messageRef: string;
850
+ readonly requestRef: string;
851
+ readonly status: string;
852
+ readonly browserUpload: BrowserUploadProgress | null;
853
+ readonly support: {
854
+ readonly protocol: 1;
855
+ readonly available: boolean;
856
+ };
406
857
  }
407
- export interface TenantContextInput {
408
- readonly tenantId?: string | undefined;
409
- readonly principalRef?: string | undefined;
410
- readonly actorRef?: string | undefined;
411
- readonly authorizationScopes?: readonly string[] | undefined;
412
- readonly projectRef?: string | undefined;
413
- readonly workspaceRef?: string | undefined;
414
- /** Signature-verified JWT issuer, never a caller-supplied business payload. */
415
- readonly identityIssuer?: string | undefined;
416
- /** Signature-verified JWT subject, never a caller-supplied business payload. */
417
- readonly identitySubject?: string | undefined;
418
- /** 只由验证签名的 Agent Stack 适配器产生,HTTP 业务 payload 不得提供。 */
419
- readonly agentStack?: AgentStackScope | undefined;
858
+ export type BrowserSocialPlatform = typeof BROWSER_SOCIAL_PLATFORMS[number];
859
+ export interface BrowserAccountActivityView {
860
+ readonly tenantId: string;
861
+ readonly profileRef: string;
862
+ readonly revision: number;
863
+ readonly state: "READY" | "WAITING" | "PAUSED";
864
+ readonly nextAllowedAt: string;
865
+ readonly pauseRef: string | null;
866
+ readonly reasonCode: string | null;
420
867
  }
421
- /** EMAIL 专属的内嵌映射;文件字节身份仍由原附件六字段清单拥有。 */
422
- export interface EmailInlineImage {
423
- readonly cid: string;
424
- readonly assetRef: string;
868
+ export interface BrowserAccountView extends BrowserAccountActivityView {
869
+ readonly platform: BrowserSocialPlatform;
870
+ readonly externalAccountRef: string;
425
871
  }
426
- export interface MailSignatureImage extends EmailInlineImage {
427
- readonly filename: string;
872
+ export interface SocialMediaCaptureFailure {
873
+ readonly contentRef: string;
874
+ readonly sourceDigest: string;
875
+ readonly mediaRef: string;
876
+ readonly reasonCode: string;
428
877
  }
429
- /** 草稿中冻结的签名快照;发送和核查不再读取可变模板。 */
430
- export interface FrozenMailSignature {
431
- readonly signatureRef: string;
432
- readonly version: number;
878
+ /** transport 为必填判别项,旧 TIKTOK API scope 不会被重新解释成网页授权。 */
879
+ export interface BrowserSocialScope {
880
+ readonly platform: Exclude<BrowserSocialPlatform, "XIAOHONGSHU">;
881
+ readonly transport: "BROWSER";
882
+ readonly surface: "SEARCH" | "VIDEO" | "PROFILE" | "DIRECT" | "NOTIFICATIONS" | "INBOX";
883
+ readonly rootRef: string;
884
+ readonly audience: "PUBLIC" | "ACCOUNT_OWNED" | "PRIVATE";
885
+ readonly query?: string;
886
+ readonly peerRef?: string;
887
+ }
888
+ export interface BrowserMediaSelection {
889
+ readonly assetRef: string;
433
890
  readonly digest: string;
434
- readonly profileRef: string;
435
- readonly text: string;
436
- readonly html?: string;
437
- readonly inlineImages: readonly EmailInlineImage[];
891
+ readonly sourceVersion: string;
892
+ readonly mediaType: string;
893
+ readonly byteLength: number;
894
+ readonly filename: string;
438
895
  }
439
- export interface EmailRichContent {
440
- readonly text: string;
441
- readonly html?: string;
442
- readonly inlineImages?: readonly EmailInlineImage[];
443
- readonly signature?: FrozenMailSignature;
444
- }
445
- export interface CommunicationPolicyBasis {
446
- readonly policyRef: string;
447
- readonly version: number;
448
- readonly digest: string;
449
- readonly matchedRuleRefs: readonly string[];
450
- readonly basisDigest: string;
896
+ export interface BrowserPublicationSettings {
897
+ readonly aiAssisted: boolean | null;
898
+ readonly original: boolean | null;
899
+ readonly commercial: boolean | null;
900
+ readonly allowComments: boolean | null;
901
+ readonly scheduledAt: string | null;
902
+ readonly timeZone: string;
451
903
  }
452
- export interface CommunicationOwnership {
453
- readonly kind: "COMMUNICATION";
904
+ export type BrowserSocialIntent = {
905
+ readonly kind: "COMMENT" | "REPLY";
906
+ } | {
907
+ readonly kind: "LIKE";
908
+ readonly value: boolean;
909
+ } | {
910
+ readonly kind: "FOLLOW";
911
+ readonly value: boolean;
912
+ } | {
913
+ readonly kind: "COMMENT_DELETE";
914
+ } | {
915
+ readonly kind: "COMMENT_VISIBILITY";
916
+ readonly visibility: "HIDDEN" | "VISIBLE";
917
+ } | {
918
+ readonly kind: "SCHEDULE_CANCEL";
919
+ } | {
920
+ readonly kind: "SCHEDULE_RESCHEDULE";
921
+ readonly scheduledAt: string;
922
+ readonly timeZone: string;
923
+ } | {
924
+ readonly kind: "DIRECT";
925
+ readonly assets?: readonly BrowserMediaSelection[];
926
+ readonly presentation?: "VOICE_NOTE";
927
+ } | {
928
+ readonly kind: "DIRECT_START";
929
+ readonly peerRef: string;
930
+ } | {
931
+ readonly kind: "PUBLISH";
932
+ readonly title: string;
933
+ readonly tags: readonly string[];
934
+ readonly visibility: "PUBLIC" | "SELF_ONLY" | "FRIENDS";
935
+ readonly video: BrowserMediaSelection;
936
+ readonly cover?: BrowserMediaSelection;
937
+ readonly settings: BrowserPublicationSettings;
938
+ };
939
+ export interface BrowserSocialEvidence {
454
940
  readonly accountRef: string;
455
- readonly profileRef: string;
456
- readonly displayName: string;
457
- readonly basis: {
458
- readonly kind: "HUMAN_DECLARED";
459
- readonly principalRef: string;
460
- readonly operationKey: string;
461
- } | {
462
- readonly kind: "DELEGATED_SOCIAL_OBSERVATION";
463
- readonly principalRef: string;
464
- readonly operationKey: string;
465
- readonly inboxEngagementRef: string;
466
- readonly inboxConversationRef: string;
467
- readonly sourceFactRef: string;
468
- readonly policyRef: string;
469
- readonly policyVersion: number;
470
- readonly policyDigest: string;
471
- } | {
472
- readonly kind: "DELEGATED_NATIVE_OBSERVATION";
473
- readonly principalRef: string;
474
- readonly operationKey: string;
475
- readonly dispatchRef: string;
476
- readonly reportDigest: string;
477
- readonly policyRef: string;
478
- readonly policyVersion: number;
479
- readonly policyDigest: string;
941
+ readonly peerRef?: string;
942
+ readonly title?: string;
943
+ readonly interaction?: {
944
+ readonly like?: "LIKED" | "NOT_LIKED";
945
+ readonly follow?: "FOLLOWING" | "NOT_FOLLOWING";
946
+ };
947
+ readonly moderation?: {
948
+ readonly authority: "OWN_COMMENT" | "OWN_VIDEO" | "NONE";
949
+ readonly videoAuthorRef: string;
950
+ readonly visibility?: "HIDDEN" | "VISIBLE";
951
+ readonly scope?: "COMMENT";
952
+ };
953
+ readonly media?: readonly {
954
+ readonly mediaRef: string;
955
+ readonly kind: "IMAGE" | "VIDEO" | "AUDIO";
956
+ readonly presentation?: "VOICE_NOTE";
957
+ }[];
958
+ readonly replyTo?: {
959
+ readonly targetRef: string;
960
+ readonly authorRef: string;
961
+ readonly rootCommentRef: string;
962
+ };
963
+ readonly unsupported?: {
964
+ readonly platformType: string;
965
+ readonly detail: "NOT_READ";
966
+ readonly reasonCode: "BROWSER_MESSAGE_TYPE_NOT_MAPPED";
967
+ };
968
+ readonly notification?: {
969
+ readonly kind: "COMMENT" | "REPLY" | "MENTION";
970
+ readonly subjectRef: string;
971
+ readonly videoRef: string;
972
+ readonly occurredAt: string;
973
+ readonly visibility?: "PUBLIC" | "SELF_ONLY" | "FRIENDS" | "UNKNOWN";
974
+ };
975
+ readonly publication?: {
976
+ readonly state: "PROCESSING" | "REVIEW_PENDING" | "PUBLISHED" | "REJECTED" | "SCHEDULED" | "CANCELLED";
977
+ readonly scheduledAt: string | null;
978
+ readonly visibility?: "PUBLIC" | "SELF_ONLY" | "FRIENDS" | "UNKNOWN";
480
979
  };
481
980
  }
482
- export interface SocialMediaCaptureFailure {
483
- readonly contentRef: string;
484
- readonly sourceDigest: string;
485
- readonly mediaRef: string;
486
- readonly reasonCode: string;
981
+ export type BrowserPublicationObservation = NonNullable<BrowserSocialEvidence["publication"]> & {
982
+ readonly objectRef: string;
983
+ readonly observedAt: string;
984
+ readonly reviewRequired: boolean;
985
+ };
986
+ /** 真实私聊窗口的观察;Owner 引用只由 Core 从已核实线程派生。 */
987
+ export interface BrowserDirectObservation {
988
+ readonly state: "NEW_THREAD" | "EXISTING_THREAD" | "MESSAGE_REQUEST" | "UNREACHABLE" | "UNKNOWN";
989
+ readonly peerRef: string;
990
+ readonly scope: BrowserSocialScope | null;
991
+ readonly observedAt: string;
992
+ readonly reviewRequired: boolean;
993
+ readonly engagementRef?: string;
994
+ readonly conversationRef?: string;
995
+ }
996
+ export interface BrowserActionObservation {
997
+ readonly kind: "LIKE" | "FOLLOW" | "COMMENT_DELETE" | "COMMENT_VISIBILITY";
998
+ readonly targetRef: string;
999
+ readonly rootRef: string;
1000
+ readonly parentRef: string | null;
1001
+ readonly authorRef: string;
1002
+ readonly state: "LIKED" | "NOT_LIKED" | "FOLLOWING" | "NOT_FOLLOWING" | "DELETED" | "HIDDEN" | "VISIBLE";
1003
+ readonly visibilityScope?: "COMMENT";
1004
+ readonly observedAt: string;
1005
+ }
1006
+ export interface BrowserSocialReadOptions {
1007
+ readonly view?: "CONTENT" | "CAPABILITIES" | "PUBLICATIONS" | "SCHEDULED";
1008
+ readonly pageLimit?: number;
1009
+ readonly maxItems?: number;
1010
+ readonly maxExpansions?: number;
1011
+ readonly maxScrolls?: number;
1012
+ readonly direction?: "FORWARD" | "BACKWARD";
1013
+ readonly resumeBeforeContentRef?: string;
1014
+ readonly resumeAfterContentRef?: string;
1015
+ readonly captureMedia?: boolean;
1016
+ }
1017
+ export interface BrowserSocialTraversal {
1018
+ readonly pagesVisited: number;
1019
+ readonly expansions: number;
1020
+ readonly scrolls: number;
1021
+ readonly stoppedBy: "EXHAUSTED" | "PAGE_LIMIT" | "ITEM_LIMIT" | "NO_PROGRESS" | "CURRENT_VIEW" | "TIME_LIMIT" | "CONTROL_LIMIT";
1022
+ readonly nextAfterContentRef: string | null;
1023
+ readonly nextBeforeContentRef: string | null;
1024
+ readonly direction: "FORWARD" | "BACKWARD";
1025
+ readonly beforeContentRef: string | null;
1026
+ readonly afterContentRef: string | null;
1027
+ readonly startedAt: string;
1028
+ readonly finishedAt: string;
1029
+ }
1030
+ export interface BrowserInstalledCapabilities {
1031
+ readonly basis: "INSTALLED_MAPPING";
1032
+ readonly capabilities: readonly {
1033
+ readonly name: string;
1034
+ readonly available: boolean;
1035
+ readonly reasonCode: string | null;
1036
+ }[];
1037
+ }
1038
+ export interface BrowserSocialReadWindow {
1039
+ readonly view: NonNullable<BrowserSocialReadOptions["view"]>;
1040
+ readonly observedAt: string;
1041
+ readonly contentRefs: readonly string[];
1042
+ readonly traversal?: BrowserSocialTraversal;
1043
+ readonly captureFailures?: readonly SocialMediaCaptureFailure[];
487
1044
  }
488
1045
  /** Browser-backed Xiaohongshu scopes are separate from official API capabilities. */
489
1046
  export interface XiaohongshuScope {
@@ -599,286 +1156,340 @@ export interface XiaohongshuTraversal {
599
1156
  readonly startedAt: string;
600
1157
  readonly finishedAt: string;
601
1158
  }
602
- export type BrowserSocialPlatform = typeof BROWSER_SOCIAL_PLATFORMS[number];
603
- export interface BrowserAccountActivityView {
1159
+ export interface AgentStackScope {
1160
+ readonly authorityRef: string;
1161
+ readonly sourcePrincipal: Readonly<{
1162
+ issuer: string;
1163
+ subject: string;
1164
+ }>;
604
1165
  readonly tenantId: string;
605
- readonly profileRef: string;
606
- readonly revision: number;
607
- readonly state: "READY" | "WAITING" | "PAUSED";
608
- readonly nextAllowedAt: string;
609
- readonly pauseRef: string | null;
610
- readonly reasonCode: string | null;
1166
+ readonly workspaceId: string;
1167
+ readonly projectId: string;
1168
+ readonly businessAgentId: string;
1169
+ readonly businessAgentVersionId: string;
1170
+ /** 经签名的上游服务凭据租约 ID;正式生产端配对要求此字段以隔离轮换后的旧断言。 */
1171
+ readonly sourceCredentialId?: string;
611
1172
  }
612
- export interface BrowserAccountView extends BrowserAccountActivityView {
613
- readonly platform: BrowserSocialPlatform;
614
- readonly externalAccountRef: string;
1173
+ export interface TenantContextInput {
1174
+ readonly tenantId?: string | undefined;
1175
+ readonly principalRef?: string | undefined;
1176
+ readonly actorRef?: string | undefined;
1177
+ readonly authorizationScopes?: readonly string[] | undefined;
1178
+ readonly projectRef?: string | undefined;
1179
+ readonly workspaceRef?: string | undefined;
1180
+ /** Signature-verified JWT issuer, never a caller-supplied business payload. */
1181
+ readonly identityIssuer?: string | undefined;
1182
+ /** Signature-verified JWT subject, never a caller-supplied business payload. */
1183
+ readonly identitySubject?: string | undefined;
1184
+ /** 只由验证签名的 Agent Stack 适配器产生,HTTP 业务 payload 不得提供。 */
1185
+ readonly agentStack?: AgentStackScope | undefined;
615
1186
  }
616
- export interface EngagementControl {
617
- readonly tenantId: string;
618
- readonly engagementRef: string;
619
- readonly version: number;
620
- readonly state: "AGENT_CONTROLLED" | "HANDOFF_REQUESTED" | "HUMAN_CONTROLLED";
621
- readonly controlScope: "ENGAGEMENT_OUTBOUND_AUTOMATION";
622
- readonly handoffRef?: string;
623
- readonly requestedBy?: string;
624
- readonly requestedAt?: string;
625
- readonly reason?: string;
626
- readonly assigneeRef?: string;
627
- readonly controlledBy?: string;
628
- readonly controlledAt?: string;
629
- readonly resumedBy?: string;
630
- readonly resumedAt?: string;
631
- readonly sessionCorrelationRef?: string;
1187
+ /** EMAIL 专属的内嵌映射;文件字节身份仍由原附件六字段清单拥有。 */
1188
+ export interface EmailInlineImage {
1189
+ readonly cid: string;
1190
+ readonly assetRef: string;
632
1191
  }
633
- /** 模板属于创建时的精确租户范围,媒体只保存已有 Asset 的选择,不拥有字节。 */
634
- export interface MailSignatureTemplate {
635
- readonly tenantId: string;
636
- readonly projectRef?: string;
637
- readonly workspaceRef?: string;
1192
+ export interface MailSignatureImage extends EmailInlineImage {
1193
+ readonly filename: string;
1194
+ }
1195
+ /** 草稿中冻结的签名快照;发送和核查不再读取可变模板。 */
1196
+ export interface FrozenMailSignature {
638
1197
  readonly signatureRef: string;
639
1198
  readonly version: number;
640
- readonly displayName: string;
641
- readonly enabled: boolean;
1199
+ readonly digest: string;
1200
+ readonly profileRef: string;
642
1201
  readonly text: string;
643
1202
  readonly html?: string;
644
- readonly inlineImages: readonly MailSignatureImage[];
645
- readonly digest: string;
646
- readonly configuredAt: string;
647
- readonly configuredBy: string;
1203
+ readonly inlineImages: readonly EmailInlineImage[];
648
1204
  }
649
- export interface MailSignaturePage {
650
- readonly items: readonly Pick<MailSignatureTemplate, "signatureRef" | "version" | "displayName" | "enabled" | "digest">[];
651
- readonly nextOffset: number | null;
652
- readonly total: number;
1205
+ export interface EmailRichContent {
1206
+ readonly text: string;
1207
+ readonly html?: string;
1208
+ readonly inlineImages?: readonly EmailInlineImage[];
1209
+ readonly signature?: FrozenMailSignature;
653
1210
  }
654
- export interface WechatAutonomy {
655
- readonly enabled: boolean;
1211
+ export interface CommunicationPolicyBasis {
1212
+ readonly policyRef: string;
656
1213
  readonly version: number;
657
- readonly delegatePrincipalRef: string;
658
- readonly expiresAt?: string;
659
- readonly configuredBy: string;
660
- }
661
- export interface SocialAutonomy extends WechatAutonomy {
662
- readonly expiresAt: string;
663
- readonly maxReplies: number;
664
- readonly factRef: string;
1214
+ readonly digest: string;
1215
+ readonly matchedRuleRefs: readonly string[];
1216
+ readonly basisDigest: string;
665
1217
  }
666
- export interface WechatChannelsFeedObservation {
1218
+ /** 由已安装适配器协商的宿主需求;业务身份、设备检查及资源租约仍各自生效。 */
1219
+ export interface NodeExecutionRequirements {
667
1220
  readonly protocol: 1;
668
- readonly authorIdentity: "NOT_ATTESTED";
669
- readonly contentIdentity: "NOT_ATTESTED";
670
- readonly directReplyTarget: "NOT_ATTESTED";
671
- readonly ownReaction: "NOT_ATTESTED";
672
- readonly following: "NOT_ATTESTED";
673
- readonly visibleText: readonly {
674
- readonly captureKey: string;
675
- readonly text: string;
676
- }[];
677
- readonly dynamicRead: {
678
- readonly basis: "EXACT_FINDER_PROGRESS_ONLY";
679
- readonly firstObservedAt: string;
680
- readonly secondObservedAt: string;
681
- readonly firstRawDigest: string;
682
- readonly secondRawDigest: string;
683
- readonly firstTreeDigest: string;
684
- readonly secondTreeDigest: string;
685
- readonly comparisonDigest: string;
686
- readonly firstValue: string;
687
- readonly secondValue: string;
688
- };
1221
+ readonly hostSleepMonitor: boolean;
1222
+ readonly hostDisplay: boolean;
1223
+ readonly hostDesktopSession: boolean;
689
1224
  }
690
- export type WechatObservationIntent = "CURRENT_VIEW" | "REFRESH_CURRENT_OFFICIAL_ARTICLE";
691
- export type WechatOfficialPage = "OFFICIAL_DIRECTORY" | "OFFICIAL_ACCOUNT_LIST" | "OFFICIAL_ACCOUNT_HOME" | "OFFICIAL_ACCOUNT_PROFILE" | "OFFICIAL_ARTICLE" | "OFFICIAL_ARTICLE_FAILED" | "OFFICIAL_ARTICLE_COMMENTS" | "OFFICIAL_ARTICLE_UNEXPOSED";
692
- export type WechatOfficialReason = "CURRENT_VIEW_OBSERVED" | "ARTICLE_DNS_FAILED" | "ARTICLE_LOAD_FAILED" | "ARTICLE_LOADING" | "ARTICLE_CONTENT_NOT_EXPOSED" | "OFFICIAL_STRUCTURE_UNSUPPORTED" | "OFFICIAL_SAFE_DOMAIN_NOT_PROVEN";
693
- export interface WechatOfficialRow {
694
- readonly captureKey: string;
695
- readonly kind: "ACCOUNT_LABEL" | "NEWS_PREVIEW" | "ARTICLE_PREVIEW" | "SECTION_LABEL" | "PROFILE_FIELD" | "TEXT_BLOCK" | "INLINE_FRAGMENT" | "INTERACTION_LABEL" | "COMMENT_COMPOSITE";
1225
+ /** The exact accessible display belongs to its outer source row, without author or parent identity. */
1226
+ export interface NativeQuotedDisplay {
1227
+ readonly schemaVersion: 1;
696
1228
  readonly text: string;
697
- readonly label: string | null;
698
- readonly timeLabel: string | null;
699
- readonly parentKey: string | null;
700
- readonly visibility: "FULLY_VISIBLE" | "CLIPPED";
701
- readonly partial: boolean;
702
- readonly rowNumber: number | null;
1229
+ readonly basis: "WECHAT_NATIVE_QUOTE_ROW" | "WECHAT_DESKTOP_CLIPBOARD_QUOTE" | "WECHAT_DESKTOP_RENDERED_QUOTE";
1230
+ readonly displayCoverage: "CURRENT_ACCESSIBLE_DISPLAY" | "CURRENT_CLIPBOARD_DISPLAY" | "CURRENT_RENDERED_VIEW";
1231
+ readonly displayTruncated: false;
1232
+ readonly originalContentCompleteness: "NOT_ATTESTED";
1233
+ readonly authorIdentity: "NOT_ATTESTED";
1234
+ readonly parentMessageIdentity: "NOT_ATTESTED";
703
1235
  }
704
- export interface WechatOfficialObservation {
705
- readonly observationIntent: WechatObservationIntent;
706
- readonly viewer: "NOT_ATTESTED";
707
- readonly status: "OBSERVED" | "GAP";
708
- readonly reasonCode: WechatOfficialReason;
709
- readonly safeDomain: "mp.weixin.qq.com" | null;
710
- readonly refreshPerformed: boolean;
711
- readonly accountSelection: "NOT_ATTESTED";
712
- readonly accountLabel: string | null;
713
- readonly domainExposure: "EXPOSED" | "NOT_EXPOSED";
714
- readonly refreshQualification: "NOT_REQUESTED" | "SAFE_DOMAIN_NATIVE_MENU" | "OFFICIAL_ACCOUNT_NATIVE_MENU";
715
- readonly article: {
716
- readonly title: string | null;
717
- readonly byline: string | null;
718
- readonly publisherLabel: string | null;
719
- readonly publishedLabel: string | null;
720
- };
721
- readonly identityClue: {
722
- readonly namespace: "OFFICIAL_ACCOUNT";
723
- readonly clueKind: "OFFICIAL_ACCOUNT_ID";
724
- readonly value: string;
725
- readonly basis: "VISIBLE_PROFILE_FIELD";
726
- readonly verification: "UI_DISPLAY_ONLY";
727
- } | null;
728
- readonly rows: readonly WechatOfficialRow[];
729
- readonly commentCountLabel: string | null;
730
- readonly coverage: {
731
- readonly fullText: "NOT_ATTESTED";
732
- readonly comments: "NOT_ATTESTED";
733
- readonly excludedUnderlay: boolean;
734
- readonly excludedOffscreen: boolean;
735
- };
1236
+ /** The occurrence is observed; its human identity has not been established.
1237
+ * This is never a Participant, membership proof or permission to act for a person. */
1238
+ export interface NativeGroupAuthorResolution {
1239
+ readonly schemaVersion: 1;
1240
+ readonly state: "UNRESOLVED";
1241
+ readonly basis: "CURRENT_RENDERED_OCCURRENCE";
1242
+ readonly evidenceDigest: string;
736
1243
  }
737
- /** A transient display observation, never a SocialContent, Participant or write target. */
738
- export interface WechatSocialWindowContent {
739
- readonly captureKey: string;
740
- readonly kind: "MOMENT_CARD" | "CHANNELS_SNIPPET" | "CHANNELS_AUTHOR_DESCRIPTION";
741
- readonly authorLabel: string | null;
742
- readonly text: string;
743
- readonly timeLabel: string | null;
744
- readonly expandable: boolean;
745
- readonly partial: boolean;
746
- readonly plane: "FOREGROUND" | "UNDERLAY";
747
- readonly visibleMediaItems: number;
748
- readonly declaredMediaTotal: number | null;
1244
+ /** Accessible card/quote text is an observation, never a filename, MIME, URL or original bytes. */
1245
+ export interface NativeRenderedMedia {
1246
+ readonly schemaVersion: 1;
1247
+ readonly kind: "SHARED_VIDEO_CARD" | "QUOTED_MEDIA_DISPLAY" | "NATIVE_FILE_DISPLAY" | "NATIVE_IMAGE_DISPLAY" | "NATIVE_VIDEO_DISPLAY" | "NATIVE_INBOUND_VOICE_DISPLAY";
1248
+ readonly displayText: string;
1249
+ readonly coverage: "RENDERED_CARD_ONLY" | "RENDERED_QUOTE_ONLY" | "RENDERED_NATIVE_MEDIA_ONLY";
1250
+ readonly originalBytes: "NOT_ACQUIRED";
1251
+ readonly originalContentCompleteness: "NOT_ATTESTED";
1252
+ readonly authorIdentity: "NOT_ATTESTED";
1253
+ readonly parentMessageIdentity: "NOT_ATTESTED";
749
1254
  }
750
- export interface WechatSocialWindowComment {
751
- readonly captureKey: string;
752
- readonly kind: "ROOT_COMMENT" | "THREAD_REPLY";
753
- readonly authorLabel: string;
754
- readonly text: string;
755
- readonly timeLabel: string;
756
- readonly authorBadgeObserved: boolean;
757
- readonly threadRootKey: string | null;
758
- readonly relationBasis: "ROOT_ROW_STRUCTURE" | "VISIBLE_GROUPED_REPLY_ROW";
759
- readonly directReplyTarget: "NOT_ATTESTED";
1255
+ /** Native UI observation only. Neither value attests network delivery or a physical request. */
1256
+ export interface NativeOutboundDisplay {
1257
+ readonly schemaVersion: 1;
1258
+ readonly state: "FAILED" | "NO_FAILURE_INDICATOR";
1259
+ readonly basis: "WECHAT_NATIVE_OUTBOUND_TEXT_ROW";
1260
+ readonly delivery: "NOT_ATTESTED";
760
1261
  }
761
- export interface WechatSocialRenderedWindow {
762
- /** v1 remains the original feed/Channels/Works shape; v2 is the closed current Moments detail preview. */
763
- readonly schemaVersion: 1 | 2 | 3 | 4;
764
- readonly channelsFeed?: WechatChannelsFeedObservation;
765
- readonly official?: WechatOfficialObservation;
1262
+ export interface NativeOutboundDisplayWitness {
766
1263
  readonly observationRef: string;
767
1264
  readonly observedAt: string;
768
- readonly page: WechatOfficialPage | "MOMENTS_FEED" | "MOMENTS_DETAIL" | "CHANNELS_COMMENTS" | "CHANNELS_FEED" | "WORKS_ENTRY" | "WORKS_MEDIA_PERMISSION_NOTICE" | "WORKS_TEXT_COVER_PREVIEW";
769
- readonly identityBasis: "UNBOUND_UI_LABELS_ONLY";
770
- readonly referenceLifetime: "CURRENT_OBSERVATION_ONLY";
771
- readonly coverage: "BOUNDED_CURRENT_RENDERED_VIEW";
772
- readonly completeness: "NOT_ATTESTED";
773
- readonly publicationAudience: "NOT_ATTESTED";
774
- readonly businessActionsPermitted: false;
775
- readonly partial: boolean;
776
- readonly truncated: boolean;
777
- readonly commentsCoverage: "NOT_OBSERVED" | "CURRENT_VISIBLE_ROWS_ONLY";
778
- readonly commentCountLabel: string | null;
779
- readonly content: readonly WechatSocialWindowContent[];
780
- readonly comments: readonly WechatSocialWindowComment[];
781
- readonly partialRows: readonly {
782
- readonly captureKey: string;
783
- readonly reasonCode: "ANDROID_WECHAT_SOCIAL_MOMENT_CONTINUES_OUTSIDE_VIEW" | "ANDROID_WECHAT_SOCIAL_COMMENT_BODY_NOT_RENDERED";
784
- }[];
785
- readonly notices: readonly string[];
786
1265
  }
787
- /** Added only to the existing authorized WeChat Social query; no independent submission authority. */
788
- export interface WechatSocialReadAttemptView {
789
- readonly dispatchRef: string;
790
- readonly state: "QUEUED" | "CLAIMED" | "RESOURCE_READY" | "RUNNING" | "RESULT_RECORDED" | "NEEDS_RECONCILIATION" | "ABORTED";
791
- readonly physicalIdle: boolean;
792
- readonly createdAt: string;
793
- readonly reasonCode?: string;
794
- readonly renderedObservation?: {
795
- readonly observationRef: string;
796
- readonly observedAt: string;
797
- readonly evidenceDigest: string;
798
- readonly renderedWindow: WechatSocialRenderedWindow;
1266
+ export interface NativeOutboundDisplayState {
1267
+ readonly schemaVersion: 1;
1268
+ readonly latest: NativeOutboundDisplayWitness & {
1269
+ readonly state: NativeOutboundDisplay["state"] | "UNQUALIFIED";
799
1270
  };
1271
+ readonly lastFailure?: NativeOutboundDisplayWitness;
800
1272
  }
801
- export type WechatSocialSurface = "MOMENTS" | "CHANNELS" | "OFFICIAL_ARTICLE" | "WORKS";
802
- export interface WechatSocialContentScope {
803
- readonly platform: "WECHAT";
804
- readonly surface: WechatSocialSurface;
805
- /** 原 Owner 登记的视图内定位引用,不是昵称摘要或永久平台对象 ID。 */
806
- readonly rootRef: string;
807
- readonly audience: "CURRENT_ACCOUNT_VISIBLE" | "FRIENDS" | "MUTUAL_FRIENDS" | "SELECTED_PARTICIPANTS" | "SELF_ONLY";
808
- readonly audienceParticipantRefs?: readonly string[];
1273
+ /** 外部 Owner 的稳定身份;本仓只消费精确版本,不维护另一份声音主库。 */
1274
+ export interface VoiceProfileRef {
1275
+ readonly ownerSystem: string;
1276
+ readonly ownerTenantRef: string;
1277
+ readonly voiceProfileRef: string;
1278
+ readonly version: string;
1279
+ readonly digest: string;
809
1280
  }
810
- export interface WechatSocialAuthorEvidence {
811
- readonly identitySpace: "PERSONAL_WECHAT" | "CHANNELS" | "OFFICIAL_ACCOUNT" | "WORKS";
812
- readonly externalRef: string;
813
- readonly evidenceDigest: string;
814
- /** Explicit current Owner clue snapshot; never a platform authentication claim. */
815
- readonly ownerIdentity?: {
816
- readonly schemaVersion: 1;
817
- readonly identityVersion: number;
818
- readonly externalIdentityVersion: number;
819
- readonly clueRef: string;
820
- };
1281
+ export type VoiceProfilePurpose = "BIND" | "AUDITION" | "MESSAGE" | "NARRATION";
1282
+ export interface VoiceProfileDocument {
1283
+ readonly ref: VoiceProfileRef;
1284
+ readonly displayName: string;
1285
+ readonly languages: readonly string[];
1286
+ readonly voiceOrigin: "BUILTIN" | "LICENSED" | "CLONED_WITH_CONSENT";
1287
+ readonly allowedUses: readonly VoiceProfilePurpose[];
1288
+ readonly expiresAt?: string;
1289
+ readonly sampleAssetRef?: string;
1290
+ readonly rightsRef?: string;
1291
+ }
1292
+ /** 模型资格是准确版本的声明;同名 voiceRef 不表示同一声线。 */
1293
+ export interface VoiceModelBinding {
1294
+ readonly bindingRef: string;
1295
+ readonly providerRef: string;
1296
+ readonly providerVersion: string;
1297
+ readonly modelRef: string;
1298
+ readonly modelDigest: string;
1299
+ readonly programDigest: string;
1300
+ readonly voiceRef: string;
1301
+ readonly language: string;
1302
+ readonly mode: "BATCH";
1303
+ readonly qualification: "QUALIFIED";
1304
+ readonly qualificationRef: string;
1305
+ }
1306
+ export interface VoiceProfileSnapshot {
1307
+ readonly profile: VoiceProfileDocument;
1308
+ readonly binding: VoiceModelBinding;
1309
+ readonly digest: string;
821
1310
  }
822
- /** 原 Owner 内部端口的受信读取依据;公共请求不能提交此 authority。 */
823
- export interface SocialRenderedReadAuthority {
1311
+ /** 当前授权在不可变快照外;缓存或历史回执不能延长本次许可。 */
1312
+ export interface VoiceProfileAuthorization {
1313
+ readonly connectionRef: string;
1314
+ readonly grantRef: string;
1315
+ readonly consumerTenantRef: string;
1316
+ readonly principalRef: string;
1317
+ readonly purpose: VoiceProfilePurpose;
1318
+ readonly expiresAt: string;
1319
+ }
1320
+ export interface VoiceProfileResolution {
1321
+ readonly snapshot: VoiceProfileSnapshot;
1322
+ readonly authorization: VoiceProfileAuthorization;
1323
+ }
1324
+ export interface VoiceProfileView {
1325
+ readonly profile: VoiceProfileDocument;
1326
+ readonly authorization: VoiceProfileAuthorization;
1327
+ }
1328
+ export interface VoiceProfileSourceSummary {
1329
+ readonly sourceRef: string;
1330
+ readonly ownerSystem: string;
1331
+ readonly ownerTenantRef: string;
1332
+ readonly allowedUses: readonly VoiceProfilePurpose[];
1333
+ }
1334
+ export interface VoiceProfileSourcePage {
824
1335
  readonly tenantId: string;
825
- readonly engagementRef: string;
826
- readonly conversationRef: string;
827
- readonly profileRef: string;
828
- readonly accountRef: string;
829
- readonly hostRef: string;
830
- readonly hostBindingDigest: string;
831
- readonly runtimeKind: "MOBILE";
832
- readonly conversationRevision: number;
833
- readonly membershipDigest: string;
1336
+ readonly entries: readonly VoiceProfileSourceSummary[];
1337
+ readonly nextCursor: null;
834
1338
  }
835
- export interface WechatSocialVisibility {
836
- readonly basis: "CURRENT_ACCOUNT_RENDERED_VIEW";
837
- readonly comments: "CURRENT_VISIBLE_ONLY" | "MUTUAL_FRIENDS_VISIBLE";
838
- /** 看见内容或部分共同好友评论不证明发表时的完整受众。 */
839
- readonly publicationAudience: "NOT_ATTESTED";
1339
+ export interface VoiceProfilePage {
1340
+ readonly tenantId: string;
1341
+ readonly sourceRef: string;
1342
+ readonly entries: readonly VoiceProfileView[];
1343
+ readonly nextCursor: string | null;
840
1344
  }
841
- export interface WechatSocialReadEvidence {
842
- readonly schemaVersion: 1;
843
- readonly observationRef: string;
844
- readonly binding: SocialRenderedReadAuthority;
845
- readonly evidenceKind: "ANDROID_UI_AUTOMATION";
846
- readonly targetIdentity: "OWNER_SELECTED_VIEW";
847
- readonly coverage: "BOUNDED_CURRENT_RENDERED_VIEW";
848
- readonly contentCoverage: "RENDERED_TEXT_AND_STRUCTURE_ONLY";
849
- readonly evidenceDigest: string;
850
- readonly visibility: WechatSocialVisibility;
1345
+ export interface VoiceProfileSourcesInput {
1346
+ readonly purpose: VoiceProfilePurpose;
851
1347
  }
852
- export type XiaohongshuActivityView = BrowserAccountActivityView;
853
- export interface XiaohongshuScheduleHistory {
854
- readonly coverage: "RETAINED_OWNER_EXACT_OBJECT_ASSOCIATIONS";
855
- readonly platformCurrentness: "NOT_ATTESTED";
856
- readonly truncated: boolean;
857
- /** SQL history uses original outbox sequence, newest first, independent of observed clock. */
858
- readonly items: readonly {
859
- readonly messageRef: string;
860
- readonly requestRef: string | null;
861
- readonly kind: "PUBLISH" | "SCHEDULE_CANCEL" | "SCHEDULE_RESCHEDULE";
862
- readonly status: string;
863
- readonly approvedScheduledAt: string | null;
864
- readonly objectRef: string | null;
865
- readonly originalPublicationRequestRef: string | null;
866
- readonly association: "EXACT_OBJECT" | "MISSING_PROOF" | "CONFLICT";
867
- readonly currentObservation: {
868
- readonly factRef: string;
869
- readonly observedAt: string;
870
- readonly state: "PENDING" | "CANCELLED" | "PUBLISHED";
871
- readonly scheduledAt: string | null;
872
- } | null;
873
- }[];
1348
+ export interface VoiceProfileListInput extends VoiceProfileSourcesInput {
1349
+ readonly sourceRef: string;
1350
+ readonly language?: string;
1351
+ readonly limit?: number;
1352
+ readonly cursor?: string;
874
1353
  }
875
- export interface FacebookSocialScope {
876
- readonly platform: "FACEBOOK";
877
- readonly surface: "OWN_POSTS";
878
- readonly rootRef: string;
879
- readonly audience: "ACCOUNT_OWNED";
1354
+ export interface VoiceProfileGetInput extends VoiceProfileSourcesInput {
1355
+ readonly voiceProfile: VoiceProfileRef;
880
1356
  }
881
- /** 只保留正文片段的实际覆盖,不推定公开范围、完整历史或平台最终状态。 */
1357
+ export interface VoiceProfileResolveInput extends VoiceProfileGetInput {
1358
+ readonly language: string;
1359
+ }
1360
+ export interface VoiceProfileSynthesisInput {
1361
+ readonly idempotencyKey: string;
1362
+ readonly assetRef: string;
1363
+ readonly digest: string;
1364
+ readonly sourceVersion: string;
1365
+ readonly voiceProfile: VoiceProfileRef;
1366
+ readonly bindingDigest: string;
1367
+ readonly voiceRef: string;
1368
+ readonly language: string;
1369
+ readonly purpose: Exclude<VoiceProfilePurpose, "BIND">;
1370
+ }
1371
+ /** 模板属于创建时的精确租户范围,媒体只保存已有 Asset 的选择,不拥有字节。 */
1372
+ export interface MailSignatureTemplate {
1373
+ readonly tenantId: string;
1374
+ readonly projectRef?: string;
1375
+ readonly workspaceRef?: string;
1376
+ readonly signatureRef: string;
1377
+ readonly version: number;
1378
+ readonly displayName: string;
1379
+ readonly enabled: boolean;
1380
+ readonly text: string;
1381
+ readonly html?: string;
1382
+ readonly inlineImages: readonly MailSignatureImage[];
1383
+ readonly digest: string;
1384
+ readonly configuredAt: string;
1385
+ readonly configuredBy: string;
1386
+ }
1387
+ export interface MailSignaturePage {
1388
+ readonly items: readonly Pick<MailSignatureTemplate, "signatureRef" | "version" | "displayName" | "enabled" | "digest">[];
1389
+ readonly nextOffset: number | null;
1390
+ readonly total: number;
1391
+ }
1392
+ /** 受保护宿主原操作日志的准确引用,不是外部平台消息 ID。 */
1393
+ export interface NativeExecutionSourceReference {
1394
+ readonly requestRef: string;
1395
+ readonly operationRef: string;
1396
+ readonly messageRef: string;
1397
+ readonly version: number;
1398
+ readonly contentDigest: string;
1399
+ readonly attemptRef: string;
1400
+ readonly evidenceDigest: string;
1401
+ /** 原消息的准确部件;缺省保留旧纯文字整条回执语义。 */
1402
+ readonly partRef?: string;
1403
+ }
1404
+ /** 原服务器回执关联;receiptRef 必须由原执行账本解析,不接收客户端声明。 */
1405
+ export interface NativeExecutionSourceCorrelation extends NativeExecutionSourceReference {
1406
+ readonly receiptRef: string;
1407
+ }
1408
+ /** 群内逐条作者证据;外部身份仅在当前 Profile 账号范围内比较。 */
1409
+ export interface NativeSourceGroupAuthor {
1410
+ readonly participantRef: string;
1411
+ readonly externalRef: string;
1412
+ readonly basis: "MEMBER_PROFILE_UI" | "BOUND_LOCAL_ACCOUNT";
1413
+ readonly evidenceDigest: string;
1414
+ }
1415
+ /** 原 Interaction 的渠道来源,不是另一份 Message 或平台消息身份。 */
1416
+ export interface NativeWechatContactIdentity {
1417
+ /** 原 Participant 的当前账号范围微信号核对依据;不是平台认证结论。 */
1418
+ readonly wechatContactParticipantRef?: string;
1419
+ readonly wechatContactExternalRef?: string;
1420
+ readonly wechatContactIdentityVersion?: number;
1421
+ }
1422
+ /** Declared LOCAL Owner comparison values; no platform authentication is implied. */
1423
+ export interface NativeWechatLocalIdentity {
1424
+ readonly participantRef: string;
1425
+ readonly wechatId: string;
1426
+ readonly identityVersion: number;
1427
+ readonly externalIdentityVersion: number;
1428
+ readonly clueRef: string;
1429
+ }
1430
+ export interface NativeWechatLocalBinding {
1431
+ readonly wechatLocalIdentity?: NativeWechatLocalIdentity;
1432
+ }
1433
+ export interface NativeInteractionSource extends NativeWechatContactIdentity, NativeWechatLocalBinding {
1434
+ readonly nativeVoiceObservationDigest?: string;
1435
+ readonly nativeVoiceObservation?: NativeVoiceObservation;
1436
+ readonly nativeMedia?: NativeRenderedMedia;
1437
+ readonly nativeOutboundDisplayDigest?: string;
1438
+ readonly nativeOutboundDisplay?: NativeOutboundDisplay;
1439
+ readonly nativeQuote?: NativeQuotedDisplay;
1440
+ /** Explicit original v2 negotiation; omission retains the old outbound-only source. */
1441
+ readonly wechatQuotedHistoryProtocol?: 2;
1442
+ readonly schemaVersion: 1 | 2;
1443
+ /** V2: 原摘要只证明原生行观察,尚无正文/原文件字节;V1 不接收此字段。 */
1444
+ readonly contentState?: "UNREAD_RENDERED_CONTENT";
1445
+ readonly channel: Extract<CommunicationChannel, "WECHAT" | "WHATSAPP">;
1446
+ readonly profileRef: string;
1447
+ readonly accountRef: string;
1448
+ readonly hostRef: string;
1449
+ readonly hostBindingDigest: string;
1450
+ readonly routeRef: string;
1451
+ readonly routeAssociationVersion: number;
1452
+ readonly targetRef: string;
1453
+ readonly conversationRevision: number;
1454
+ readonly membershipDigest: string;
1455
+ readonly observationRef: string;
1456
+ readonly streamRef: string;
1457
+ readonly sequence: number;
1458
+ readonly observedAt: string;
1459
+ readonly contentDigest: string;
1460
+ readonly evidenceKind: "ANDROID_UI_AUTOMATION";
1461
+ readonly targetIdentity: "OWNER_SELECTED_VIEW";
1462
+ readonly groupAuthor?: NativeSourceGroupAuthor;
1463
+ readonly authorResolution?: NativeGroupAuthorResolution;
1464
+ readonly wechatGroupAuthorProtocol?: 1;
1465
+ }
1466
+ export type NativeSourceBinding = Pick<NativeInteractionSource, "channel" | "profileRef" | "accountRef" | "hostRef" | "hostBindingDigest" | "routeRef" | "routeAssociationVersion" | "targetRef" | "conversationRevision" | "membershipDigest" | "wechatContactParticipantRef" | "wechatContactExternalRef" | "wechatContactIdentityVersion" | "wechatLocalIdentity">;
1467
+ /** Client representation only; neither original audio bytes nor an AX transcript. */
1468
+ export interface NativeVoiceObservation {
1469
+ readonly schemaVersion: 1;
1470
+ readonly durationSeconds: number;
1471
+ readonly playbackLabel: "UNPLAYED" | "NOT_EXPOSED";
1472
+ readonly playbackCompletion: "NOT_ATTESTED";
1473
+ readonly clientTranscript: "COLLAPSED" | "RENDERED_NOT_ACCESSIBLE";
1474
+ readonly transcriptText: "NOT_EXPOSED";
1475
+ readonly originalAudio: "NOT_ACQUIRED";
1476
+ }
1477
+ export interface SocialPublicationRegistration {
1478
+ readonly protocol: 1;
1479
+ readonly publicationRef: string;
1480
+ readonly requestRef: string;
1481
+ readonly contentDigest: string;
1482
+ readonly resultDigest: string;
1483
+ readonly publisher: SocialPublisher;
1484
+ readonly observedAt: string;
1485
+ }
1486
+ export interface FacebookSocialScope {
1487
+ readonly platform: "FACEBOOK";
1488
+ readonly surface: "OWN_POSTS";
1489
+ readonly rootRef: string;
1490
+ readonly audience: "ACCOUNT_OWNED";
1491
+ }
1492
+ /** 只保留正文片段的实际覆盖,不推定公开范围、完整历史或平台最终状态。 */
882
1493
  export interface FacebookPostContent {
883
1494
  readonly accountRef: string;
884
1495
  readonly profileUrl: string;
@@ -912,524 +1523,426 @@ export interface FacebookPostCapture {
912
1523
  readonly moduleDigest: string;
913
1524
  readonly observedAt: string;
914
1525
  }
915
- export interface FacebookReplyWaiting {
916
- kind: "ACCOUNT_PAUSED" | "ACCOUNT_BUDGET" | "NODE_UNAVAILABLE" | "NODE_POLICY" | "CLIENT_RELAY" | "PLACEMENT_CHANGED" | "RESOURCE_BUSY" | "PHYSICAL_RECOVERY";
917
- reasonCode: string;
918
- nextCheckAt: string | null;
919
- effect: "NONE";
1526
+ /** 来源观察描述实际证据,不把屏幕序号或本地关联解释为平台身份。 */
1527
+ export interface SourceObservation {
1528
+ readonly facebookPostCapture?: FacebookPostCapture;
1529
+ readonly authorResolution?: NativeGroupAuthorResolution;
1530
+ readonly displayedAuthor?: string;
1531
+ readonly textAcquisition?: "CLIENT_CLIPBOARD" | "RENDERED_OCR" | "NATIVE_ACCESSIBILITY";
1532
+ /** Native rendered type clue; actual bytes and understanding remain separate. */
1533
+ readonly renderedContentKind?: "FILE" | "IMAGE" | "AUDIO" | "VIDEO";
1534
+ readonly nativeObservationRef?: string;
1535
+ readonly wechatGroupAuthorProtocol?: 1;
1536
+ readonly nativeVoiceObservationDigest?: string;
1537
+ readonly nativeVoiceObservation?: NativeVoiceObservation;
1538
+ readonly nativeMedia?: NativeRenderedMedia;
1539
+ readonly nativeOutboundDisplayDigest?: string;
1540
+ readonly nativeOutboundDisplay?: NativeOutboundDisplay;
1541
+ readonly nativeQuote?: NativeQuotedDisplay;
1542
+ /** Explicit original v2 negotiation; omission retains the old outbound-only source. */
1543
+ readonly wechatQuotedHistoryProtocol?: 2;
1544
+ readonly contentState?: "UNREAD_RENDERED_CONTENT" | "CONTENT_CAPTURED";
1545
+ readonly nativeExecution?: NativeExecutionSourceCorrelation;
1546
+ readonly lifecycle?: SourceLifecycleState;
1547
+ readonly previousFactRef?: string;
1548
+ readonly evidenceDigest?: string;
1549
+ readonly observationRef: string;
1550
+ readonly factRef: string;
1551
+ readonly profileRef: string | null;
1552
+ readonly externalMessageRef: string | null;
1553
+ readonly sourceVersion: string;
1554
+ readonly observedAt: string;
1555
+ readonly evidenceKind: "MAIL_CLIENT" | "NATIVE_ACCESSIBILITY" | "RENDERED_OCR" | "HOST_BROWSER_DOM" | "NATIVE_RECORDED" | "ANDROID_UI_AUTOMATION" | "PLATFORM_API";
1556
+ readonly coverage: "LINKED_MESSAGE" | "CURRENT_RENDERED_VIEW" | "NATIVE_FACT" | "BOUNDED_API_RESPONSE";
1557
+ readonly identityBasis: "PROFILE_MESSAGE_ID" | "NATIVE_STREAM_SEQUENCE" | "HOST_EXTERNAL_REFERENCE" | "PROTOCOL_EXTERNAL_REFERENCE" | "NATIVE_FACT" | "PLATFORM_OBJECT_ID" | "OWNER_SELECTED_VIEW";
1558
+ readonly versionBasis: "HOST_REPORTED_VERSION" | "CONTENT_DIGEST" | "VISUAL_DIGEST" | "NATIVE_EVENT_SEQUENCE" | "PROTOCOL_RESPONSE_DIGEST" | "NATIVE_UI_WITNESS_DIGEST" | "PLATFORM_ETAG_OR_DIGEST";
1559
+ readonly sourceLocatorRef: string;
1560
+ readonly changeTracking: "ON_REREAD_CONTENT_CONFLICT" | "NOT_TRACKED";
920
1561
  }
921
- export type SocialApiPlatform = "YOUTUBE" | "TIKTOK";
922
- export interface SocialApiContentScope {
923
- platform: SocialApiPlatform;
924
- rootRef: string;
925
- audience: "PUBLIC" | "ACCOUNT_OWNED";
1562
+ export interface CommunicationMessage {
1563
+ readonly channel: "EMAIL" | "WECHAT" | "WHATSAPP" | "BROWSER" | "AGENT_PROTOCOL" | "NATIVE" | "SOCIAL";
1564
+ readonly direction: "INBOUND" | "OUTBOUND" | "INTERNAL";
1565
+ readonly state: string;
1566
+ readonly emailThread?: {
1567
+ readonly inReplyTo: readonly string[];
1568
+ readonly references: readonly string[];
1569
+ };
1570
+ readonly eventSequence: string;
1571
+ readonly occurredAt: string;
1572
+ readonly message: MessageProjection;
1573
+ readonly source: SourceObservation;
926
1574
  }
927
- export type SocialContentScope = SocialApiContentScope | WechatSocialContentScope | XiaohongshuScope | BrowserSocialScope | FacebookSocialScope;
928
- export interface SocialContentRecord {
929
- contentRef: string;
930
- rootRef: string;
931
- parentRef: string | null;
932
- threadRef?: string;
933
- authorRef: string;
934
- text: string;
935
- kind: "POST" | "COMMENT" | "REPLY" | "MESSAGE" | "ACCOUNT" | "THREAD" | "NOTIFICATION" | "OPTION";
936
- xiaohongshu?: XiaohongshuContentEvidence;
937
- browser?: BrowserSocialEvidence;
938
- facebook?: FacebookPostContent | FacebookCommentContent;
939
- sourceVersion: string;
940
- contentDigest: string;
941
- observedAt: string;
942
- /** 仅原生微信内容使用,authorRef 指向原 Participant;API 作者引用原样保留。 */
943
- wechatAuthor?: WechatSocialAuthorEvidence;
944
- replyToAuthorRef?: string;
1575
+ export interface EngagementControl {
1576
+ readonly tenantId: string;
1577
+ readonly engagementRef: string;
1578
+ readonly version: number;
1579
+ readonly state: "AGENT_CONTROLLED" | "HANDOFF_REQUESTED" | "HUMAN_CONTROLLED";
1580
+ readonly controlScope: "ENGAGEMENT_OUTBOUND_AUTOMATION";
1581
+ readonly handoffRef?: string;
1582
+ readonly requestedBy?: string;
1583
+ readonly requestedAt?: string;
1584
+ readonly reason?: string;
1585
+ readonly assigneeRef?: string;
1586
+ readonly controlledBy?: string;
1587
+ readonly controlledAt?: string;
1588
+ readonly resumedBy?: string;
1589
+ readonly resumedAt?: string;
1590
+ readonly sessionCorrelationRef?: string;
945
1591
  }
946
- export interface SocialReadFrameBase {
947
- profileRef: string;
948
- externalAccountRef: string;
949
- observedAt: string;
950
- contents: readonly SocialContentRecord[];
951
- completeness: "NOT_ATTESTED";
1592
+ export interface WechatAutonomy {
1593
+ readonly enabled: boolean;
1594
+ readonly version: number;
1595
+ readonly delegatePrincipalRef: string;
1596
+ readonly expiresAt?: string;
1597
+ readonly configuredBy: string;
952
1598
  }
953
- export interface WechatSocialReadFrame extends SocialReadFrameBase, WechatSocialReadEvidence {
954
- scope: WechatSocialContentScope;
955
- readonly renderedWindow?: WechatSocialRenderedWindow;
1599
+ /** Browser-safe shared approval representation; no host paths, locators or bytes. */
1600
+ export interface MessageAttachment {
1601
+ readonly assetRef: string;
1602
+ readonly sourceVersion: string;
1603
+ readonly digest: string;
1604
+ readonly mediaType: string;
1605
+ readonly byteLength: number;
1606
+ readonly filename: string;
1607
+ readonly presentation?: "VOICE_NOTE" | "IMAGE" | "VIDEO";
956
1608
  }
957
- export interface SocialOperationView {
958
- tenantId: string;
959
- profileRef: string;
960
- engagementRef: string;
961
- conversationRef: string;
962
- dispatchRef: string;
963
- action: string;
964
- state: string;
965
- physicalIdle: boolean;
966
- requestRef: string | null;
967
- reasonCode: string | null;
968
- browserActivity?: XiaohongshuActivityView;
969
- installedCapabilities?: BrowserInstalledCapabilities;
970
- browserRead?: BrowserSocialReadWindow;
971
- facebookWaiting?: FacebookReplyWaiting;
972
- }
973
- export interface SocialContentProjection extends SocialContentRecord {
974
- revision: number;
975
- factRef: string;
976
- source: SourceObservation;
977
- historicalContext?: true;
978
- messageOrder?: {
979
- previousRef: string | null;
980
- nextRef: string | null;
981
- };
982
- renderedEvidence?: WechatSocialReadEvidence;
983
- }
984
- export interface SocialContentPage {
985
- tenantId: string;
986
- engagementRef: string;
987
- conversationRef: string;
988
- profileRef: string;
989
- items: readonly Omit<SocialContentProjection, "source">[];
990
- nextCursor: string | null;
991
- consistency: "SNAPSHOT" | "LIVE";
992
- coverage: "RETAINED_CANONICAL_OBSERVATIONS";
993
- platformCurrentness: "NOT_ATTESTED";
994
- }
995
- export interface SocialTextMessage extends TextChannelMessage {
996
- readonly acceptedScheduleObjectRef?: string;
997
- readonly externalObjectRef?: string;
998
- readonly delegation?: {
999
- readonly version: number;
1000
- readonly factRef: string;
1001
- };
1002
- readonly channel: "SOCIAL";
1003
- readonly executionPlacementDigest?: string;
1004
- readonly conversationRef: string;
1005
- readonly senderParticipantRef: string;
1006
- readonly xiaohongshuIntent?: XiaohongshuIntent;
1007
- readonly browserIntent?: BrowserSocialIntent;
1008
- readonly browserPublication?: BrowserPublicationObservation;
1009
- readonly socialTarget: (SocialApiContentScope | XiaohongshuScope | BrowserSocialScope | FacebookSocialScope) & {
1010
- targetRef: string;
1011
- sourceFactRef: string;
1012
- sourceVersion: string;
1013
- sourceDigest: string;
1014
- conversationRevision: number;
1015
- };
1016
- }
1017
- export interface SocialConversationView {
1018
- readonly xiaohongshuScheduleHistory?: XiaohongshuScheduleHistory;
1019
- tenantId: string;
1020
- conversationRef: string;
1021
- profileRef: string;
1022
- scope: SocialContentScope;
1023
- revision: number;
1024
- contents: readonly Omit<SocialContentProjection, "source">[];
1025
- messages: readonly (Pick<SocialTextMessage, "messageRef" | "version" | "contentDigest" | "text" | "socialTarget" | "xiaohongshuIntent" | "browserIntent" | "browserPublication" | "externalObjectRef" | "acceptedScheduleObjectRef" | "status"> & {
1026
- requestRef: string | null;
1027
- })[];
1028
- dispatches: readonly {
1029
- dispatchRef: string;
1030
- action: string;
1031
- state: string;
1032
- physicalIdle: boolean;
1033
- createdAt: string;
1034
- requestRef: string | null;
1035
- reasonCode?: string | null;
1036
- }[];
1037
- controlVersion: number;
1038
- readonly autonomy?: SocialAutonomy;
1039
- readonly xiaohongshuRead?: {
1040
- dispatchRef: string;
1041
- traversal: XiaohongshuTraversal;
1042
- contentRefs?: readonly string[];
1043
- captureFailures?: readonly SocialMediaCaptureFailure[];
1044
- };
1045
- readonly browserRead?: BrowserSocialReadWindow & {
1046
- readonly dispatchRef: string;
1047
- };
1048
- readonly browserCapture?: {
1049
- readonly basis: "INSTALLED_NODE_PORT";
1050
- readonly available: boolean;
1051
- readonly reasonCode: string | null;
1052
- };
1053
- readonly registrationContext?: SocialRegistrationContext;
1054
- readonly targetRegistration?: SocialTargetRegistrationView;
1055
- readonly socialRegistration?: SocialRegistrationMetadata;
1056
- readonly publicationRegistration?: SocialPublicationRegistration;
1057
- readonly readAttempt?: WechatSocialReadAttemptView;
1058
- }
1059
- /** transport 为必填判别项,旧 TIKTOK API scope 不会被重新解释成网页授权。 */
1060
- export interface BrowserSocialScope {
1061
- readonly platform: Exclude<BrowserSocialPlatform, "XIAOHONGSHU">;
1062
- readonly transport: "BROWSER";
1063
- readonly surface: "SEARCH" | "VIDEO" | "PROFILE" | "DIRECT" | "NOTIFICATIONS" | "INBOX";
1064
- readonly rootRef: string;
1065
- readonly audience: "PUBLIC" | "ACCOUNT_OWNED" | "PRIVATE";
1066
- readonly query?: string;
1067
- readonly peerRef?: string;
1068
- }
1069
- export interface BrowserMediaSelection {
1070
- readonly assetRef: string;
1071
- readonly digest: string;
1072
- readonly sourceVersion: string;
1609
+ type MessageAttachmentChoice = Pick<MessageAttachment, "assetRef" | "filename" | "presentation">;
1610
+ export type SourceMessagePart = {
1611
+ readonly partRef: string;
1612
+ readonly kind: "TEXT";
1613
+ readonly text: string;
1614
+ } | {
1615
+ readonly partRef: string;
1616
+ readonly kind: "FILE" | "IMAGE" | "AUDIO" | "VIDEO";
1617
+ readonly sourceAttachmentRef: string;
1618
+ readonly filename: string;
1073
1619
  readonly mediaType: string;
1074
1620
  readonly byteLength: number;
1075
- readonly filename: string;
1076
- }
1077
- export interface BrowserPublicationSettings {
1078
- readonly aiAssisted: boolean | null;
1079
- readonly original: boolean | null;
1080
- readonly commercial: boolean | null;
1081
- readonly allowComments: boolean | null;
1082
- readonly scheduledAt: string | null;
1083
- readonly timeZone: string;
1084
- }
1085
- export type BrowserSocialIntent = {
1086
- readonly kind: "COMMENT" | "REPLY";
1087
- } | {
1088
- readonly kind: "SCHEDULE_CANCEL";
1089
- } | {
1090
- readonly kind: "SCHEDULE_RESCHEDULE";
1091
- readonly scheduledAt: string;
1092
- readonly timeZone: string;
1093
- } | {
1094
- readonly kind: "DIRECT";
1095
- readonly assets?: readonly BrowserMediaSelection[];
1096
- } | {
1097
- readonly kind: "PUBLISH";
1098
- readonly title: string;
1099
- readonly tags: readonly string[];
1100
- readonly visibility: "PUBLIC" | "SELF_ONLY" | "FRIENDS";
1101
- readonly video: BrowserMediaSelection;
1102
- readonly cover?: BrowserMediaSelection;
1103
- readonly settings: BrowserPublicationSettings;
1621
+ readonly assetRef?: string;
1622
+ readonly digest?: string;
1623
+ readonly sourceVersion?: string;
1104
1624
  };
1105
- export interface BrowserSocialEvidence {
1106
- readonly accountRef: string;
1107
- readonly peerRef?: string;
1108
- readonly title?: string;
1109
- readonly media?: readonly {
1110
- readonly mediaRef: string;
1111
- readonly kind: "IMAGE" | "VIDEO" | "AUDIO";
1112
- }[];
1113
- readonly replyTo?: {
1114
- readonly targetRef: string;
1115
- readonly authorRef: string;
1116
- readonly rootCommentRef: string;
1117
- };
1118
- readonly unsupported?: {
1119
- readonly platformType: string;
1120
- readonly detail: "NOT_READ";
1121
- readonly reasonCode: "BROWSER_MESSAGE_TYPE_NOT_MAPPED";
1122
- };
1123
- readonly notification?: {
1124
- readonly kind: "COMMENT" | "REPLY" | "MENTION";
1125
- readonly subjectRef: string;
1126
- readonly videoRef: string;
1127
- readonly occurredAt: string;
1128
- readonly visibility?: "PUBLIC" | "SELF_ONLY" | "FRIENDS" | "UNKNOWN";
1129
- };
1130
- readonly publication?: {
1131
- readonly state: "PROCESSING" | "REVIEW_PENDING" | "PUBLISHED" | "REJECTED" | "SCHEDULED" | "CANCELLED";
1132
- readonly scheduledAt: string | null;
1133
- readonly visibility?: "PUBLIC" | "SELF_ONLY" | "FRIENDS" | "UNKNOWN";
1134
- };
1135
- }
1136
- export type BrowserPublicationObservation = NonNullable<BrowserSocialEvidence["publication"]> & {
1137
- readonly objectRef: string;
1138
- readonly observedAt: string;
1139
- readonly reviewRequired: boolean;
1625
+ /** 出站资产没有外部来源部件 ID;不以 AssetRef 冒充 sourceAttachmentRef。 */
1626
+ export type AssetMessagePart = MessageAttachment & {
1627
+ readonly partRef: string;
1628
+ readonly kind: "FILE" | "AUDIO" | "IMAGE" | "VIDEO";
1629
+ readonly sourceAttachmentRef?: never;
1140
1630
  };
1141
- export interface BrowserSocialReadOptions {
1142
- readonly view?: "CONTENT" | "CAPABILITIES" | "PUBLICATIONS" | "SCHEDULED";
1143
- readonly pageLimit?: number;
1144
- readonly maxItems?: number;
1145
- readonly maxExpansions?: number;
1146
- readonly maxScrolls?: number;
1147
- readonly direction?: "FORWARD" | "BACKWARD";
1148
- readonly resumeBeforeContentRef?: string;
1149
- readonly resumeAfterContentRef?: string;
1150
- readonly captureMedia?: boolean;
1151
- }
1152
- export interface BrowserSocialTraversal {
1153
- readonly pagesVisited: number;
1154
- readonly expansions: number;
1155
- readonly scrolls: number;
1156
- readonly stoppedBy: "EXHAUSTED" | "PAGE_LIMIT" | "ITEM_LIMIT" | "NO_PROGRESS" | "CURRENT_VIEW" | "TIME_LIMIT" | "CONTROL_LIMIT";
1157
- readonly nextAfterContentRef: string | null;
1158
- readonly nextBeforeContentRef: string | null;
1159
- readonly direction: "FORWARD" | "BACKWARD";
1160
- readonly beforeContentRef: string | null;
1161
- readonly afterContentRef: string | null;
1162
- readonly startedAt: string;
1163
- readonly finishedAt: string;
1164
- }
1165
- export interface BrowserInstalledCapabilities {
1166
- readonly basis: "INSTALLED_MAPPING";
1167
- readonly capabilities: readonly {
1168
- readonly name: string;
1169
- readonly available: boolean;
1170
- readonly reasonCode: string | null;
1171
- }[];
1172
- }
1173
- export interface BrowserSocialReadWindow {
1174
- readonly view: NonNullable<BrowserSocialReadOptions["view"]>;
1631
+ export type MessagePart = SourceMessagePart | AssetMessagePart;
1632
+ export type SourceChangeKind = "UNCHANGED" | "CONTENT_CONFLICT" | "CONTENT_REVISED" | "CONTENT_RECONCILED" | "CONTENT_CAPTURED" | "DELETED" | "RETRACTED" | "RESTORED" | "NOT_VISIBLE" | "NOT_SUPPORTED" | "HISTORICAL_RECORDED" | "NATIVE_DISPLAY_OBSERVED" | "NATIVE_VOICE_OBSERVED";
1633
+ export interface SourceLifecycleState {
1634
+ readonly nativeVoiceObservationDigest?: string;
1635
+ readonly nativeVoiceObservedAt?: string;
1636
+ readonly nativeVoiceObservation?: NativeVoiceObservation;
1637
+ readonly nativeOutboundDisplay?: NativeOutboundDisplayState;
1638
+ readonly nativeExecutionFactRef?: string;
1639
+ readonly headFactRef: string;
1640
+ readonly contentFactRef: string;
1641
+ readonly revision: number;
1642
+ readonly availability: "AVAILABLE" | "UNAVAILABLE" | "UNRESOLVED";
1643
+ readonly changeKind: SourceChangeKind | "LEGACY_OBSERVATION";
1644
+ readonly reasonCode: string;
1175
1645
  readonly observedAt: string;
1176
- readonly contentRefs: readonly string[];
1177
- readonly traversal?: BrowserSocialTraversal;
1178
- readonly captureFailures?: readonly SocialMediaCaptureFailure[];
1646
+ readonly candidateFactRef: string | null;
1647
+ readonly lastInspectionRef: string | null;
1179
1648
  }
1180
- export interface SocialRegistrationIdentity {
1181
- readonly participantRef: string;
1182
- readonly identityVersion: number;
1183
- readonly externalIdentityVersion: number;
1184
- readonly clueRef: string;
1649
+ export interface SourceBasis {
1650
+ readonly channel: CommunicationMessage["channel"];
1651
+ readonly conversationRef: string;
1652
+ readonly messageRef: string;
1653
+ readonly headFactRef: string;
1185
1654
  }
1186
- export interface SocialRegistrationSource {
1187
- readonly dispatchRef: string;
1188
- readonly observationRef: string;
1189
- readonly captureKey: string;
1655
+ export interface DeliveredEmailAttachment extends MessageAttachment {
1656
+ readonly remoteAttachmentRef: string;
1190
1657
  }
1191
- export interface SocialTargetPreview {
1192
- readonly schemaVersion: 1;
1193
- readonly registrationRef: string;
1194
- readonly previewRef: string;
1195
- readonly observedAt: string;
1196
- readonly expiresAt: string;
1197
- readonly evidenceDigest: string;
1198
- readonly renderedWindow: WechatSocialRenderedWindow;
1199
- }
1200
- export interface SocialTargetQualified {
1201
- readonly schemaVersion: 1;
1202
- readonly registrationRef: string;
1203
- readonly state: "QUALIFIED";
1204
- readonly previewRef: string;
1205
- readonly previewDigest: string;
1206
- readonly captureKey: string;
1207
- readonly selectionReceiptRef: string;
1208
- readonly frame: WechatSocialReadFrame;
1209
- readonly authorObservation: SocialRegistrationIdentity & {
1210
- readonly wechatId: string;
1211
- readonly observedAt: string;
1212
- readonly evidenceDigest: string;
1213
- readonly basis: "CURRENT_DETAIL_AUTHOR_PROFILE_RETURN";
1214
- readonly verification: "VISIBLE_UI_ID_MATCH";
1215
- };
1216
- readonly roundTrip: {
1217
- readonly enteredAt: string;
1218
- readonly returnedAt: string;
1219
- readonly evidenceDigest: string;
1220
- readonly basis: "CURRENT_DETAIL_RETURN";
1221
- };
1222
- readonly viewer: "NOT_ATTESTED";
1223
- }
1224
- export interface SocialRegistrationMetadata {
1225
- readonly protocol: 1;
1226
- readonly identityBasis: "UI_INSTANCE";
1227
- readonly registrationRef: string;
1228
- readonly source: SocialRegistrationSource;
1229
- readonly sourceRelation: "CURRENT_INSTANCE_RECONFIRMED";
1230
- readonly previewRef: string;
1231
- readonly previewDigest: string;
1232
- readonly selectionReceiptRef: string;
1233
- readonly author: SocialRegistrationIdentity;
1234
- readonly local: SocialRegistrationIdentity;
1235
- readonly authorObservation: SocialTargetQualified["authorObservation"];
1236
- readonly roundTrip: SocialTargetQualified["roundTrip"];
1237
- readonly viewer: "NOT_ATTESTED";
1238
- readonly contentCoverage: "VISIBLE_SHARE_TITLE_ONLY";
1239
- readonly writeEligible: false;
1658
+ export type EmailMessageStatus = "DRAFT" | "APPROVED" | "REJECTED" | "QUEUED" | "CANCELLED" | "ACCEPTED" | "UNCERTAIN" | "FAILED";
1659
+ /** 原 Work 的提交依据;与内容生成来源区分,外部命令不能自行声明。 */
1660
+ export interface EmailWorkSource {
1661
+ readonly workRef: string;
1662
+ readonly kind: "REPLY" | "FOLLOW_UP" | "CONTACT";
1663
+ readonly taskOrigin?: TaskCommunicationOrigin;
1664
+ readonly communicationPolicyBasis?: CommunicationPolicyBasis;
1240
1665
  }
1241
- export interface SocialRegistrationContext {
1242
- readonly schemaVersion: 1;
1666
+ export interface EmailMessageProjection extends EmailRichContent {
1667
+ readonly taskOrigin?: TaskCommunicationOrigin;
1668
+ readonly workSource?: EmailWorkSource;
1669
+ readonly sourceBasis?: SourceBasis;
1670
+ readonly tenantId: string;
1243
1671
  readonly engagementRef: string;
1244
- readonly conversationRef: string;
1245
- readonly profileRef: string;
1246
- readonly accountRef: string;
1247
- readonly conversationRevision: number;
1248
- readonly membershipDigest: string;
1249
- readonly local: SocialRegistrationIdentity | null;
1250
- readonly authors: readonly (SocialRegistrationIdentity & {
1251
- readonly label: string;
1252
- })[];
1253
- readonly eligibility: "ELIGIBLE" | "BLOCKED";
1254
- readonly reasonCodes: readonly ("LOCAL_CURRENT_SLOT_REQUIRED" | "AUTHOR_CURRENT_SLOT_REQUIRED" | "BOUNDED_MOMENTS_VIEW_REQUIRED" | "TARGET_PROTOCOL_REQUIRED")[];
1255
- }
1256
- export interface SocialTargetRegistrationView {
1257
- readonly schemaVersion: 1;
1258
- readonly registrationRef: string;
1672
+ readonly messageRef: string;
1673
+ readonly conversationRef?: string;
1674
+ readonly version: number;
1675
+ readonly contentDigest: string;
1676
+ readonly routeRef: string;
1677
+ readonly recipientAddress: string;
1678
+ readonly senderParticipantRef: string;
1679
+ readonly recipientParticipantRef: string;
1680
+ readonly subject: string;
1681
+ readonly text: string;
1682
+ readonly replyToMessageRef?: string;
1683
+ readonly followUpOfMessageRef?: string;
1684
+ readonly followUpPlanVersion?: number;
1685
+ readonly attachments?: readonly MessageAttachment[];
1686
+ readonly deliveredAttachments?: readonly DeliveredEmailAttachment[];
1687
+ readonly status: EmailMessageStatus;
1259
1688
  readonly createdAt: string;
1260
- readonly state: string;
1261
- readonly physicalIdle: boolean;
1262
- readonly phase: "QUEUED" | "WAITING_CONFIRMATION" | "QUALIFYING" | "REGISTERED" | "GAP" | "UNKNOWN";
1263
- readonly expiresAt: string | null;
1264
- readonly reasonCode?: string;
1265
- readonly preview?: SocialTargetPreview & {
1266
- readonly previewDigest: string;
1267
- };
1268
- readonly confirmationRecorded: boolean;
1269
- readonly registered?: {
1270
- readonly conversationRef: string;
1271
- readonly rootRef: string;
1272
- readonly routeRef: string;
1273
- readonly receipt: ActionReceipt;
1274
- };
1689
+ readonly updatedAt: string;
1690
+ readonly reviewedBy?: string;
1691
+ readonly reviewerKind?: "HUMAN";
1692
+ readonly approvalExpiresAt?: string;
1693
+ readonly profileRef?: string;
1694
+ readonly sendRequestRef?: string;
1695
+ readonly correlationRef?: string;
1696
+ readonly internetMessageId?: string;
1697
+ readonly observedAt?: string;
1698
+ readonly followUpDueAt?: string;
1275
1699
  }
1276
- export type SocialPublisher = SocialRegistrationIdentity & {
1277
- readonly wechatId: string;
1278
- };
1279
- export interface SocialPublicationRegistration {
1280
- readonly protocol: 1;
1281
- readonly publicationRef: string;
1282
- readonly requestRef: string;
1283
- readonly contentDigest: string;
1284
- readonly resultDigest: string;
1285
- readonly publisher: SocialPublisher;
1286
- readonly observedAt: string;
1700
+ /** 原文本消息模型;旧 WechatMessage 继续作为兼容名称。 */
1701
+ export type TextMessageStatus = "DRAFT" | "APPROVED" | "REJECTED" | "QUEUED" | "CLIENT_VISIBLE" | "UNCERTAIN" | "FAILED" | "CANCELLED";
1702
+ export interface TaskCommunicationOrigin {
1703
+ readonly handoffRef?: string;
1704
+ readonly workRef: string;
1705
+ readonly invocationRef: string;
1706
+ readonly callId: string;
1707
+ readonly inputDigest: string;
1287
1708
  }
1288
- /** 受保护宿主原操作日志的准确引用,不是外部平台消息 ID。 */
1289
- export interface NativeExecutionSourceReference {
1290
- readonly requestRef: string;
1291
- readonly operationRef: string;
1709
+ export interface TextChannelMessage {
1710
+ readonly attachments?: readonly MessageAttachment[];
1711
+ readonly taskOrigin?: TaskCommunicationOrigin;
1712
+ readonly communicationPolicyBasis?: CommunicationPolicyBasis;
1713
+ readonly channel?: "WECHAT" | "WHATSAPP" | "SOCIAL";
1714
+ readonly nativeBinding?: NativeSourceBinding;
1715
+ readonly senderParticipantRef?: string;
1716
+ readonly recipientParticipantRefs?: readonly string[];
1717
+ readonly sourceBasis?: SourceBasis;
1718
+ readonly humanIntent?: {
1719
+ readonly kind: "HUMAN";
1720
+ readonly authoredBy: string;
1721
+ readonly contextDigest: string;
1722
+ };
1723
+ readonly conversationRef?: string;
1724
+ readonly tenantId: string;
1725
+ readonly engagementRef: string;
1292
1726
  readonly messageRef: string;
1727
+ readonly profileRef: string;
1293
1728
  readonly version: number;
1729
+ readonly text: string;
1294
1730
  readonly contentDigest: string;
1295
- readonly attemptRef: string;
1296
- readonly evidenceDigest: string;
1297
- /** 原消息的准确部件;缺省保留旧纯文字整条回执语义。 */
1298
- readonly partRef?: string;
1299
- }
1300
- /** 原服务器回执关联;receiptRef 必须由原执行账本解析,不接收客户端声明。 */
1301
- export interface NativeExecutionSourceCorrelation extends NativeExecutionSourceReference {
1302
- readonly receiptRef: string;
1303
- }
1304
- /** 群内逐条作者证据;外部身份仅在当前 Profile 账号范围内比较。 */
1305
- export interface NativeSourceGroupAuthor {
1306
- readonly participantRef: string;
1307
- readonly externalRef: string;
1308
- readonly basis: "MEMBER_PROFILE_UI" | "BOUND_LOCAL_ACCOUNT";
1309
- readonly evidenceDigest: string;
1310
- }
1311
- /** 原 Interaction 的渠道来源,不是另一份 Message 或平台消息身份。 */
1312
- export interface NativeWechatContactIdentity {
1313
- /** 原 Participant 的当前账号范围微信号核对依据;不是平台认证结论。 */
1314
- readonly wechatContactParticipantRef?: string;
1315
- readonly wechatContactExternalRef?: string;
1316
- readonly wechatContactIdentityVersion?: number;
1317
- }
1318
- /** Declared LOCAL Owner comparison values; no platform authentication is implied. */
1319
- export interface NativeWechatLocalIdentity {
1320
- readonly participantRef: string;
1321
- readonly wechatId: string;
1322
- readonly identityVersion: number;
1323
- readonly externalIdentityVersion: number;
1324
- readonly clueRef: string;
1731
+ readonly status: TextMessageStatus;
1732
+ readonly createdBy: string;
1733
+ readonly createdAt: string;
1734
+ readonly updatedAt: string;
1735
+ readonly replyToMessageRef?: string;
1736
+ readonly followUpOfMessageRef?: string;
1737
+ readonly followUpPlanVersion?: number;
1738
+ readonly reviewRef?: string;
1739
+ readonly reviewedBy?: string;
1740
+ readonly approvalExpiresAt?: string;
1741
+ readonly reviewSourceRef?: string;
1742
+ readonly authorizationBasis?: "HUMAN_MESSAGE_REVIEW" | "HUMAN_CONVERSATION_DELEGATION" | "ENGAGEMENT_CONTROL";
1743
+ readonly authorizationControlVersion?: number;
1744
+ readonly requestRef?: string;
1745
+ readonly hostEvidenceDigest?: string;
1325
1746
  }
1326
- export interface NativeWechatLocalBinding {
1327
- readonly wechatLocalIdentity?: NativeWechatLocalIdentity;
1747
+ export type CommunicationChannel = "EMAIL" | "WECHAT" | "WHATSAPP" | "SOCIAL";
1748
+ declare const DESKTOP_ACTION_KINDS: readonly [
1749
+ "MOMENTS_PUBLISH",
1750
+ "MOMENTS_COMMENT",
1751
+ "MOMENTS_REPLY",
1752
+ "MOMENTS_LIKE",
1753
+ "MOMENTS_UNLIKE",
1754
+ "MOMENTS_DELETE",
1755
+ "MOMENTS_COMMENT_DELETE",
1756
+ "CHANNELS_PUBLISH",
1757
+ "CHANNELS_COMMENT",
1758
+ "CHANNELS_REPLY",
1759
+ "CHANNELS_LIKE",
1760
+ "CHANNELS_UNLIKE",
1761
+ "CHANNELS_COMMENT_DELETE",
1762
+ "WORKS_PUBLISH",
1763
+ "WORKS_COMMENT",
1764
+ "WORKS_REPLY",
1765
+ "WORKS_LIKE",
1766
+ "WORKS_UNLIKE",
1767
+ "WORKS_DELETE",
1768
+ "WORKS_COMMENT_DELETE",
1769
+ "CONTACT_REMARK",
1770
+ "CONTACT_DELETE",
1771
+ "GROUP_RENAME",
1772
+ "GROUP_ANNOUNCEMENT",
1773
+ "GROUP_LEAVE",
1774
+ "GROUP_MUTE",
1775
+ "GROUP_UNMUTE",
1776
+ "GROUP_PIN",
1777
+ "GROUP_UNPIN",
1778
+ "CONTACT_REQUEST",
1779
+ "CONTACT_ACCEPT",
1780
+ "GROUP_CREATE",
1781
+ "GROUP_INVITE",
1782
+ "MESSAGE_FORWARD",
1783
+ "CONTACT_SHARE",
1784
+ "MOMENTS_SHARE",
1785
+ "CHANNELS_SHARE",
1786
+ "WORKS_SHARE"
1787
+ ];
1788
+ export type DesktopActionKind = typeof DESKTOP_ACTION_KINDS[number];
1789
+ declare const DESKTOP_NATIVE_PRESENTATIONS: readonly [
1790
+ "IMAGE",
1791
+ "VIDEO",
1792
+ "VOICE_NOTE"
1793
+ ];
1794
+ export type DesktopNativePresentation = typeof DESKTOP_NATIVE_PRESENTATIONS[number];
1795
+ declare const EXECUTION_NODE_PROTOCOL = "ne-execution-node/1.0";
1796
+ declare const EXECUTION_NODE_MODULE = "android.whatsapp.read";
1797
+ export interface NodeResourceAdvertisement extends WechatOnboardingProtocols {
1798
+ readonly weixinOfficialReadProtocol?: 1;
1799
+ readonly weixinOfficialWriteProtocol?: 2;
1800
+ readonly weixinOfficialCommentWriteProtocol?: 1;
1801
+ readonly weixinImageUploadProtocol?: 1;
1802
+ readonly weixinDraftPreconditionProtocol?: 2;
1803
+ readonly executionRequirements?: NodeExecutionRequirements;
1804
+ readonly desktopTaskContextProtocol?: 1;
1805
+ readonly desktopTaskNavigationProtocol?: 1;
1806
+ readonly desktopConversationLocateProtocol?: 1;
1807
+ readonly desktopConversationResolveProtocol?: 1;
1808
+ readonly desktopConversationDiscoveryProtocol?: 1;
1809
+ readonly desktopConversationSelectProtocol?: 1;
1810
+ readonly desktopConversationBrowseProtocol?: 1;
1811
+ readonly nativeTaskNavigationProtocol?: 1;
1812
+ readonly nativeCancelledDraftProtocol?: 1;
1813
+ readonly nativeMediaSendProtocol?: 1;
1814
+ /** 固定 Facebook Profile 观察与人工恢复协议,不授予营销写入。 */
1815
+ readonly browserProfileProtocol?: 1;
1816
+ readonly browserProfileTaskProtocol?: 1;
1817
+ readonly browserProfileContentProtocol?: 1;
1818
+ readonly browserProfilePostsProtocol?: 1;
1819
+ readonly browserProfilePostDetailProtocol?: 1;
1820
+ readonly browserProfileCommentsProtocol?: 1;
1821
+ readonly browserProfileCurrentCommentsProtocol?: 1;
1822
+ readonly browserProfileSearchProtocol?: 1;
1823
+ readonly browserProfileNavigationProtocol?: 1;
1824
+ readonly facebookReplyProtocol?: 1;
1825
+ readonly browserProfileActivityProtocol?: 1;
1826
+ readonly nativeRenderedWindowBoundaryProtocol?: 1;
1827
+ readonly nativeRenderedMediaProtocol?: 1;
1828
+ localResourceDigest: string;
1829
+ environmentGeneration: number;
1830
+ hostRef: string;
1831
+ profileRef: string;
1832
+ accountRef: string;
1833
+ sessionRef: string;
1834
+ capabilityRef: string;
1835
+ hostBindingDigest: string;
1836
+ application: "weixin" | "whatsapp" | "youtube" | "tiktok" | "wechat" | "browser" | "mail" | "xiaohongshu" | "douyin" | "agent";
1837
+ externalAccountRef?: string;
1838
+ bridgeBindingJson?: string;
1839
+ bridgeRuntimeKind?: "DESKTOP" | "BROWSER" | "API" | "MAIL" | "AGENT_PROTOCOL";
1840
+ mailConfigurationDigest?: string;
1841
+ moduleId: typeof EXECUTION_NODE_MODULE | "android.whatsapp.message" | "android.wechat.read" | "android.wechat.message" | "api.weixin" | "api.youtube" | "api.tiktok" | "bridge.wechat" | "bridge.browser" | "bridge.mail" | "bridge.agent" | "browser.xiaohongshu" | "browser.douyin" | "browser.tiktok";
1842
+ moduleVersion: "1.0.0";
1843
+ moduleDigest: string;
1844
+ enabled: boolean;
1845
+ supportsDisplayOff: boolean;
1846
+ supportsLocked: boolean;
1847
+ supportsNativeCapture?: boolean;
1848
+ supportsNativeCaption?: boolean;
1849
+ supportsNativeBytes?: boolean;
1850
+ supportsSourceBytes?: boolean;
1851
+ browserSocialProtocol?: 1;
1852
+ browserSocialUploadProtocol?: 1;
1853
+ browserSocialDirectMediaKinds?: readonly ("IMAGE" | "VIDEO" | "VOICE_NOTE")[];
1854
+ browserSocialActions?: readonly ("READ" | "COMMENT" | "REPLY" | "DIRECT" | "DIRECT_START" | "LIKE" | "FOLLOW" | "COMMENT_DELETE" | "COMMENT_VISIBILITY" | "PUBLISH" | "SCHEDULE_CANCEL" | "SCHEDULE_RESCHEDULE")[];
1855
+ xiaohongshuDirectMediaProtocol?: 1;
1856
+ xiaohongshuDirectMediaKinds?: readonly ("IMAGE" | "VIDEO" | "VOICE_NOTE")[];
1857
+ desktopFileSendProtocol?: 1;
1858
+ nativeWechatMultiSendProtocol?: 1;
1859
+ wechatPhysicalRecoveryProtocol?: 1;
1860
+ desktopMediaPresentations?: readonly DesktopNativePresentation[];
1861
+ desktopActionProtocol?: 1;
1862
+ desktopActionKinds?: readonly DesktopActionKind[];
1863
+ /** Actual protected host describe/probe negotiated personal WeChat ID verification v1. */
1864
+ supportsWechatContactIdentity?: boolean;
1865
+ wechatLocalIdentityProtocol?: 1;
1866
+ /** Independent complete PERSONAL LOCAL5+CONTACT3 protocol; never inferred from the GROUP capability. */
1867
+ wechatPersonalLocalIdentityProtocol?: 1;
1868
+ /** Actual protected host describe/probe negotiated the bounded unbound Social read protocol v1. */
1869
+ supportsWechatSocialRead?: boolean;
1870
+ /** Absent preserves the legacy current-page-only v1 advertisement. */
1871
+ wechatSocialReadProtocol?: 2;
1872
+ wechatSocialTargetRegistrationProtocol?: 1;
1873
+ wechatMomentsPublicationProtocol?: 1;
1874
+ wechatOfficialReadProtocol?: 1;
1875
+ wechatChannelsFeedReadProtocol?: 1;
1876
+ nativeVoiceObservationProtocol?: 1 | 2;
1877
+ wechatOutboundDisplayProtocol?: 1;
1878
+ wechatQuotedHistoryProtocol?: 1 | 2;
1328
1879
  }
1329
- export interface NativeInteractionSource extends NativeWechatContactIdentity, NativeWechatLocalBinding {
1330
- readonly nativeVoiceObservationDigest?: string;
1331
- readonly nativeVoiceObservation?: NativeVoiceObservation;
1332
- readonly nativeMedia?: NativeRenderedMedia;
1333
- readonly nativeOutboundDisplayDigest?: string;
1334
- readonly nativeOutboundDisplay?: NativeOutboundDisplay;
1335
- readonly nativeQuote?: NativeQuotedDisplay;
1336
- /** Explicit original v2 negotiation; omission retains the old outbound-only source. */
1337
- readonly wechatQuotedHistoryProtocol?: 2;
1338
- readonly schemaVersion: 1 | 2;
1339
- /** V2: 原摘要只证明原生行观察,尚无正文/原文件字节;V1 不接收此字段。 */
1340
- readonly contentState?: "UNREAD_RENDERED_CONTENT";
1341
- readonly channel: Extract<CommunicationChannel, "WECHAT" | "WHATSAPP">;
1342
- readonly profileRef: string;
1343
- readonly accountRef: string;
1344
- readonly hostRef: string;
1345
- readonly hostBindingDigest: string;
1346
- readonly routeRef: string;
1347
- readonly routeAssociationVersion: number;
1348
- readonly targetRef: string;
1349
- readonly conversationRevision: number;
1350
- readonly membershipDigest: string;
1351
- readonly observationRef: string;
1352
- readonly streamRef: string;
1353
- readonly sequence: number;
1354
- readonly observedAt: string;
1355
- readonly contentDigest: string;
1356
- readonly evidenceKind: "ANDROID_UI_AUTOMATION";
1357
- readonly targetIdentity: "OWNER_SELECTED_VIEW";
1358
- readonly groupAuthor?: NativeSourceGroupAuthor;
1359
- readonly authorResolution?: NativeGroupAuthorResolution;
1360
- readonly wechatGroupAuthorProtocol?: 1;
1880
+ export interface NodeProof {
1881
+ protocol: typeof EXECUTION_NODE_PROTOCOL;
1882
+ tenantId: string;
1883
+ serviceOrigin: string;
1884
+ installationRef: string;
1885
+ keyFingerprint: string;
1886
+ nodeRef: string | null;
1887
+ nodeGeneration: number;
1888
+ nodeSessionRef: string | null;
1889
+ sessionGeneration: number;
1890
+ requestNonce: string;
1891
+ bodyDigest: string;
1892
+ signature: string;
1361
1893
  }
1362
- /** 来源观察描述实际证据,不把屏幕序号或本地关联解释为平台身份。 */
1363
- export interface SourceObservation {
1364
- readonly facebookPostCapture?: FacebookPostCapture;
1365
- readonly authorResolution?: NativeGroupAuthorResolution;
1366
- readonly displayedAuthor?: string;
1367
- readonly textAcquisition?: "CLIENT_CLIPBOARD" | "RENDERED_OCR" | "NATIVE_ACCESSIBILITY";
1368
- /** Native rendered type clue; actual bytes and understanding remain separate. */
1369
- readonly renderedContentKind?: "FILE" | "IMAGE" | "AUDIO" | "VIDEO";
1370
- readonly nativeObservationRef?: string;
1894
+ /** 独立受保护端口资格;既有能力或环境变量不能推导这些版本。 */
1895
+ export interface WechatOnboardingProtocols {
1896
+ readonly wechatGroupBindingProtocol?: 1;
1371
1897
  readonly wechatGroupAuthorProtocol?: 1;
1372
- readonly nativeVoiceObservationDigest?: string;
1373
- readonly nativeVoiceObservation?: NativeVoiceObservation;
1374
- readonly nativeMedia?: NativeRenderedMedia;
1375
- readonly nativeOutboundDisplayDigest?: string;
1376
- readonly nativeOutboundDisplay?: NativeOutboundDisplay;
1377
- readonly nativeQuote?: NativeQuotedDisplay;
1378
- /** Explicit original v2 negotiation; omission retains the old outbound-only source. */
1379
- readonly wechatQuotedHistoryProtocol?: 2;
1380
- readonly contentState?: "UNREAD_RENDERED_CONTENT" | "CONTENT_CAPTURED";
1381
- readonly nativeExecution?: NativeExecutionSourceCorrelation;
1382
- readonly lifecycle?: SourceLifecycleState;
1383
- readonly previousFactRef?: string;
1384
- readonly evidenceDigest?: string;
1385
- readonly observationRef: string;
1386
- readonly factRef: string;
1387
- readonly profileRef: string | null;
1388
- readonly externalMessageRef: string | null;
1389
- readonly sourceVersion: string;
1390
- readonly observedAt: string;
1391
- readonly evidenceKind: "MAIL_CLIENT" | "NATIVE_ACCESSIBILITY" | "RENDERED_OCR" | "HOST_BROWSER_DOM" | "NATIVE_RECORDED" | "ANDROID_UI_AUTOMATION" | "PLATFORM_API";
1392
- readonly coverage: "LINKED_MESSAGE" | "CURRENT_RENDERED_VIEW" | "NATIVE_FACT" | "BOUNDED_API_RESPONSE";
1393
- readonly identityBasis: "PROFILE_MESSAGE_ID" | "NATIVE_STREAM_SEQUENCE" | "HOST_EXTERNAL_REFERENCE" | "PROTOCOL_EXTERNAL_REFERENCE" | "NATIVE_FACT" | "PLATFORM_OBJECT_ID" | "OWNER_SELECTED_VIEW";
1394
- readonly versionBasis: "HOST_REPORTED_VERSION" | "CONTENT_DIGEST" | "VISUAL_DIGEST" | "NATIVE_EVENT_SEQUENCE" | "PROTOCOL_RESPONSE_DIGEST" | "NATIVE_UI_WITNESS_DIGEST" | "PLATFORM_ETAG_OR_DIGEST";
1395
- readonly sourceLocatorRef: string;
1396
- readonly changeTracking: "ON_REREAD_CONTENT_CONFLICT" | "NOT_TRACKED";
1898
+ readonly wechatSourceRebuildProtocol?: 1;
1899
+ readonly wechatTargetContinuityProtocol?: 1;
1900
+ readonly wechatSelectionNavigationProtocol?: 1;
1901
+ readonly nativeBootstrapProtocol?: 1;
1902
+ readonly wechatConversationDiscoveryProtocol?: 1;
1903
+ readonly wechatHomeLocalIdentityProtocol?: 1;
1904
+ readonly wechatBindingContinuityProtocol?: 1;
1905
+ readonly wechatSourceWindowCommitProtocol?: 1;
1397
1906
  }
1398
- export interface CommunicationMessage {
1399
- readonly channel: "EMAIL" | "WECHAT" | "WHATSAPP" | "BROWSER" | "AGENT_PROTOCOL" | "NATIVE" | "SOCIAL";
1400
- readonly direction: "INBOUND" | "OUTBOUND" | "INTERNAL";
1401
- readonly state: string;
1402
- readonly emailThread?: {
1403
- readonly inReplyTo: readonly string[];
1404
- readonly references: readonly string[];
1907
+ export interface CommunicationOwnership {
1908
+ readonly kind: "COMMUNICATION";
1909
+ readonly accountRef: string;
1910
+ readonly profileRef: string;
1911
+ readonly displayName: string;
1912
+ readonly basis: {
1913
+ readonly kind: "REVIEWED_SOCIAL_INITIATION";
1914
+ readonly principalRef: string;
1915
+ readonly operationKey: string;
1916
+ readonly sourceEngagementRef: string;
1917
+ readonly sourceConversationRef: string;
1918
+ readonly sourceFactRef: string;
1919
+ readonly requestRef: string;
1920
+ readonly evidenceDigest: string;
1921
+ } | {
1922
+ readonly kind: "HUMAN_DECLARED";
1923
+ readonly principalRef: string;
1924
+ readonly operationKey: string;
1925
+ } | {
1926
+ readonly kind: "DELEGATED_SOCIAL_OBSERVATION";
1927
+ readonly principalRef: string;
1928
+ readonly operationKey: string;
1929
+ readonly inboxEngagementRef: string;
1930
+ readonly inboxConversationRef: string;
1931
+ readonly sourceFactRef: string;
1932
+ readonly policyRef: string;
1933
+ readonly policyVersion: number;
1934
+ readonly policyDigest: string;
1935
+ } | {
1936
+ readonly kind: "DELEGATED_NATIVE_OBSERVATION";
1937
+ readonly principalRef: string;
1938
+ readonly operationKey: string;
1939
+ readonly dispatchRef: string;
1940
+ readonly reportDigest: string;
1941
+ readonly policyRef: string;
1942
+ readonly policyVersion: number;
1943
+ readonly policyDigest: string;
1405
1944
  };
1406
- readonly eventSequence: string;
1407
- readonly occurredAt: string;
1408
- readonly message: MessageProjection;
1409
- readonly source: SourceObservation;
1410
1945
  }
1411
- export type SourceMessagePart = {
1412
- readonly partRef: string;
1413
- readonly kind: "TEXT";
1414
- readonly text: string;
1415
- } | {
1416
- readonly partRef: string;
1417
- readonly kind: "FILE" | "IMAGE" | "AUDIO" | "VIDEO";
1418
- readonly sourceAttachmentRef: string;
1419
- readonly filename: string;
1420
- readonly mediaType: string;
1421
- readonly byteLength: number;
1422
- readonly assetRef?: string;
1423
- readonly digest?: string;
1424
- readonly sourceVersion?: string;
1425
- };
1426
- /** 出站资产没有外部来源部件 ID;不以 AssetRef 冒充 sourceAttachmentRef。 */
1427
- export type AssetMessagePart = MessageAttachment & {
1428
- readonly partRef: string;
1429
- readonly kind: "FILE" | "AUDIO" | "IMAGE" | "VIDEO";
1430
- readonly sourceAttachmentRef?: never;
1431
- };
1432
- export type MessagePart = SourceMessagePart | AssetMessagePart;
1433
1946
  export interface ProspectEngagementBasis {
1434
1947
  readonly whyFit: string;
1435
1948
  readonly whyNow: string;
@@ -1483,307 +1996,475 @@ export interface NextAction {
1483
1996
  readonly policyRequirements?: readonly string[];
1484
1997
  readonly missingPrerequisites?: readonly string[];
1485
1998
  }
1486
- /** Native UI observation only. Neither value attests network delivery or a physical request. */
1487
- export interface NativeOutboundDisplay {
1488
- readonly schemaVersion: 1;
1489
- readonly state: "FAILED" | "NO_FAILURE_INDICATOR";
1490
- readonly basis: "WECHAT_NATIVE_OUTBOUND_TEXT_ROW";
1491
- readonly delivery: "NOT_ATTESTED";
1999
+ export interface WechatChannelsFeedObservation {
2000
+ readonly protocol: 1;
2001
+ readonly authorIdentity: "NOT_ATTESTED";
2002
+ readonly contentIdentity: "NOT_ATTESTED";
2003
+ readonly directReplyTarget: "NOT_ATTESTED";
2004
+ readonly ownReaction: "NOT_ATTESTED";
2005
+ readonly following: "NOT_ATTESTED";
2006
+ readonly visibleText: readonly {
2007
+ readonly captureKey: string;
2008
+ readonly text: string;
2009
+ }[];
2010
+ readonly dynamicRead: {
2011
+ readonly basis: "EXACT_FINDER_PROGRESS_ONLY";
2012
+ readonly firstObservedAt: string;
2013
+ readonly secondObservedAt: string;
2014
+ readonly firstRawDigest: string;
2015
+ readonly secondRawDigest: string;
2016
+ readonly firstTreeDigest: string;
2017
+ readonly secondTreeDigest: string;
2018
+ readonly comparisonDigest: string;
2019
+ readonly firstValue: string;
2020
+ readonly secondValue: string;
2021
+ };
1492
2022
  }
1493
- export interface NativeOutboundDisplayWitness {
2023
+ export type WechatObservationIntent = "CURRENT_VIEW" | "REFRESH_CURRENT_OFFICIAL_ARTICLE";
2024
+ export type WechatOfficialPage = "OFFICIAL_DIRECTORY" | "OFFICIAL_ACCOUNT_LIST" | "OFFICIAL_ACCOUNT_HOME" | "OFFICIAL_ACCOUNT_PROFILE" | "OFFICIAL_ARTICLE" | "OFFICIAL_ARTICLE_FAILED" | "OFFICIAL_ARTICLE_COMMENTS" | "OFFICIAL_ARTICLE_UNEXPOSED";
2025
+ export type WechatOfficialReason = "CURRENT_VIEW_OBSERVED" | "ARTICLE_DNS_FAILED" | "ARTICLE_LOAD_FAILED" | "ARTICLE_LOADING" | "ARTICLE_CONTENT_NOT_EXPOSED" | "OFFICIAL_STRUCTURE_UNSUPPORTED" | "OFFICIAL_SAFE_DOMAIN_NOT_PROVEN";
2026
+ export interface WechatOfficialRow {
2027
+ readonly captureKey: string;
2028
+ readonly kind: "ACCOUNT_LABEL" | "NEWS_PREVIEW" | "ARTICLE_PREVIEW" | "SECTION_LABEL" | "PROFILE_FIELD" | "TEXT_BLOCK" | "INLINE_FRAGMENT" | "INTERACTION_LABEL" | "COMMENT_COMPOSITE";
2029
+ readonly text: string;
2030
+ readonly label: string | null;
2031
+ readonly timeLabel: string | null;
2032
+ readonly parentKey: string | null;
2033
+ readonly visibility: "FULLY_VISIBLE" | "CLIPPED";
2034
+ readonly partial: boolean;
2035
+ readonly rowNumber: number | null;
2036
+ }
2037
+ export interface WechatOfficialObservation {
2038
+ readonly observationIntent: WechatObservationIntent;
2039
+ readonly viewer: "NOT_ATTESTED";
2040
+ readonly status: "OBSERVED" | "GAP";
2041
+ readonly reasonCode: WechatOfficialReason;
2042
+ readonly safeDomain: "mp.weixin.qq.com" | null;
2043
+ readonly refreshPerformed: boolean;
2044
+ readonly accountSelection: "NOT_ATTESTED";
2045
+ readonly accountLabel: string | null;
2046
+ readonly domainExposure: "EXPOSED" | "NOT_EXPOSED";
2047
+ readonly refreshQualification: "NOT_REQUESTED" | "SAFE_DOMAIN_NATIVE_MENU" | "OFFICIAL_ACCOUNT_NATIVE_MENU";
2048
+ readonly article: {
2049
+ readonly title: string | null;
2050
+ readonly byline: string | null;
2051
+ readonly publisherLabel: string | null;
2052
+ readonly publishedLabel: string | null;
2053
+ };
2054
+ readonly identityClue: {
2055
+ readonly namespace: "OFFICIAL_ACCOUNT";
2056
+ readonly clueKind: "OFFICIAL_ACCOUNT_ID";
2057
+ readonly value: string;
2058
+ readonly basis: "VISIBLE_PROFILE_FIELD";
2059
+ readonly verification: "UI_DISPLAY_ONLY";
2060
+ } | null;
2061
+ readonly rows: readonly WechatOfficialRow[];
2062
+ readonly commentCountLabel: string | null;
2063
+ readonly coverage: {
2064
+ readonly fullText: "NOT_ATTESTED";
2065
+ readonly comments: "NOT_ATTESTED";
2066
+ readonly excludedUnderlay: boolean;
2067
+ readonly excludedOffscreen: boolean;
2068
+ };
2069
+ }
2070
+ /** A transient display observation, never a SocialContent, Participant or write target. */
2071
+ export interface WechatSocialWindowContent {
2072
+ readonly captureKey: string;
2073
+ readonly kind: "MOMENT_CARD" | "CHANNELS_SNIPPET" | "CHANNELS_AUTHOR_DESCRIPTION";
2074
+ readonly authorLabel: string | null;
2075
+ readonly text: string;
2076
+ readonly timeLabel: string | null;
2077
+ readonly expandable: boolean;
2078
+ readonly partial: boolean;
2079
+ readonly plane: "FOREGROUND" | "UNDERLAY";
2080
+ readonly visibleMediaItems: number;
2081
+ readonly declaredMediaTotal: number | null;
2082
+ }
2083
+ export interface WechatSocialWindowComment {
2084
+ readonly captureKey: string;
2085
+ readonly kind: "ROOT_COMMENT" | "THREAD_REPLY";
2086
+ readonly authorLabel: string;
2087
+ readonly text: string;
2088
+ readonly timeLabel: string;
2089
+ readonly authorBadgeObserved: boolean;
2090
+ readonly threadRootKey: string | null;
2091
+ readonly relationBasis: "ROOT_ROW_STRUCTURE" | "VISIBLE_GROUPED_REPLY_ROW";
2092
+ readonly directReplyTarget: "NOT_ATTESTED";
2093
+ }
2094
+ export interface WechatSocialRenderedWindow {
2095
+ /** v1 remains the original feed/Channels/Works shape; v2 is the closed current Moments detail preview. */
2096
+ readonly schemaVersion: 1 | 2 | 3 | 4;
2097
+ readonly channelsFeed?: WechatChannelsFeedObservation;
2098
+ readonly official?: WechatOfficialObservation;
1494
2099
  readonly observationRef: string;
1495
2100
  readonly observedAt: string;
2101
+ readonly page: WechatOfficialPage | "MOMENTS_FEED" | "MOMENTS_DETAIL" | "CHANNELS_COMMENTS" | "CHANNELS_FEED" | "WORKS_ENTRY" | "WORKS_MEDIA_PERMISSION_NOTICE" | "WORKS_TEXT_COVER_PREVIEW";
2102
+ readonly identityBasis: "UNBOUND_UI_LABELS_ONLY";
2103
+ readonly referenceLifetime: "CURRENT_OBSERVATION_ONLY";
2104
+ readonly coverage: "BOUNDED_CURRENT_RENDERED_VIEW";
2105
+ readonly completeness: "NOT_ATTESTED";
2106
+ readonly publicationAudience: "NOT_ATTESTED";
2107
+ readonly businessActionsPermitted: false;
2108
+ readonly partial: boolean;
2109
+ readonly truncated: boolean;
2110
+ readonly commentsCoverage: "NOT_OBSERVED" | "CURRENT_VISIBLE_ROWS_ONLY";
2111
+ readonly commentCountLabel: string | null;
2112
+ readonly content: readonly WechatSocialWindowContent[];
2113
+ readonly comments: readonly WechatSocialWindowComment[];
2114
+ readonly partialRows: readonly {
2115
+ readonly captureKey: string;
2116
+ readonly reasonCode: "ANDROID_WECHAT_SOCIAL_MOMENT_CONTINUES_OUTSIDE_VIEW" | "ANDROID_WECHAT_SOCIAL_COMMENT_BODY_NOT_RENDERED";
2117
+ }[];
2118
+ readonly notices: readonly string[];
1496
2119
  }
1497
- export interface NativeOutboundDisplayState {
1498
- readonly schemaVersion: 1;
1499
- readonly latest: NativeOutboundDisplayWitness & {
1500
- readonly state: NativeOutboundDisplay["state"] | "UNQUALIFIED";
2120
+ /** Added only to the existing authorized WeChat Social query; no independent submission authority. */
2121
+ export interface WechatSocialReadAttemptView {
2122
+ readonly dispatchRef: string;
2123
+ readonly state: "QUEUED" | "CLAIMED" | "RESOURCE_READY" | "RUNNING" | "RESULT_RECORDED" | "NEEDS_RECONCILIATION" | "ABORTED";
2124
+ readonly physicalIdle: boolean;
2125
+ readonly createdAt: string;
2126
+ readonly reasonCode?: string;
2127
+ readonly renderedObservation?: {
2128
+ readonly observationRef: string;
2129
+ readonly observedAt: string;
2130
+ readonly evidenceDigest: string;
2131
+ readonly renderedWindow: WechatSocialRenderedWindow;
1501
2132
  };
1502
- readonly lastFailure?: NativeOutboundDisplayWitness;
1503
2133
  }
1504
- export type NativeSourceBinding = Pick<NativeInteractionSource, "channel" | "profileRef" | "accountRef" | "hostRef" | "hostBindingDigest" | "routeRef" | "routeAssociationVersion" | "targetRef" | "conversationRevision" | "membershipDigest" | "wechatContactParticipantRef" | "wechatContactExternalRef" | "wechatContactIdentityVersion" | "wechatLocalIdentity">;
1505
- /** Client representation only; neither original audio bytes nor an AX transcript. */
1506
- export interface NativeVoiceObservation {
1507
- readonly schemaVersion: 1;
1508
- readonly durationSeconds: number;
1509
- readonly playbackLabel: "UNPLAYED" | "NOT_EXPOSED";
1510
- readonly playbackCompletion: "NOT_ATTESTED";
1511
- readonly clientTranscript: "COLLAPSED" | "RENDERED_NOT_ACCESSIBLE";
1512
- readonly transcriptText: "NOT_EXPOSED";
1513
- readonly originalAudio: "NOT_ACQUIRED";
2134
+ export type WechatSocialSurface = "MOMENTS" | "CHANNELS" | "OFFICIAL_ARTICLE" | "WORKS";
2135
+ export interface WechatSocialContentScope {
2136
+ readonly platform: "WECHAT";
2137
+ readonly surface: WechatSocialSurface;
2138
+ /** 原 Owner 登记的视图内定位引用,不是昵称摘要或永久平台对象 ID。 */
2139
+ readonly rootRef: string;
2140
+ readonly audience: "CURRENT_ACCOUNT_VISIBLE" | "FRIENDS" | "MUTUAL_FRIENDS" | "SELECTED_PARTICIPANTS" | "SELF_ONLY";
2141
+ readonly audienceParticipantRefs?: readonly string[];
1514
2142
  }
1515
- export type SourceChangeKind = "UNCHANGED" | "CONTENT_CONFLICT" | "CONTENT_REVISED" | "CONTENT_RECONCILED" | "CONTENT_CAPTURED" | "DELETED" | "RETRACTED" | "RESTORED" | "NOT_VISIBLE" | "NOT_SUPPORTED" | "HISTORICAL_RECORDED" | "NATIVE_DISPLAY_OBSERVED" | "NATIVE_VOICE_OBSERVED";
1516
- export interface SourceLifecycleState {
1517
- readonly nativeVoiceObservationDigest?: string;
1518
- readonly nativeVoiceObservedAt?: string;
1519
- readonly nativeVoiceObservation?: NativeVoiceObservation;
1520
- readonly nativeOutboundDisplay?: NativeOutboundDisplayState;
1521
- readonly nativeExecutionFactRef?: string;
1522
- readonly headFactRef: string;
1523
- readonly contentFactRef: string;
1524
- readonly revision: number;
1525
- readonly availability: "AVAILABLE" | "UNAVAILABLE" | "UNRESOLVED";
1526
- readonly changeKind: SourceChangeKind | "LEGACY_OBSERVATION";
1527
- readonly reasonCode: string;
1528
- readonly observedAt: string;
1529
- readonly candidateFactRef: string | null;
1530
- readonly lastInspectionRef: string | null;
2143
+ export interface WechatSocialAuthorEvidence {
2144
+ readonly identitySpace: "PERSONAL_WECHAT" | "CHANNELS" | "OFFICIAL_ACCOUNT" | "WORKS";
2145
+ readonly externalRef: string;
2146
+ readonly evidenceDigest: string;
2147
+ /** Explicit current Owner clue snapshot; never a platform authentication claim. */
2148
+ readonly ownerIdentity?: {
2149
+ readonly schemaVersion: 1;
2150
+ readonly identityVersion: number;
2151
+ readonly externalIdentityVersion: number;
2152
+ readonly clueRef: string;
2153
+ };
2154
+ }
2155
+ /** 原 Owner 内部端口的受信读取依据;公共请求不能提交此 authority。 */
2156
+ export interface SocialRenderedReadAuthority {
2157
+ readonly tenantId: string;
2158
+ readonly engagementRef: string;
2159
+ readonly conversationRef: string;
2160
+ readonly profileRef: string;
2161
+ readonly accountRef: string;
2162
+ readonly hostRef: string;
2163
+ readonly hostBindingDigest: string;
2164
+ readonly runtimeKind: "MOBILE";
2165
+ readonly conversationRevision: number;
2166
+ readonly membershipDigest: string;
2167
+ }
2168
+ export interface WechatSocialVisibility {
2169
+ readonly basis: "CURRENT_ACCOUNT_RENDERED_VIEW";
2170
+ readonly comments: "CURRENT_VISIBLE_ONLY" | "MUTUAL_FRIENDS_VISIBLE";
2171
+ /** 看见内容或部分共同好友评论不证明发表时的完整受众。 */
2172
+ readonly publicationAudience: "NOT_ATTESTED";
2173
+ }
2174
+ export interface WechatSocialReadEvidence {
2175
+ readonly schemaVersion: 1;
2176
+ readonly observationRef: string;
2177
+ readonly binding: SocialRenderedReadAuthority;
2178
+ readonly evidenceKind: "ANDROID_UI_AUTOMATION";
2179
+ readonly targetIdentity: "OWNER_SELECTED_VIEW";
2180
+ readonly coverage: "BOUNDED_CURRENT_RENDERED_VIEW";
2181
+ readonly contentCoverage: "RENDERED_TEXT_AND_STRUCTURE_ONLY";
2182
+ readonly evidenceDigest: string;
2183
+ readonly visibility: WechatSocialVisibility;
1531
2184
  }
1532
- export interface SourceBasis {
1533
- readonly channel: CommunicationMessage["channel"];
1534
- readonly conversationRef: string;
1535
- readonly messageRef: string;
1536
- readonly headFactRef: string;
2185
+ export interface SocialRegistrationIdentity {
2186
+ readonly participantRef: string;
2187
+ readonly identityVersion: number;
2188
+ readonly externalIdentityVersion: number;
2189
+ readonly clueRef: string;
1537
2190
  }
1538
- export interface DeliveredEmailAttachment extends MessageAttachment {
1539
- readonly remoteAttachmentRef: string;
2191
+ export interface SocialRegistrationSource {
2192
+ readonly dispatchRef: string;
2193
+ readonly observationRef: string;
2194
+ readonly captureKey: string;
1540
2195
  }
1541
- export type EmailMessageStatus = "DRAFT" | "APPROVED" | "REJECTED" | "QUEUED" | "CANCELLED" | "ACCEPTED" | "UNCERTAIN" | "FAILED";
1542
- /** 原 Work 的提交依据;与内容生成来源区分,外部命令不能自行声明。 */
1543
- export interface EmailWorkSource {
1544
- readonly workRef: string;
1545
- readonly kind: "REPLY" | "FOLLOW_UP" | "CONTACT";
1546
- readonly taskOrigin?: TaskCommunicationOrigin;
1547
- readonly communicationPolicyBasis?: CommunicationPolicyBasis;
2196
+ export interface SocialTargetPreview {
2197
+ readonly schemaVersion: 1;
2198
+ readonly registrationRef: string;
2199
+ readonly previewRef: string;
2200
+ readonly observedAt: string;
2201
+ readonly expiresAt: string;
2202
+ readonly evidenceDigest: string;
2203
+ readonly renderedWindow: WechatSocialRenderedWindow;
1548
2204
  }
1549
- export interface EmailMessageProjection extends EmailRichContent {
1550
- readonly taskOrigin?: TaskCommunicationOrigin;
1551
- readonly workSource?: EmailWorkSource;
1552
- readonly sourceBasis?: SourceBasis;
1553
- readonly tenantId: string;
1554
- readonly engagementRef: string;
1555
- readonly messageRef: string;
1556
- readonly conversationRef?: string;
1557
- readonly version: number;
1558
- readonly contentDigest: string;
1559
- readonly routeRef: string;
1560
- readonly recipientAddress: string;
1561
- readonly senderParticipantRef: string;
1562
- readonly recipientParticipantRef: string;
1563
- readonly subject: string;
1564
- readonly text: string;
1565
- readonly replyToMessageRef?: string;
1566
- readonly followUpOfMessageRef?: string;
1567
- readonly followUpPlanVersion?: number;
1568
- readonly attachments?: readonly MessageAttachment[];
1569
- readonly deliveredAttachments?: readonly DeliveredEmailAttachment[];
1570
- readonly status: EmailMessageStatus;
1571
- readonly createdAt: string;
1572
- readonly updatedAt: string;
1573
- readonly reviewedBy?: string;
1574
- readonly reviewerKind?: "HUMAN";
1575
- readonly approvalExpiresAt?: string;
1576
- readonly profileRef?: string;
1577
- readonly sendRequestRef?: string;
1578
- readonly correlationRef?: string;
1579
- readonly internetMessageId?: string;
1580
- readonly observedAt?: string;
1581
- readonly followUpDueAt?: string;
2205
+ export interface SocialTargetQualified {
2206
+ readonly schemaVersion: 1;
2207
+ readonly registrationRef: string;
2208
+ readonly state: "QUALIFIED";
2209
+ readonly previewRef: string;
2210
+ readonly previewDigest: string;
2211
+ readonly captureKey: string;
2212
+ readonly selectionReceiptRef: string;
2213
+ readonly frame: WechatSocialReadFrame;
2214
+ readonly authorObservation: SocialRegistrationIdentity & {
2215
+ readonly wechatId: string;
2216
+ readonly observedAt: string;
2217
+ readonly evidenceDigest: string;
2218
+ readonly basis: "CURRENT_DETAIL_AUTHOR_PROFILE_RETURN";
2219
+ readonly verification: "VISIBLE_UI_ID_MATCH";
2220
+ };
2221
+ readonly roundTrip: {
2222
+ readonly enteredAt: string;
2223
+ readonly returnedAt: string;
2224
+ readonly evidenceDigest: string;
2225
+ readonly basis: "CURRENT_DETAIL_RETURN";
2226
+ };
2227
+ readonly viewer: "NOT_ATTESTED";
1582
2228
  }
1583
- /** 原文本消息模型;旧 WechatMessage 继续作为兼容名称。 */
1584
- export type TextMessageStatus = "DRAFT" | "APPROVED" | "REJECTED" | "QUEUED" | "CLIENT_VISIBLE" | "UNCERTAIN" | "FAILED" | "CANCELLED";
1585
- export interface TaskCommunicationOrigin {
1586
- readonly handoffRef?: string;
1587
- readonly workRef: string;
1588
- readonly invocationRef: string;
1589
- readonly callId: string;
1590
- readonly inputDigest: string;
2229
+ export interface SocialRegistrationMetadata {
2230
+ readonly protocol: 1;
2231
+ readonly identityBasis: "UI_INSTANCE";
2232
+ readonly registrationRef: string;
2233
+ readonly source: SocialRegistrationSource;
2234
+ readonly sourceRelation: "CURRENT_INSTANCE_RECONFIRMED";
2235
+ readonly previewRef: string;
2236
+ readonly previewDigest: string;
2237
+ readonly selectionReceiptRef: string;
2238
+ readonly author: SocialRegistrationIdentity;
2239
+ readonly local: SocialRegistrationIdentity;
2240
+ readonly authorObservation: SocialTargetQualified["authorObservation"];
2241
+ readonly roundTrip: SocialTargetQualified["roundTrip"];
2242
+ readonly viewer: "NOT_ATTESTED";
2243
+ readonly contentCoverage: "VISIBLE_SHARE_TITLE_ONLY";
2244
+ readonly writeEligible: false;
1591
2245
  }
1592
- export interface TextChannelMessage {
1593
- readonly attachments?: readonly MessageAttachment[];
1594
- readonly taskOrigin?: TaskCommunicationOrigin;
1595
- readonly communicationPolicyBasis?: CommunicationPolicyBasis;
1596
- readonly channel?: "WECHAT" | "WHATSAPP" | "SOCIAL";
1597
- readonly nativeBinding?: NativeSourceBinding;
1598
- readonly senderParticipantRef?: string;
1599
- readonly recipientParticipantRefs?: readonly string[];
1600
- readonly sourceBasis?: SourceBasis;
1601
- readonly humanIntent?: {
1602
- readonly kind: "HUMAN";
1603
- readonly authoredBy: string;
1604
- readonly contextDigest: string;
1605
- };
1606
- readonly conversationRef?: string;
1607
- readonly tenantId: string;
2246
+ export interface SocialRegistrationContext {
2247
+ readonly schemaVersion: 1;
1608
2248
  readonly engagementRef: string;
1609
- readonly messageRef: string;
2249
+ readonly conversationRef: string;
1610
2250
  readonly profileRef: string;
1611
- readonly version: number;
1612
- readonly text: string;
1613
- readonly contentDigest: string;
1614
- readonly status: TextMessageStatus;
1615
- readonly createdBy: string;
2251
+ readonly accountRef: string;
2252
+ readonly conversationRevision: number;
2253
+ readonly membershipDigest: string;
2254
+ readonly local: SocialRegistrationIdentity | null;
2255
+ readonly authors: readonly (SocialRegistrationIdentity & {
2256
+ readonly label: string;
2257
+ })[];
2258
+ readonly eligibility: "ELIGIBLE" | "BLOCKED";
2259
+ readonly reasonCodes: readonly ("LOCAL_CURRENT_SLOT_REQUIRED" | "AUTHOR_CURRENT_SLOT_REQUIRED" | "BOUNDED_MOMENTS_VIEW_REQUIRED" | "TARGET_PROTOCOL_REQUIRED")[];
2260
+ }
2261
+ export interface SocialTargetRegistrationView {
2262
+ readonly schemaVersion: 1;
2263
+ readonly registrationRef: string;
1616
2264
  readonly createdAt: string;
1617
- readonly updatedAt: string;
1618
- readonly replyToMessageRef?: string;
1619
- readonly followUpOfMessageRef?: string;
1620
- readonly followUpPlanVersion?: number;
1621
- readonly reviewRef?: string;
1622
- readonly reviewedBy?: string;
1623
- readonly approvalExpiresAt?: string;
1624
- readonly reviewSourceRef?: string;
1625
- readonly authorizationBasis?: "HUMAN_MESSAGE_REVIEW" | "HUMAN_CONVERSATION_DELEGATION" | "ENGAGEMENT_CONTROL";
1626
- readonly authorizationControlVersion?: number;
1627
- readonly requestRef?: string;
1628
- readonly hostEvidenceDigest?: string;
2265
+ readonly state: string;
2266
+ readonly physicalIdle: boolean;
2267
+ readonly phase: "QUEUED" | "WAITING_CONFIRMATION" | "QUALIFYING" | "REGISTERED" | "GAP" | "UNKNOWN";
2268
+ readonly expiresAt: string | null;
2269
+ readonly reasonCode?: string;
2270
+ readonly preview?: SocialTargetPreview & {
2271
+ readonly previewDigest: string;
2272
+ };
2273
+ readonly confirmationRecorded: boolean;
2274
+ readonly registered?: {
2275
+ readonly conversationRef: string;
2276
+ readonly rootRef: string;
2277
+ readonly routeRef: string;
2278
+ readonly receipt: ActionReceipt;
2279
+ };
1629
2280
  }
1630
- export type CommunicationChannel = "EMAIL" | "WECHAT" | "WHATSAPP" | "SOCIAL";
1631
- declare const DESKTOP_ACTION_KINDS: readonly [
1632
- "MOMENTS_PUBLISH",
1633
- "MOMENTS_COMMENT",
1634
- "MOMENTS_REPLY",
1635
- "MOMENTS_LIKE",
1636
- "MOMENTS_UNLIKE",
1637
- "MOMENTS_DELETE",
1638
- "MOMENTS_COMMENT_DELETE",
1639
- "CHANNELS_PUBLISH",
1640
- "CHANNELS_COMMENT",
1641
- "CHANNELS_REPLY",
1642
- "CHANNELS_LIKE",
1643
- "CHANNELS_UNLIKE",
1644
- "CHANNELS_COMMENT_DELETE",
1645
- "WORKS_PUBLISH",
1646
- "WORKS_COMMENT",
1647
- "WORKS_REPLY",
1648
- "WORKS_LIKE",
1649
- "WORKS_UNLIKE",
1650
- "WORKS_DELETE",
1651
- "WORKS_COMMENT_DELETE",
1652
- "CONTACT_REMARK",
1653
- "CONTACT_DELETE",
1654
- "GROUP_RENAME",
1655
- "GROUP_ANNOUNCEMENT",
1656
- "GROUP_LEAVE",
1657
- "GROUP_MUTE",
1658
- "GROUP_UNMUTE",
1659
- "GROUP_PIN",
1660
- "GROUP_UNPIN",
1661
- "CONTACT_REQUEST",
1662
- "CONTACT_ACCEPT",
1663
- "GROUP_CREATE",
1664
- "GROUP_INVITE",
1665
- "MESSAGE_FORWARD",
1666
- "CONTACT_SHARE",
1667
- "MOMENTS_SHARE",
1668
- "CHANNELS_SHARE",
1669
- "WORKS_SHARE"
1670
- ];
1671
- export type DesktopActionKind = typeof DESKTOP_ACTION_KINDS[number];
1672
- declare const DESKTOP_NATIVE_PRESENTATIONS: readonly [
1673
- "IMAGE",
1674
- "VIDEO",
1675
- "VOICE_NOTE"
1676
- ];
1677
- export type DesktopNativePresentation = typeof DESKTOP_NATIVE_PRESENTATIONS[number];
1678
- declare const EXECUTION_NODE_PROTOCOL = "ne-execution-node/1.0";
1679
- declare const EXECUTION_NODE_MODULE = "android.whatsapp.read";
1680
- export interface NodeResourceAdvertisement extends WechatOnboardingProtocols {
1681
- readonly weixinOfficialReadProtocol?: 1;
1682
- readonly executionRequirements?: NodeExecutionRequirements;
1683
- readonly desktopTaskContextProtocol?: 1;
1684
- readonly desktopTaskNavigationProtocol?: 1;
1685
- readonly desktopConversationLocateProtocol?: 1;
1686
- readonly desktopConversationResolveProtocol?: 1;
1687
- readonly desktopConversationDiscoveryProtocol?: 1;
1688
- readonly desktopConversationSelectProtocol?: 1;
1689
- readonly desktopConversationBrowseProtocol?: 1;
1690
- readonly nativeTaskNavigationProtocol?: 1;
1691
- readonly nativeCancelledDraftProtocol?: 1;
1692
- readonly nativeMediaSendProtocol?: 1;
1693
- /** 固定 Facebook Profile 观察与人工恢复协议,不授予营销写入。 */
1694
- readonly browserProfileProtocol?: 1;
1695
- readonly browserProfileTaskProtocol?: 1;
1696
- readonly browserProfileContentProtocol?: 1;
1697
- readonly browserProfilePostsProtocol?: 1;
1698
- readonly browserProfilePostDetailProtocol?: 1;
1699
- readonly browserProfileCommentsProtocol?: 1;
1700
- readonly browserProfileCurrentCommentsProtocol?: 1;
1701
- readonly browserProfileSearchProtocol?: 1;
1702
- readonly browserProfileNavigationProtocol?: 1;
1703
- readonly facebookReplyProtocol?: 1;
1704
- readonly browserProfileActivityProtocol?: 1;
1705
- readonly nativeRenderedWindowBoundaryProtocol?: 1;
1706
- readonly nativeRenderedMediaProtocol?: 1;
1707
- localResourceDigest: string;
1708
- environmentGeneration: number;
1709
- hostRef: string;
2281
+ export type SocialPublisher = SocialRegistrationIdentity & {
2282
+ readonly wechatId: string;
2283
+ };
2284
+ export type XiaohongshuActivityView = BrowserAccountActivityView;
2285
+ export interface SocialAutonomy extends WechatAutonomy {
2286
+ readonly expiresAt: string;
2287
+ readonly maxReplies: number;
2288
+ readonly factRef: string;
2289
+ }
2290
+ export interface XiaohongshuScheduleHistory {
2291
+ readonly coverage: "RETAINED_OWNER_EXACT_OBJECT_ASSOCIATIONS";
2292
+ readonly platformCurrentness: "NOT_ATTESTED";
2293
+ readonly truncated: boolean;
2294
+ /** SQL history uses original outbox sequence, newest first, independent of observed clock. */
2295
+ readonly items: readonly {
2296
+ readonly messageRef: string;
2297
+ readonly requestRef: string | null;
2298
+ readonly kind: "PUBLISH" | "SCHEDULE_CANCEL" | "SCHEDULE_RESCHEDULE";
2299
+ readonly status: string;
2300
+ readonly approvedScheduledAt: string | null;
2301
+ readonly objectRef: string | null;
2302
+ readonly originalPublicationRequestRef: string | null;
2303
+ readonly association: "EXACT_OBJECT" | "MISSING_PROOF" | "CONFLICT";
2304
+ readonly currentObservation: {
2305
+ readonly factRef: string;
2306
+ readonly observedAt: string;
2307
+ readonly state: "PENDING" | "CANCELLED" | "PUBLISHED";
2308
+ readonly scheduledAt: string | null;
2309
+ } | null;
2310
+ }[];
2311
+ }
2312
+ export interface FacebookReplyWaiting {
2313
+ kind: "ACCOUNT_PAUSED" | "ACCOUNT_BUDGET" | "NODE_UNAVAILABLE" | "NODE_POLICY" | "CLIENT_RELAY" | "PLACEMENT_CHANGED" | "RESOURCE_BUSY" | "PHYSICAL_RECOVERY";
2314
+ reasonCode: string;
2315
+ nextCheckAt: string | null;
2316
+ effect: "NONE";
2317
+ }
2318
+ export type SocialApiPlatform = "YOUTUBE" | "TIKTOK";
2319
+ export interface SocialApiContentScope {
2320
+ platform: SocialApiPlatform;
2321
+ rootRef: string;
2322
+ audience: "PUBLIC" | "ACCOUNT_OWNED";
2323
+ }
2324
+ export type SocialContentScope = SocialApiContentScope | WechatSocialContentScope | XiaohongshuScope | BrowserSocialScope | FacebookSocialScope;
2325
+ export interface SocialContentRecord {
2326
+ contentRef: string;
2327
+ rootRef: string;
2328
+ parentRef: string | null;
2329
+ threadRef?: string;
2330
+ authorRef: string;
2331
+ text: string;
2332
+ kind: "POST" | "COMMENT" | "REPLY" | "MESSAGE" | "ACCOUNT" | "THREAD" | "NOTIFICATION" | "OPTION";
2333
+ xiaohongshu?: XiaohongshuContentEvidence;
2334
+ browser?: BrowserSocialEvidence;
2335
+ facebook?: FacebookPostContent | FacebookCommentContent;
2336
+ sourceVersion: string;
2337
+ contentDigest: string;
2338
+ observedAt: string;
2339
+ /** 仅原生微信内容使用,authorRef 指向原 Participant;API 作者引用原样保留。 */
2340
+ wechatAuthor?: WechatSocialAuthorEvidence;
2341
+ replyToAuthorRef?: string;
2342
+ }
2343
+ export interface SocialReadFrameBase {
1710
2344
  profileRef: string;
1711
- accountRef: string;
1712
- sessionRef: string;
1713
- capabilityRef: string;
1714
- hostBindingDigest: string;
1715
- application: "weixin" | "whatsapp" | "youtube" | "tiktok" | "wechat" | "browser" | "mail" | "xiaohongshu" | "douyin";
1716
- externalAccountRef?: string;
1717
- bridgeBindingJson?: string;
1718
- bridgeRuntimeKind?: "DESKTOP" | "BROWSER" | "API" | "MAIL";
1719
- mailConfigurationDigest?: string;
1720
- moduleId: typeof EXECUTION_NODE_MODULE | "android.whatsapp.message" | "android.wechat.read" | "android.wechat.message" | "api.weixin" | "api.youtube" | "api.tiktok" | "bridge.wechat" | "bridge.browser" | "bridge.mail" | "browser.xiaohongshu" | "browser.douyin" | "browser.tiktok";
1721
- moduleVersion: "1.0.0";
1722
- moduleDigest: string;
1723
- enabled: boolean;
1724
- supportsDisplayOff: boolean;
1725
- supportsLocked: boolean;
1726
- supportsNativeCapture?: boolean;
1727
- supportsNativeCaption?: boolean;
1728
- supportsNativeBytes?: boolean;
1729
- supportsSourceBytes?: boolean;
1730
- browserSocialProtocol?: 1;
1731
- browserSocialDirectMediaKinds?: readonly ("IMAGE" | "VIDEO")[];
1732
- browserSocialActions?: readonly ("READ" | "COMMENT" | "REPLY" | "DIRECT" | "PUBLISH" | "SCHEDULE_CANCEL" | "SCHEDULE_RESCHEDULE")[];
1733
- xiaohongshuDirectMediaProtocol?: 1;
1734
- xiaohongshuDirectMediaKinds?: readonly ("IMAGE" | "VIDEO" | "VOICE_NOTE")[];
1735
- desktopFileSendProtocol?: 1;
1736
- nativeWechatMultiSendProtocol?: 1;
1737
- wechatPhysicalRecoveryProtocol?: 1;
1738
- desktopMediaPresentations?: readonly DesktopNativePresentation[];
1739
- desktopActionProtocol?: 1;
1740
- desktopActionKinds?: readonly DesktopActionKind[];
1741
- /** Actual protected host describe/probe negotiated personal WeChat ID verification v1. */
1742
- supportsWechatContactIdentity?: boolean;
1743
- wechatLocalIdentityProtocol?: 1;
1744
- /** Independent complete PERSONAL LOCAL5+CONTACT3 protocol; never inferred from the GROUP capability. */
1745
- wechatPersonalLocalIdentityProtocol?: 1;
1746
- /** Actual protected host describe/probe negotiated the bounded unbound Social read protocol v1. */
1747
- supportsWechatSocialRead?: boolean;
1748
- /** Absent preserves the legacy current-page-only v1 advertisement. */
1749
- wechatSocialReadProtocol?: 2;
1750
- wechatSocialTargetRegistrationProtocol?: 1;
1751
- wechatMomentsPublicationProtocol?: 1;
1752
- wechatOfficialReadProtocol?: 1;
1753
- wechatChannelsFeedReadProtocol?: 1;
1754
- nativeVoiceObservationProtocol?: 1 | 2;
1755
- wechatOutboundDisplayProtocol?: 1;
1756
- wechatQuotedHistoryProtocol?: 1 | 2;
2345
+ externalAccountRef: string;
2346
+ observedAt: string;
2347
+ contents: readonly SocialContentRecord[];
2348
+ completeness: "NOT_ATTESTED";
1757
2349
  }
1758
- export interface NodeProof {
1759
- protocol: typeof EXECUTION_NODE_PROTOCOL;
2350
+ export interface WechatSocialReadFrame extends SocialReadFrameBase, WechatSocialReadEvidence {
2351
+ scope: WechatSocialContentScope;
2352
+ readonly renderedWindow?: WechatSocialRenderedWindow;
2353
+ }
2354
+ export interface SocialOperationView {
1760
2355
  tenantId: string;
1761
- serviceOrigin: string;
1762
- installationRef: string;
1763
- keyFingerprint: string;
1764
- nodeRef: string | null;
1765
- nodeGeneration: number;
1766
- nodeSessionRef: string | null;
1767
- sessionGeneration: number;
1768
- requestNonce: string;
1769
- bodyDigest: string;
1770
- signature: string;
2356
+ profileRef: string;
2357
+ engagementRef: string;
2358
+ conversationRef: string;
2359
+ dispatchRef: string;
2360
+ action: string;
2361
+ state: string;
2362
+ physicalIdle: boolean;
2363
+ requestRef: string | null;
2364
+ reasonCode: string | null;
2365
+ browserActivity?: XiaohongshuActivityView;
2366
+ installedCapabilities?: BrowserInstalledCapabilities;
2367
+ browserRead?: BrowserSocialReadWindow;
2368
+ browserUpload?: BrowserUploadProgress;
2369
+ browserDirect?: BrowserDirectObservation;
2370
+ browserAction?: BrowserActionObservation;
2371
+ facebookWaiting?: FacebookReplyWaiting;
1771
2372
  }
1772
- /** 独立受保护端口资格;既有能力或环境变量不能推导这些版本。 */
1773
- export interface WechatOnboardingProtocols {
1774
- readonly wechatGroupBindingProtocol?: 1;
1775
- readonly wechatGroupAuthorProtocol?: 1;
1776
- readonly wechatSourceRebuildProtocol?: 1;
1777
- readonly wechatTargetContinuityProtocol?: 1;
1778
- readonly wechatSelectionNavigationProtocol?: 1;
1779
- readonly nativeBootstrapProtocol?: 1;
1780
- readonly wechatConversationDiscoveryProtocol?: 1;
1781
- readonly wechatHomeLocalIdentityProtocol?: 1;
1782
- readonly wechatBindingContinuityProtocol?: 1;
1783
- readonly wechatSourceWindowCommitProtocol?: 1;
2373
+ export interface SocialContentProjection extends SocialContentRecord {
2374
+ revision: number;
2375
+ factRef: string;
2376
+ source: SourceObservation;
2377
+ historicalContext?: true;
2378
+ messageOrder?: {
2379
+ previousRef: string | null;
2380
+ nextRef: string | null;
2381
+ };
2382
+ renderedEvidence?: WechatSocialReadEvidence;
2383
+ }
2384
+ export interface SocialContentPage {
2385
+ tenantId: string;
2386
+ engagementRef: string;
2387
+ conversationRef: string;
2388
+ profileRef: string;
2389
+ items: readonly Omit<SocialContentProjection, "source">[];
2390
+ nextCursor: string | null;
2391
+ consistency: "SNAPSHOT" | "LIVE";
2392
+ coverage: "RETAINED_CANONICAL_OBSERVATIONS";
2393
+ platformCurrentness: "NOT_ATTESTED";
2394
+ }
2395
+ export interface SocialTextMessage extends TextChannelMessage {
2396
+ readonly acceptedScheduleObjectRef?: string;
2397
+ readonly externalObjectRef?: string;
2398
+ readonly delegation?: {
2399
+ readonly version: number;
2400
+ readonly factRef: string;
2401
+ };
2402
+ readonly channel: "SOCIAL";
2403
+ readonly executionPlacementDigest?: string;
2404
+ readonly conversationRef: string;
2405
+ readonly senderParticipantRef: string;
2406
+ readonly xiaohongshuIntent?: XiaohongshuIntent;
2407
+ readonly browserIntent?: BrowserSocialIntent;
2408
+ readonly browserDirect?: BrowserDirectObservation;
2409
+ readonly browserAction?: BrowserActionObservation;
2410
+ readonly browserPublication?: BrowserPublicationObservation;
2411
+ readonly browserUpload?: BrowserUploadProgress;
2412
+ readonly socialTarget: (SocialApiContentScope | XiaohongshuScope | BrowserSocialScope | FacebookSocialScope) & {
2413
+ targetRef: string;
2414
+ sourceFactRef: string;
2415
+ sourceVersion: string;
2416
+ sourceDigest: string;
2417
+ conversationRevision: number;
2418
+ };
2419
+ }
2420
+ export interface SocialConversationView {
2421
+ readonly xiaohongshuScheduleHistory?: XiaohongshuScheduleHistory;
2422
+ tenantId: string;
2423
+ conversationRef: string;
2424
+ profileRef: string;
2425
+ scope: SocialContentScope;
2426
+ revision: number;
2427
+ contents: readonly Omit<SocialContentProjection, "source">[];
2428
+ messages: readonly (Pick<SocialTextMessage, "messageRef" | "version" | "contentDigest" | "text" | "socialTarget" | "xiaohongshuIntent" | "browserIntent" | "browserAction" | "browserDirect" | "browserPublication" | "browserUpload" | "externalObjectRef" | "acceptedScheduleObjectRef" | "status"> & {
2429
+ requestRef: string | null;
2430
+ })[];
2431
+ dispatches: readonly {
2432
+ dispatchRef: string;
2433
+ action: string;
2434
+ state: string;
2435
+ physicalIdle: boolean;
2436
+ createdAt: string;
2437
+ requestRef: string | null;
2438
+ reasonCode?: string | null;
2439
+ }[];
2440
+ controlVersion: number;
2441
+ readonly autonomy?: SocialAutonomy;
2442
+ readonly xiaohongshuRead?: {
2443
+ dispatchRef: string;
2444
+ traversal: XiaohongshuTraversal;
2445
+ contentRefs?: readonly string[];
2446
+ captureFailures?: readonly SocialMediaCaptureFailure[];
2447
+ };
2448
+ readonly browserRead?: BrowserSocialReadWindow & {
2449
+ readonly dispatchRef: string;
2450
+ };
2451
+ readonly browserCapture?: {
2452
+ readonly basis: "INSTALLED_NODE_PORT";
2453
+ readonly available: boolean;
2454
+ readonly reasonCode: string | null;
2455
+ };
2456
+ readonly browserUploadSupport?: {
2457
+ readonly protocol: 1;
2458
+ readonly available: boolean;
2459
+ };
2460
+ readonly registrationContext?: SocialRegistrationContext;
2461
+ readonly targetRegistration?: SocialTargetRegistrationView;
2462
+ readonly socialRegistration?: SocialRegistrationMetadata;
2463
+ readonly publicationRegistration?: SocialPublicationRegistration;
2464
+ readonly readAttempt?: WechatSocialReadAttemptView;
1784
2465
  }
1785
2466
  /** 通用交互只关联原业务操作、人类决定和应用回执,不承载模型会话或设备秘密。 */
1786
- export type EngagementInteractionOperationType = "MAIL_CONFIGURATION" | "MESSAGE_REVIEW" | "ENVIRONMENT_INSTALLATION" | "NODE_PAIRING" | "DEVICE_PLACEMENT" | "ACCOUNT_SETUP" | "ACCOUNT_CONNECTION" | "FEEDBACK";
2467
+ export type EngagementInteractionOperationType = "WEIXIN_COMMENT_WRITE" | "WEIXIN_IMAGE_UPLOAD" | "WEIXIN_CONTENT_WRITE" | "MAIL_CONFIGURATION" | "MESSAGE_REVIEW" | "ENVIRONMENT_INSTALLATION" | "NODE_PAIRING" | "DEVICE_PLACEMENT" | "ACCOUNT_SETUP" | "ACCOUNT_CONNECTION" | "VOICE_PROFILE_BINDING" | "FEEDBACK";
1787
2468
  export interface EngagementInteractionOperation {
1788
2469
  type: EngagementInteractionOperationType;
1789
2470
  payload: Record<string, unknown>;
@@ -1824,6 +2505,19 @@ export interface EngagementInteraction {
1824
2505
  } | null;
1825
2506
  application: EngagementInteractionApplication;
1826
2507
  }
2508
+ export type WeixinReadOperation = typeof WEIXIN_READ_OPERATIONS[number];
2509
+ export interface WeixinReadView {
2510
+ tenantId: string;
2511
+ kind: "WEIXIN_READ";
2512
+ dispatchRef: string;
2513
+ profileRef: string;
2514
+ configurationRevision: number;
2515
+ operation: WeixinReadOperation;
2516
+ state: string;
2517
+ resultJson: string | null;
2518
+ reasonCode: string | null;
2519
+ platformAcceptance: "NOT_PROVEN";
2520
+ }
1827
2521
  export type WorkbenchSummary = ({
1828
2522
  readonly prospectRef: string;
1829
2523
  readonly ownership?: never;
@@ -1857,6 +2551,13 @@ export interface ContractExecutionRequest {
1857
2551
  readonly payload?: Readonly<Record<string, unknown>> | undefined;
1858
2552
  readonly context?: TenantContextInput | undefined;
1859
2553
  }
2554
+ export interface ExecutionReceipt<T> {
2555
+ readonly ok: true;
2556
+ readonly contractName: string;
2557
+ readonly contractVersion: string;
2558
+ readonly resolvedTenantId?: string;
2559
+ readonly result: T;
2560
+ }
1860
2561
  /** 签名 Node 心跳观察的宿主系统,不能从安装意图推断;旧节点明确保留 UNKNOWN。 */
1861
2562
  export interface ExecutionDeviceSystem {
1862
2563
  schemaVersion: 1;
@@ -2084,8 +2785,46 @@ export declare function projectContractSchema(descriptor: ContractDescriptor, vi
2084
2785
  errorCodes?: readonly string[] | undefined;
2085
2786
  riskClass?: ContractRisk;
2086
2787
  };
2788
+ /** 分发安装前置说明;宿主保留安装、依赖准备和真实 Human 授权的执行责任。 */
2789
+ export declare const installationRuntimeSkill: () => Promise<{
2790
+ name: "native-engagement-node-installation";
2791
+ digest: string;
2792
+ instructions: string;
2793
+ }>;
2794
+ /** 仅封装原canonical合同;授权、派发、微信访问和恢复仍由原Owner处理。 */
2795
+ export declare class WeixinOfficialClient {
2796
+ readonly sdk: Pick<RemoteNativeEngagementSdk, "query" | "command">;
2797
+ constructor(sdk: Pick<RemoteNativeEngagementSdk, "query" | "command">);
2798
+ commentBasis(input: WeixinCommentIntent, signal?: AbortSignal): Promise<ExecutionReceipt<WeixinCommentBasisView>>;
2799
+ comment(input: WeixinCommentRequest, signal?: AbortSignal): Promise<ExecutionReceipt<ActionReceipt>>;
2800
+ commentStatus(profileRef: string, dispatchRef: string, signal?: AbortSignal): Promise<ExecutionReceipt<WeixinCommentView>>;
2801
+ recoverComment(input: {
2802
+ idempotencyKey: string;
2803
+ profileRef: string;
2804
+ dispatchRef: string;
2805
+ }, signal?: AbortSignal): Promise<ExecutionReceipt<ActionReceipt>>;
2806
+ capabilities(profileRef: string, signal?: AbortSignal): Promise<ExecutionReceipt<ApiCapabilitiesView>>;
2807
+ read(input: WeixinRuntimeReadRequest, signal?: AbortSignal): Promise<ExecutionReceipt<ActionReceipt>>;
2808
+ readStatus(profileRef: string, dispatchRef: string, signal?: AbortSignal): Promise<ExecutionReceipt<WeixinReadView>>;
2809
+ write(input: WeixinRuntimeWriteRequest, signal?: AbortSignal): Promise<ExecutionReceipt<ActionReceipt>>;
2810
+ writeStatus(profileRef: string, dispatchRef: string, signal?: AbortSignal): Promise<ExecutionReceipt<WeixinWriteView>>;
2811
+ upload(input: WeixinUploadRequest, signal?: AbortSignal): Promise<ExecutionReceipt<ActionReceipt>>;
2812
+ uploadStatus(profileRef: string, dispatchRef: string, signal?: AbortSignal): Promise<ExecutionReceipt<WeixinUploadView>>;
2813
+ recoverUpload(input: {
2814
+ idempotencyKey: string;
2815
+ profileRef: string;
2816
+ dispatchRef: string;
2817
+ }, signal?: AbortSignal): Promise<ExecutionReceipt<ActionReceipt>>;
2818
+ recoverWrite(input: {
2819
+ idempotencyKey: string;
2820
+ profileRef: string;
2821
+ dispatchRef: string;
2822
+ }, signal?: AbortSignal): Promise<ExecutionReceipt<ActionReceipt>>;
2823
+ }
2087
2824
  export type TokenProvider = () => string | Promise<string>;
2088
2825
  export interface RemoteSdkOptions {
2826
+ /** 默认只为已支持的资源操作协商展示;off 完整保留旧传输。 */
2827
+ readonly presentation?: PresentationMode;
2089
2828
  readonly nodeProof?: (method: string, route: string, payload: Readonly<Record<string, unknown>>) => NodeProof;
2090
2829
  readonly baseUrl: string;
2091
2830
  readonly accessToken: TokenProvider;
@@ -2105,6 +2844,12 @@ export declare class RemoteNativeEngagementError extends Error {
2105
2844
  readonly reasonCode: string | undefined;
2106
2845
  constructor(code: string, message: string, status: number, details?: Readonly<Record<string, unknown>>);
2107
2846
  }
2847
+ /** 仅投影已认证媒体等待的原定位;白名单之外的错误详情不能进入 CLI/MCP。 */
2848
+ export declare function mediaProcessingRecovery(error: RemoteNativeEngagementError): Readonly<{
2849
+ reasonCode: "ASSET_PROCESSING_WAITING";
2850
+ mediaProcessingProtocol: 1;
2851
+ dispatchRef: string;
2852
+ }> | undefined;
2108
2853
  /**
2109
2854
  * Public Agent SDK. For each operation, present a bearer credential to the
2110
2855
  * service, which verifies identity and tenant. This client accepts no
@@ -2150,8 +2895,13 @@ export declare class RemoteNativeEngagementSdk {
2150
2895
  errorCodes?: readonly string[] | undefined;
2151
2896
  riskClass?: ContractRisk;
2152
2897
  }>;
2153
- query(request: Pick<ContractExecutionRequest, "name" | "payload">, signal?: AbortSignal): Promise<unknown>;
2154
- command(request: Pick<ContractExecutionRequest, "name" | "payload">, signal?: AbortSignal): Promise<unknown>;
2898
+ query(request: Pick<ContractExecutionRequest, "name" | "payload">, signal?: AbortSignal, presentation?: PresentationRequest): Promise<unknown>;
2899
+ command(request: Pick<ContractExecutionRequest, "name" | "payload">, signal?: AbortSignal, presentation?: PresentationRequest): Promise<unknown>;
2900
+ /** 明确返回完整 envelope,旧 typed helper 的业务对象返回形状保持不变。 */
2901
+ queryWithPresentation<T = unknown>(request: Pick<ContractExecutionRequest, "name" | "payload">, signal?: AbortSignal): Promise<PresentedEnvelope<T>>;
2902
+ commandWithPresentation<T = unknown>(request: Pick<ContractExecutionRequest, "name" | "payload">, signal?: AbortSignal): Promise<PresentedEnvelope<T>>;
2903
+ /** 只执行已校验的准确原查询,不读取其中的 URL、不切换中心或改写身份。 */
2904
+ resumePresentation<T = unknown>(value: ResponsePresentation, signal?: AbortSignal): Promise<PresentedEnvelope<T>>;
2155
2905
  search(payload: Readonly<Record<string, unknown>>): Promise<unknown>;
2156
2906
  enquiry(payload: Readonly<Record<string, unknown>>): Promise<unknown>;
2157
2907
  agentStackPreflight(payload: Readonly<Record<string, unknown>>): Promise<unknown>;
@@ -2174,6 +2924,15 @@ export declare function interactionClient(sdk: WorkClient): {
2174
2924
  cancel: (input: InteractionCancelInput) => Promise<EngagementInteraction>;
2175
2925
  };
2176
2926
  export type InteractionClient = ReturnType<typeof interactionClient>;
2927
+ /** 便携入口只读非秘密元数据;未知写入不自动重试,准确原 key 交还调用者恢复。 */
2928
+ export declare function voiceProfileClient(sdk: WorkClient): {
2929
+ sources: (input: VoiceProfileSourcesInput) => Promise<VoiceProfileSourcePage>;
2930
+ list: (input: VoiceProfileListInput) => Promise<VoiceProfilePage>;
2931
+ get: (input: VoiceProfileGetInput) => Promise<VoiceProfileView>;
2932
+ resolve: (input: VoiceProfileResolveInput) => Promise<VoiceProfileResolution>;
2933
+ synthesize: (input: VoiceProfileSynthesisInput) => Promise<ActionReceipt>;
2934
+ };
2935
+ export type VoiceProfileClient = ReturnType<typeof voiceProfileClient>;
2177
2936
  export interface DeviceListInput {
2178
2937
  limit?: number;
2179
2938
  }
@@ -2452,10 +3211,18 @@ export declare function browserSocialClient(sdk: Pick<RemoteNativeEngagementSdk,
2452
3211
  operation: (dispatchRef: string) => Promise<SocialOperationView>;
2453
3212
  contents: (limit?: number, cursor?: string, consistency?: "SNAPSHOT" | "LIVE") => Promise<SocialContentPage>;
2454
3213
  draft: (idempotencyKey: string, messageRef: string, expectedVersion: number, source: Pick<SocialContentProjection, "contentRef" | "revision">, text: string, browserIntent: BrowserSocialIntent) => Promise<ActionReceipt>;
3214
+ likeDraft: (idempotencyKey: string, messageRef: string, expectedVersion: number, source: Pick<SocialContentProjection, "contentRef" | "revision">, value: boolean) => Promise<ActionReceipt>;
3215
+ followDraft: (idempotencyKey: string, messageRef: string, expectedVersion: number, source: Pick<SocialContentProjection, "contentRef" | "revision">, value: boolean) => Promise<ActionReceipt>;
3216
+ deleteCommentDraft: (idempotencyKey: string, messageRef: string, expectedVersion: number, source: Pick<SocialContentProjection, "contentRef" | "revision">) => Promise<ActionReceipt>;
3217
+ commentVisibilityDraft: (idempotencyKey: string, messageRef: string, expectedVersion: number, source: Pick<SocialContentProjection, "contentRef" | "revision">, visibility: "HIDDEN" | "VISIBLE") => Promise<ActionReceipt>;
3218
+ startDirectDraft: (idempotencyKey: string, messageRef: string, expectedVersion: number, source: Pick<SocialContentProjection, "contentRef" | "revision" | "kind" | "authorRef" | "browser">, text: string) => Promise<ActionReceipt>;
3219
+ voiceDraft: (idempotencyKey: string, messageRef: string, expectedVersion: number, source: Pick<SocialContentProjection, "contentRef" | "revision">, audio: BrowserMediaSelection) => Promise<ActionReceipt>;
2455
3220
  scheduleCancelDraft: (idempotencyKey: string, messageRef: string, expectedVersion: number, source: Pick<SocialContentProjection, "contentRef" | "revision">) => Promise<ActionReceipt>;
2456
3221
  scheduleRescheduleDraft: (idempotencyKey: string, messageRef: string, expectedVersion: number, source: Pick<SocialContentProjection, "contentRef" | "revision">, scheduledAt: string, timeZone: string) => Promise<ActionReceipt>;
2457
3222
  queue: (idempotencyKey: string, message: BrowserSocialMessage, expectedControlVersion: number) => Promise<ActionReceipt>;
2458
3223
  execute: (idempotencyKey: string, message: BrowserSocialMessage) => Promise<ActionReceipt>;
3224
+ upload: (idempotencyKey: string, message: BrowserSocialMessage, uploadAction: BrowserUploadAction) => Promise<ActionReceipt>;
3225
+ uploadProgress: (message: BrowserSocialMessage) => Promise<BrowserUploadView>;
2459
3226
  verify: (idempotencyKey: string, message: BrowserSocialMessage) => Promise<ActionReceipt>;
2460
3227
  cancel: (idempotencyKey: string, message: BrowserSocialMessage) => Promise<ActionReceipt>;
2461
3228
  activity: () => Promise<BrowserAccountView>;
@@ -2466,6 +3233,9 @@ export declare function browserSocialClient(sdk: Pick<RemoteNativeEngagementSdk,
2466
3233
  sourceDigest: string;
2467
3234
  }) => Promise<ActionReceipt>;
2468
3235
  };
3236
+ export type BrowserUploadNextAction = BrowserUploadAction | "EXECUTE" | "VERIFY" | "WAIT";
3237
+ /** 只依据保留状态选择原操作;暂停和失败恢复必须由调用方明确请求。 */
3238
+ export declare function nextBrowserUploadAction(view: SocialConversationView, message: SocialConversationView["messages"][number]): BrowserUploadNextAction;
2469
3239
  export type Message = SocialConversationView["messages"][number];
2470
3240
  /** 原请求、独立观察和已完成的原作品管理只作投影;不浏览、不计时派发、不授予发送。 */
2471
3241
  export declare function browserPublicationLifecycle(message: Message, operation: SocialOperationView | null, view?: SocialConversationView, now?: number): {