ARTEX/intercept
BaaRai 4bcb6d7250 Add agentic guards for goals, hint origin and planner Bash (F5, F6, F11)
Audit findings F5, F6 and F11 for issue #124.

F5, goal guards:
- goal_met refuses while any goal node of the task is open, and when the
  goals cannot be read. A task without goal nodes keeps the old behavior.
- prove_goal accepts a fact as evidence only when its confidence is
  "observed"; otherwise it refuses and the goal stays open. Findings are
  still accepted.

F6, hint origin:
- add_hint stores the calling ToolSet's worker as the hint origin instead
  of "human", and passes it to the planner trigger (TriggerEvent.HintOrigin).
- renderTriggers names the writer: the human via the main agent, a
  cross-task orchestration, or an agent, with a neutral fallback.

F11, built-in rules for the planner and the main agent:
- Interceptor.MatchBuiltin evaluates the enabled "[built-in]" deny rules on
  the intercept-enabled tools.
- The target-only guard applies them before the target gate, whether the
  gate is on or off. User rules and the judge stay out of it.
- SetRulesForTest is a test seam for the store-less guard tests; Log is a
  no-op without a store.
2026-11-11 22:39:13 +01:00
..
intercept.go Add agentic guards for goals, hint origin and planner Bash (F5, F6, F11) 2026-11-11 22:39:13 +01:00
prompt.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
prompt_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
review_context.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
review_context_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
target.go feat(intercept): target extraction, resolver, exemptions and the gate in the hook (S3b 1.5-1.7) 2026-11-11 00:34:55 +01:00
target_declared_test.go fix(intercept): match block rules on the declared targets before any lookup 2026-11-11 15:47:58 +01:00
target_dial.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_dial_pg_test.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_dial_test.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_exempt.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_exempt_test.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_extract.go fix(intercept): match block rules on the declared targets before any lookup 2026-11-11 15:47:58 +01:00
target_gate.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_gate_pg_test.go feat(intercept): target extraction, resolver, exemptions and the gate in the hook (S3b 1.5-1.7) 2026-11-11 00:34:55 +01:00
target_gate_test.go feat(intercept): target extraction, resolver, exemptions and the gate in the hook (S3b 1.5-1.7) 2026-11-11 00:34:55 +01:00
target_redirect.go feat(intercept): check every redirect hop against the target gate (S3b 1.9) 2026-11-11 17:07:35 +01:00
target_redirect_pg_test.go feat(intercept): check every redirect hop against the target gate (S3b 1.9) 2026-11-11 17:07:35 +01:00
target_redirect_test.go feat(intercept): check every redirect hop against the target gate (S3b 1.9) 2026-11-11 17:07:35 +01:00
target_rendered.go fix(intercept): match block rules on the declared targets before any lookup 2026-11-11 15:47:58 +01:00
target_rendered_test.go feat(intercept): gate the rendered targets of custom tools (S3b 1.8) 2026-11-11 15:04:42 +01:00
target_request.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_request_test.go feat(intercept): target-gate schema, opt-in flag and approval requests (S3b 1.2-1.4) 2026-11-10 23:05:47 +01:00
target_resolve.go feat(intercept): pinned dialer for WebFetch and the custom http tool (S3b 2.1) 2026-11-11 19:19:55 +01:00
target_test.go feat(intercept): target extraction, resolver, exemptions and the gate in the hook (S3b 1.5-1.7) 2026-11-11 00:34:55 +01:00
testmain_test.go feat(intercept): target-gate schema, opt-in flag and approval requests (S3b 1.2-1.4) 2026-11-10 23:05:47 +01:00
trace.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
trace_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00