CyberStrikeAI/internal/handler
Sycun acd84cd525 feat: let an installation choose its update source, and adopt a plain directory
config.yaml gains an optional update section (remote / remote_url / branch). The
resolver keeps its default - whatever remote this tree already tracks - and the
explicit choice wins when set, which is also what lets a tarball installation
that never saw git get on the update rails at all.

- RemoteURL is fetched straight into a ref namespace of its own, so a URL source
  cannot be shadowed by a same-named remote's stale refs. ValidRemoteURL allowlists
  https/http/ssh/git/file and local absolute paths, and rejects git's ext::
  transport (which executes commands) before anything reaches argv.
- Adopt connects a plain directory to the source. Preview is side-effect free (the
  fetch happens in a throwaway bare repository) and lists every local file whose
  content the target would replace, plus the operator content that is put aside.
  The confirmed run inits, adds origin, stashes operator content, keeps every
  replaced file under .update-backup/<ts>/overwritten/ so "the update ate my edit"
  has an address, lands the target content, sets upstream, rebuilds the binary.
  A failure removes only the .git it created itself; once the content has landed
  the tree stays adopted even if the build fails.
- Console/API: the status envelope carries the configured source;
  POST /system/update/source writes it through the same config path every other
  setting uses (validated, audited); POST /system/update/adopt is preview-then-job,
  with the job's kind recorded. OpenAPI updated; RBAC rides the existing
  update:apply prefix and the route inventory stays green.

