Commit Graph
164 Commits
Author SHA1 Message Date
ji ruo f8c9728698 Merge pull request #204 from RuoJi6/RuoJi6/fix/issue-196-mainagent-reopen-task
feat(agent): support reopening and steering closed/paused tasks (#196)

# Conflicts:
#	server/orchestration.go
2026-11-27 15:58:05 +08:00
ji ruo 99994413bf Merge pull request #202 from RuoJi6/RuoJi6/feat/issue-198-finding-remark-edit
feat(findings): add manual remark and finding edit support (#198)

# Conflicts:
#	web/src/app/(main)/function/tasks/detail/_tabs/findings-tab.tsx
2026-11-27 15:56:10 +08:00
ji ruo 10be95ac44 Merge pull request #193 from RuoJi6/RuoJi6/fix/issue-186-intercept-polling-count
fix(intercept): avoid full-history polling and full-table counts (#186)
2026-11-27 15:55:28 +08:00
ji ruo f7bf75f535 feat(agent): support reopening and steering tasks via resume_task, set_task_goals, and add_task_intent
- Add resume_task, set_task_goals, and add_task_intent orchestration tools bound to auto (and resume_task also bound to mainagent with task-context scoping) plus one-shot DB binding/prompt migrations.
- Wire task ID, NotifyGoal, and reviveTask into delegateToTask so set_task_goals and add_task_intent revive done/paused tasks in place while preserving graph/findings.
- Add shared resumeOrReopenTask and POST /api/tasks/{id}/resume (also wired into MCP resume_task) to reopen terminal tasks with open goals/intents and refuse closed tasks with no remaining work.
- Update auto and mainagent default prompts to prefer in-place resume/steering over spawning duplicate tasks.

Fixes #196
2026-11-27 15:31:16 +08:00
ji ruo 835e289ee2 feat(findings): add manual remark and finding edit support
- Persist findings.remark with archive-restore compatibility, full-text search, and Markdown/CSV/JSON export
- Extend PATCH /api/exploration/findings/{id} to update name, vulnclass, severity, status, summary, evidence, report, and remark with atomic upfront validation
- Add dedicated Notes (remark) card and Edit Finding dialog on the finding detail page, plus remark preview/inline editing in the findings list and task findings tab

Fixes #198
2026-11-27 15:06:07 +08:00
ji ruo ea49ba0a3a fix(intercept): avoid full-history polling and full-table counts
- Add partial covering index on intercept_pending(task_id, created_at DESC) INCLUDE (agent_name) WHERE status = 'pending'.
- Add GET /api/intercept/pending/summary (global count or per-task count + agent_names) and ?task_id= filtering on GET /api/intercept/pending.
- Cap unpaginated GET /api/intercept/task/{taskID} at 200 rows and remove unused tasks JOIN from non-search approval queries.
- Replace unbounded SELECT COUNT(*) in paginated approval queries with end-of-list shortcut, pg_class/pg_stat catalog estimate for large unfiltered tables, and bounded counting (10,000 cap) for large filtered sets.
- Deduplicate task detail and sessions-tab polling via single pending summary poll, switch sidebar badge to summary count, and guard approval polling against background tabs, overlapping requests, and deep-page/search churn.

Fixes #186
2026-11-26 00:54:26 +08:00
ji ruo b23d1776c7 feat(settings): default-enable screenshot/evidence settings and fix container Playwright MCP
- Default-enable browser_screenshot_enabled, browser_screenshot_timestamp_enabled, agent_traffic_binding, and task_intelligence_enabled when unset in DB (preserving explicit user false values).
- Align db/credentials.go SQL checks and frontend defaults/copy with DefaultTaskIntelligence = true.
- Fix container Playwright MCP screenshot failures: ensure --browser chromium in seed/reconcile, install Chromium via playwright-mcp install-browser --with-deps chromium in Dockerfile, prefer local playwright-mcp binary over npx, and run stdio MCP servers in the active agent working directory with stderr capture.

Fixes #188
2026-11-26 00:54:12 +08:00
ji ruo 566c533052 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	CHANGELOG.md
2026-11-23 18:38:26 +08:00
ji ruo 044f420c48 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	web/src/i18n/messages.ts
2026-11-23 18:35:27 +08:00
RuoJi6 1005fdc0ac Merge pull request #181 from RuoJi6/feat/issue-157-findings-one-click-cleanup
feat(findings): 发现页历史漏洞一键清理功能 (#157)
2026-11-23 18:33:10 +08:00
ji ruo bdd2da919c feat(llm): 支持原生 Google Gemini API 格式
- 新增 agent/gemini.go 原生 Gemini generateContent / streamGenerateContent?alt=sse llm.Provider,支持流式/非流式、工具调用与 JSON Schema 清洗、thoughtSignature 回传、thinkingConfig(Gemini 2.5 thinkingBudget / Gemini 3+ thinkingLevel)、建连/空响应重试及限流/抓包透传。
- agent.ConfigFrom / FromEnv / Provider() 支持 gemini 格式与 BaseURL 归一化(自动补全 /v1beta 并容忍粘贴完整端点 URL),环境变量支持 GEMINI_API_KEY / GOOGLE_API_KEY。
- db/schema.sql 放开 llm_profiles.format CHECK 约束加入 gemini 并幂等迁移旧库。
- server/server_mgmt.go 模型列表接口支持 Gemini /models(剥离 models/ 前缀并过滤支持 generateContent 的模型)。
- web LLM 配置页与类型/国际化新增 Google Gemini 协议选项及占位提示。
- 补充 agent/gemini_test.go、server/gemini_models_test.go 与限流重试测试。

Fixes #170
2026-11-23 18:24:43 +08:00
ji ruo e196a06aa9 feat(findings): add one-click cleanup for historical findings
- Add DB `DeleteFindings` bulk deletion inside `WithEvidenceTx`, locking affected tasks/findings, cascading retests/cases, and removing originating `exploration_nodes` (kind='finding').
- Add `DELETE /api/exploration/findings` endpoint supporting `scope` (`all`, `filtered`, `selected`) via JSON body or query params with strict validation and 409 on archive-state conflicts.
- Add `api.cleanupFindings`, mock handler support, bilingual `findingsCleanup.*` i18n keys, and a one-click cleanup button + confirmation dialog on the Findings page refreshing all four views.
- Add Go DB/server tests (`TestDeleteFindings`, `TestDeleteFindingsValidation`, `TestDeleteFindingsEndpoint`).

Fixes #157
2026-11-23 18:20:33 +08:00
ji ruo c6f7c29b71 feat: 一键备份与迁移 (#160)
- 系统配置新增「备份与迁移」:下载单个 tar.zst 备份(全部业务表的一致快照、数据目录、流量索引快照、skills)
- 上传恢复:先解包并按当前 schema 校验,通过后重启;启动时数据库单事务整体替换,文件逐项替换且可续做
- 归档包绝对路径改写到新数据目录;本机已有同名 skill 保留本机版本
- 抽出 extractTarZst 供流式解包复用
2026-11-19 23:34:02 +08:00
ji ruo 7d9c5699cb feat(workers): hot-reload task worker concurrency
Support live task overrides and global default/pool reconciliation.
Drain retiring workers without cancelling active intents; expose actual/target loop counts in the API and task UI.
Persist worker policy and cover resizing, API validation, settings notification, and restoration with regression tests.

Fixes #171
2026-11-19 17:26:51 +08:00
ji ruo 8cf118e34d feat(mcp): expose ARTEX as an MCP server for external agents
Add a stateless Streamable HTTP endpoint at /mcp that lets external agents
list tasks and findings, create tasks, pause/resume them and add hints.

- Access tokens (api_tokens): scopes (read, task:create, task:control),
  optional company restriction, task quotas, expiry, revocation. Only the
  SHA-256 is stored; the plaintext is returned once.
- /mcp authenticates with access tokens only. It sits outside the HTTP Basic
  Auth gate and rejects Basic credentials and the admin JWT.
- Whitelisted tools only; nothing that edits tools, skills, MCP servers,
  workspace files or settings is exposed.
- Every tools/call is audited (mcp_audit_log), refusals included.
- POST /api/tasks and the MCP spawn_task tool now share one creation path.
- Settings card for the switch, token management and the call audit.
- Off by default.

Refs RuoJi6/ARTEX#144
2026-11-14 14:08:07 +08:00
ji ruo 5131905918 Merge pull request #134 from RuoJi6/agent/agent/github-3 2026-11-11 15:25:36 +08:00
ji ruo 3306e547b2 fix(tasks): serialize no-result decisions with finding writes 2026-11-11 15:20:58 +08:00
ji ruo 62ed7db7b2 feat(tasks): add read-only task file browser (GITHUB-3) 2026-11-11 14:14:37 +08:00
ji ruo 997d2d98c0 feat(tasks): stop tasks that miss a configurable findings checkpoint 2026-11-11 14:07:39 +08:00
ji ruo 8ee94f2215 feat: expose traffic IDs and filter finding statistics 2026-11-09 16:11:15 +08:00
RuoJi6 459a484237 Merge pull request #120 from RuoJi6/codex/task-global-assets
feat: add opt-in global asset sharing per task
2026-11-05 16:37:07 +08:00
ji ruo 080a46eb2d feat: make task global asset sharing opt-in 2026-11-05 16:27:44 +08:00
ji ruo 4868b1816f fix: persist custom egress IP probe service (#118) 2026-11-05 16:00:07 +08:00
ji ruo f053931a1d fix: require Basic Auth for health checks 2026-11-03 14:56:39 +08:00
ji ruo 5203176364 fix: remove application fingerprints from public responses 2026-11-03 14:48:41 +08:00
ji ruo 7140d14a17 feat: use DeepSeek Search API for web search 2026-11-03 14:07:32 +08:00
RuoJi6 05dd5b40e8 Merge pull request #107 from RuoJi6/feat/proxy-pool
feat: 全局代理池(健康检查、定时/失效轮换、热切换、脱敏)— Depends on #106
2026-11-02 15:45:28 +08:00
RuoJi6 f0993424e5 Merge pull request #106 from RuoJi6/feat/proxy-auto-resume-on-reconnect
feat: 代理异常时暂停任务并在重连后自动恢复(含手动测试代理)
2026-11-01 23:38:48 -08:00
RuoJi6 4955fb87e2 Merge pull request #105 from RuoJi6/feat/jev-intercept-judge
feat: 拦截判定模型接入 Jev(TypeSafe System One)
2026-11-01 23:38:34 -08:00
RuoJi6 008a9ced0d fix: 代理暂停归入任务暂停语义并为所有成功路径加轮次门控 2026-10-31 19:30:38 +08:00
RuoJi6 d93032fbea fix: 新一轮代理暂停重置重连计数并丢弃过期探测写回 2026-10-31 18:58:15 +08:00
RuoJi6 e47f7892dd fix: address Jev judge review round 2 2026-10-31 18:52:47 +08:00
RuoJi6 9a1599b96e fix: address Jev judge review feedback 2026-10-31 18:16:49 +08:00
RuoJi6 e878020c4d fix: 收紧代理故障判定并修复自动恢复门控/日历/终态问题 2026-10-31 16:23:28 +08:00
RuoJi6 b0e25d766f feat: 接入 Jev 拦截判定模型
Add TypeSafe System One as an isolated intercept judge backend.
2026-10-31 15:56:02 +08:00
RuoJi6 de6a0fa125 feat: 代理异常暂停与自动重连恢复
Proxy failure pause, timed reconnect, and guarded auto-resume.
2026-10-31 15:54:41 +08:00
RuoJi6 eabdf85558 fix: wire paused side task provider cache 2026-10-31 10:14:18 +08:00
ji ruo 542d7e9ca6 fix: preserve UTF-8 filenames for exports 2026-10-30 15:06:37 +08:00
ji ruo 21f68a6a60 feat: event-driven credential processing conversations 2026-10-30 09:18:31 +08:00
RuoJi6 5366160a5d feat: add container resource monitoring 2026-10-29 10:28:40 -07:00
ji ruo 2290acfa62 feat: refine agent workflows and settings UI 2026-10-29 16:20:11 +08:00
ji ruo 7946869762 feat: add task traffic history and report recovery 2026-10-29 10:18:32 +08:00
ji ruo b0a29236f8 feat: improve finding reports and evidence exports 2026-10-29 01:25:32 +08:00
ji ruo 21646d5d29 feat: separate topology mapping from asset graph 2026-10-28 23:19:53 +08:00
ji ruo 14ebf44362 fix: restore topology view and mapping progress state 2026-10-28 21:10:43 +08:00
ji ruo fb6942f2b2 fix: align asset coverage zones and remapping chat 2026-10-28 19:23:13 +08:00
ji ruo e8572a18d2 feat: add structured finding reproduction screenshots 2026-10-28 18:08:12 +08:00
RuoJi6 cb0a69ef60 Merge pull request #60 from RuoJi6/fix/task-runtime-exclude-pause
fix: 运行时长排除暂停时间
2026-10-27 00:44:03 -07:00
RuoJi6 287021b494 Merge pull request #58 from RuoJi6/feat/task-auto-title
feat: 双能力自动标题(任务名 + 对话标题)
2026-10-27 00:43:31 -07:00
RuoJi6 7e5c828fc2 fix(web): show egress IPs in navbar middle via settings toggle 2026-10-27 13:46:34 +08:00