diff --git a/frontend/src/lib/components/JobTokenScopesSetting.svelte b/frontend/src/lib/components/JobTokenScopesSetting.svelte
index ac5fc8d59c..6ef1ecf3c4 100644
--- a/frontend/src/lib/components/JobTokenScopesSetting.svelte
+++ b/frontend/src/lib/components/JobTokenScopesSetting.svelte
@@ -8,9 +8,12 @@
/** `null`/`undefined`: the job token has the full permissions of the identity it runs as. */
value: string[] | null | undefined
kind: 'script' | 'flow' | 'step'
+ /** Match the toggles listed around it. */
+ size?: 'xs' | 'sm'
+ textClass?: string
}
- let { value = $bindable(), kind }: Props = $props()
+ let { value = $bindable(), kind, size = 'sm', textClass }: Props = $props()
const OIDC_ONLY = ['oidc:write']
@@ -36,7 +39,8 @@
{
if (value != null) {
@@ -45,7 +49,13 @@
setMode('oidc_only')
}
}}
- options={{ right: 'Restrict the job token' }}
+ options={{
+ right: 'Restrict the job token',
+ rightTooltip:
+ "Limit what the WM_TOKEN of this " +
+ kind +
+ "'s jobs can do through the API, e.g. only mint an OIDC token. Use it for code that handles untrusted input, such as AI agents."
+ }}
/>
{#if value != null}
setMode(v)}>
diff --git a/frontend/src/lib/components/ScriptBuilder.svelte b/frontend/src/lib/components/ScriptBuilder.svelte
index 059d0109ef..62f9851fcc 100644
--- a/frontend/src/lib/components/ScriptBuilder.svelte
+++ b/frontend/src/lib/components/ScriptBuilder.svelte
@@ -2069,13 +2069,6 @@
- {#snippet header()}
-
- Restrict what the token of this script's jobs (WM_TOKEN) can do through the
- API, e.g. only mint an OIDC token. Use it for scripts that run untrusted
- input, such as AI agents.
-
- {/snippet}
{/if}
+
+
+
+
{#if loopSubset}
@@ -383,8 +392,4 @@
{/if}
{/if}
-
- {@render sectionHeader('Job token')}
-
-
diff --git a/frontend/src/lib/components/flows/content/FlowSettings.svelte b/frontend/src/lib/components/flows/content/FlowSettings.svelte
index e73733aa91..3fc6ce9908 100644
--- a/frontend/src/lib/components/flows/content/FlowSettings.svelte
+++ b/frontend/src/lib/components/flows/content/FlowSettings.svelte
@@ -460,10 +460,12 @@
}}
/>
-
- Job token
-
-
+