fix(web): harden the target gate UI and state its limits

Review of the first commit found defects in the new control and copy that
overstated what the gate does. Fixes, all frontend plus docs:

- The gate read and the rules read no longer share one Promise.all: a
  failing /intercept-rules call used to leave the switch disabled forever
  with no retry. They load independently, a failed gate read offers Retry,
  and the error renders next to the switch instead of inside the add-rule
  row.
- A task row without target_gate now reads as unknown (switch disabled)
  instead of a confident "off"; state resets when the task id changes, so
  the switch cannot show or write another task's gate.
- The amber warning counts only enabled block rules: allow-only and
  switched-off rules are unaffected by the gate.
- Rule mutations reload the rules only, so a concurrent toggle is no longer
  overwritten by a stale snapshot.
- The switch is disabled on a finished task, where no call is left to gate.
- Copy: the gate checks the targets a call declares, not "every outbound
  network target"; an unpinned target waits the 300 s bound and is then
  refused; allow rules do not apply to the gate; sandbox mode gates the
  call, not the worker's sockets, and turns on the panel-hosted browser.
  The create sheet warns when "Off" is chosen with block rules present, and
  the advanced-settings summary now lists the gate and coverage.
- updateTask keeps its original signature (no call sites, and the wider
  shape type-erased plan_quiet_mode); the dead variant is gone.
- README: the gate is no longer "off by default, API-only"; the changelog
  entry is scoped to tasks and records the known limits.
