import { HelpText } from './HelpText'; import { FieldLabel, FieldInput } from './formUtils'; import { StringArrayEditor } from './StringArrayEditor'; import type { SectionFormProps } from './types'; /** * External Services settings — credentials and gates for third-party * API integrations (X / Twitter, Maps, Amazon / Keepa) plus the * user-supplied scripts security gate. * * Replaces the `x` / `maps` / `amazon` / `user-folder` tabs of the * legacy grab-bag `ToolsForm`. The config keys are unchanged: * * tools.x_auth_token / x_ct0 / x_cli_command / x_timeout / x_proxy / x_chrome_profile * tools.google_maps_api_key * tools.amazon_affiliate_tag / keepa_api_key * tools.user_scripts_enabled / user_scripts_allow_userids * * Note: trash_retention_days lives in Paths & Storage (storage.*) since * config v2 normalization (#360/#362). It is intentionally NOT shown * here — see PathsStorageForm. */ export function ToolsExternalForm({ config, onChange }: SectionFormProps) { const tools = config.tools ?? {}; return (
--permission で sandbox 化され child_process / worker / tmpdir 外の FS アクセスを deny。
browser-macros は Playwright の要件 (child_process / native bindings / network) で sandbox 不可、フル Node.js capability。
信頼できるユーザーのみに有効化。
user_scripts_enabled のみで制御。設定すると指定 ID のみ RunUserScript / scheduled script task が許可される。