@tangle-network/agent-app 0.60.179 → 0.60.181

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.
@@ -105,6 +105,15 @@ export interface HubActionField {
105
105
  /** Render in the monospace face: shas, ids, paths. */
106
106
  mono?: boolean;
107
107
  }
108
+ /** Frozen media bytes supplied by the host; renderers never resolve a provider URL. */
109
+ export interface HubPreviewMedia {
110
+ kind: 'image' | 'video';
111
+ src: string;
112
+ alt: string;
113
+ poster?: string;
114
+ width?: number;
115
+ height?: number;
116
+ }
108
117
  /** What a held call will do, shaped for its integration's renderer. */
109
118
  export type HubActionPreview = {
110
119
  kind: 'pull-request';
@@ -151,7 +160,7 @@ export type HubActionPreview = {
151
160
  reply: boolean;
152
161
  } | {
153
162
  kind: 'post';
154
- channel: 'x' | 'linkedin' | 'slack';
163
+ channel: 'x' | 'linkedin' | 'slack' | 'instagram' | 'facebook' | 'tiktok' | 'youtube';
155
164
  text: string;
156
165
  /** The post's place, such as a Slack channel. */
157
166
  where?: string;
@@ -164,6 +173,12 @@ export type HubActionPreview = {
164
173
  url: string;
165
174
  alt?: string;
166
175
  }[];
176
+ media?: readonly HubPreviewMedia[];
177
+ placement?: 'feed' | 'vertical' | 'carousel';
178
+ sponsored?: boolean;
179
+ displayName?: string;
180
+ handle?: string;
181
+ callToAction?: string;
167
182
  } | {
168
183
  kind: 'ad';
169
184
  placement: string;
@@ -1,11 +1,11 @@
1
- import { type HubApprovalFeedback, type HubApprovalItem } from '../hub-approvals';
1
+ import { type HubActionPreview, type HubApprovalFeedback, type HubApprovalItem } from '../hub-approvals';
2
2
  export interface HubPreviewFeedbackProps {
3
3
  item: HubApprovalItem;
4
4
  onFeedback: (item: HubApprovalItem, feedback: HubApprovalFeedback) => Promise<void>;
5
5
  /** Owner-local drafts survive collapsing/switching previews, never another viewer. */
6
- drafts?: Map<string, FeedbackDraft>;
6
+ drafts?: Map<string, ReviewFeedbackDraft>;
7
7
  }
8
- interface FeedbackDraft {
8
+ export interface ReviewFeedbackDraft {
9
9
  score: string;
10
10
  comment: string;
11
11
  editing: boolean;
@@ -15,6 +15,26 @@ interface FeedbackDraft {
15
15
  payload: string;
16
16
  saved: boolean;
17
17
  }
18
- /** Host callback saves the signal; this component has no execution transport. */
18
+ export type ReviewVerdict = 'approve' | 'reject' | 'request_changes';
19
+ export interface ReviewFeedbackFormHandle {
20
+ focusScore: () => void;
21
+ focusComment: () => void;
22
+ submitVerdict: (verdict: ReviewVerdict) => Promise<void>;
23
+ }
24
+ export interface ReviewFeedbackFormProps {
25
+ input: unknown;
26
+ preview?: HubActionPreview;
27
+ feedback?: HubApprovalFeedback;
28
+ draftKey: string;
29
+ drafts?: Map<string, ReviewFeedbackDraft>;
30
+ onFeedback?: (feedback: HubApprovalFeedback) => Promise<void>;
31
+ onVerdict?: (verdict: ReviewVerdict, feedback: HubApprovalFeedback) => Promise<void>;
32
+ allowedVerdicts?: readonly ReviewVerdict[];
33
+ approveLabel?: string;
34
+ disabled?: boolean;
35
+ editNote?: string;
36
+ }
37
+ /** One form for Hub previews, assets and work products. Hosts own storage and authority. */
38
+ export declare const ReviewFeedbackForm: import("react").ForwardRefExoticComponent<ReviewFeedbackFormProps & import("react").RefAttributes<ReviewFeedbackFormHandle>>;
39
+ /** Existing Hub adapter: teaching never calls the effect transport. */
19
40
  export declare function HubPreviewFeedback({ item, onFeedback, drafts }: HubPreviewFeedbackProps): import("react").JSX.Element;
20
- export {};
@@ -19,5 +19,6 @@ export { HubApprovalsList, type HubApprovalsListProps } from './list';
19
19
  export { HubApprovalRow, type HubApprovalRowProps } from './row';
20
20
  export { HubActionReceiptCard, HubApprovalReceipts, type HubActionReceiptCardProps, type HubApprovalReceiptsProps } from './receipt';
21
21
  export { HubActionPreviewView } from './preview';
22
+ export { ReviewFeedbackForm, type ReviewFeedbackFormProps, type ReviewFeedbackFormHandle, type ReviewFeedbackDraft, type ReviewVerdict } from './feedback';
22
23
  export { HubPreviewFeedback, type HubPreviewFeedbackProps } from './feedback';
23
24
  export { HubApprovalPhasePill, HubApprovalWaitNote, HubProviderMark, openPhaseLabel } from './parts';