Commit Graph

274 Commits

Author SHA1 Message Date
ZhenYi
6d8076674f chore(migrate): remove old room_compact_summary Rust migration module 2026-05-18 20:45:15 +08:00
ZhenYi
3df7ae78c9 feat(models): update AI subagent session with role fields and room streaming
Add role_name and parent_call_id fields to subagent session model.
Update room struct and AI streaming service to align with new
sub-agent orchestration.
2026-05-18 20:43:34 +08:00
ZhenYi
4034e98dfb refactor(service): multi-root skill scanner and chat/join_request updates
Skill scanner now walks .claude/skills and .codex/skills directories
separately, adds relative_path/system fields to DiscoveredSkill, and
supports root-level SKILL.md. Update chat context and join request
handling.
2026-05-18 20:43:27 +08:00
ZhenYi
3faaff6220 refactor(git): expand hook sync with skill scanning and multi-root discovery
Update sync module to support .claude/skills and .codex/skills roots,
add system/source tracking to discovered skills, and refactor
migration path for the new SQL-file based migrator.
2026-05-18 20:43:16 +08:00
ZhenYi
1d48cdc973 feat(fctool): add git LFS, merge analysis, ref listing, status tools and Bing search
New git subcommands: lfs (summary/scan_tree), merge_analysis,
ref_list/ref_info, and git_status. New project tool: bing_search.
Update repo_analysis with expanded field coverage and curl tool.
2026-05-18 20:43:08 +08:00
ZhenYi
8d144ac139 feat(agent): add architect, debugger, implementer, tester, security sub-agent roles
Extend delegation system with 5 new specialized roles alongside
researcher/analyst/reviewer. Each role has curated tool access.
Refactor profile lookup to use profile_for_role_name and update
compact/summarizer and tool context accordingly.
2026-05-18 20:42:57 +08:00
ZhenYi
b413edccaf refactor(migrate): replace hand-written migrations with SQL-file macro system
Replace individual Rust migration modules with a define_sql_migrations
macro that reads up/down SQL files via include_str!. Consolidate all
legacy single-file SQL into per-table directories and add full schema
migration coverage for 90+ tables.
2026-05-18 20:42:47 +08:00
ZhenYi
54d6f01981 fix(ai): cap max_output_tokens to 2048 hard limit
- Add resolve_room_max_tokens helper with hard cap at 2048
- Replace unwrap_or(4096) defaults across ai_service and process_ai
2026-05-17 17:32:29 +08:00
ZhenYi
78598b4586 refactor(skills): simplify BuiltInSkill and update triggers
- Refactor SKILL_TEMPLATES to use array.into_iter().collect()
- Add Chinese trigger keywords (审查, 性能, 总结, 分诊)
- Remove duplicate test and dead code
2026-05-17 17:32:24 +08:00
ZhenYi
60100a025c refactor(chat): refactor skill context deduplication and injection
- Extract push_unique_skill_context method to MessageBuilder
- Merge built-in skills with DB skills in passive injection
- Simplify code structure for both streaming/nonstreaming execution
2026-05-17 17:32:19 +08:00
ZhenYi
5c1b14c26a refactor(perception): simplify active/auto detection and deduplication
- Remove activation threshold logic from PassiveSkillAwareness
- Add SkillActivation enum with Priority/Keyword/Vector/Auto variants
- Add deduplication via SkillContext.dedupe_key() using rank ordering
- Simplify ActiveSkillAwareness with cleaner regex-based detection
2026-05-17 17:31:50 +08:00
ZhenYi
18a4adb32f feat(service): add project members, activity and billing services 2026-05-17 16:37:39 +08:00
ZhenYi
131c1cca2f feat(agent): add orchestrator, agent profile and message favorites 2026-05-17 16:37:30 +08:00
ZhenYi
b35d2d4fe7 refactor(access_key): migrate auth to Argon2 password verification
- Replace custom hash check with Argon2 password verification
- Scan all un-revoked tokens for matching access key
- Add expiry validation per token with proper skip logic
2026-05-15 11:48:46 +08:00
ZhenYi
0703816482 feat(ssh): enhance ref update handling and add push queue
- Add post-receive refs tracking with mutex-protected storage
- Improve branch protection error messages with actionable guidance
- Add push queue slot waiting mechanism for concurrent push control
- Support for checking push queue availability before push operations
2026-05-15 11:48:40 +08:00
ZhenYi
2b6b4af3db feat(http): improve auth verification and route handling
- Migrate access key auth from custom hash to Argon2 password verification
- Check all un-revoked tokens with expiry validation
- Add branch protection checks to HTTP push handlers
2026-05-15 11:48:33 +08:00
ZhenYi
a3ecf0c88b Separate SSH key probe from authentication 2026-05-14 21:44:55 +08:00
ZhenYi
12eaa83b87 refactor(transport): apply rustfmt formatting 2026-05-14 10:02:36 +08:00
ZhenYi
06c08148cb refactor(service,session): apply rustfmt formatting 2026-05-14 10:02:29 +08:00
ZhenYi
18ea3cc355 refactor(room): apply rustfmt formatting 2026-05-14 10:02:21 +08:00
ZhenYi
52e1831452 refactor(observability,queue): apply rustfmt formatting 2026-05-14 10:02:15 +08:00
ZhenYi
8fd6dbb68b refactor(migrate,models): apply rustfmt formatting 2026-05-14 10:02:07 +08:00
ZhenYi
4c4c33f970 refactor(git,gingress-proxy): apply rustfmt formatting 2026-05-14 10:02:00 +08:00
ZhenYi
2dcb5b3028 refactor(fctool): apply rustfmt formatting 2026-05-14 10:01:52 +08:00
ZhenYi
02a1020f75 refactor(config,db,email): apply rustfmt formatting 2026-05-14 10:01:46 +08:00
ZhenYi
724858a721 refactor(api): apply rustfmt and update fork API + project stats endpoint 2026-05-14 10:01:39 +08:00
ZhenYi
e29ef0e76d refactor(agent): apply rustfmt formatting across agent library 2026-05-14 10:01:32 +08:00
ZhenYi
1c55cb8559 refactor(docker): run all containers as root, add compact log format support
- Docker: remove appuser creation and USER directive in all 7 Dockerfiles
- observability: recognize APP_LOG_FORMAT=compact as non-JSON pretty output
2026-05-12 23:59:31 +08:00
ZhenYi
e6ba5433e2 bucong 提交 2026-05-12 18:06:20 +08:00
ZhenYi
d19a3ca557 fix(avatar): gracefully degrade when avatar directory is not writable
AppAvatar::init() create_dir_all failure now logs a warning instead of
failing fatally. This fixes the email worker crash — it runs AppService
but has no PVC mount, so /data/avatars is not accessible. Other services
(app) have the PVC mounted and are unaffected.
2026-05-12 18:05:55 +08:00
ZhenYi
dc193a061a fix(api): replace async block in Option::and_then with match for proper await 2026-05-12 16:06:32 +08:00
ZhenYi
9d091d3dfb refactor(service): update observability push, chat conversation and search service 2026-05-12 13:04:46 +08:00
ZhenYi
395fa1b498 refactor(agent): update AI chat execution, streaming and ReAct logic 2026-05-12 13:04:40 +08:00
ZhenYi
6921220cc2 refactor(migrate): consolidate all individual migrations into single init.sql 2026-05-12 13:04:28 +08:00
ZhenYi
de85417053 refactor(service): update service layer, TOTP, and AI streaming
Refine room AI streaming logic, update TOTP auth error handling,
and adjust user 2FA migration order. Remove unused service exports.
2026-05-11 17:05:59 +08:00
ZhenYi
0f800da74d chore(api): update Cargo dependency and build script 2026-05-11 17:05:50 +08:00
ZhenYi
3b17a0493f refactor(git/ssh): extract helper functions into dedicated modules
Move RefUpdate, GitService, branch_protection check, and forward
function from handle.rs into separate modules.
2026-05-11 17:05:30 +08:00
ZhenYi
deb25614ba refactor(transport): split handler inbound and types into sub-modules
Extract MessageHandler methods into inbound/{message,room,reaction,misc,msg}
and type definitions into types/{in_message,out_event}.
2026-05-11 17:05:17 +08:00
ZhenYi
d45e9e28f4 refactor(agent): split monolithic service files into specialized modules
Extract agent, compact, embed, task, and modes modules from single
service.rs files into focused sub-modules. Add orao module for
O1-like reasoning loop. Move RigAgentService to rig_tool.rs.
2026-05-11 17:04:57 +08:00
ZhenYi
b1ef024724 fix(migrate): reorder create_project before add_workspace_id_to_project and remove foreign keys
- Move create_project migration before add_workspace_id_to_project so the
  project table exists when workspace_id column is added