This commit is contained in:
Barry
2026-12-01 19:32:54 -05:00
parent f3a8983249
commit 43f6d200ed
9 changed files with 114 additions and 47 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ All notable changes to this project are documented in this file. The format is b
### Added
- **The target gate has a UI.** `target_gate` was API-only (`POST /api/tasks`, `PATCH /api/tasks/{id}`), so an operator could neither see nor change it: a task-level block rule added to a task whose gate was off never reached a network target, because `CheckTargets` returns before any rule is matched. The create-task sheet now carries a `Network target gate` selector (auto / on / off; auto leaves the backend default of on for scoped tasks), and the task overview's task-level rule card carries a switch with the live state and an explicit warning while block rules exist with the gate off. The switch writes through `PATCH /api/tasks/{id}` and takes effect on the next tool call.
- **The task target gate has a UI.** `target_gate` was API-only (`POST /api/tasks`, `PATCH /api/tasks/{id}`), so an operator could neither see nor change it: a task-level block rule added to a task whose gate was off never reached a network target, because `CheckTargets` returns before any rule is matched. The create-task sheet now carries a `Network target gate` selector (auto / on / off; auto leaves the backend default of on for scoped tasks) and warns when block rules would be stored unenforced, and the task overview's task-level rule card carries a switch with the live state, an explicit warning while enabled block rules exist with the gate off, and a retry when the state cannot be read. The switch writes through `PATCH /api/tasks/{id}` and takes effect on the next tool call. The gate governs the targets a tool call declares, not a sandboxed worker's sockets (the sandbox egress list decides those), turning it on also attaches the panel-hosted shared browser in sandbox mode, an unpinned target waits out the 300 s bound before the call is refused, task allow rules do not affect the gate, and the flip itself is not audited yet; the chat side's `target_gate` still has no UI.
- **`domain_suffix` asset interception rule kind**: a domain and its subdomains, matched on a label boundary. `example.com` matches `example.com` and `a.example.com`, but not `a.example.com.other.net` or `badexample.com`, which `fuzzy_domain`'s substring match also lets through; that makes it the kind to use for a task allow-list that covers a site. `*.example.com` and `.example.com` are stored as `example.com`. It is the label-boundary semantics the sandbox egress policy already applies, and a `domain_suffix` allow rule is now a scope domain for that policy too (`taskSandboxRunInfo` already read the kind). `fuzzy_domain` is unchanged. Migration `0026_asset_intercept_domain_suffix.sql` widens the `kind` CHECK constraint of both rule tables.
### Fixed
+4 -2
View File
@@ -282,8 +282,10 @@ worker remains confined to the intent it claimed.
construction (`["git","push"]` covers `git push --force`, but `git -C /repo push` matches
nothing). Each approval records who decided: `human`, `rule`, `model` or `system`.
- **Scope and target gate**: scope rows define the coverage denominator; assets outside the
declared scope are not explored. The target gate (off by default, API-only) can refuse
destinations that were not approved.
declared scope are not explored. The target gate (on by default for a task with a linked company
or asset rules, off otherwise; set at creation or from the task overview) can refuse declared
targets that were not approved. It governs the targets a tool call declares, not a sandboxed
worker's sockets, which the sandbox egress list decides, and it does not audit the flip itself.
- **Budgets**: `ARTEX_TASK_BUDGET_TOKENS` / `ARTEX_TASK_BUDGET_TURNS` cap a whole task (planner and
workers); `ARTEX_INTENT_BUDGET_TOKENS` / `ARTEX_INTENT_BUDGET_TURNS` cap one worker run. Near the
limit the task enters a forced wrap-up; a worker is not started when the remaining budget cannot
@@ -1124,7 +1124,9 @@ function TaskInterceptRulesCard({ taskId }: { taskId: string }) {
const [err, setErr] = React.useState("");
// targetGate is undefined until the task row is read, so the switch never shows a guessed state.
const [targetGate, setTargetGate] = React.useState<boolean | undefined>(undefined);
const [taskFinished, setTaskFinished] = React.useState(false);
const [gateBusy, setGateBusy] = React.useState(false);
const [gateErr, setGateErr] = React.useState("");
const [newAction, setNewAction] = React.useState<"block" | "allow">("block");
const [newKind, setNewKind] = React.useState<AssetInterceptKind>("fuzzy_domain");
const [newPattern, setNewPattern] = React.useState("");
@@ -1135,30 +1137,49 @@ function TaskInterceptRulesCard({ taskId }: { taskId: string }) {
const [editPattern, setEditPattern] = React.useState("");
const [editNote, setEditNote] = React.useState("");
const load = React.useCallback(async () => {
// The rules and the gate are read separately: a failure in one must not hide the other, and a failed
// read must never leave the switch disabled with no way to retry.
const loadRules = React.useCallback(async () => {
try {
const [next, task] = await Promise.all([api.taskInterceptRules(taskId), api.task(taskId).catch(() => null)]);
setRules(next);
if (task) setTargetGate(!!task.target_gate);
} catch {
// Ignore transient errors
setRules(await api.taskInterceptRules(taskId));
} catch (e) {
setErr((e as Error).message);
}
}, [taskId]);
const loadGate = React.useCallback(async () => {
setGateErr("");
try {
const task = await api.task(taskId);
// A backend that omits the field reads as unknown, never as "off".
setTargetGate(typeof task.target_gate === "boolean" ? task.target_gate : undefined);
setTaskFinished(task.status === "done" || task.status === "failed" || task.status === "timeout");
} catch (e) {
setTargetGate(undefined);
setGateErr((e as Error).message);
}
}, [taskId]);
// Switching between two task details keeps this component mounted, so drop the previous task's state
// before the new read lands: otherwise the switch shows, and can write, another task's gate.
React.useEffect(() => {
void load();
}, [load]);
setTargetGate(undefined);
setTaskFinished(false);
setGateErr("");
void loadRules();
void loadGate();
}, [loadRules, loadGate]);
// toggleTargetGate flips the task's target gate. The API answers the patched task, so the switch shows
// the state the backend actually stored rather than the one that was clicked.
async function toggleTargetGate(next: boolean) {
setGateBusy(true);
setErr("");
setGateErr("");
try {
const task = await api.setTaskTargetGate(taskId, next);
setTargetGate(!!task.target_gate);
setTargetGate(typeof task.target_gate === "boolean" ? task.target_gate : undefined);
} catch (e) {
setErr((e as Error).message);
setGateErr((e as Error).message);
} finally {
setGateBusy(false);
}
@@ -1178,7 +1199,7 @@ function TaskInterceptRulesCard({ taskId }: { taskId: string }) {
});
setNewPattern("");
setNewNote("");
await load();
await loadRules();
} catch (e) {
setErr((e as Error).message);
} finally {
@@ -1208,7 +1229,7 @@ function TaskInterceptRulesCard({ taskId }: { taskId: string }) {
enabled: r.enabled,
});
setEditId(null);
await load();
await loadRules();
} catch (e) {
setErr((e as Error).message);
} finally {
@@ -1221,7 +1242,7 @@ function TaskInterceptRulesCard({ taskId }: { taskId: string }) {
try {
await api.deleteTaskInterceptRule(taskId, r.id);
} catch {
await load();
await loadRules();
}
}
@@ -1230,10 +1251,13 @@ function TaskInterceptRulesCard({ taskId }: { taskId: string }) {
try {
await api.toggleTaskInterceptRule(taskId, r.id, !r.enabled);
} catch {
await load();
await loadRules();
}
}
// Only an enabled block rule is affected by the gate; an allow rule or a switched-off rule is not, so the
// amber warning below must not fire for them.
const blockRuleCount = rules.filter((r) => r.enabled && r.action !== "allow").length;
const placeholder = TASK_RULE_KIND_OPTIONS.find((o) => o.value === newKind)?.placeholder ?? "";
return (
@@ -1254,31 +1278,53 @@ function TaskInterceptRulesCard({ taskId }: { taskId: string }) {
<div className="flex flex-wrap items-center gap-2 rounded-md border px-2.5 py-2 text-sm">
<Switch
id={`task-target-gate-${taskId}`}
aria-describedby={`task-target-gate-note-${taskId}`}
checked={targetGate === true}
disabled={gateBusy || targetGate === undefined}
disabled={gateBusy || targetGate === undefined || taskFinished}
onCheckedChange={(checked) => void toggleTargetGate(checked)}
/>
<label htmlFor={`task-target-gate-${taskId}`} className="cursor-pointer font-medium">
{t("Target gate (approve outbound network targets)")}
</label>
<span
id={`task-target-gate-note-${taskId}`}
className={`text-xs ${
targetGate === false && rules.length > 0 ? "text-amber-600 dark:text-amber-400" : "text-muted-foreground"
targetGate === false && blockRuleCount > 0
? "text-amber-600 dark:text-amber-400"
: "text-muted-foreground"
}`}
>
{targetGate === undefined
? t("Reading the gate state…")
? gateErr
? t("The gate state could not be read.")
: t("Reading the gate state…")
: targetGate
? t(
"On: a block rule below stops the call, and a target no approval covers waits for your decision before the connection opens.",
"On: a block rule stops the call before it runs. A target that no approval pin covers waits about five minutes for your decision, then the call is refused.",
)
: rules.length > 0
: blockRuleCount > 0
? t(
"Off: outbound connections are not checked, so the block rules below are NOT evaluated for network targets. Turn the gate on to enforce them.",
)
: t("Off: outbound connections are not checked against these rules.")}
</span>
{targetGate === undefined && gateErr && (
<Button size="sm" variant="ghost" className="h-6 shrink-0 px-1.5" onClick={() => void loadGate()}>
<RefreshCwIcon className="size-3.5" /> {t("Retry")}
</Button>
)}
{gateErr && targetGate !== undefined && <span className="text-xs text-red-500">{gateErr}</span>}
{taskFinished && (
<span className="text-muted-foreground text-xs">
{t("This task has finished, so no tool call reads this gate.")}
</span>
)}
</div>
<p className="text-muted-foreground text-xs">
{t(
"Allow rules do not apply to this gate: they set asset scope and the sandbox egress list. The gate asks for every target until an approval pins it.",
)}
</p>
{/* Add form */}
<div className="flex flex-wrap items-center gap-2">
<NativeSelect size="sm" value={newAction} onChange={(e) => setNewAction(e.target.value as "block" | "allow")}>
+10 -2
View File
@@ -3596,7 +3596,7 @@ function CreateTaskSheet({
<ChevronRightIcon className="size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-90" />
{t("Advanced settings")}
<span className="ml-auto font-normal text-muted-foreground text-xs">
{t("Timeout · Heartbeat · First intent")}
{t("Timeout · Heartbeat · First intent · Coverage · Target gate")}
</span>
</CollapsibleTrigger>
<CollapsibleContent className="grid gap-5 pt-5">
@@ -3678,9 +3678,17 @@ function CreateTaskSheet({
</NativeSelect>
<p className="text-muted-foreground text-xs">
{t(
'The gate checks every outbound network target of an agent call and is the only place where the "block" rules above are evaluated against network targets: with it off, those rules never stop a connection. "Auto" leaves the backend default: on when the task links a company or carries asset rules, off otherwise. A target no approval pin covers waits for your decision in the approval panel; editable mid-run from the task overview.',
'The gate checks the targets an agent call declares, and it is the only place where the "block" rules above are evaluated against network targets: with it off, those rules never stop a connection. A declared target that no approval pin covers waits about five minutes for your decision, then the call is refused — a timeout cannot approve. "Auto" leaves the backend default: on when the task links a company or carries any asset rule, off otherwise, so an allow-only list also turns it on. In sandbox mode the gate sees the call, not the worker\'s sockets, which the sandbox egress list governs; the gate also switches on the panel-hosted shared browser. Editable mid-run from the task overview.',
)}
</p>
{targetGateMode === "off" &&
interceptRules.some((r) => r.action !== "allow" && r.pattern.trim() !== "") && (
<p className="text-xs text-amber-600 dark:text-amber-400">
{t(
"The gate is off and this task has block rules: they will be stored but never evaluated for network targets.",
)}
</p>
)}
</div>
</CollapsibleContent>
</Collapsible>
+8 -4
View File
@@ -2413,7 +2413,6 @@
"This will permanently delete the company and its asset scope configuration. This action cannot be undone.": "Isso excluirá permanentemente a empresa e a configuração do escopo de ativos. Esta ação não pode ser desfeita.",
"Time": "Tempo",
"Timed out": "Tempo esgotado",
"Timeout · Heartbeat · First intent": "Tempo limite · Heartbeat · primeira intenção",
"Timeout (ms, empty = default)": "Tempo limite (ms, vazio = padrão)",
"Timeout (seconds)": "Tempo limite (segundos)",
"Timeout action": "Ação em caso de tempo limite",
@@ -2795,13 +2794,18 @@
"Clicking or typing in the view takes control from the agent.": "Clicking or typing in the view takes control from the agent.",
"Target gate (approve outbound network targets)": "Portão de destino (aprovar destinos de rede de saída)",
"Reading the gate state…": "Lendo o estado do portão…",
"On: a block rule below stops the call, and a target no approval covers waits for your decision before the connection opens.": "Ligado: uma regra de bloqueio abaixo interrompe a chamada, e um destino sem aprovação aguarda sua decisão antes de a conexão abrir.",
"Off: outbound connections are not checked, so the block rules below are NOT evaluated for network targets. Turn the gate on to enforce them.": "Desligado: as conexões de saída não são verificadas, então as regras de bloqueio abaixo NÃO são avaliadas para destinos de rede. Ligue o portão para aplicá-las.",
"Off: outbound connections are not checked against these rules.": "Desligado: as conexões de saída não são verificadas por estas regras.",
"Network target gate": "Portão de destinos de rede",
"Auto (on when the task is scoped)": "Automático (ligado quando a tarefa tem escopo)",
"On (approve every outbound target)": "Ligado (aprovar cada destino de saída)",
"Off (no target approvals)": "Desligado (sem aprovação de destinos)",
"The gate checks every outbound network target of an agent call and is the only place where the \"block\" rules above are evaluated against network targets: with it off, those rules never stop a connection. \"Auto\" leaves the backend default: on when the task links a company or carries asset rules, off otherwise. A target no approval pin covers waits for your decision in the approval panel; editable mid-run from the task overview.": "O portão verifica cada destino de rede de saída de uma chamada do agente e é o único lugar onde as regras de \"bloqueio\" acima são avaliadas para destinos de rede: desligado, essas regras nunca interrompem uma conexão. \"Automático\" mantém o padrão do backend: ligado quando a tarefa vincula uma empresa ou tem regras de ativos, desligado caso contrário. Um destino sem aprovação aguarda sua decisão no painel de aprovações; editável durante a execução na visão geral da tarefa.",
"Applies to this task only and is not written to global rules. Evaluation order: \"Block\" rules (including global ones) match first, and a hit forbids testing; with no hit and \"Allow\" rules configured for this task, an asset must match an allow rule to be permitted, otherwise testing is likewise forbidden; with no allow rules configured, no whitelist is active. Assets are always checked, but outbound network targets are checked only while the task's target gate is on (Advanced settings).": "Aplica-se somente a esta tarefa e não é gravado nas regras globais. Ordem de avaliação: regras \"Bloquear\" (incluindo as globais) são avaliadas primeiro e um acerto proíbe o teste; sem acerto e com regras \"Permitir\" configuradas para esta tarefa, um ativo deve corresponder a uma regra de permissão para ser permitido, caso contrário o teste também é proibido; sem regras de permissão configuradas, nenhuma lista de permissão está ativa. Os ativos são sempre verificados; os destinos de rede de saída só são verificados enquanto o portão de destino da tarefa estiver ligado (Configurações avançadas)."
"Applies to this task only and is not written to global rules. Evaluation order: \"Block\" rules (including global ones) match first, and a hit forbids testing; with no hit and \"Allow\" rules configured for this task, an asset must match an allow rule to be permitted, otherwise testing is likewise forbidden; with no allow rules configured, no whitelist is active. Assets are always checked, but outbound network targets are checked only while the task's target gate is on (Advanced settings).": "Aplica-se somente a esta tarefa e não é gravado nas regras globais. Ordem de avaliação: regras \"Bloquear\" (incluindo as globais) são avaliadas primeiro e um acerto proíbe o teste; sem acerto e com regras \"Permitir\" configuradas para esta tarefa, um ativo deve corresponder a uma regra de permissão para ser permitido, caso contrário o teste também é proibido; sem regras de permissão configuradas, nenhuma lista de permissão está ativa. Os ativos são sempre verificados; os destinos de rede de saída só são verificados enquanto o portão de destino da tarefa estiver ligado (Configurações avançadas).",
"On: a block rule stops the call before it runs. A target that no approval pin covers waits about five minutes for your decision, then the call is refused.": "Ligado: uma regra de bloqueio interrompe a chamada antes de executá-la. Um destino sem aprovação aguarda sua decisão por cerca de cinco minutos; depois a chamada é recusada.",
"The gate checks the targets an agent call declares, and it is the only place where the \"block\" rules above are evaluated against network targets: with it off, those rules never stop a connection. A declared target that no approval pin covers waits about five minutes for your decision, then the call is refused — a timeout cannot approve. \"Auto\" leaves the backend default: on when the task links a company or carries any asset rule, off otherwise, so an allow-only list also turns it on. In sandbox mode the gate sees the call, not the worker's sockets, which the sandbox egress list governs; the gate also switches on the panel-hosted shared browser. Editable mid-run from the task overview.": "O portão verifica os destinos que uma chamada do agente declara e é o único lugar onde as regras de \"bloqueio\" acima são avaliadas para destinos de rede: desligado, essas regras nunca interrompem uma conexão. Um destino declarado sem aprovação aguarda sua decisão por cerca de cinco minutos; depois a chamada é recusada — um tempo limite não pode aprovar. \"Automático\" mantém o padrão do backend: ligado quando a tarefa vincula uma empresa ou tem qualquer regra de ativos, desligado caso contrário, então uma lista só de permissões também liga o portão. No modo sandbox o portão vê a chamada, não os sockets do worker, que a lista de saída do sandbox decide; o portão também liga o navegador compartilhado hospedado no painel. Editável durante a execução na visão geral da tarefa.",
"Timeout · Heartbeat · First intent · Coverage · Target gate": "Tempo limite · Heartbeat · Primeira intenção · Cobertura · Portão de destino",
"The gate state could not be read.": "Não foi possível ler o estado do portão.",
"This task has finished, so no tool call reads this gate.": "Esta tarefa terminou, então nenhuma chamada de ferramenta lê este portão.",
"Allow rules do not apply to this gate: they set asset scope and the sandbox egress list. The gate asks for every target until an approval pins it.": "Regras de permissão não se aplicam a este portão: elas definem o escopo de ativos e a lista de saída do sandbox. O portão pede cada destino até que uma aprovação o fixe.",
"The gate is off and this task has block rules: they will be stored but never evaluated for network targets.": "O portão está desligado e esta tarefa tem regras de bloqueio: elas serão armazenadas mas nunca avaliadas para destinos de rede."
}
+8 -4
View File
@@ -2413,7 +2413,6 @@
"This will permanently delete the company and its asset scope configuration. This action cannot be undone.": "Şirket ve varlık kapsamı yapılandırması kalıcı olarak silinecek. Bu işlem geri alınamaz.",
"Time": "Zaman",
"Timed out": "Zaman aşımı",
"Timeout · Heartbeat · First intent": "Zaman aşımı · Kalp atışı · İlk niyet",
"Timeout (ms, empty = default)": "Zaman aşımı (ms, boş = varsayılan)",
"Timeout (seconds)": "Zaman aşımı (saniye)",
"Timeout action": "Zaman aşımı işlemi",
@@ -2795,13 +2794,18 @@
"Clicking or typing in the view takes control from the agent.": "Görünümde tıklamak veya yazmak kontrolü ajandan alır.",
"Target gate (approve outbound network targets)": "Hedef kapısı (giden ağ hedeflerini onayla)",
"Reading the gate state…": "Kapı durumu okunuyor…",
"On: a block rule below stops the call, and a target no approval covers waits for your decision before the connection opens.": "Açık: aşağıdaki engelleme kuralı çağrıyı durdurur; hiçbir onayın kapsamadığı hedef, bağlantı açılmadan önce kararınızı bekler.",
"Off: outbound connections are not checked, so the block rules below are NOT evaluated for network targets. Turn the gate on to enforce them.": "Kapalı: giden bağlantılar denetlenmez; bu nedenle aşağıdaki engelleme kuralları ağ hedefleri için değerlendirilmez. Yürürlüğe girmeleri için kapıyı açın.",
"Off: outbound connections are not checked against these rules.": "Kapalı: giden bağlantılar bu kurallara göre denetlenmez.",
"Network target gate": "Ağ hedefi kapısı",
"Auto (on when the task is scoped)": "Otomatik (görevin kapsamı varsa açık)",
"On (approve every outbound target)": "Açık (her giden hedef onay gerektirir)",
"Off (no target approvals)": "Kapalı (hedef onayı yok)",
"The gate checks every outbound network target of an agent call and is the only place where the \"block\" rules above are evaluated against network targets: with it off, those rules never stop a connection. \"Auto\" leaves the backend default: on when the task links a company or carries asset rules, off otherwise. A target no approval pin covers waits for your decision in the approval panel; editable mid-run from the task overview.": "Kapı, bir ajan çağrısının her giden ağ hedefini denetler ve yukarıdaki \"engelle\" kurallarının ağ hedeflerine karşı değerlendirildiği tek yerdir: kapalıyken bu kurallar hiçbir bağlantıyı durdurmaz. \"Otomatik\" arka ucun varsayılanını korur: görev bir şirketle ilişkiliyse veya varlık kuralları taşıyorsa açık, aksi halde kapalı. Hiçbir onay sabitlemesinin kapsamadığı hedef, onay panelinde kararınızı bekler; görev genel görünümünden çalışma sırasında düzenlenebilir.",
"Applies to this task only and is not written to global rules. Evaluation order: \"Block\" rules (including global ones) match first, and a hit forbids testing; with no hit and \"Allow\" rules configured for this task, an asset must match an allow rule to be permitted, otherwise testing is likewise forbidden; with no allow rules configured, no whitelist is active. Assets are always checked, but outbound network targets are checked only while the task's target gate is on (Advanced settings).": "Yalnızca bu göreve uygulanır ve genel kurallara yazılmaz. Değerlendirme sırası: önce \"Engelle\" kuralları (genel olanlar dahil) eşleştirilir ve eşleşme testi yasaklar; eşleşme yoksa ve bu görev için \"İzin ver\" kuralları yapılandırılmışsa, bir varlığa izin verilmesi için bir izin kuralıyla eşleşmesi gerekir, aksi halde test yine yasaktır; izin kuralı yapılandırılmamışsa beyaz liste etkin değildir. Varlıklar her zaman bu kurallara göre denetlenir; giden ağ hedefleri yalnızca görevin hedef kapısı açıkken denetlenir (Gelişmiş ayarlar)."
"Applies to this task only and is not written to global rules. Evaluation order: \"Block\" rules (including global ones) match first, and a hit forbids testing; with no hit and \"Allow\" rules configured for this task, an asset must match an allow rule to be permitted, otherwise testing is likewise forbidden; with no allow rules configured, no whitelist is active. Assets are always checked, but outbound network targets are checked only while the task's target gate is on (Advanced settings).": "Yalnızca bu göreve uygulanır ve genel kurallara yazılmaz. Değerlendirme sırası: önce \"Engelle\" kuralları (genel olanlar dahil) eşleştirilir ve eşleşme testi yasaklar; eşleşme yoksa ve bu görev için \"İzin ver\" kuralları yapılandırılmışsa, bir varlığa izin verilmesi için bir izin kuralıyla eşleşmesi gerekir, aksi halde test yine yasaktır; izin kuralı yapılandırılmamışsa beyaz liste etkin değildir. Varlıklar her zaman bu kurallara göre denetlenir; giden ağ hedefleri yalnızca görevin hedef kapısı açıkken denetlenir (Gelişmiş ayarlar).",
"On: a block rule stops the call before it runs. A target that no approval pin covers waits about five minutes for your decision, then the call is refused.": "Açık: engelleme kuralı çağrıyı çalışmadan durdurur. Hiçbir onay sabitlemesinin kapsamadığı hedef, kararınız için yaklaşık beş dakika bekler, sonra çağrı reddedilir.",
"The gate checks the targets an agent call declares, and it is the only place where the \"block\" rules above are evaluated against network targets: with it off, those rules never stop a connection. A declared target that no approval pin covers waits about five minutes for your decision, then the call is refused — a timeout cannot approve. \"Auto\" leaves the backend default: on when the task links a company or carries any asset rule, off otherwise, so an allow-only list also turns it on. In sandbox mode the gate sees the call, not the worker's sockets, which the sandbox egress list governs; the gate also switches on the panel-hosted shared browser. Editable mid-run from the task overview.": "Kapı, bir ajan çağrısının bildirdiği hedefleri denetler ve yukarıdaki \"engelle\" kurallarının ağ hedeflerine karşı değerlendirildiği tek yerdir: kapalıyken bu kurallar hiçbir bağlantıyı durdurmaz. Hiçbir onay sabitlemesinin kapsamadığı bildirilmiş hedef, kararınız için yaklaşık beş dakika bekler, sonra çağrı reddedilir — zaman aşımı onaylayamaz. \"Otomatik\" arka ucun varsayılanını bırakır: görev bir şirketle ilişkiliyse veya herhangi bir varlık kuralı taşıyorsa açık, aksi halde kapalı; bu yüzden yalnızca izin kuralı içeren bir liste de kapıyı açar. Sandbox modunda kapı çağrıyı görür, çalışanın soketlerini görmez (bunları sandbox giden trafik listesi belirler); kapı ayrıca panelde barındırılan paylaşılan tarayıcıyı da açar. Görev genel görünümünden çalışma sırasında düzenlenebilir.",
"Timeout · Heartbeat · First intent · Coverage · Target gate": "Zaman aşımı · Kalp atışı · İlk niyet · Kapsam · Hedef kapısı",
"The gate state could not be read.": "Kapı durumu okunamadı.",
"This task has finished, so no tool call reads this gate.": "Bu görev tamamlandı; artık hiçbir araç çağrısı bu kapıyı okumaz.",
"Allow rules do not apply to this gate: they set asset scope and the sandbox egress list. The gate asks for every target until an approval pins it.": "İzin kuralları bu kapıya uygulanmaz: varlık kapsamını ve sandbox giden trafik listesini belirler. Bir onay sabitleyene kadar kapı her hedef için izin ister.",
"The gate is off and this task has block rules: they will be stored but never evaluated for network targets.": "Kapı kapalı ve bu görevde engelleme kuralları var: saklanırlar ama ağ hedefleri için hiç değerlendirilmezler."
}
+8 -4
View File
@@ -2413,7 +2413,6 @@
"This will permanently delete the company and its asset scope configuration. This action cannot be undone.": "Việc này sẽ xóa vĩnh viễn công ty và cấu hình phạm vi tài sản của nó. Hành động này không thể hoàn tác.",
"Time": "Thời gian",
"Timed out": "Đã hết thời gian chờ",
"Timeout · Heartbeat · First intent": "Hết thời gian chờ · Nhịp tim · Ý định đầu tiên",
"Timeout (ms, empty = default)": "Thời gian chờ (ms, để trống = mặc định)",
"Timeout (seconds)": "Thời gian chờ (giây)",
"Timeout action": "Hành động khi hết thời gian chờ",
@@ -2795,13 +2794,18 @@
"One per line. Needed only for groups: these users can give the bot commands in every allowed group. Every member of an allowed group still sees what the bot sends there. A member who is refused gets their user ID in the refusal.": "Mỗi dòng một mục. Chỉ cần cho nhóm: những người dùng này có thể ra lệnh cho bot trong mọi nhóm được phép. Mọi thành viên của nhóm được phép vẫn thấy những gì bot gửi ở đó. Thành viên bị từ chối nhận ID người dùng của mình trong tin từ chối.",
"Target gate (approve outbound network targets)": "Cổng đích (phê duyệt đích mạng ra ngoài)",
"Reading the gate state…": "Đang đọc trạng thái cổng…",
"On: a block rule below stops the call, and a target no approval covers waits for your decision before the connection opens.": "Bật: quy tắc chặn bên dưới sẽ dừng lệnh gọi, và đích chưa được phê duyệt sẽ chờ quyết định của bạn trước khi kết nối mở.",
"Off: outbound connections are not checked, so the block rules below are NOT evaluated for network targets. Turn the gate on to enforce them.": "Tắt: kết nối ra ngoài không được kiểm tra, vì vậy các quy tắc chặn bên dưới KHÔNG được đánh giá cho đích mạng. Bật cổng để áp dụng chúng.",
"Off: outbound connections are not checked against these rules.": "Tắt: kết nối ra ngoài không được kiểm tra theo các quy tắc này.",
"Network target gate": "Cổng đích mạng",
"Auto (on when the task is scoped)": "Tự động (bật khi tác vụ có phạm vi)",
"On (approve every outbound target)": "Bật (phê duyệt mọi đích ra ngoài)",
"Off (no target approvals)": "Tắt (không phê duyệt đích)",
"The gate checks every outbound network target of an agent call and is the only place where the \"block\" rules above are evaluated against network targets: with it off, those rules never stop a connection. \"Auto\" leaves the backend default: on when the task links a company or carries asset rules, off otherwise. A target no approval pin covers waits for your decision in the approval panel; editable mid-run from the task overview.": "Cổng kiểm tra mọi đích mạng ra ngoài của một lệnh gọi của agent và là nơi duy nhất mà các quy tắc \"chặn\" bên trên được đánh giá cho đích mạng: khi tắt, các quy tắc đó không bao giờ chặn kết nối. \"Tự động\" giữ mặc định của backend: bật khi tác vụ liên kết công ty hoặc có quy tắc tài sản, ngược lại là tắt. Đích chưa được phê duyệt sẽ chờ quyết định của bạn trong bảng phê duyệt; có thể chỉnh sửa khi đang chạy từ phần tổng quan tác vụ.",
"Applies to this task only and is not written to global rules. Evaluation order: \"Block\" rules (including global ones) match first, and a hit forbids testing; with no hit and \"Allow\" rules configured for this task, an asset must match an allow rule to be permitted, otherwise testing is likewise forbidden; with no allow rules configured, no whitelist is active. Assets are always checked, but outbound network targets are checked only while the task's target gate is on (Advanced settings).": "Chỉ áp dụng cho tác vụ này và không ghi vào quy tắc toàn cục. Thứ tự xét: quy tắc \"Chặn\" (kể cả quy tắc toàn cục) được khớp trước, khớp trúng là cấm kiểm thử; nếu không khớp và tác vụ có cấu hình quy tắc \"Cho phép\", tài sản phải khớp một quy tắc cho phép mới được phép, nếu không cũng bị cấm kiểm thử; nếu không cấu hình quy tắc cho phép nào, danh sách trắng không hoạt động. Tài sản luôn được kiểm tra; đích mạng ra ngoài chỉ được kiểm tra khi cổng đích của tác vụ đang bật (Cài đặt nâng cao)."
"Applies to this task only and is not written to global rules. Evaluation order: \"Block\" rules (including global ones) match first, and a hit forbids testing; with no hit and \"Allow\" rules configured for this task, an asset must match an allow rule to be permitted, otherwise testing is likewise forbidden; with no allow rules configured, no whitelist is active. Assets are always checked, but outbound network targets are checked only while the task's target gate is on (Advanced settings).": "Chỉ áp dụng cho tác vụ này và không ghi vào quy tắc toàn cục. Thứ tự xét: quy tắc \"Chặn\" (kể cả quy tắc toàn cục) được khớp trước, khớp trúng là cấm kiểm thử; nếu không khớp và tác vụ có cấu hình quy tắc \"Cho phép\", tài sản phải khớp một quy tắc cho phép mới được phép, nếu không cũng bị cấm kiểm thử; nếu không cấu hình quy tắc cho phép nào, danh sách trắng không hoạt động. Tài sản luôn được kiểm tra; đích mạng ra ngoài chỉ được kiểm tra khi cổng đích của tác vụ đang bật (Cài đặt nâng cao).",
"On: a block rule stops the call before it runs. A target that no approval pin covers waits about five minutes for your decision, then the call is refused.": "Bật: quy tắc chặn sẽ dừng lệnh gọi trước khi nó chạy. Đích chưa được phê duyệt sẽ chờ quyết định của bạn khoảng năm phút, sau đó lệnh gọi bị từ chối.",
"The gate checks the targets an agent call declares, and it is the only place where the \"block\" rules above are evaluated against network targets: with it off, those rules never stop a connection. A declared target that no approval pin covers waits about five minutes for your decision, then the call is refused — a timeout cannot approve. \"Auto\" leaves the backend default: on when the task links a company or carries any asset rule, off otherwise, so an allow-only list also turns it on. In sandbox mode the gate sees the call, not the worker's sockets, which the sandbox egress list governs; the gate also switches on the panel-hosted shared browser. Editable mid-run from the task overview.": "Cổng kiểm tra các đích mà lệnh gọi của agent khai báo và là nơi duy nhất mà các quy tắc \"chặn\" bên trên được đánh giá cho đích mạng: khi tắt, các quy tắc đó không bao giờ chặn kết nối. Đích đã khai báo mà chưa được phê duyệt sẽ chờ quyết định của bạn khoảng năm phút, sau đó lệnh gọi bị từ chối — hết thời gian không thể phê duyệt. \"Tự động\" giữ mặc định của backend: bật khi tác vụ liên kết công ty hoặc có bất kỳ quy tắc tài sản nào, ngược lại là tắt, nên danh sách chỉ có quy tắc cho phép cũng bật cổng. Ở chế độ sandbox, cổng thấy lệnh gọi chứ không thấy socket của worker (danh sách ra ngoài của sandbox quyết định chúng); cổng cũng bật trình duyệt dùng chung trên panel. Có thể chỉnh sửa khi đang chạy từ phần tổng quan tác vụ.",
"Timeout · Heartbeat · First intent · Coverage · Target gate": "Thời gian chờ · Nhịp tim · Ý định đầu tiên · Phạm vi bao phủ · Cổng đích",
"The gate state could not be read.": "Không đọc được trạng thái cổng.",
"This task has finished, so no tool call reads this gate.": "Tác vụ này đã kết thúc nên không còn lệnh gọi công cụ nào đọc cổng này.",
"Allow rules do not apply to this gate: they set asset scope and the sandbox egress list. The gate asks for every target until an approval pins it.": "Quy tắc cho phép không áp dụng cho cổng này: chúng đặt phạm vi tài sản và danh sách ra ngoài của sandbox. Cổng sẽ hỏi cho mọi đích cho đến khi một phê duyệt ghim nó.",
"The gate is off and this task has block rules: they will be stored but never evaluated for network targets.": "Cổng đang tắt và tác vụ này có quy tắc chặn: chúng sẽ được lưu nhưng không bao giờ được đánh giá cho đích mạng."
}
+8 -4
View File
@@ -2413,7 +2413,6 @@
"This will permanently delete the company and its asset scope configuration. This action cannot be undone.": "此操作将永久删除该企业及其资产范围配置,不可撤销。",
"Time": "时间",
"Timed out": "已超时",
"Timeout · Heartbeat · First intent": "超时 · 心跳 · 首个意图",
"Timeout (ms, empty = default)": "超时(ms,空=默认)",
"Timeout (seconds)": "超时时间(秒)",
"Timeout action": "超时动作",
@@ -2795,13 +2794,18 @@
"Clicking or typing in the view takes control from the agent.": "在视图中点击或输入会从智能体手中接管控制。",
"Target gate (approve outbound network targets)": "目标审批门禁(出站网络目标需审批)",
"Reading the gate state…": "正在读取门禁状态…",
"On: a block rule below stops the call, and a target no approval covers waits for your decision before the connection opens.": "已开启:下方的阻止规则会拦下调用;未被审批覆盖的目标会等待您的决定后才建立连接。",
"Off: outbound connections are not checked, so the block rules below are NOT evaluated for network targets. Turn the gate on to enforce them.": "已关闭:出站连接不会被检查,因此下方阻止规则不会对网络目标进行评估。开启门禁后这些规则才会生效。",
"Off: outbound connections are not checked against these rules.": "已关闭:出站连接不会按这些规则检查。",
"Network target gate": "网络目标审批门禁",
"Auto (on when the task is scoped)": "自动(任务有拦截范围时开启)",
"On (approve every outbound target)": "开启(每个出站目标都需审批)",
"Off (no target approvals)": "关闭(不做目标审批)",
"The gate checks every outbound network target of an agent call and is the only place where the \"block\" rules above are evaluated against network targets: with it off, those rules never stop a connection. \"Auto\" leaves the backend default: on when the task links a company or carries asset rules, off otherwise. A target no approval pin covers waits for your decision in the approval panel; editable mid-run from the task overview.": "门禁会检查智能体调用中的每个出站网络目标,也是上方“阻止”规则唯一会针对网络目标评估的地方:关闭后这些规则不会拦住任何连接。“自动”保留后端默认:任务关联了公司或带有资产规则时开启,否则关闭。未被审批固定覆盖的目标会在审批面板中等待您的决定;可在任务概览中随时修改。",
"Applies to this task only and is not written to global rules. Evaluation order: \"Block\" rules (including global ones) match first, and a hit forbids testing; with no hit and \"Allow\" rules configured for this task, an asset must match an allow rule to be permitted, otherwise testing is likewise forbidden; with no allow rules configured, no whitelist is active. Assets are always checked, but outbound network targets are checked only while the task's target gate is on (Advanced settings).": "仅对本任务生效,不写入全局规则。判定顺序:先按「拦截」规则(含全局)匹配,命中即禁止测试;未命中且本任务配置了「允许」规则时,须命中某条允许规则才放行,否则同样不允许测试;未配置任何允许规则则不启用白名单。 资产始终会按这些规则检查;出站网络目标只有在任务的审批门禁开启时才会检查(高级设置)。"
"Applies to this task only and is not written to global rules. Evaluation order: \"Block\" rules (including global ones) match first, and a hit forbids testing; with no hit and \"Allow\" rules configured for this task, an asset must match an allow rule to be permitted, otherwise testing is likewise forbidden; with no allow rules configured, no whitelist is active. Assets are always checked, but outbound network targets are checked only while the task's target gate is on (Advanced settings).": "仅对本任务生效,不写入全局规则。判定顺序:先按「拦截」规则(含全局)匹配,命中即禁止测试;未命中且本任务配置了「允许」规则时,须命中某条允许规则才放行,否则同样不允许测试;未配置任何允许规则则不启用白名单。 资产始终会按这些规则检查;出站网络目标只有在任务的审批门禁开启时才会检查(高级设置)。",
"On: a block rule stops the call before it runs. A target that no approval pin covers waits about five minutes for your decision, then the call is refused.": "已开启:阻止规则会在调用执行前将其拦下。未被审批固定覆盖的目标会等待您约五分钟作出决定,随后调用被拒绝。",
"The gate checks the targets an agent call declares, and it is the only place where the \"block\" rules above are evaluated against network targets: with it off, those rules never stop a connection. A declared target that no approval pin covers waits about five minutes for your decision, then the call is refused — a timeout cannot approve. \"Auto\" leaves the backend default: on when the task links a company or carries any asset rule, off otherwise, so an allow-only list also turns it on. In sandbox mode the gate sees the call, not the worker's sockets, which the sandbox egress list governs; the gate also switches on the panel-hosted shared browser. Editable mid-run from the task overview.": "门禁会检查智能体调用声明的目标,也是上方“阻止”规则唯一会针对网络目标评估的地方:关闭后这些规则不会拦住任何连接。未被审批固定覆盖的已声明目标会等待您约五分钟作出决定,随后调用被拒绝——超时不能批准。“自动”保留后端默认:任务关联了公司或带有任意资产规则时开启,否则关闭,因此只含允许规则的列表也会开启门禁。沙盒模式下门禁只看到调用,看不到工作进程的套接字(后者由沙盒出站清单决定);门禁还会启用面板托管的共享浏览器。可在任务概览中随时修改。",
"Timeout · Heartbeat · First intent · Coverage · Target gate": "超时 · 心跳 · 首个意图 · 覆盖率 · 目标门禁",
"The gate state could not be read.": "无法读取门禁状态。",
"This task has finished, so no tool call reads this gate.": "该任务已结束,不再有工具调用会读取此门禁。",
"Allow rules do not apply to this gate: they set asset scope and the sandbox egress list. The gate asks for every target until an approval pins it.": "允许规则不作用于该门禁:它们只设定资产范围和沙盒出站清单。在获得审批固定之前,门禁会对每个目标发起请求。",
"The gate is off and this task has block rules: they will be stored but never evaluated for network targets.": "门禁已关闭,但该任务带有阻止规则:这些规则会被保存,但不会针对网络目标进行评估。"
}
+1 -6
View File
@@ -353,12 +353,7 @@ export const api = {
target_gate: input.targetGate, // undefined is dropped by JSON.stringify: the backend then defaults it on for scoped tasks
}),
taskCategories: () => get<{ categories: TaskCategory[] }>("/task-categories").then((r) => arr(r.categories)),
updateTask: (id: string, input: { name?: string; pinned?: boolean; targetGate?: boolean }) =>
patch<Task>(`/tasks/${id}`, {
...(input.name !== undefined ? { name: input.name } : {}),
...(input.pinned !== undefined ? { pinned: input.pinned } : {}),
...(input.targetGate !== undefined ? { target_gate: input.targetGate } : {}),
}),
updateTask: (id: string, input: { name?: string; pinned?: boolean }) => patch<Task>(`/tasks/${id}`, input),
setTaskTargetGate: (id: string, targetGate: boolean) => patch<Task>(`/tasks/${id}`, { target_gate: targetGate }),
renameTask: (id: string, name: string) => patch<Task>(`/tasks/${id}`, { name }),
pinTask: (id: string, pinned: boolean) => patch<Task>(`/tasks/${id}`, { pinned }),