@luckylillia-dev/plugin-aiimgdetector 0.0.0-placeholder → 1.0.4

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.
Files changed (99) hide show
  1. package/README.md +2 -2
  2. package/assets/demo.png +0 -0
  3. package/assets/icon.svg +15 -0
  4. package/assets/synthid-login-check.jpg +0 -0
  5. package/docs/details.md +45 -0
  6. package/docs/publishing.md +66 -0
  7. package/docs/synthid.md +80 -0
  8. package/lib/image.js +90 -0
  9. package/lib/index.js +207 -0
  10. package/lib/provenance.js +21 -0
  11. package/lib/synthid-auth.js +100 -0
  12. package/lib/synthid-browser.js +451 -0
  13. package/lib/synthid-http-runtime/chromium-css-property-catalog.mjs +7 -0
  14. package/lib/synthid-http-runtime/complete-protocol.mjs +88 -0
  15. package/lib/synthid-http-runtime/entry.d.mts +41 -0
  16. package/lib/synthid-http-runtime/entry.mjs +6 -0
  17. package/lib/synthid-http-runtime/event-listener-diagnostics.mjs +141 -0
  18. package/lib/synthid-http-runtime/independent-request-reference.mjs +49 -0
  19. package/lib/synthid-http-runtime/jsdom-event-clock-compat.mjs +76 -0
  20. package/lib/synthid-http-runtime/lifecycle-client.mjs +165 -0
  21. package/lib/synthid-http-runtime/lifecycle-web-session.mjs +114 -0
  22. package/lib/synthid-http-runtime/lifecycle-worker.mjs +363 -0
  23. package/lib/synthid-http-runtime/node-platform-failure-diagnostics.mjs +108 -0
  24. package/lib/synthid-http-runtime/realm-activation-diagnostic.js +31 -0
  25. package/lib/synthid-http-runtime/realm-focus-diagnostic.js +9 -0
  26. package/lib/synthid-http-runtime/realm-init.js +34 -0
  27. package/lib/synthid-http-runtime/realm-pointer-diagnostic.js +49 -0
  28. package/lib/synthid-http-runtime/runtime-anchor-href-translate.mjs +242 -0
  29. package/lib/synthid-http-runtime/runtime-child-web-compat.mjs +103 -0
  30. package/lib/synthid-http-runtime/runtime-chrome-csi.mjs +216 -0
  31. package/lib/synthid-http-runtime/runtime-clock-precision-control.mjs +51 -0
  32. package/lib/synthid-http-runtime/runtime-css-properties-compat.mjs +165 -0
  33. package/lib/synthid-http-runtime/runtime-detached-frame-compat.mjs +214 -0
  34. package/lib/synthid-http-runtime/runtime-javascript-bindings.mjs +69 -0
  35. package/lib/synthid-http-runtime/runtime-navigator-compat.mjs +99 -0
  36. package/lib/synthid-http-runtime/runtime-permissions-binding.mjs +64 -0
  37. package/lib/synthid-http-runtime/runtime-permissions-control.mjs +143 -0
  38. package/lib/synthid-http-runtime/runtime-web-compat.mjs +639 -0
  39. package/lib/synthid-http-runtime/runtime-webidl-callable-control.mjs +151 -0
  40. package/lib/synthid-http-runtime/runtime-webidl-realm-compat.mjs +132 -0
  41. package/lib/synthid-http-runtime/runtime-window-state-compat.mjs +128 -0
  42. package/lib/synthid-http-runtime/scripting-parser.mjs +13 -0
  43. package/lib/synthid-http-runtime/web-session.mjs +64 -0
  44. package/lib/synthid-http-runtime/webidl-brand-errors-preload.mjs +49 -0
  45. package/lib/synthid-http-runtime/webidl-callable-source-catalog.mjs +4491 -0
  46. package/lib/synthid-http-runtime/webidl-realm-catalog.mjs +124 -0
  47. package/lib/synthid-http.js +314 -0
  48. package/lib/synthid-manual.js +365 -0
  49. package/lib/synthid-page.js +101 -0
  50. package/lib/synthid-result.js +189 -0
  51. package/lib/synthid.js +540 -0
  52. package/lib/vision.js +41 -0
  53. package/package.json +77 -4
  54. package/src/image.ts +74 -0
  55. package/src/index.ts +203 -0
  56. package/src/provenance.ts +40 -0
  57. package/src/synthid-auth.ts +83 -0
  58. package/src/synthid-browser.ts +426 -0
  59. package/src/synthid-http-runtime/chromium-css-property-catalog.mjs +7 -0
  60. package/src/synthid-http-runtime/complete-protocol.mjs +88 -0
  61. package/src/synthid-http-runtime/entry.d.mts +41 -0
  62. package/src/synthid-http-runtime/entry.mjs +6 -0
  63. package/src/synthid-http-runtime/event-listener-diagnostics.mjs +141 -0
  64. package/src/synthid-http-runtime/independent-request-reference.mjs +49 -0
  65. package/src/synthid-http-runtime/jsdom-event-clock-compat.mjs +76 -0
  66. package/src/synthid-http-runtime/lifecycle-client.mjs +165 -0
  67. package/src/synthid-http-runtime/lifecycle-web-session.mjs +114 -0
  68. package/src/synthid-http-runtime/lifecycle-worker.mjs +363 -0
  69. package/src/synthid-http-runtime/node-platform-failure-diagnostics.mjs +108 -0
  70. package/src/synthid-http-runtime/realm-activation-diagnostic.js +31 -0
  71. package/src/synthid-http-runtime/realm-focus-diagnostic.js +9 -0
  72. package/src/synthid-http-runtime/realm-init.js +34 -0
  73. package/src/synthid-http-runtime/realm-pointer-diagnostic.js +49 -0
  74. package/src/synthid-http-runtime/runtime-anchor-href-translate.mjs +242 -0
  75. package/src/synthid-http-runtime/runtime-child-web-compat.mjs +103 -0
  76. package/src/synthid-http-runtime/runtime-chrome-csi.mjs +216 -0
  77. package/src/synthid-http-runtime/runtime-clock-precision-control.mjs +51 -0
  78. package/src/synthid-http-runtime/runtime-css-properties-compat.mjs +165 -0
  79. package/src/synthid-http-runtime/runtime-detached-frame-compat.mjs +214 -0
  80. package/src/synthid-http-runtime/runtime-javascript-bindings.mjs +69 -0
  81. package/src/synthid-http-runtime/runtime-navigator-compat.mjs +99 -0
  82. package/src/synthid-http-runtime/runtime-permissions-binding.mjs +64 -0
  83. package/src/synthid-http-runtime/runtime-permissions-control.mjs +143 -0
  84. package/src/synthid-http-runtime/runtime-web-compat.mjs +639 -0
  85. package/src/synthid-http-runtime/runtime-webidl-callable-control.mjs +151 -0
  86. package/src/synthid-http-runtime/runtime-webidl-realm-compat.mjs +132 -0
  87. package/src/synthid-http-runtime/runtime-window-state-compat.mjs +128 -0
  88. package/src/synthid-http-runtime/scripting-parser.mjs +13 -0
  89. package/src/synthid-http-runtime/web-session.mjs +64 -0
  90. package/src/synthid-http-runtime/webidl-brand-errors-preload.mjs +49 -0
  91. package/src/synthid-http-runtime/webidl-callable-source-catalog.mjs +4491 -0
  92. package/src/synthid-http-runtime/webidl-realm-catalog.mjs +124 -0
  93. package/src/synthid-http.ts +290 -0
  94. package/src/synthid-manual.ts +388 -0
  95. package/src/synthid-page.ts +103 -0
  96. package/src/synthid-result.ts +177 -0
  97. package/src/synthid.ts +514 -0
  98. package/src/vision.ts +57 -0
  99. package/webui/index.js +279 -0
