ARTEX/agent
BaaRai 1f4cb65ca6 feat(intercept): target-gate schema, opt-in flag and approval requests (S3b 1.2-1.4)
Storage, flag and request path of the approval gate for asset targets. The
gate itself is not wired into the tool hook yet (steps 1.5 to 1.7): with this
change nothing is extracted, resolved or blocked, whatever the flag says.

Schema and store (1.2)
- tasks.target_gate, conversations.target_gate (default false).
- intercept_pending.target_key and a partial unique index: one open request
  per scope (task or conversation) and host:port.
- target_pins (no foreign keys: a pin outlives its task, its conversation and
  its request row) and target_gate_exemption_log. All DDL is idempotent; no
  CHECK constraints; the cascade on intercept_pending.conversation_id stays.
- db/target_pins.go: pin lookup with port precedence, list, revoke,
  find-or-create of a request, and ResolveTargetRequest, which settles the
  row, supersedes the old pin and writes the new version in one transaction.
- Deleting a task or an archive stub revokes its pins and settles its open
  target requests in the delete transaction. DeleteConversation and
  DeleteConversations revoke the pins of the removed conversations in the
  same transaction as the delete.

Opt-in flag (1.3)
- Per task through the create and metadata-patch paths, per conversation
  through create and patch; exposed in the task DTO. A retest conversation
  takes the flag of the finding's task, never its pins. A spawned task starts
  with the gate off.
- The task flag is atomic and read on every call through TargetScope.Enabled.
  TargetScope now carries the Interceptor that owns the gate.

Request, wait, decide (1.4)
- pendingManager keeps a list of waiters per request; resolve wakes all.
- RequestTargets: find-or-create per target, one card per request, wait on
  channel, poll, context and wait bound. A plain request is never settled by
  a call that leaves. A request merged with an ask is bound to its creating
  call and a timeout never allows it.
- Decide records the approver (subject of the session token) and the remote
  address for every human decision, classic asks included. On a target
  request "allowed" pins the displayed addresses; that is the only writer of
  pins.
- A request raised while the global egress proxy is set says the approval is
  name-only and its pin is stored with name_only_effective.
- Routes: GET/POST .../target-pins and .../target-pins/{pid}/revoke under
  /api/tasks/{id} and /api/conversations/{id}; decision_source=target filter.
- ValidateExemptionHost: an exemption written as an IP literal may be private
  unicast, never loopback, link-local or metadata, unspecified or multicast.
