Commit Graph
52 Commits
Author SHA1 Message Date
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
公明 82b0af10f8 Update config.example.yaml 2026-10-05 15:11:57 +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
Ed1s0nZ bbfcb87103 fix: avoid duplicate summarization token limits 2026-09-23 18:02:00 +08:00
公明 a89f21b49e Update config.example.yaml 2026-09-22 22:07:38 +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
公明 f44adaddf3 Update config.example.yaml 2026-09-18 11:36:54 +08:00
Ed1s0nZ f7882be546 feat: manage task process lifetimes and preserve turn history 2026-09-16 17:52:58 +08:00
公明 6edc70f3fc Update config.example.yaml 2026-09-08 16:10:29 +08:00
Ed1s0nZ 94cdf760af feat: persist diagnostic logs with daily rotation and retention 2026-09-08 14:41:46 +08:00
Ed1s0nZ 6ad9ea2d13 feat: add configurable tool call blocking and monitoring 2026-09-08 09:44:32 +08:00
temp 21c6ad9bdf feat: persist hitl default config 2026-08-24 19:45:07 +08:00
公明 e0a2f01427 Update version number to v1.7.17 2026-08-24 18:46:58 +08:00
temp baff533196 fix: disable chat checkpoint resume 2026-08-24 18:42:06 +08:00
公明 bf761e9cd5 Update config.example.yaml 2026-08-19 17:36:35 +08:00
公明 ac6e04a94c Update config.example.yaml 2026-08-19 00:14:46 +08:00
公明 c21ba6c419 Add files via upload 2026-08-18 20:38:40 +08:00
公明 217f5570c2 Update config.example.yaml 2026-08-17 15:55:03 +08:00
RuoJi6 f30a9de01d feat(hitl): expand safe read-only tool allowlist (#258) 2026-08-17 15:50:32 +08:00
公明 4410cfe826 Update config.example.yaml 2026-08-15 02:25:02 +08:00
公明 43fe8fa7d6 Add files via upload 2026-08-15 01:26:13 +08:00
公明 c345880765 Update version number to v1.7.13 2026-08-14 15:44:45 +08:00
RuoJi6 02216a4660 feat: exempt get_project_fact from HITL approval (#239) 2026-08-08 23:44:00 +08:00
公明 3bb8ec57fd Update config.example.yaml 2026-08-06 17:42:04 +08:00
RuoJi6 aff9c9301f feat: refine HITL audit policy defaults (#236) 2026-08-05 18:02:48 +08:00
公明 59dc7cf858 Add files via upload 2026-07-28 18:17:47 +08:00
公明 9ef8263eaf Update config.example.yaml 2026-07-28 17:50:02 +08:00
公明 c326adbb66 Add files via upload 2026-07-24 14:53:44 +08:00
公明 af4b25b84e Update config.example.yaml 2026-07-23 20:20:41 +08:00
公明 6f0eaf7667 Update config.example.yaml 2026-07-23 19:14:49 +08:00
公明 a83490f29c Add files via upload 2026-07-23 18:56:18 +08:00
公明 dbc4ead040 Update config.example.yaml 2026-07-22 21:09:53 +08:00
公明 0062cebc6b Update config.example.yaml 2026-07-22 00:17:45 +08:00
公明 4bb12bbbdc Add files via upload 2026-07-21 23:30:20 +08:00
公明 fa9229b435 Add files via upload 2026-07-21 20:42:43 +08:00
公明 b51d428704 Update config.example.yaml 2026-07-20 17:48:53 +08:00
公明 ef2c3474fe Add files via upload 2026-07-20 16:54:50 +08:00
公明 b0d3ed8a87 Add files via upload 2026-07-17 16:53:06 +08:00
公明 0b638791eb Add files via upload 2026-07-17 10:51:59 +08:00
公明 f34abf4d76 Update config.example.yaml 2026-07-16 21:30:53 +08:00
公明 e830c3dbeb Add files via upload 2026-07-14 16:07:19 +08:00
公明 e98da9d1b3 Update config.example.yaml 2026-07-14 14:59:52 +08:00
公明 a603adb467 Add files via upload 2026-07-14 11:48:09 +08:00
公明 41f683ce6c Update config.example.yaml 2026-07-12 13:27:31 +08:00
公明 6529c13ffb Update config.example.yaml 2026-07-11 11:53:24 +08:00
公明 fa0dd6c721 Add files via upload 2026-07-11 11:32:44 +08:00
公明 722806797f Add files via upload 2026-07-11 10:47:31 +08:00
公明 ca0bcc21d4 Update config.example.yaml 2026-07-10 21:37:32 +08:00
公明 1abfd3d22a Add files via upload 2026-07-10 21:19:55 +08:00
公明 3bfa846db1 Add files via upload 2026-07-10 18:45:07 +08:00