@getcliqio/hug-frontend 0.0.0-stage → 1.15.33
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/README.md +31 -2
- package/dist/base_css.d.ts +6 -0
- package/dist/base_css.d.ts.map +1 -0
- package/dist/base_css.js +28 -0
- package/dist/base_css.js.map +1 -0
- package/dist/build.d.ts +45 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/build.js +44 -0
- package/dist/build.js.map +1 -0
- package/dist/current.d.ts +10 -0
- package/dist/current.d.ts.map +1 -0
- package/dist/current.js +14 -0
- package/dist/current.js.map +1 -0
- package/dist/define.d.ts +12 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +9 -0
- package/dist/define.js.map +1 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +25 -0
- package/dist/errors.js.map +1 -0
- package/dist/host.d.ts +137 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +368 -0
- package/dist/host.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/mount.d.ts +64 -0
- package/dist/mount.d.ts.map +1 -0
- package/dist/mount.js +106 -0
- package/dist/mount.js.map +1 -0
- package/dist/paths.d.ts +12 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +42 -0
- package/dist/paths.js.map +1 -0
- package/dist/react.d.ts +63 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +149 -0
- package/dist/react.js.map +1 -0
- package/dist/runtime.d.ts +140 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +284 -0
- package/dist/runtime.js.map +1 -0
- package/dist/shared/bridge/index.d.ts +16 -0
- package/dist/shared/bridge/index.d.ts.map +1 -0
- package/dist/shared/bridge/index.js +14 -0
- package/dist/shared/bridge/index.js.map +1 -0
- package/dist/shared/bridge/messages.d.ts +559 -0
- package/dist/shared/bridge/messages.d.ts.map +1 -0
- package/dist/shared/bridge/messages.js +166 -0
- package/dist/shared/bridge/messages.js.map +1 -0
- package/dist/shared/context.d.ts +54 -0
- package/dist/shared/context.d.ts.map +1 -0
- package/dist/shared/context.js +28 -0
- package/dist/shared/context.js.map +1 -0
- package/dist/shared/define.d.ts +116 -0
- package/dist/shared/define.d.ts.map +1 -0
- package/dist/shared/define.js +120 -0
- package/dist/shared/define.js.map +1 -0
- package/dist/shared/definitions/approval.d.ts +216 -0
- package/dist/shared/definitions/approval.d.ts.map +1 -0
- package/dist/shared/definitions/approval.js +51 -0
- package/dist/shared/definitions/approval.js.map +1 -0
- package/dist/shared/definitions/common.d.ts +122 -0
- package/dist/shared/definitions/common.d.ts.map +1 -0
- package/dist/shared/definitions/common.js +71 -0
- package/dist/shared/definitions/common.js.map +1 -0
- package/dist/shared/definitions/form.d.ts +197 -0
- package/dist/shared/definitions/form.d.ts.map +1 -0
- package/dist/shared/definitions/form.js +30 -0
- package/dist/shared/definitions/form.js.map +1 -0
- package/dist/shared/definitions/index.d.ts +10 -0
- package/dist/shared/definitions/index.d.ts.map +1 -0
- package/dist/shared/definitions/index.js +9 -0
- package/dist/shared/definitions/index.js.map +1 -0
- package/dist/shared/problems.d.ts +35 -0
- package/dist/shared/problems.d.ts.map +1 -0
- package/dist/shared/problems.js +54 -0
- package/dist/shared/problems.js.map +1 -0
- package/dist/shared/requested_inputs.d.ts +190 -0
- package/dist/shared/requested_inputs.d.ts.map +1 -0
- package/dist/shared/requested_inputs.js +221 -0
- package/dist/shared/requested_inputs.js.map +1 -0
- package/dist/shared/schema_for_inputs.d.ts +20 -0
- package/dist/shared/schema_for_inputs.d.ts.map +1 -0
- package/dist/shared/schema_for_inputs.js +96 -0
- package/dist/shared/schema_for_inputs.js.map +1 -0
- package/dist/state.d.ts +58 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +124 -0
- package/dist/state.js.map +1 -0
- package/dist/testing.d.ts +96 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +156 -0
- package/dist/testing.js.map +1 -0
- package/dist/theme.d.ts +15 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +18 -0
- package/dist/theme.js.map +1 -0
- package/dist/transport.d.ts +19 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +21 -0
- package/dist/transport.js.map +1 -0
- package/dist/ui/base.d.ts +33 -0
- package/dist/ui/base.d.ts.map +1 -0
- package/dist/ui/base.js +99 -0
- package/dist/ui/base.js.map +1 -0
- package/dist/ui/choices.d.ts +46 -0
- package/dist/ui/choices.d.ts.map +1 -0
- package/dist/ui/choices.js +121 -0
- package/dist/ui/choices.js.map +1 -0
- package/dist/ui/fields.d.ts +46 -0
- package/dist/ui/fields.d.ts.map +1 -0
- package/dist/ui/fields.js +169 -0
- package/dist/ui/fields.js.map +1 -0
- package/dist/ui/files.d.ts +80 -0
- package/dist/ui/files.d.ts.map +1 -0
- package/dist/ui/files.js +342 -0
- package/dist/ui/files.js.map +1 -0
- package/dist/ui/fonts.css +7 -0
- package/dist/ui/fonts_css.d.ts +3 -0
- package/dist/ui/fonts_css.d.ts.map +1 -0
- package/dist/ui/fonts_css.js +4 -0
- package/dist/ui/fonts_css.js.map +1 -0
- package/dist/ui/index.d.ts +24 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +32 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/markdown.d.ts +46 -0
- package/dist/ui/markdown.d.ts.map +1 -0
- package/dist/ui/markdown.js +318 -0
- package/dist/ui/markdown.js.map +1 -0
- package/dist/view.d.ts +49 -0
- package/dist/view.d.ts.map +1 -0
- package/dist/view.js +136 -0
- package/dist/view.js.map +1 -0
- package/dist/zod_config.d.ts +2 -0
- package/dist/zod_config.d.ts.map +1 -0
- package/dist/zod_config.js +10 -0
- package/dist/zod_config.js.map +1 -0
- package/fonts/LICENSE.txt +92 -0
- package/package.json +82 -5
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `approval` — the built-in hug that approves or rejects the work (PLAN-hug-widgets §10.1); the Hug gate always asks
|
|
3
|
+
* with it. A gate configures it through its params: `review.inputs` → `inputs` (the fields approving requires),
|
|
4
|
+
* `route_targets` → `reject_choices` ("Send back to …"), `review.params` → the labels and `show_comment`.
|
|
5
|
+
*
|
|
6
|
+
* Answer: `{ decision: 'approve', …one key per input (required ones enforced), comment? }`, or
|
|
7
|
+
* `{ decision: 'reject', reason, choice? }` — a rejection never needs the inputs. The same rules as today's
|
|
8
|
+
* `approval_v1` (the parity is tested).
|
|
9
|
+
*/
|
|
10
|
+
import { z } from 'zod';
|
|
11
|
+
/** The answer keys `approval` adds itself; inputs can't use them. */
|
|
12
|
+
export declare const APPROVAL_OWN_KEYS: readonly ["decision", "reason", "choice", "comment"];
|
|
13
|
+
/** `approval`'s params. */
|
|
14
|
+
export declare const ApprovalParams: z.ZodObject<{
|
|
15
|
+
reject_choices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16
|
+
value: z.ZodString;
|
|
17
|
+
label: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, z.core.$strict>>>;
|
|
19
|
+
approve_label: z.ZodOptional<z.ZodString>;
|
|
20
|
+
reject_label: z.ZodOptional<z.ZodString>;
|
|
21
|
+
show_comment: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
23
|
+
context: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"markdown">;
|
|
25
|
+
text: z.ZodString;
|
|
26
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
27
|
+
type: z.ZodLiteral<"artifact">;
|
|
28
|
+
artifact_id: z.ZodString;
|
|
29
|
+
label: z.ZodOptional<z.ZodString>;
|
|
30
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
31
|
+
type: z.ZodLiteral<"checks">;
|
|
32
|
+
results: z.ZodArray<z.ZodObject<{
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
ok: z.ZodBoolean;
|
|
35
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, z.core.$strict>>;
|
|
37
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
38
|
+
type: z.ZodLiteral<"transcript">;
|
|
39
|
+
turns: z.ZodArray<z.ZodObject<{
|
|
40
|
+
role: z.ZodString;
|
|
41
|
+
content: z.ZodString;
|
|
42
|
+
}, z.core.$strict>>;
|
|
43
|
+
}, z.core.$strict>], "type">>>;
|
|
44
|
+
inputs: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
45
|
+
type: z.ZodLiteral<"text">;
|
|
46
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
min_length: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
max_length: z.ZodOptional<z.ZodNumber>;
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
label: z.ZodOptional<z.ZodString>;
|
|
51
|
+
help: z.ZodOptional<z.ZodString>;
|
|
52
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
54
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
55
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
56
|
+
type: z.ZodLiteral<"number">;
|
|
57
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
58
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
59
|
+
integer: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
name: z.ZodString;
|
|
61
|
+
label: z.ZodOptional<z.ZodString>;
|
|
62
|
+
help: z.ZodOptional<z.ZodString>;
|
|
63
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
64
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
65
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
66
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
67
|
+
type: z.ZodLiteral<"boolean">;
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
label: z.ZodOptional<z.ZodString>;
|
|
70
|
+
help: z.ZodOptional<z.ZodString>;
|
|
71
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
73
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
74
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
75
|
+
type: z.ZodLiteral<"enum">;
|
|
76
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
77
|
+
value: z.ZodString;
|
|
78
|
+
label: z.ZodOptional<z.ZodString>;
|
|
79
|
+
}, z.core.$strict>>;
|
|
80
|
+
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
name: z.ZodString;
|
|
82
|
+
label: z.ZodOptional<z.ZodString>;
|
|
83
|
+
help: z.ZodOptional<z.ZodString>;
|
|
84
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
86
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
87
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
88
|
+
type: z.ZodLiteral<"file">;
|
|
89
|
+
accept: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
90
|
+
max_bytes: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
name: z.ZodString;
|
|
93
|
+
label: z.ZodOptional<z.ZodString>;
|
|
94
|
+
help: z.ZodOptional<z.ZodString>;
|
|
95
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
97
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
98
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
99
|
+
type: z.ZodLiteral<"channel">;
|
|
100
|
+
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
label: z.ZodOptional<z.ZodString>;
|
|
103
|
+
help: z.ZodOptional<z.ZodString>;
|
|
104
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
105
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
106
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
107
|
+
}, z.core.$strict>], "type">>>;
|
|
108
|
+
}, z.core.$strict>;
|
|
109
|
+
/** `approval`'s params. */
|
|
110
|
+
export type ApprovalParams = z.infer<typeof ApprovalParams>;
|
|
111
|
+
/** An `approval` answer. */
|
|
112
|
+
export type ApprovalValues = ({
|
|
113
|
+
decision: 'approve';
|
|
114
|
+
comment?: string | null;
|
|
115
|
+
} & Record<string, unknown>) | {
|
|
116
|
+
decision: 'reject';
|
|
117
|
+
reason: string;
|
|
118
|
+
choice?: string | null;
|
|
119
|
+
};
|
|
120
|
+
/** The built-in `approval` hug. */
|
|
121
|
+
export declare const approval: import("../define.js").HugDefinition<{
|
|
122
|
+
inputs: ({
|
|
123
|
+
type: "text";
|
|
124
|
+
name: string;
|
|
125
|
+
multiline?: boolean | undefined;
|
|
126
|
+
min_length?: number | undefined;
|
|
127
|
+
max_length?: number | undefined;
|
|
128
|
+
label?: string | undefined;
|
|
129
|
+
help?: string | undefined;
|
|
130
|
+
required?: boolean | undefined;
|
|
131
|
+
default?: unknown;
|
|
132
|
+
ui?: Record<string, unknown> | undefined;
|
|
133
|
+
} | {
|
|
134
|
+
type: "number";
|
|
135
|
+
name: string;
|
|
136
|
+
min?: number | undefined;
|
|
137
|
+
max?: number | undefined;
|
|
138
|
+
integer?: boolean | undefined;
|
|
139
|
+
label?: string | undefined;
|
|
140
|
+
help?: string | undefined;
|
|
141
|
+
required?: boolean | undefined;
|
|
142
|
+
default?: unknown;
|
|
143
|
+
ui?: Record<string, unknown> | undefined;
|
|
144
|
+
} | {
|
|
145
|
+
type: "boolean";
|
|
146
|
+
name: string;
|
|
147
|
+
label?: string | undefined;
|
|
148
|
+
help?: string | undefined;
|
|
149
|
+
required?: boolean | undefined;
|
|
150
|
+
default?: unknown;
|
|
151
|
+
ui?: Record<string, unknown> | undefined;
|
|
152
|
+
} | {
|
|
153
|
+
type: "enum";
|
|
154
|
+
choices: {
|
|
155
|
+
value: string;
|
|
156
|
+
label?: string | undefined;
|
|
157
|
+
}[];
|
|
158
|
+
name: string;
|
|
159
|
+
multiple?: boolean | undefined;
|
|
160
|
+
label?: string | undefined;
|
|
161
|
+
help?: string | undefined;
|
|
162
|
+
required?: boolean | undefined;
|
|
163
|
+
default?: unknown;
|
|
164
|
+
ui?: Record<string, unknown> | undefined;
|
|
165
|
+
} | {
|
|
166
|
+
type: "file";
|
|
167
|
+
name: string;
|
|
168
|
+
accept?: string[] | undefined;
|
|
169
|
+
max_bytes?: number | undefined;
|
|
170
|
+
multiple?: boolean | undefined;
|
|
171
|
+
label?: string | undefined;
|
|
172
|
+
help?: string | undefined;
|
|
173
|
+
required?: boolean | undefined;
|
|
174
|
+
default?: unknown;
|
|
175
|
+
ui?: Record<string, unknown> | undefined;
|
|
176
|
+
} | {
|
|
177
|
+
type: "channel";
|
|
178
|
+
name: string;
|
|
179
|
+
multiple?: boolean | undefined;
|
|
180
|
+
label?: string | undefined;
|
|
181
|
+
help?: string | undefined;
|
|
182
|
+
required?: boolean | undefined;
|
|
183
|
+
default?: unknown;
|
|
184
|
+
ui?: Record<string, unknown> | undefined;
|
|
185
|
+
})[];
|
|
186
|
+
reject_choices?: {
|
|
187
|
+
value: string;
|
|
188
|
+
label?: string | undefined;
|
|
189
|
+
}[] | undefined;
|
|
190
|
+
approve_label?: string | undefined;
|
|
191
|
+
reject_label?: string | undefined;
|
|
192
|
+
show_comment?: boolean | undefined;
|
|
193
|
+
prompt?: string | undefined;
|
|
194
|
+
context?: ({
|
|
195
|
+
type: "markdown";
|
|
196
|
+
text: string;
|
|
197
|
+
} | {
|
|
198
|
+
type: "artifact";
|
|
199
|
+
artifact_id: string;
|
|
200
|
+
label?: string | undefined;
|
|
201
|
+
} | {
|
|
202
|
+
type: "checks";
|
|
203
|
+
results: {
|
|
204
|
+
name: string;
|
|
205
|
+
ok: boolean;
|
|
206
|
+
summary?: string | undefined;
|
|
207
|
+
}[];
|
|
208
|
+
} | {
|
|
209
|
+
type: "transcript";
|
|
210
|
+
turns: {
|
|
211
|
+
role: string;
|
|
212
|
+
content: string;
|
|
213
|
+
}[];
|
|
214
|
+
})[] | undefined;
|
|
215
|
+
}, ApprovalValues>;
|
|
216
|
+
//# sourceMappingURL=approval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../../src/shared/definitions/approval.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,sDAAuD,CAAC;AAItF,2BAA2B;AAC3B,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBASmB,CAAC;AAC/C,2BAA2B;AAC3B,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,4BAA4B;AAC5B,MAAM,MAAM,cAAc,GACpB,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAC5E;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AASrE,mCAAmC;AACnC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAenB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// GENERATED by packages/hug-frontend/scripts/sync_shared.mjs from cliq-sdk/src/hug — do not edit.
|
|
2
|
+
/**
|
|
3
|
+
* `approval` — the built-in hug that approves or rejects the work (PLAN-hug-widgets §10.1); the Hug gate always asks
|
|
4
|
+
* with it. A gate configures it through its params: `review.inputs` → `inputs` (the fields approving requires),
|
|
5
|
+
* `route_targets` → `reject_choices` ("Send back to …"), `review.params` → the labels and `show_comment`.
|
|
6
|
+
*
|
|
7
|
+
* Answer: `{ decision: 'approve', …one key per input (required ones enforced), comment? }`, or
|
|
8
|
+
* `{ decision: 'reject', reason, choice? }` — a rejection never needs the inputs. The same rules as today's
|
|
9
|
+
* `approval_v1` (the parity is tested).
|
|
10
|
+
*/
|
|
11
|
+
import { z } from 'zod';
|
|
12
|
+
import { define_hug } from '../define.js';
|
|
13
|
+
import { schema_for_inputs } from '../schema_for_inputs.js';
|
|
14
|
+
import { base_params, file_inputs, no_own_keys, note } from './common.js';
|
|
15
|
+
/** The answer keys `approval` adds itself; inputs can't use them. */
|
|
16
|
+
export const APPROVAL_OWN_KEYS = ['decision', 'reason', 'choice', 'comment'];
|
|
17
|
+
const Choice = z.strictObject({ value: z.string().min(1).max(200), label: z.string().max(200).optional() });
|
|
18
|
+
/** `approval`'s params. */
|
|
19
|
+
export const ApprovalParams = z.strictObject({
|
|
20
|
+
...base_params,
|
|
21
|
+
reject_choices: z.array(Choice).max(20).refine((choices) => new Set(choices.map((c) => c.value)).size === choices.length, 'values must be unique').optional(),
|
|
22
|
+
approve_label: z.string().min(1).max(40).optional(),
|
|
23
|
+
reject_label: z.string().min(1).max(40).optional(),
|
|
24
|
+
show_comment: z.boolean().optional(),
|
|
25
|
+
}).superRefine(no_own_keys(APPROVAL_OWN_KEYS));
|
|
26
|
+
/** The choice schema for these params: one of `reject_choices`, or none when none are offered. */
|
|
27
|
+
function choice_schema(p) {
|
|
28
|
+
const values = (p.reject_choices ?? []).map((c) => c.value);
|
|
29
|
+
if (values.length === 0)
|
|
30
|
+
return z.null({ error: 'must be one of (none offered)' }).optional();
|
|
31
|
+
return z.enum(values, { error: `must be one of ${values.join(', ')}` }).nullish();
|
|
32
|
+
}
|
|
33
|
+
/** The built-in `approval` hug. */
|
|
34
|
+
export const approval = define_hug({
|
|
35
|
+
name: 'approval',
|
|
36
|
+
title: 'Approval',
|
|
37
|
+
description: 'Asks people to approve the work (filling in any fields approving requires) or reject it with a reason and, when offered, where to send it back.',
|
|
38
|
+
params: ApprovalParams,
|
|
39
|
+
values: (p) => z.discriminatedUnion('decision', [
|
|
40
|
+
z.strictObject({ ...schema_for_inputs(p.inputs).shape, decision: z.literal('approve'), comment: note(false) }),
|
|
41
|
+
z.strictObject({ decision: z.literal('reject'), reason: note(true), choice: choice_schema(p) }),
|
|
42
|
+
], { error: 'decision: must be approve or reject' }),
|
|
43
|
+
files: (p) => file_inputs(p.inputs),
|
|
44
|
+
summary: (v, p) => {
|
|
45
|
+
if (v.decision === 'approve')
|
|
46
|
+
return 'Approved';
|
|
47
|
+
const choice = (p.reject_choices ?? []).find((c) => c.value === v.choice);
|
|
48
|
+
return choice ? (choice.label ?? `Rejected — ${choice.value}`) : 'Rejected';
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=approval.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approval.js","sourceRoot":"","sources":["../../../src/shared/definitions/approval.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG;;;;;;;;GAQG;AAEH,OAA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I,CAAC,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;KAClG,EAAE,EAAE,KAAK,EAAE,qCAAqC,EAAE,CAAyC;IAC5F,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC;IACnC,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACd,IAAI,CAAC,CAAC,QAAQ,KAAK,SAAS;YAAE,OAAO,UAAU,CAAC;QAChD,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QAC1E,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,cAAc,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IAChF,CAAC;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pieces the built-in definitions share (PLAN-hug-widgets §9.2.0): their common params, notes (a comment, a reason),
|
|
3
|
+
* the "inputs can't use our own keys" rule, and the first-answer summary.
|
|
4
|
+
*
|
|
5
|
+
* Browser-safe: imports only `zod` and the shared hug modules.
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
import { type RequestedInput } from '../requested_inputs.js';
|
|
9
|
+
/** Longest prompt (markdown). */
|
|
10
|
+
export declare const MAX_PROMPT_LENGTH = 20000;
|
|
11
|
+
/** Longest free-text answer a built-in hug adds itself (a reason, a comment). */
|
|
12
|
+
export declare const MAX_NOTE_LENGTH = 20000;
|
|
13
|
+
/** Params every built-in hug takes: what is asked, what is shown with it, and the fields. */
|
|
14
|
+
export declare const base_params: {
|
|
15
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
16
|
+
context: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<"markdown">;
|
|
18
|
+
text: z.ZodString;
|
|
19
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
20
|
+
type: z.ZodLiteral<"artifact">;
|
|
21
|
+
artifact_id: z.ZodString;
|
|
22
|
+
label: z.ZodOptional<z.ZodString>;
|
|
23
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<"checks">;
|
|
25
|
+
results: z.ZodArray<z.ZodObject<{
|
|
26
|
+
name: z.ZodString;
|
|
27
|
+
ok: z.ZodBoolean;
|
|
28
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
29
|
+
}, z.core.$strict>>;
|
|
30
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
31
|
+
type: z.ZodLiteral<"transcript">;
|
|
32
|
+
turns: z.ZodArray<z.ZodObject<{
|
|
33
|
+
role: z.ZodString;
|
|
34
|
+
content: z.ZodString;
|
|
35
|
+
}, z.core.$strict>>;
|
|
36
|
+
}, z.core.$strict>], "type">>>;
|
|
37
|
+
inputs: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
38
|
+
type: z.ZodLiteral<"text">;
|
|
39
|
+
multiline: z.ZodOptional<z.ZodBoolean>;
|
|
40
|
+
min_length: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
max_length: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
label: z.ZodOptional<z.ZodString>;
|
|
44
|
+
help: z.ZodOptional<z.ZodString>;
|
|
45
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
47
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
48
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
49
|
+
type: z.ZodLiteral<"number">;
|
|
50
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
52
|
+
integer: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
label: z.ZodOptional<z.ZodString>;
|
|
55
|
+
help: z.ZodOptional<z.ZodString>;
|
|
56
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
57
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
58
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
59
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
60
|
+
type: z.ZodLiteral<"boolean">;
|
|
61
|
+
name: z.ZodString;
|
|
62
|
+
label: z.ZodOptional<z.ZodString>;
|
|
63
|
+
help: z.ZodOptional<z.ZodString>;
|
|
64
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
65
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
66
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
67
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
68
|
+
type: z.ZodLiteral<"enum">;
|
|
69
|
+
choices: z.ZodArray<z.ZodObject<{
|
|
70
|
+
value: z.ZodString;
|
|
71
|
+
label: z.ZodOptional<z.ZodString>;
|
|
72
|
+
}, z.core.$strict>>;
|
|
73
|
+
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
name: z.ZodString;
|
|
75
|
+
label: z.ZodOptional<z.ZodString>;
|
|
76
|
+
help: z.ZodOptional<z.ZodString>;
|
|
77
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
79
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
80
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
81
|
+
type: z.ZodLiteral<"file">;
|
|
82
|
+
accept: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
83
|
+
max_bytes: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
label: z.ZodOptional<z.ZodString>;
|
|
87
|
+
help: z.ZodOptional<z.ZodString>;
|
|
88
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
90
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
91
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
92
|
+
type: z.ZodLiteral<"channel">;
|
|
93
|
+
multiple: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
name: z.ZodString;
|
|
95
|
+
label: z.ZodOptional<z.ZodString>;
|
|
96
|
+
help: z.ZodOptional<z.ZodString>;
|
|
97
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
default: z.ZodOptional<z.ZodUnknown>;
|
|
99
|
+
ui: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
100
|
+
}, z.core.$strict>], "type">>>;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Refuses inputs named like one of the hug's own answer keys.
|
|
104
|
+
*
|
|
105
|
+
* @param own - The keys the hug adds to an answer itself (`comment`, `declined`, …).
|
|
106
|
+
*/
|
|
107
|
+
export declare const no_own_keys: (own: readonly string[]) => (p: {
|
|
108
|
+
inputs: RequestedInput[];
|
|
109
|
+
}, ctx: z.RefinementCtx) => void;
|
|
110
|
+
/** A note: text of at most {@link MAX_NOTE_LENGTH}, trimmed (the checked value has no surrounding spaces); required means not blank. */
|
|
111
|
+
export declare function note(required: boolean): z.ZodType<string | null | undefined>;
|
|
112
|
+
/** The upload slots of requested inputs: their file inputs. */
|
|
113
|
+
export declare function file_inputs(inputs: readonly RequestedInput[]): {
|
|
114
|
+
required: boolean;
|
|
115
|
+
multiple?: boolean | undefined;
|
|
116
|
+
max_bytes?: number | undefined;
|
|
117
|
+
accept?: string[] | undefined;
|
|
118
|
+
name: string;
|
|
119
|
+
}[];
|
|
120
|
+
/** The first answered value that reads as a line (not a file), as today's "others responded" line shows it. */
|
|
121
|
+
export declare function first_answer(inputs: readonly RequestedInput[], values: Record<string, unknown>): string | null;
|
|
122
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/shared/definitions/common.ts"],"names":[],"mappings":"AACA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAyB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEpF,iCAAiC;AACjC,eAAO,MAAM,iBAAiB,QAAS,CAAC;AACxC,iFAAiF;AACjF,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC,6FAA6F;AAC7F,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIvB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,SAAS,MAAM,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,cAAc,EAAE,CAAA;CAAE,EAAE,KAAK,CAAC,CAAC,aAAa,KAAG,IAI/G,CAAC;AAEF,wIAAwI;AACxI,wBAAgB,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,CAK5E;AAED,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE;;;;;;IAQ5D;AAaD,+GAA+G;AAC/G,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI,CAO9G"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// GENERATED by packages/hug-frontend/scripts/sync_shared.mjs from cliq-sdk/src/hug — do not edit.
|
|
2
|
+
/**
|
|
3
|
+
* Pieces the built-in definitions share (PLAN-hug-widgets §9.2.0): their common params, notes (a comment, a reason),
|
|
4
|
+
* the "inputs can't use our own keys" rule, and the first-answer summary.
|
|
5
|
+
*
|
|
6
|
+
* Browser-safe: imports only `zod` and the shared hug modules.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
import { ContextSchema } from '../context.js';
|
|
10
|
+
import { RequestedInputsSchema } from '../requested_inputs.js';
|
|
11
|
+
/** Longest prompt (markdown). */
|
|
12
|
+
export const MAX_PROMPT_LENGTH = 20_000;
|
|
13
|
+
/** Longest free-text answer a built-in hug adds itself (a reason, a comment). */
|
|
14
|
+
export const MAX_NOTE_LENGTH = 20_000;
|
|
15
|
+
/** Params every built-in hug takes: what is asked, what is shown with it, and the fields. */
|
|
16
|
+
export const base_params = {
|
|
17
|
+
prompt: z.string().max(MAX_PROMPT_LENGTH).optional(),
|
|
18
|
+
context: ContextSchema.optional(),
|
|
19
|
+
inputs: RequestedInputsSchema.default([]),
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Refuses inputs named like one of the hug's own answer keys.
|
|
23
|
+
*
|
|
24
|
+
* @param own - The keys the hug adds to an answer itself (`comment`, `declined`, …).
|
|
25
|
+
*/
|
|
26
|
+
export const no_own_keys = (own) => (p, ctx) => {
|
|
27
|
+
p.inputs.forEach((input, i) => {
|
|
28
|
+
if (own.includes(input.name))
|
|
29
|
+
ctx.addIssue({ code: 'custom', path: ['inputs', i, 'name'], message: `'${input.name}' is a key of the hug's own` });
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
/** A note: text of at most {@link MAX_NOTE_LENGTH}, trimmed (the checked value has no surrounding spaces); required means not blank. */
|
|
33
|
+
export function note(required) {
|
|
34
|
+
const text = z.string({ error: (i) => (i.input === undefined || i.input === null ? 'required' : 'must be text') })
|
|
35
|
+
.trim()
|
|
36
|
+
.max(MAX_NOTE_LENGTH, `at most ${MAX_NOTE_LENGTH} characters`);
|
|
37
|
+
return required ? text.refine((v) => v !== '', 'required') : text.nullish();
|
|
38
|
+
}
|
|
39
|
+
/** The upload slots of requested inputs: their file inputs. */
|
|
40
|
+
export function file_inputs(inputs) {
|
|
41
|
+
return inputs.filter((i) => i.type === 'file').map((i) => ({
|
|
42
|
+
name: i.name,
|
|
43
|
+
...(i.accept ? { accept: i.accept } : {}),
|
|
44
|
+
...(i.max_bytes ? { max_bytes: i.max_bytes } : {}),
|
|
45
|
+
...(i.multiple ? { multiple: true } : {}),
|
|
46
|
+
required: i.required !== false,
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
/** An input's value as words: an enum's choice labels, Yes / No, channels joined, else the text. */
|
|
50
|
+
function value_words(input, value) {
|
|
51
|
+
if (input.type === 'enum') {
|
|
52
|
+
const label = (v) => input.choices.find((c) => c.value === v)?.label ?? String(v);
|
|
53
|
+
return Array.isArray(value) ? value.map(label).join(', ') : label(value);
|
|
54
|
+
}
|
|
55
|
+
if (input.type === 'boolean')
|
|
56
|
+
return value ? 'Yes' : 'No';
|
|
57
|
+
if (Array.isArray(value))
|
|
58
|
+
return value.join(', ');
|
|
59
|
+
return String(value);
|
|
60
|
+
}
|
|
61
|
+
/** The first answered value that reads as a line (not a file), as today's "others responded" line shows it. */
|
|
62
|
+
export function first_answer(inputs, values) {
|
|
63
|
+
for (const input of inputs) {
|
|
64
|
+
const value = values[input.name];
|
|
65
|
+
if (input.type === 'file' || value === undefined || value === null || value === '')
|
|
66
|
+
continue;
|
|
67
|
+
return value_words(input, value);
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 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