2026-11-10 23:05:47 +01:00
..
adversarial_gate_seed_test.go feat: adversarial verification gate before confirmed findings 2026-10-12 06:26:51 +02:00
assembly.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
blackboard_inheritance_test.go Skip the four known-broken tests in code instead of CI -skip flags 2026-10-10 18:12:42 +02:00
cancelcause.go feat(engine): intent claim heartbeat, TTL and fencing token (S3c) 2026-11-10 17:45:11 +01:00
capture.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
capture_approval_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
capture_usage_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
chat.go feat: enable the untrusted-output boundary with ARTEX_UNTRUSTED_BOUNDARY 2026-11-09 23:42:49 +01:00
coldgraph.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
coldgraph_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
compaction.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
constraints.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
deadline_contract_seed_test.go feat: deadline contract in the executor seeds 2026-10-12 07:30:27 +02:00
deferred.go feat: 增加 Agent 流量绑定开关并补齐证据交接 2026-09-10 14:08:40 +08:00
deferred_test.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
finding_dedup_seed_test.go feat: duplicate discipline before report_finding and in the reporter 2026-10-12 07:29:59 +02:00
finding_quality_seed_test.go feat: measured impact and attacker-goal proof standard for findings 2026-10-12 06:25:35 +02:00
finding_recorder.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
finding_recorder_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
finding_workflow.go feat: verified findings backend (S1) 2026-11-09 20:21:27 +01:00
finding_workflow_test.go feat: 增加 Agent 流量绑定开关并补齐证据交接 2026-09-10 14:08:40 +08:00
goals.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
hooks_reach_test.go feat(guard): planner and main-agent hooks, target-gate scope in every session (S3b 1.1) 2026-11-10 22:14:24 +01:00
insert_assets_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
mainagent.go feat(guard): planner and main-agent hooks, target-gate scope in every session (S3b 1.1) 2026-11-10 22:14:24 +01:00
noa.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
operator_handoff_seed_test.go feat: ask_operator environmental handoff discipline 2026-10-12 06:45:21 +02:00
planner.go feat(guard): planner and main-agent hooks, target-gate scope in every session (S3b 1.1) 2026-11-10 22:14:24 +01:00
prompt.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
prompt_injection_seed_test.go feat: first-layer prompt-injection hardening for agents 2026-10-12 00:58:53 +02:00
prompt_now_test.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
promptcatalog.go Merge pull request #65 from BaaRai/feat/deadline-contract 2026-10-12 08:02:08 +02:00
provider.go feat(llm): optional custom User-Agent for LLM requests 2026-11-08 17:11:43 +01:00
provider_capture_e2e_test.go feat(llmrec): 录制 LLM 请求/响应 HTTP 原文 2026-08-25 09:40:05 -04:00
provider_capture_test.go feat(llm): optional custom User-Agent for LLM requests 2026-11-08 17:11:43 +01:00
provider_env_test.go fix(agent): match ARTEX_LLM_PROVIDER case-insensitively 2026-11-03 23:20:21 +01:00
provider_quota_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
provider_responses_test.go feat(llm): 支持 OpenAI Responses API 格式的 LLM 配置 2026-08-25 11:39:24 -04:00
proxyenv_test.go feat(proxy): 新增全局出口代理配置 2026-09-07 10:43:38 -04:00
retester.go feat: adversarial verification gate before confirmed findings 2026-10-12 06:26:51 +02:00
review_context_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
runinfo.go feat(tasks): add runtime controls and inherited context 2026-08-24 19:29:00 +08:00
session_header_test.go feat(llm): 每个 LLM 配置支持自定义会话头 2026-09-07 11:21:50 -04:00
side_questions.go feat(agent): 支持持久化 /btw 旁路提问 2026-09-10 21:42:25 +08:00
side_questions_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
stagnation_test.go feat(engine): ouroboros takes - goal ambiguity gate, failover escalation, stagnation surfacing 2026-10-21 14:46:56 +02:00
taskclock.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
terminalreason.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
terminalreason_test.go feat(engine): intent claim heartbeat, TTL and fencing token (S3c) 2026-11-10 17:45:11 +01:00
testmain_test.go feat: each test package runs on its own database 2026-10-12 18:43:29 +02:00
toolcatalog.go feat(tasks): per-task test-account credentials 2026-10-09 14:28:08 +02:00
toolcatalog_test.go fix(tools): harden obj against blank required names and heal seeded list_task_credentials rows 2026-11-10 09:46:49 +01:00
tools.go fix(tools): harden obj against blank required names and heal seeded list_task_credentials rows 2026-11-10 09:46:49 +01:00
tools_creds.go fix(tools): drop empty required entry from list_task_credentials schema 2026-11-02 09:05:03 +03:00
tools_digest.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
tools_insert.go feat(tasks): per-task test-account credentials 2026-10-09 14:28:08 +02:00
tools_nil_store_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
tools_overview_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
untrusted_boundary.go feat: enable the untrusted-output boundary with ARTEX_UNTRUSTED_BOUNDARY 2026-11-09 23:42:49 +01:00
untrusted_boundary_test.go feat: enable the untrusted-output boundary with ARTEX_UNTRUSTED_BOUNDARY 2026-11-09 23:42:49 +01:00
user_agent_test.go fix(llm): validate custom User-Agent in the connection-test path 2026-11-08 18:15:33 +01:00
worker.go feat: enable the untrusted-output boundary with ARTEX_UNTRUSTED_BOUNDARY 2026-11-09 23:42:49 +01:00
worker_intervention_test.go 新增worker直接对话 2026-08-29 21:55:27 +08:00
wrapup.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00