Commit Graph
49 Commits
Author SHA1 Message Date
Sycun cb8bc6b824 feat: update this installation's own source in one action
An operator running a fork has no honest way to upgrade: upgrade.sh downloads the
Release tarball of one hard-coded third-party repository and rsyncs it over the
tree, so "upgrade" means "overwrite yourself with somebody else's code", and the
safe alternative is to pull by hand and remember the build command.

internal/update drives the remote the directory already tracks: fetch, fast-forward,
go build into .update-staging, atomic rename of the binary (the previous one kept as
cyberstrike-ai.prev), and a .update-state.json so a rollback has a target that is
not guessed at. Refusals are the point - local source edits and a diverged branch
stop with the file names and commit counts in the error rather than being reset to
match, and operator-owned content (roles/skills/tools/agents/data/config.yaml) is put
aside before the merge and restored over it, with what was kept listed in keptContent
instead of quietly dropped.

Consumers: GET/POST /api/system/update* behind update:read / update:apply (mutations
are process-global, so they need a global-scope session); a console page at
#system-update with an apply button that names why it is blocked, a job polled from
the server and a rollback control; the same three actions as -check-update / -update
/ -update-rollback on the binary; OpenAPI entries for all five endpoints. Permission
gating no longer re-enables a control a page disabled for a reason of its own
(data-state-disabled), which every state-disabled, permission-gated button in the
console was subject to. upgrade.sh becomes a thin shell over the same implementation
and only falls back to the tarball path for installs that are not git work trees.

Docs and the zh/EN/RU dictionaries are updated. The package runs 13 tests against
real temporary git repositories; the HTTP layer, RBAC and the console page each
carry their own contract tests.
2026-10-07 12:07:26 +08:00
SycunandParallels 470eb5ead1 feat: add runtime storage cleanup with per-category retention (#310) (#313)
Runtime artifacts (agent workspaces, tool-output spill, C2 payloads, chat
uploads, workflow checkpoints, diagnostic logs) previously accumulated
without bound: most were only removed when a conversation or project was
deleted, and tmp/c2 plus workflow checkpoints were never removed at all.

Add a storage cleaner with named per-category tasks (Gitea-style), a
settings page tab, and a background sweep that is off by default so
upgrading never deletes existing data.

Safety properties, since mis-deleting live task data costs far more than
the disk saved:
- dry-run is the default; a real cleanup requires dry_run=false together
  with confirm=true at the API layer, not just a frontend dialog
- sessions active within active_grace_hours are always skipped, and a
  failed activity lookup skips conservatively (fail closed)
- directories whose conversation/project no longer exists are reclaimed
  as orphans after orphan_grace_days
- scanners never follow symlinks and every candidate path is confined to
  its category root; deletion renames to a .tmp-for-deletion marker first
  so a crash leaves recoverable residue instead of a half-deleted dir
- storage:* permissions are admin-only; without the grantSystemRolePermissions
  skip the default branch would have given operators an irreversible
  file-deletion right

Also fix two confirmed leaks: DeleteConversation left chat_uploads files
on disk (their rows already vanished via ON DELETE CASCADE), and workflow
checkpoints had no deletion path at all.

Co-authored-by: Parallels <parallels@kali-linux-2025-2.localdomain>
2026-09-25 14:46:23 +08:00
Ed1s0nZandCursor 38b96ec67a feat: add TypeSafe Jev as HITL audit backend
Let audit_agent approve or reject with one System One call instead of chat JSON, while keeping the OpenAI-compatible backend as an option.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-22 21:15:53 +08:00
temp c70da22de7 Remove conversation grouping feature 2026-08-26 15:00:09 +08:00
公明 cecbe5a086 Add files via upload 2026-08-18 20:20:39 +08:00
公明 55ee5fbac9 Delete internal directory 2026-08-18 20:14:29 +08:00
公明 409e75f15a Add files via upload 2026-08-15 02:19:19 +08:00
公明 2910289f0b Delete internal directory 2026-08-15 01:54:26 +08:00
公明 0324b41a01 Add files via upload 2026-07-28 18:25:11 +08:00
公明 44d069da2b Add files via upload 2026-07-23 20:14:45 +08:00
公明 3763da8773 Add files via upload 2026-07-22 16:23:57 +08:00
公明 07229f0fde Add files via upload 2026-07-21 20:57:07 +08:00
公明 1f3472955c Add files via upload 2026-07-17 17:11:16 +08:00
公明 64c3f28780 Add files via upload 2026-07-09 14:38:09 +08:00
公明 62fafbf09b Add files via upload 2026-07-08 15:20:59 +08:00
公明 8d04b0c266 Add files via upload 2026-07-03 10:52:21 +08:00
公明 8e5f40d226 Add files via upload 2026-06-26 14:30:00 +08:00
公明 7e4a8db7af Add files via upload 2026-06-26 01:01:49 +08:00
公明 90cd119a83 Add files via upload 2026-06-20 19:35:06 +08:00
公明 09b0479fb3 Add files via upload 2026-06-18 21:50:44 +08:00
公明 7eadccbff6 Add files via upload 2026-06-18 12:44:42 +08:00
公明 cf1f8515d9 Delete internal directory 2026-06-18 12:37:39 +08:00
公明 f3be355820 Add files via upload 2026-06-12 19:39:01 +08:00
公明 4661862a1a Add files via upload 2026-06-11 18:03:09 +08:00
公明 444f85b9c4 Add files via upload 2026-06-04 13:36:46 +08:00
公明 e606369e31 Add files via upload 2026-06-03 17:16:48 +08:00
公明 f0fb634a6b Add files via upload 2026-06-02 13:27:15 +08:00
公明 dd3b1ae219 Add files via upload 2026-05-26 14:34:21 +08:00
公明 6685076dfb Add files via upload 2026-05-22 11:35:02 +08:00
公明 84f4da4d1d Add files via upload 2026-05-08 13:07:33 +08:00
公明 6d180c814d Add files via upload 2026-05-07 17:01:15 +08:00
公明 b53cae3a02 Add files via upload 2026-04-28 11:37:52 +08:00
公明 0597838217 Add files via upload 2026-04-28 01:04:58 +08:00
公明 0d4f608c14 Add files via upload 2026-04-21 01:25:40 +08:00
公明 fbd1ede8cb Add files via upload 2026-04-20 19:45:04 +08:00
公明 21b1ef6cf5 Add files via upload 2026-04-19 05:11:42 +08:00
公明 5810fd7afa Add files via upload 2026-04-19 04:43:45 +08:00
公明 b8a0f40017 Add files via upload 2026-04-19 03:01:30 +08:00
公明 a5e61947d3 Add files via upload 2026-04-19 01:17:09 +08:00
公明 5ef7618f44 Delete internal directory 2026-04-19 01:14:50 +08:00
公明 389fc971c6 Add files via upload 2026-04-18 23:35:49 +08:00
公明 62241e0e66 Add files via upload 2026-04-15 00:13:09 +08:00
公明 a31c4996c7 Add files via upload 2026-03-23 02:15:46 +08:00
公明 f26ee8e6e7 Add files via upload 2026-03-09 22:19:22 +08:00
公明 efd7a0aadd Add files via upload 2026-01-28 20:34:21 +08:00
公明 a99387fd6d Add files via upload 2026-01-28 20:02:06 +08:00
公明 068dbc1209 Add files via upload 2026-01-28 19:49:34 +08:00
公明 7c35c93f23 Add files via upload 2026-01-28 19:20:22 +08:00
公明 6815e03842 Add files via upload 2026-01-27 20:56:20 +08:00