Tests: URL-mode check/apply against real repositories (including the address
beating a remote name), URL validation table, and the full adoption story -
preview touches nothing, operator content survives, the replaced edit is in the
backup, and the adopted tree updates and rolls back like any other installation.
2026-10-07 12:46:32 +08:00
..
agent.go fix: validate login and role inputs and protect task access 2026-10-06 01:36:31 +08:00
agent_progress_callback_test.go Add files via upload 2026-08-18 20:20:39 +08:00
asset.go Add files via upload 2026-08-18 20:20:39 +08:00
asset_test.go Add files via upload 2026-08-18 20:20:39 +08:00
attackchain.go Add files via upload 2026-08-18 20:20:39 +08:00
audit.go Add files via upload 2026-08-18 20:20:39 +08:00
audit_export_csv.go Add files via upload 2026-08-18 20:20:39 +08:00
audit_query.go Add files via upload 2026-08-18 20:20:39 +08:00
audit_query_test.go Add files via upload 2026-08-18 20:20:39 +08:00
auth.go fix: validate login and role inputs and protect task access 2026-10-06 01:36:31 +08:00
auth_login_validation_test.go fix: validate login and role inputs and protect task access 2026-10-06 01:36:31 +08:00
batch_hitl.go feat: add batch task approval settings and fix modal dropdown scrolling 2026-09-13 18:02:43 +08:00
batch_hitl_test.go feat: add batch task approval settings and fix modal dropdown scrolling 2026-09-13 18:02:43 +08:00
batch_queue_executor.go fix: validate login and role inputs and protect task access 2026-10-06 01:36:31 +08:00
batch_task_manager.go fix: validate form edits and enforce task result ownership 2026-10-06 02:20:28 +08:00
batch_task_manager_test.go Add files via upload 2026-08-18 20:20:39 +08:00
batch_task_mcp.go Add files via upload 2026-08-18 20:20:39 +08:00
c2.go fix: validate callback hosts before generating payloads 2026-10-06 02:57:09 +08:00
c2_listener_validation_test.go fix: validate callback hosts before generating payloads 2026-10-06 02:57:09 +08:00
c2_profile_validation_test.go fix: preserve task terminal state and file navigation paths 2026-10-06 01:48:12 +08:00
c2_task_access_test.go fix: validate login and role inputs and protect task access 2026-10-06 01:36:31 +08:00
chat_uploads.go Add files via upload 2026-08-18 20:20:39 +08:00
config.go feat: let an installation choose its update source, and adopt a plain directory 2026-10-07 12:46:32 +08:00
config_eino_resilience_test.go Add files via upload 2026-08-18 20:20:39 +08:00
config_file.go feat: add configurable tool call blocking and monitoring 2026-09-08 09:44:32 +08:00
config_secrets.go fix: mask stored credentials and validate agent saves 2026-10-06 02:04:14 +08:00
config_secrets_test.go fix: mask stored credentials and validate agent saves 2026-10-06 02:04:14 +08:00
conversation.go Remove conversation grouping feature 2026-08-26 15:00:09 +08:00
conversation_delete_task_test.go Add files via upload 2026-08-18 20:20:39 +08:00
conversation_plantask_test.go Add files via upload 2026-08-18 20:20:39 +08:00
conversation_process_details_test.go Fix finalization cleanup for pending tool executions 2026-08-23 19:57:17 +08:00
conversation_rbac_test.go Add files via upload 2026-08-18 20:20:39 +08:00
eino_empty_response_continue.go Add files via upload 2026-08-18 20:20:39 +08:00
eino_resume_segment.go Add files via upload 2026-08-18 20:20:39 +08:00
eino_single_agent.go feat: manage task process lifetimes and preserve turn history 2026-09-16 17:52:58 +08:00
external_mcp.go feat: add configurable tool call blocking and monitoring 2026-09-08 09:44:32 +08:00
external_mcp_test.go Add files via upload 2026-08-18 20:20:39 +08:00
finalization_auto_continue.go Fix finalization cleanup for pending tool executions 2026-08-23 19:57:17 +08:00
finalization_auto_continue_test.go Fix finalization cleanup for pending tool executions 2026-08-23 19:57:17 +08:00
finalization_helpers.go fix: validate workflows and preserve execution outcomes 2026-10-06 02:32:32 +08:00
fofa.go Add files via upload 2026-08-18 20:20:39 +08:00
fofa_test.go Add files via upload 2026-08-18 20:20:39 +08:00
form_validation_test.go fix: validate form edits and enforce task result ownership 2026-10-06 02:20:28 +08:00
hitl.go feat: add TypeSafe Jev as HITL audit backend 2026-09-22 21:15:53 +08:00
hitl_audit_agent.go feat: add TypeSafe Jev as HITL audit backend 2026-09-22 21:15:53 +08:00
hitl_audit_agent_test.go feat: add TypeSafe Jev as HITL audit backend 2026-09-22 21:15:53 +08:00
hitl_audit_backend.go feat: add TypeSafe Jev as HITL audit backend 2026-09-22 21:15:53 +08:00
hitl_audit_backend_test.go feat: add TypeSafe Jev as HITL audit backend 2026-09-22 21:15:53 +08:00
hitl_cognition.go Add files via upload 2026-08-18 20:20:39 +08:00
hitl_context.go Add files via upload 2026-08-18 20:20:39 +08:00
hitl_context_test.go Add files via upload 2026-08-18 20:20:39 +08:00
hitl_execution.go Add files via upload 2026-08-18 20:20:39 +08:00
hitl_execution_test.go Add files via upload 2026-08-18 20:20:39 +08:00
hitl_logs.go feat: add TypeSafe Jev as HITL audit backend 2026-09-22 21:15:53 +08:00
hitl_restart_test.go Add files via upload 2026-08-18 20:20:39 +08:00
hitl_task_cancel_integration_test.go fix: retain cancellation labels after approval interruptions 2026-10-06 03:11:11 +08:00
hitl_whitelist_test.go Add files via upload 2026-08-18 20:20:39 +08:00
knowledge.go fix: retain knowledge indexing errors and explain failure causes 2026-10-06 03:02:14 +08:00
knowledge_index_error_test.go fix: retain knowledge indexing errors and explain failure causes 2026-10-06 03:02:14 +08:00
markdown_agent_validation.go fix: mask stored credentials and validate agent saves 2026-10-06 02:04:14 +08:00
markdown_agent_validation_test.go fix: mask stored credentials and validate agent saves 2026-10-06 02:04:14 +08:00
markdown_agents.go fix: mask stored credentials and validate agent saves 2026-10-06 02:04:14 +08:00
monitor.go feat: add configurable tool call blocking and monitoring 2026-09-08 09:44:32 +08:00
multi_agent.go feat: manage task process lifetimes and preserve turn history 2026-09-16 17:52:58 +08:00
multi_agent_prepare.go Add files via upload 2026-08-18 20:20:39 +08:00
notification.go Add files via upload 2026-08-18 20:20:39 +08:00
notification_rbac_test.go Add files via upload 2026-08-18 20:20:39 +08:00
openapi.go feat: let an installation choose its update source, and adopt a plain directory 2026-10-07 12:46:32 +08:00
openapi_i18n.go Remove conversation grouping feature 2026-08-26 15:00:09 +08:00
openapi_i18n_test.go Add files via upload 2026-08-18 20:20:39 +08:00
plain_text_finalization_test.go fix: validate login and role inputs and protect task access 2026-10-06 01:36:31 +08:00
project.go fix: validate form edits and enforce task result ownership 2026-10-06 02:20:28 +08:00
project_context.go Add files via upload 2026-08-18 20:20:39 +08:00
project_resolve.go Add files via upload 2026-08-18 20:20:39 +08:00
rbac.go Add files via upload 2026-08-18 20:20:39 +08:00
rbac_boundary_test.go Add files via upload 2026-08-18 20:20:39 +08:00
rbac_context.go Add files via upload 2026-08-18 20:20:39 +08:00
rbac_test.go Add files via upload 2026-08-18 20:20:39 +08:00
robot.go Add files via upload 2026-08-18 20:20:39 +08:00
robot_mode_test.go Add files via upload 2026-08-18 20:20:39 +08:00
robot_rbac_test.go Add files via upload 2026-08-18 20:20:39 +08:00
robot_wecom_test.go Add files via upload 2026-08-18 20:20:39 +08:00
role.go fix: validate login and role inputs and protect task access 2026-10-06 01:36:31 +08:00
role_validation.go fix: validate login and role inputs and protect task access 2026-10-06 01:36:31 +08:00
role_validation_test.go fix: validate login and role inputs and protect task access 2026-10-06 01:36:31 +08:00
skills.go Add files via upload 2026-08-18 20:20:39 +08:00
sse_keepalive.go Add files via upload 2026-08-18 20:20:39 +08:00
sse_keepalive_test.go Add files via upload 2026-08-18 20:20:39 +08:00
storage.go feat: add runtime storage cleanup with per-category retention (#310) (#313) 2026-09-25 14:46:23 +08:00
task_cancel_terminal_test.go fix: preserve task cancellation through final events 2026-10-06 03:09:04 +08:00
task_event_bus.go Add files via upload 2026-08-18 20:20:39 +08:00
task_lifecycle.go fix: preserve task cancellation through final events 2026-10-06 03:09:04 +08:00
task_manager.go fix: preserve task cancellation through final events 2026-10-06 03:09:04 +08:00
task_manager_eino_execute_test.go Add files via upload 2026-08-18 20:20:39 +08:00
task_manager_order_test.go 修复多会话任务栏抖动、会话跳回与停止失效 (#264) 2026-08-19 13:54:30 +08:00
task_manager_tool_cancel_test.go 修复多会话任务栏抖动、会话跳回与停止失效 (#264) 2026-08-19 13:54:30 +08:00
task_process_cleanup_test.go feat: manage task process lifetimes and preserve turn history 2026-09-16 17:52:58 +08:00
terminal.go Add files via upload 2026-08-18 20:20:39 +08:00
terminal_stream_unix.go Add files via upload 2026-08-18 20:20:39 +08:00
terminal_stream_windows.go Add files via upload 2026-08-18 20:20:39 +08:00
terminal_ws_unix.go Add files via upload 2026-08-18 20:20:39 +08:00
terminal_ws_windows.go Add files via upload 2026-08-18 20:20:39 +08:00
token_usage.go Add token usage tracking and UI refinements 2026-08-24 00:05:05 +08:00
tool_guard.go feat: add configurable tool call blocking and monitoring 2026-09-08 09:44:32 +08:00
tool_guard_test.go feat: add configurable tool call blocking and monitoring 2026-09-08 09:44:32 +08:00
update.go feat: let an installation choose its update source, and adopt a plain directory 2026-10-07 12:46:32 +08:00
update_http_test.go feat: let an installation choose its update source, and adopt a plain directory 2026-10-07 12:46:32 +08:00
vulnerability.go Add files via upload 2026-08-18 20:20:39 +08:00
vulnerability_alert.go Add files via upload 2026-08-18 20:20:39 +08:00
vulnerability_alert_test.go Add files via upload 2026-08-18 20:20:39 +08:00
webshell.go fix: mask stored credentials and validate agent saves 2026-10-06 02:04:14 +08:00
webshell_context.go Add files via upload 2026-08-18 20:20:39 +08:00
webshell_context_test.go Add files via upload 2026-08-18 20:20:39 +08:00
webshell_encoding_test.go Add files via upload 2026-08-18 20:20:39 +08:00
webshell_os_test.go Add files via upload 2026-08-18 20:20:39 +08:00
webshell_probe.go Add files via upload 2026-08-18 20:20:39 +08:00
webshell_probe_test.go Add files via upload 2026-08-18 20:20:39 +08:00
webshell_rbac_test.go Add files via upload 2026-08-18 20:20:39 +08:00
webshell_secrets.go fix: mask stored credentials and validate agent saves 2026-10-06 02:04:14 +08:00
webshell_secrets_test.go fix: mask stored credentials and validate agent saves 2026-10-06 02:04:14 +08:00
wechat_robot.go Add files via upload 2026-08-18 20:20:39 +08:00
workflow.go fix: validate workflows and preserve execution outcomes 2026-10-06 02:32:32 +08:00
workflow_bug_sheet_test.go fix: validate workflows and preserve execution outcomes 2026-10-06 02:32:32 +08:00
workflow_integration.go fix: validate workflows and preserve execution outcomes 2026-10-06 02:32:32 +08:00
workflow_package.go Add files via upload 2026-08-18 20:20:39 +08:00
workflow_package_test.go Add files via upload 2026-08-18 20:20:39 +08:00
workflow_progress_delivery_test.go test: verify workflow activity delivery and record bug audit results 2026-10-06 03:44:22 +08:00
workflow_run.go Add files via upload 2026-08-18 20:20:39 +08:00