package/webui/index.js ADDED
@@ -0,0 +1,279 @@
1
+ // React and the SDK are provided by the host's import map; no separate frontend build.
2
+ import { createContext, createElement as h, useContext, useEffect, useMemo, useRef, useState } from 'react'
3
+ import { SchemaForm, usePluginContext, usePluginStatus } from '@luckylillia-dev/plugin-sdk/webui'
4
+
5
+ const endpoint = '/api/aiimgdetector/synthid'
6
+ const states = new Set(['logged-out', 'opening', 'awaiting-login', 'capturing', 'ready', 'error'])
7
+ const credentialKeys = ['refreshToken']
8
+ const SynthIdEditorContext = createContext(null)
9
+ const emptyCredentials = value => credentialKeys.every(key => !String(value?.[key] ?? '').trim())
10
+ const line = { display: 'flex', alignItems: 'center', gap: 8, flexWrap: 'wrap' }
11
+ const muted = { fontSize: 13, lineHeight: 1.6, margin: 0, overflowWrap: 'anywhere' }
12
+ const errorStyle = { ...muted, color: 'rgb(239 68 68)' }
13
+
14
+ function inactiveMessage(plugin) {
15
+ if (!plugin) return '正在读取插件状态…'
16
+ if (plugin.disabled) return '启用 AI 图片检测插件后即可登录 SynthID。'
17
+ if (plugin.state === 'loading') return '插件正在启动,稍后即可登录 SynthID。'
18
+ if (plugin.state === 'pending') return '插件正在等待依赖服务,请先启用所需服务。'
19
+ if (plugin.state === 'failed') return '插件启动失败,请在插件列表查看错误并重新加载。'
20
+ return '插件尚未运行,请在插件列表检查状态。'
21
+ }
22
+
23
+ function accountTitle(status) {
24
+ if (!status) return '正在读取登录状态…'
25
+ switch (status.state) {
26
+ case 'ready': return status.account ? `已登录 · ${status.account}` : '已登录'
27
+ case 'opening': return '正在打开登录浏览器…'
28
+ case 'awaiting-login': return '等待你在浏览器中完成登录'
29
+ case 'capturing': return '已登录,正在获取检测凭证…'
30
+ case 'error': return status.account ? '已登录,凭证获取失败' : '登录需要处理'
31
+ default: return '尚未登录'
32
+ }
33
+ }
34
+
35
+ function SynthIdAccount({ credentials, onCredentials }) {
36
+ const ctx = usePluginContext()
37
+ const plugin = usePluginStatus()
38
+ const active = !!plugin && !plugin.disabled && plugin.state === 'active'
39
+ const [status, setStatus] = useState(null)
40
+ const [request, setRequest] = useState(null)
41
+ const [error, setError] = useState('')
42
+ const [filled, setFilled] = useState(false)
43
+ const controller = useRef(null)
44
+ const latest = useRef({ credentials, onCredentials })
45
+ latest.current = { credentials, onCredentials }
46
+ // Only an initially blank form can restore a saved session automatically.
47
+ // Once credentials are edited or filled, later polls must not replace them.
48
+ const restoreAllowed = useRef(emptyCredentials(credentials))
49
+ if (!emptyCredentials(credentials)) restoreAllowed.current = false
50
+ const loginAttempt = useRef(null)
51
+ const lastAppliedRevision = useRef(null)
52
+ const currentStatus = useRef(null)
53
+
54
+ useEffect(() => {
55
+ setStatus(null)
56
+ setError('')
57
+ setRequest(null)
58
+ if (!active) return
59
+
60
+ // Each request schedules the next poll after it settles. Actions use the same
61
+ // lock, so an old status response cannot overwrite a login/cancel/logout result.
62
+ let disposed = false
63
+ let pending = false
64
+ let timer
65
+ const fillCredentials = async next => {
66
+ const revision = next.credentialRevision
67
+ if (next.state !== 'ready' || typeof revision !== 'string' || !revision || revision === lastAppliedRevision.current) return
68
+ const fromLogin = loginAttempt.current && revision !== loginAttempt.current.previousRevision
69
+ const fromRestore = restoreAllowed.current && emptyCredentials(latest.current.credentials)
70
+ if (!fromLogin && !fromRestore) return
71
+ setRequest('credentials')
72
+ const result = await ctx.api(`${endpoint}/credentials`, { method: 'POST', body: { revision } })
73
+ if (disposed) return
74
+ if (result?.revision !== revision || !credentialKeys.every(key => typeof result.credentials?.[key] === 'string' && result.credentials[key].trim())) {
75
+ throw new Error('未能取得完整登录凭证,请重新登录 SynthID。')
76
+ }
77
+ // An edit made while restoring was in flight wins over the old session.
78
+ if (!fromLogin && (!restoreAllowed.current || !emptyCredentials(latest.current.credentials))) return
79
+ restoreAllowed.current = false
80
+ loginAttempt.current = null
81
+ lastAppliedRevision.current = revision
82
+ latest.current.onCredentials(Object.fromEntries(credentialKeys.map(key => [key, result.credentials[key]])))
83
+ setFilled(true)
84
+ }
85
+ const run = async action => {
86
+ if (disposed || pending) return
87
+ pending = true
88
+ clearTimeout(timer)
89
+ if (action === 'login') {
90
+ loginAttempt.current = { previousRevision: currentStatus.current?.credentialRevision }
91
+ restoreAllowed.current = false
92
+ setFilled(false)
93
+ } else if (action === 'cancel' || action === 'logout') {
94
+ loginAttempt.current = null
95
+ restoreAllowed.current = false
96
+ }
97
+ setRequest(action)
98
+ try {
99
+ const next = await ctx.api(`${endpoint}/${action}`, action === 'status' ? undefined : { method: 'POST' })
100
+ if (disposed) return
101
+ if (!next || !states.has(next.state)) throw new Error('登录服务返回了无法识别的状态,请重新加载插件。')
102
+ const safeStatus = {
103
+ state: next.state,
104
+ account: typeof next.account === 'string' ? next.account : undefined,
105
+ message: typeof next.message === 'string' ? next.message : undefined,
106
+ credentialRevision: typeof next.credentialRevision === 'string' ? next.credentialRevision : undefined,
107
+ }
108
+ currentStatus.current = safeStatus
109
+ setStatus(safeStatus)
110
+ if (next.state === 'error') loginAttempt.current = null
111
+ await fillCredentials(safeStatus)
112
+ if (disposed) return
113
+ setError('')
114
+ } catch (failure) {
115
+ if (!disposed) setError(failure instanceof Error ? failure.message : '请求失败,请稍后重试。')
116
+ } finally {
117
+ pending = false
118
+ if (!disposed) {
119
+ setRequest(null)
120
+ timer = setTimeout(() => { void run('status') }, 5000)
121
+ }
122
+ }
123
+ }
124
+ const current = { run }
125
+ controller.current = current
126
+ void run('status')
127
+ return () => {
128
+ disposed = true
129
+ clearTimeout(timer)
130
+ loginAttempt.current = null
131
+ if (controller.current === current) controller.current = null
132
+ }
133
+ }, [ctx, active])
134
+
135
+ const act = action => { void controller.current?.run(action) }
136
+ const loggingIn = ['opening', 'awaiting-login', 'capturing'].includes(status?.state)
137
+ const busy = !!request
138
+ const operationLabel = request === 'login' ? '正在启动登录…'
139
+ : request === 'cancel' ? '正在取消登录…'
140
+ : request === 'logout' ? '正在清除会话…'
141
+ : request === 'credentials' ? '正在填入凭证…' : ''
142
+
143
+ return h('section', { className: 'bg-theme-item', 'aria-label': 'SynthID 浏览器登录',
144
+ style: { padding: 16, borderRadius: 12, display: 'grid', gap: 10, minWidth: 0 } },
145
+ h('div', { style: { ...line, justifyContent: 'space-between' } },
146
+ h('span', { className: 'text-sm font-medium text-theme' }, 'SynthID 浏览器登录'),
147
+ active && h('span', { className: 'text-theme-secondary', role: 'status', 'aria-live': 'polite', style: muted },
148
+ operationLabel || (error ? '暂时无法连接登录服务' : accountTitle(status))),
149
+ ),
150
+ h('p', { className: 'text-theme-muted', style: muted },
151
+ '登录浏览器和检测请求自动使用 Bot「代理」插件的设置。'),
152
+ !active
153
+ ? h('p', { className: 'text-theme-muted', style: muted }, inactiveMessage(plugin))
154
+ : h('div', { style: { display: 'grid', gap: 10 } },
155
+ status?.message && !error && h('p', { className: 'text-theme-secondary',
156
+ style: status.state === 'error' ? errorStyle : muted }, status.message),
157
+ error && h('p', { role: 'alert', style: errorStyle }, error),
158
+ h('p', { className: 'text-theme-muted', style: muted },
159
+ '完成 Google 登录后,插件会读取登录凭据并填入下方。检测通过 HTTP 完成,无需上传测试图片或保留浏览器窗口。也可直接填写自己的 refresh_token。'),
160
+ filled && h('p', { className: 'text-theme-secondary', role: 'status', style: muted },
161
+ '凭证已自动填入,请点击弹窗底部「保存」。'),
162
+ status?.state === 'ready' && h('p', { className: 'text-theme-muted', style: muted },
163
+ '取得登录凭据后会关闭登录窗口,后续检测通过 HTTP 完成。清除浏览器会话不会删除下方已保存的凭证。'),
164
+ h('div', { style: line },
165
+ !error && status && !loggingIn && h('button', {
166
+ type: 'button', className: 'btn-primary', disabled: busy, onClick: () => act('login'),
167
+ }, request === 'login' ? '正在启动登录…' : status.account ? '重新获取凭证' : status.state === 'error' ? '重新登录 SynthID' : '登录 SynthID'),
168
+ !error && loggingIn && h('button', {
169
+ type: 'button', className: 'btn-glass', disabled: busy, onClick: () => act('cancel'),
170
+ }, request === 'cancel' ? '正在取消…' : '取消登录'),
171
+ !error && !loggingIn && (status?.state === 'ready' || status?.account) && h('button', {
172
+ type: 'button', className: 'btn-glass', disabled: busy, onClick: () => act('logout'),
173
+ }, request === 'logout' ? '正在清除…' : '清除浏览器会话'),
174
+ error && h('button', { type: 'button', className: 'btn-glass', disabled: busy, onClick: () => act('status') },
175
+ busy ? '正在重试…' : '重试'),
176
+ ),
177
+ ),
178
+ )
179
+ }
180
+
181
+ function CredentialHelp() {
182
+ const code = text => h('code', { style: { fontSize: 'inherit', overflowWrap: 'anywhere' } }, text)
183
+ return h('section', { className: 'bg-theme-item', 'aria-label': 'SynthID 手动凭证说明',
184
+ style: { padding: 16, borderRadius: 12, display: 'grid', gap: 10, minWidth: 0 } },
185
+ h('p', { className: 'text-theme-secondary', style: muted },
186
+ '只需填写登录凭据 refresh_token。插件会为每张图片生成新的上传标识和校验凭据,通过 HTTP 检测。可用登录按钮自动填写,也可从自己的浏览器复制;填写或修改后点击底部「保存」。'),
187
+ h('details', null,
188
+ h('summary', { className: 'text-sm font-medium text-theme', style: { cursor: 'pointer' } }, '如何获取凭证(在自己的浏览器中操作)'),
189
+ h('ol', { className: 'text-theme-secondary', style: { ...muted, marginTop: 12, paddingLeft: 22, listStyle: 'decimal', display: 'grid', gap: 10 } },
190
+ h('li', null, '用 Chrome 或 Edge 打开 ',
191
+ h('a', { href: 'https://synthid.com/image-detection', target: '_blank', rel: 'noopener noreferrer', style: { textDecoration: 'underline' } }, 'synthid.com/image-detection'),
192
+ ',完成 Google 登录与首次使用提示。'),
193
+ h('li', null, '获取「登录凭据」:切到 Application(应用)→ IndexedDB → ', code('firebaseLocalStorageDb'), ' → ', code('firebaseLocalStorage'),
194
+ ',展开当前账号的 ', code('firebase:authUser:…'), ' 记录,在 value 中复制 ', code('stsTokenManager.refreshToken'),
195
+ ' 的完整值,不带外围引号。没有该数据库时,确认已登录,再刷新开发者工具中的数据。'),
196
+ ),
197
+ h('p', { className: 'text-theme-muted', style: { ...muted, marginTop: 12 } },
198
+ '无需复制上传标识或网页校验请求头。旧版本保存的这两项不再用于检测。遇到服务拒绝可稍后重试;只有提示登录失效时才需要更新登录凭据。'),
199
+ h('p', { className: 'text-theme-muted', style: { ...muted, marginTop: 8 } },
200
+ '这些内容可以代表你的登录身份,请勿发送给他人或放进截图。保存后界面会遮罩显示;Bot 配置文件仍需妥善保管。'),
201
+ ),
202
+ )
203
+ }
204
+
205
+ function SecondsInput({ value, onChange, meta, error }) {
206
+ return h('div', { style: line },
207
+ h('input', {
208
+ type: 'number', className: 'input-field', style: { flex: 1, minWidth: 0 },
209
+ 'aria-label': '检测超时(秒)', 'aria-invalid': !!error,
210
+ min: meta.min / 1000, max: meta.max / 1000, step: 'any',
211
+ value: value === undefined ? '' : value / 1000,
212
+ onChange: event => onChange(event.target.value === '' ? undefined : Math.round(Number(event.target.value) * 1000)),
213
+ }),
214
+ h('span', { className: 'text-theme-secondary' }, '秒'),
215
+ )
216
+ }
217
+
218
+ function SynthIdFields({ value, onChange }) {
219
+ const editor = useContext(SynthIdEditorContext)
220
+ const current = { ...value, credentials: value?.credentials && typeof value.credentials === 'object' ? value.credentials : {} }
221
+ const latest = useRef({ value: current, onChange })
222
+ latest.current = { value: current, onChange }
223
+ if (!editor) return null
224
+ const credentialErrors = Object.fromEntries(Object.entries(editor.errors)
225
+ .filter(([path]) => path.startsWith('synthid.credentials.'))
226
+ .map(([path, message]) => [path.slice('synthid.credentials.'.length), message]))
227
+ const synthidErrors = Object.fromEntries(Object.entries(editor.errors)
228
+ .filter(([path]) => path.startsWith('synthid.'))
229
+ .map(([path, message]) => [path.slice('synthid.'.length), message]))
230
+ const updateCredentials = credentials => latest.current.onChange({ ...latest.current.value, credentials })
231
+ return h('section', { 'aria-label': 'SynthID 检测设置',
232
+ className: 'rounded-xl border border-theme-divider', style: { padding: 16, display: 'grid', gap: 16, minWidth: 0 } },
233
+ h(SynthIdAccount, { credentials: current.credentials, onCredentials: updateCredentials }),
234
+ h(CredentialHelp),
235
+ synthidErrors.credentials && h('p', { style: errorStyle, role: 'alert' }, synthidErrors.credentials),
236
+ h(SchemaForm, { schema: editor.credentialsSchema, value: current.credentials, onChange: updateCredentials,
237
+ errors: credentialErrors, fields: credentialKeys }),
238
+ h(SchemaForm, { schema: editor.synthidSchema, value: current, onChange, errors: synthidErrors, fields: ['timeout'] }),
239
+ )
240
+ }
241
+
242
+ function DetectorEditor({ value, onChange, schema, errors = {} }) {
243
+ // The host owns the SynthID switch. Its object branch renders the login and
244
+ // credential fields together, while all changes still use the outer save.
245
+ const schemas = useMemo(() => {
246
+ const copy = structuredClone(schema)
247
+ const refs = copy?.refs
248
+ const synthid = refs?.[refs[copy.uid]?.dict?.synthid]
249
+ let synthidSchema
250
+ let credentialsSchema
251
+ for (const branch of synthid?.list ?? []) {
252
+ const node = refs[branch]
253
+ if (node?.type !== 'object') continue
254
+ node.meta = { ...node.meta, role: 'aiimgdetector-synthid' }
255
+ synthidSchema = { uid: branch, refs }
256
+ const credentialNode = refs[node.dict?.credentials]
257
+ const credentialUid = credentialNode?.type === 'object' ? node.dict.credentials
258
+ : credentialNode?.list?.find(uid => refs[uid]?.type === 'object')
259
+ if (credentialUid !== undefined) credentialsSchema = { uid: credentialUid, refs }
260
+ const timeout = refs[node.dict?.timeout]
261
+ if (timeout) timeout.meta = { ...timeout.meta, role: 'aiimgdetector-seconds' }
262
+ }
263
+ return { editorSchema: copy, synthidSchema, credentialsSchema }
264
+ }, [schema])
265
+ const { '': rootError, ...fieldErrors } = errors
266
+ const form = fields => h(SchemaForm, { schema: schemas.editorSchema, value, onChange, errors: fieldErrors, fields })
267
+ return h(SynthIdEditorContext.Provider, { value: { ...schemas, errors: fieldErrors } },
268
+ h('div', { style: { display: 'grid', gap: 20 } },
269
+ rootError && h('p', { style: errorStyle, role: 'alert' }, rootError),
270
+ form(['trigger', 'cooldown', 'provenance', 'synthid', 'vision']),
271
+ ),
272
+ )
273
+ }
274
+
275
+ export default function apply(ctx) {
276
+ ctx.field('aiimgdetector-synthid', SynthIdFields)
277
+ ctx.field('aiimgdetector-seconds', SecondsInput)
278
+ ctx.config(DetectorEditor)
279
+ }