- Remove all FOREIGN KEY constraints from migration SQL files
2026-05-11 01:31:33 +08:00
ZhenYi
4d5caffe0b fix(deploy): disable readOnlyRootFilesystem to prevent temp file write errors
Email worker and other pods fail with "Read-only file system" when
readOnlyRootFilesystem is true, since they need to write temp files.
Also adds debug print statements for database connection lifecycle.
2026-05-11 01:14:06 +08:00
ZhenYi
bf7e6cf0a0 fix(app): initialize tracing immediately and fix replica timeout units
- Change init_tracing_subscriber defer=false so logs appear before DB
  connection fails (was deferred when OTEL enabled, producing no output)
- Fix replica connection pool timeouts from from_millis to from_secs
  (write connection was fixed earlier but replica was missed)
2026-05-11 00:43:36 +08:00
ZhenYi
b560d9ea0f fix(db): use seconds for connection pool timeouts instead of milliseconds
ConfigMap values are in seconds (e.g. connection_timeout=30 means 30s),
but Duration::from_millis() interpreted them as ms (30ms), causing pool
timeout on startup. Changed to from_secs(). Also removed Namespace from
Helm chart to prevent cascade deletion of PVC/ConfigMap on uninstall.
2026-05-10 23:58:16 +08:00
ZhenYi
7148c8fd39 feat(gingress): add Git UA routing and convert gingress to Helm templates
- Route requests with git/JGit User-Agent directly to gitserver backend
- Parse gingress.io/git-backend annotation (format: namespace/name:port)
- Convert static gingress YAML to Helm templates under deploy/templates/gingress/
- Add gingress config block to values.yaml (namespace, replicas, ports, resources)
2026-05-10 22:47:18 +08:00
ZhenYi
4e2a39a5c0 fix(workspace): resolve all cargo check warnings across workspace
Remove unused imports and add #[allow(dead_code)] annotations to
intentionally retained fields/methods. Also add deploy/.server.yaml
to .gitignore to prevent accidental credential exposure.
2026-05-10 21:56:08 +08:00
ZhenYi
ba2490dab4 feat(core): initialize project with access control and AI integration 2026-05-10 21:01:21 +08:00
ZhenYi
14f6e1e500 feat(core): initialize project with access control and AI integration
- Add gitignore and prettier configuration files for project scaffolding
- Implement room access control service with project member verification
- Create user access key management with CRUD operations and activity logging
- Add accordion UI component for frontend expandable sections
- Implement room AI configuration with list, upsert, and delete operations
- Add AI event types for agent join/leave/status change tracking
- Create streaming AI processing services for mode and react patterns
- Build room AI service with model detection and idempotency handling
- Integrate chat service orchestration for AI message processing
- Add typing indicators and stream cancellation for AI interactions
- Implement mention parsing and context extraction for AI agents
2026-05-03 06:04:31 +08:00
ZhenYi
4cc14687e0 feat(ai): add comprehensive AI streaming and non-streaming processing services
Some checks failed
CI / Rust Lint & Check (push) Has been cancelled
CI / Rust Tests (push) Has been cancelled
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
2026-05-01 01:14:00 +08:00
ZhenYi
fdca1fbf86 feat(ai): add comprehensive AI streaming and non-streaming processing services
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-05-01 00:54:24 +08:00
ZhenYi
96b92fe487 feat(workspace): initialize Rust workspace with core services and dependencies
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-05-01 00:40:29 +08:00