sync: update from private repo (8ed98ab)
CI / build-and-test (push) Has been cancelled

This commit is contained in:
oss-sync
2026-06-09 00:46:41 +00:00
parent ef44e1a5d9
commit d6d8e83867
20 changed files with 452 additions and 12 deletions
@@ -21,6 +21,12 @@ export function AskSubtasksForm({ config, onChange }: SectionFormProps) {
<FieldInput type="number" value={subtasks.maxDepth ?? ''} onChange={v => onChange('subtasks.maxDepth', v ? Number(v) : undefined)} />
<HelpText></HelpText>
</div>
<div>
<FieldLabel>Subtasks: Max Per Parent</FieldLabel>
<FieldInput type="number" value={subtasks.maxPerParent ?? ''} onChange={v => onChange('subtasks.maxPerParent', v ? Number(v) : undefined)} />
<HelpText>1 spawn デフォルト: 10</HelpText>
</div>
</div>
);
}
@@ -26,6 +26,8 @@ import { ReflectionForm } from './ReflectionForm';
import { McpForm } from './McpForm';
import { SshForm } from './SshForm';
import { GatewayServerForm } from './GatewayServerForm';
import { NotesForm } from './NotesForm';
import { PushNotificationsForm } from './PushNotificationsForm';
import { useAuthState } from '../../App';
@@ -185,6 +187,8 @@ function ConfigFormInner({ section }: ConfigFormProps) {
case 'context': return <ContextForm {...formProps} />;
case 'safety': return <SafetyForm {...formProps} />;
case 'reflection': return <ReflectionForm {...formProps} />;
case 'notes': return <NotesForm {...formProps} />;
case 'push-notifications': return <PushNotificationsForm {...formProps} />;
// ── Tools sub-sections — Step 9 split the legacy grab-bag
// ToolsForm into focused per-category forms. Each binds to the
+48
View File
@@ -0,0 +1,48 @@
import { HelpText } from './HelpText';
import { FieldLabel, FieldInput } from './formUtils';
import type { SectionFormProps } from './types';
/**
* Shared Knowledge Notes injection budget (`notes.inject.*`). Controls how much
* of a subscribed note is injected into the agent's context per job.
*/
export function NotesForm({ config, onChange }: SectionFormProps) {
const inject = config.notes?.inject ?? {};
return (
<div className="space-y-5">
<h2 className="text-base font-semibold text-slate-800">Notes Injection</h2>
<p className="text-[13px] text-slate-500">
context
</p>
<div>
<FieldLabel>Per-Note Max (KB)</FieldLabel>
<FieldInput type="number" value={inject.perNoteMaxKb ?? ''}
onChange={v => onChange('notes.inject.perNoteMaxKb', v ? Number(v) : undefined)} />
<HelpText>1 デフォルト: 8 KB</HelpText>
</div>
<div>
<FieldLabel>Total Max (KB)</FieldLabel>
<FieldInput type="number" value={inject.totalMaxKb ?? ''}
onChange={v => onChange('notes.inject.totalMaxKb', v ? Number(v) : undefined)} />
<HelpText>デフォルト: 32 KB</HelpText>
</div>
<div>
<FieldLabel>Over-Budget Strategy</FieldLabel>
<select
value={inject.overBudgetStrategy ?? 'skip_remaining'}
onChange={e => onChange('notes.inject.overBudgetStrategy', e.target.value)}
className="w-full h-8 px-2 text-[13px] border border-hairline rounded-md bg-canvas focus:ring-2 focus:ring-accent-ring focus:border-accent outline-none transition-shadow"
>
<option value="skip_remaining">skip_remaining</option>
<option value="truncate_last">truncate_last</option>
<option value="degrade_to_search">degrade_to_search</option>
</select>
<HelpText>デフォルト: skip_remaining</HelpText>
</div>
</div>
);
}
@@ -0,0 +1,78 @@
import { HelpText } from './HelpText';
import { FieldLabel, FieldInput } from './formUtils';
import type { SectionFormProps } from './types';
/**
* Server-side Web Push (V2) config (`notifications.push.*`): VAPID identity +
* delivery tuning. This is the ADMIN counterpart to the per-user browser
* subscription UI in NotificationsForm (which only manages this device's
* subscription, not whether the server feature is enabled at all).
*/
export function PushNotificationsForm({ config, onChange }: SectionFormProps) {
const push = config.notifications?.push ?? {};
return (
<div className="space-y-5">
<h2 className="text-base font-semibold text-slate-800">Web Push (Server)</h2>
<p className="text-[13px] text-slate-500">
V2Web PushHTTPS iOS PWA
🔔 Notifications
</p>
<div>
<label className="flex items-center gap-2 text-sm text-slate-700">
<input
type="checkbox"
checked={push.enabled === true}
onChange={e => onChange('notifications.push.enabled', e.target.checked)}
className="rounded"
/>
Web Push
</label>
<HelpText>デフォルト: 無効 opt-in</HelpText>
</div>
<div>
<FieldLabel>VAPID Subject</FieldLabel>
<FieldInput value={push.vapidSubject ?? ''} placeholder="https://example.com/"
onChange={v => onChange('notifications.push.vapidSubject', v || undefined)} />
<HelpText>RFC 8292 VAPID subject mailto: より運用 URL </HelpText>
</div>
<div>
<FieldLabel>VAPID Current Key Path</FieldLabel>
<FieldInput value={push.vapidCurrentPath ?? ''} placeholder="./data/secrets/vapid.json"
onChange={v => onChange('notifications.push.vapidCurrentPath', v || undefined)} />
<HelpText> VAPID mode 0600 </HelpText>
</div>
<div>
<FieldLabel>VAPID History Dir</FieldLabel>
<FieldInput value={push.vapidHistoryDir ?? ''} placeholder="./data/secrets/vapid-history"
onChange={v => onChange('notifications.push.vapidHistoryDir', v || undefined)} />
<HelpText> VAPID 退</HelpText>
</div>
<div>
<FieldLabel>Payload Max Bytes</FieldLabel>
<FieldInput type="number" value={push.payloadMaxBytes ?? ''}
onChange={v => onChange('notifications.push.payloadMaxBytes', v ? Number(v) : undefined)} />
<HelpText> 4096デフォルト: 3072</HelpText>
</div>
<div>
<FieldLabel>Queue Concurrency</FieldLabel>
<FieldInput type="number" value={push.queueConcurrency ?? ''}
onChange={v => onChange('notifications.push.queueConcurrency', v ? Number(v) : undefined)} />
<HelpText>デフォルト: 8</HelpText>
</div>
<div>
<FieldLabel>Per-Send Timeout (ms)</FieldLabel>
<FieldInput type="number" value={push.perSendTimeoutMs ?? ''}
onChange={v => onChange('notifications.push.perSendTimeoutMs', v ? Number(v) : undefined)} />
<HelpText>1 デフォルト: 10000</HelpText>
</div>
</div>
);
}
+49
View File
@@ -38,6 +38,55 @@ export function SafetyForm({ config, onChange }: SectionFormProps) {
<HelpText> prompt 0.50.95デフォルト: 0.8</HelpText>
</div>
<h3 className="text-sm font-medium text-slate-600 mt-4 pt-3 border-t border-slate-200">Bash </h3>
<div>
<FieldLabel>Bash Sandbox Mode</FieldLabel>
<select
value={safety.bashSandbox ?? 'auto'}
onChange={e => onChange('safety.bashSandbox', e.target.value)}
className="w-full h-8 px-2 text-[13px] border border-hairline rounded-md bg-canvas focus:ring-2 focus:ring-accent-ring focus:border-accent outline-none transition-shadow"
>
<option value="auto">autobwrap sandboxed hardened-whitelist</option>
<option value="always">alwayssandboxed bwrap fail</option>
<option value="off">off exec</option>
</select>
<HelpText>Bash デフォルト: auto</HelpText>
</div>
<div>
<label className="flex items-center gap-2 text-sm text-slate-700">
<input
type="checkbox"
checked={safety.bashUnrestricted === true}
onChange={e => onChange('safety.bashUnrestricted', e.target.checked)}
className="rounded"
/>
Bash
</label>
<HelpText>bwrap (rw)(ro) bind-mountbwrap user-namespace デフォルト: 無効</HelpText>
</div>
<div>
<label className="flex items-center gap-2 text-sm text-slate-700">
<input
type="checkbox"
checked={safety.bashAllowNetwork === true}
onChange={e => onChange('safety.bashAllowNetwork', e.target.checked)}
className="rounded"
/>
bash / python / npm
</label>
<HelpText>
<span className="text-red-700 dark:text-red-300 font-medium"> :</span>{' '}
bashpythonnpm <code>--unshare-net</code>
pip / npm install / curl 使
<strong>SSRF</strong>
デフォルト: 無効
Bash Sandbox Mode <code>off</code> bwrap sandboxed
</HelpText>
</div>
<h3 className="text-sm font-medium text-slate-600 mt-4 pt-3 border-t border-slate-200">History Summarization</h3>
<div>
@@ -34,6 +34,7 @@ const CONFIG_GROUPS = [
{ id: 'branding', label: 'Branding' },
{ id: 'paths-storage', label: 'Paths & Storage' },
{ id: 'execution', label: 'Execution' },
{ id: 'push-notifications', label: 'Web Push (Server)' },
],
},
{
@@ -56,6 +57,7 @@ const CONFIG_GROUPS = [
{ id: 'context', label: 'Context' },
{ id: 'safety', label: 'Safety' },
{ id: 'reflection', label: 'Reflection' },
{ id: 'notes', label: 'Notes Injection' },
],
},
{
+2
View File
@@ -12,6 +12,7 @@ const SETTINGS_SECTIONS = [
'branding',
'paths-storage',
'execution',
'push-notifications',
// LLM group
'llm-workers',
'gateway-server',
@@ -21,6 +22,7 @@ const SETTINGS_SECTIONS = [
'context',
'safety',
'reflection',
'notes',
// Tools group (sub-sections)
'tools-web',
'tools-browser',