Commit graph

1284 commits

Author SHA1 Message Date
777genius
92f1000a4f test: cover transcript head metadata cache 2026-05-30 15:51:59 +03:00
777genius
127d31ba88 perf: cache unchanged team task reads 2026-05-30 15:51:15 +03:00
777genius
28a55416ca test: isolate runtime usage stubs from process table 2026-05-30 15:46:27 +03:00
777genius
61e2678a5d perf: cache team transcript head metadata 2026-05-30 15:26:09 +03:00
777genius
0a750a9fa8 perf: share a frozen team-summary snapshot instead of cloning on every listTeams
listTeams() deep-cloned ALL team summaries via structuredClone on every call -- even
cache hits and concurrent in-flight awaiters. A heap allocation sample of a launch
put this (listTeams -> cloneTeamSummaries -> structuredClone) as the single largest
memory allocator, driving heap churn + GC pressure during launch (this stand has ~158
teams, and listTeams is called constantly: startup, notification init, task projection,
IPC polls, provisioning).

Build ONE deep-frozen, independent snapshot per uncached load and hand the same
reference to the cache entry, in-flight awaiters, and every later reader. The single
cloneTeamSummaries keeps it independent of any cached config the loader returns;
freezing lets all readers share it safely. Audited every listTeams consumer -- all
iterate / map / filter / serialize, none mutate -- and the freeze turns any stray
future mutation into a loud error rather than silent cross-caller corruption.

TeamConfigReader 26/26 (added a frozen + same-reference regression test), and the
listTeams consumers (TeamDataService 116, CrossTeamService 26) all pass under frozen
summaries.
2026-05-30 15:25:26 +03:00
777genius
58dfac8377 fix: preserve runtime rss fallback when process table misses roots 2026-05-30 15:16:03 +03:00
777genius
f0797e2c12 perf: replace readline with a bounded chunked read in the affinity head scan
fileBelongsToTeam streamed the head window via createReadStream + readline. readline's
line iterator runs an expensive Unicode line-break regex and stream/string-decoder
machinery per chunk, which showed up as a top main-thread cost during launch (the line-
split regex alone was ~5.7% in the warm launch profile).

Replace it with a bounded chunked fs.read + a plain '\n' split. JSONL is strictly
newline-delimited and each line is trim()'d (so a trailing CR from CRLF is dropped),
so a '\n' split is cheaper and more correct (it will not split on a bare CR or a
Unicode line/paragraph separator inside a JSON string value, which readline would). A
StringDecoder preserves multi-byte UTF-8 sequences that straddle a chunk boundary.

Byte-identical semantics to the old loop: inspect up to TEAM_AFFINITY_SCAN_LINES
non-empty lines, first match wins via early break, and a final line is honored even
without a trailing newline. Reads in 64KB chunks so a team decided in its first lines
is not penalized by a huge file. Adds tests for CRLF endings + no-trailing-newline,
a multi-byte char straddling the 64KB boundary, and the 40-line window bound (21 pass).
2026-05-30 14:54:58 +03:00
777genius
776298b0e3 perf: reuse caller stat in fileBelongsToTeam, drop duplicate fs.stat
On the live resolution path collectRootJsonlSessionIds already stat()s each root
jsonl for its mtime-window filter, then fileBelongsToTeam stat()ed the very same
file again for its cache validation -- two fs.stat syscalls (plus two Stats
allocations) per file, every poll. fileBelongsToTeam now takes an optional
precomputed stat and the mtime-filter caller passes the stat it already has, so the
file is statted once. Measured 20 files -> 20 stat calls on the mtime path (was ~40).

Using a single stat snapshot is also slightly more consistent than two reads that
could straddle a concurrent write. The other call site (subagent scan) passes no
stat and is unchanged (fileBelongsToTeam stats it itself). Adds a regression test
that a caller-supplied stat is the one recorded in the affinity cache.
2026-05-30 14:11:58 +03:00
777genius
c8d40be460 perf: cache negative team-affinity verdicts from a full head window
fileBelongsToTeam only cached POSITIVE affinity durably; a negative verdict was
re-decided on any change, so during a launch every non-matching transcript in the
project dir that grew (mtime+size change from an active session) was re-streamed
(createReadStream+readline) and re-parsed (up to 40 head lines) on every bootstrap
poll. A live atlas-hq-5 launch profile put this whole subsystem (readline streaming
+ fileBelongsToTeam + line/team matching) at ~31% of main-thread JS, the single
largest launch cost.

A team's first 40 head lines are immutable for an append-only transcript, so a
`false` decided from a FULL inspected window (>= TEAM_AFFINITY_SCAN_LINES) stays
valid while the file only grows. Track headWindowFull on the cache entry and short-
circuit such negatives the same way positives are short-circuited (size >= cached).
Short files (partial window) are still re-scanned on growth, so a team mention that
later lands inside the head window is still detected. A shrink/rewrite (size <
cached) forces a re-scan, identical to the positive path.

Behavior-preserving for affinity correctness (no new false negatives); only removes
redundant re-streams. Adds regression tests for both the durable-negative and the
short-file-flips-to-true cases.
2026-05-30 13:17:49 +03:00
777genius
126a485477 wip: team messages panel updates and runtime usage cache refinements
Checkpoint of in-progress work:
- renderer: team messages panel/composer, messagesPanelLogic, teamSlice,
  AnimatedHeightReveal plus their tests
- main: runtime process usage-stats caching (ignoreCachedMisses, bounded
  eviction), alive-run-id helpers, team watch-scope notify wiring

Note: the getTeamAgentRuntimeSnapshot rssBytes expectation in
TeamAgentLaunchMatrix.safe-e2e is environment-dependent and still red.
2026-05-30 12:54:11 +03:00
777genius
d0c64fabb8 fix: export notifyTeamWatchScopeChanged so the committed build resolves
TeamProvisioningService imports notifyTeamWatchScopeChanged (added with the
setAliveRunId/deleteAliveRunId helpers) but the export was missing, so a clean
checkout of the branch failed to typecheck. Add the export plus a test; the
call-site wiring stays as in-progress work.
2026-05-30 12:33:57 +03:00
777genius
8b3cec8013 perf: update team watcher incrementally instead of full rebuild
A team launch repeatedly changes the watched target set (new dirs appear), and each
change tore down the chokidar watcher and recreated it over the full target set.
On macOS chokidar uses kqueue with one fd per watched file, so every rebuild
re-opened an fd for EVERY watched file (the large always-watched inbox set plus
scoped dirs). Profiling a 6-member mixed launch showed ~54k open() syscalls dominated
by these rebuilds.

Keep one persistent watcher and apply target-set changes with add()/unwatch() on the
delta only, so a reconcile opens fds for just the newly added dirs. The initial
watcher still uses ignoreInitial for a silent startup baseline, and
emitExistingFilesForNewTargets still backfills files already present in newly added
dirs, so the emitted event surface is unchanged. Because the watcher is no longer
recreated per reconcile, the stale-old-generation and close-throws-during-rebuild
failure modes are gone; their tests are replaced with incremental add/unwatch and
persistent-watcher coverage. All 69 watcher tests pass.
2026-05-30 12:05:23 +03:00
777genius
f79ea145d7 perf: batch per-member task-interval resume into one locked pass
During launch the live-status loop resumes every alive member every audit cycle.
resumeActiveIntervalsForMember runs a synchronous file-lock + full read of every
task file, so for an N-member team with M task files it did N locked passes x M
readFileSync per cycle (e.g. 6 members x 20 task files), blocking the main event
loop. Profiling a 6-member mixed launch showed mutateTeamTasks/withFileLockSync as
a top main-thread cost (~14%).

Add resumeActiveIntervalsForMembers that applies the identical per-member resume
logic against a member set in a single locked pass, and use it in the live-status
loop. Same mutations, but one lock + task read per cycle instead of one per member.
Adds a test covering multi-member resume in one pass.
2026-05-30 10:02:01 +03:00
777genius
aa9a1bba8c perf: debounce team watcher rebuilds during dir-event bursts
A team launch creates many directories/files in quick succession (worktrees,
inboxes, session logs), and each addDir/unlinkDir event triggered a full
TeamTaskWatchRegistry reconcile that tore down and recreated the entire chokidar
watcher (re-opening a kqueue fd per watched file on macOS). Profiling a 6-member
mixed-team launch showed kqueue churn (kevent) as a top native cost and watcher
rebuild as the top remaining main-thread JS cost after the transcript fix.

Debounce the event-driven reconcile (250ms) so a burst collapses into one rebuild.
collectTargets re-reads the current directory state and emitExistingFilesForNewTargets
backfills files created before the rebuild, so no change is missed; requestReconcile,
startup, and the periodic 30s reconcile stay immediate. Adds a test asserting a
burst of addDir events yields a single rebuild.
2026-05-30 09:46:16 +03:00
777genius
35b76f1354 perf: share bootstrap transcript tail parse across members
During launch, the bootstrap-wait loop polls each member and, per member, re-read
and re-JSON.parsed the same growing transcript tail (readRecentBootstrapTranscriptOutcome
was the top main-thread JS hotspot at ~21% during bootstrap, ~40% with its helpers).
The same file was parsed once per member per poll.

Memoize the parsed tail by (filePath, mtime, size) in a shared cache so the file is
read + parsed once per change and reused across all members. The per-member filter
and failure/success scan is byte-for-byte the same logic; only the redundant read +
JSON.parse is removed. Cache is bounded (LRU, same cap as the outcome cache) and
invalidated on mtime/size change, matching the existing outcome cache semantics.

Adds a test asserting the tail is parsed once and shared while per-member outcome
detection is unchanged.
2026-05-30 01:05:54 +03:00
777genius
5d63ecfe32 perf: scope team file watching to active and engaged teams
The main process watched every team directory under ~/.claude/teams (one shallow
chokidar target per team root, per team inboxes, and per task dir). On macOS this
falls back to kqueue, which needs one fd per watched file, so a workspace with
many teams kept ~1600 descriptors open and made startup and reconcile work scale
with the number of teams on disk.

Scope the team-root and task watching to teams that are running or currently
engaged in the UI. The teams root and every team's inboxes are still watched for
all teams, so cross-team message delivery, the lead inbox->stdin relay, and
notifications are unchanged. Idle teams are static, so dropping their team-root/
task watches is safe; opening a team (getData) or launching it re-adds it via an
immediate watch-scope refresh. The provider falls back to watching every team
when unset, and the EMFILE polling fallback is intentionally left unscoped so a
scope change can never look like a deletion.

Measured on a 162-team workspace: open team fds 1600 -> 730, with team-root
watching restored the moment a team is opened or goes live.
2026-05-30 00:25:55 +03:00
777genius
322c63ea8b perf: skip offline runtime polling 2026-05-29 16:11:16 +03:00
777genius
b4b9175287 perf: reuse team summary for comment notification init 2026-05-29 15:43:24 +03:00
777genius
f0514a7d17 perf: skip unverifiable runtime process scans 2026-05-29 14:38:01 +03:00
777genius
9be096f864 perf: cache persisted bootstrap outcome lookups 2026-05-29 14:19:04 +03:00
777genius
d0c6fdd28c perf: extend persisted runtime probe cache 2026-05-29 14:04:28 +03:00
777genius
35a9b05637 perf: cache persisted spawn status reads 2026-05-29 13:06:26 +03:00
777genius
fa242d9ff6 perf: cache bootstrap transcript outcomes 2026-05-29 12:58:15 +03:00
777genius
0b97985474 perf: cache team transcript affinity checks 2026-05-29 12:46:29 +03:00
777genius
169ac8bb68 perf: include process table usage metrics 2026-05-29 12:34:13 +03:00
777genius
3b0c2ed24b perf: cache runtime usage telemetry 2026-05-29 12:29:37 +03:00
777genius
7d21f9bd76 perf: avoid stale runtime pid sampling 2026-05-29 12:26:15 +03:00
777genius
906942cb7a perf: isolate messages panel logic exports 2026-05-29 12:26:09 +03:00
777genius
3c37b22379 perf: debounce messages scroll persistence 2026-05-29 12:26:04 +03:00
777genius
8adbfd5357 perf: isolate messages panel logic exports 2026-05-29 12:10:26 +03:00
777genius
870861da9d perf: debounce messages scroll persistence 2026-05-29 12:04:33 +03:00
777genius
81d910399a perf: avoid stale runtime pid sampling 2026-05-29 11:10:23 +03:00
777genius
14f25fdc81 perf: reduce team page runtime telemetry load 2026-05-29 10:50:42 +03:00
777genius
6eada589aa feat(team): add Opus 4.8 to model catalog and runtime profile
Wire claude-opus-4-8 (+ [1m] variant) through the team model picker
alongside 4.7 and 4.6, point the opus alias label at 4.8, update the
reasoning/long-context predicates, and switch the fast-mode UI
message to mention 4.8.
2026-05-29 00:54:33 +03:00
777genius
9e3efa18ce perf(team): batch task activity interval resume across alive members
Collapses the per-member resume scan in getMemberSpawnStatuses into a single
readdir + file lock + pass over the team's tasks. Avoids N x IO when multiple
members become alive at launch. Semantics of the applied-set guard are
preserved 1:1; the single-member API stays as a wrapper around the batch.
2026-05-29 00:44:31 +03:00
777genius
d9479b5c61 perf(team): skip redundant task interval resumes for stable alive members
readPersistedStatuses каждый раз делал полный sync-scan всех task
JSON под file lock и звал resumeActiveIntervalsForMember для каждого
member с runtimeAlive=true — на больших командах блокировал main
до 8s. Теперь маркируем member как 'resume applied' пока он остаётся
alive, сбрасываем маркер при переходе в not-alive (через
syncMemberTaskActivityForRuntimeTransition и в readPersistedStatuses
loop). Resume остаётся идемпотентным и материализует интервалы из
истории один раз за цикл alive.
2026-05-29 00:14:40 +03:00
777genius
068399543e feat(team): clean stale persisted runtime metadata for dead direct processes
Когда снимок liveness возвращает stale_metadata для direct-process
teammate с persisted runtimePid, который реально мёртв — собираем
кандидатов на очистку и сбрасываем их runtimePid/bootstrap-поля
из config.json через двойной чек под guard для запущенных run/launch
state. Это убирает мёртвые pid из последующих snapshot'ов и не
трогает OpenCode/lane-aware/runtime-session-имеющиеся записи.

Дополнительно добавлены targeted-pid liveness check (используется
расширение TeamRuntimeLivenessResolver.targetedProcess) и
shouldUsePersistedLaunchRuntimePidForMetadata, чтобы не подсасывать
устаревший pid в metricsPid для членов с lane-aware конфигурацией.
2026-05-29 00:06:48 +03:00
777genius
7e6c0da21e fix(team): allow same-run bootstrap clock skew for native proofs
resolveBootstrapRuntimeEvidenceBoundaryMs учитывает оба источника
времени старта (firstSpawnAcceptedAt и bootstrapExpectedAfter) и
принимает более раннее, если у member и runtime совпадает
bootstrapProofToken + runId. Это лечит случай, когда proof подписан
до того, как app зафиксировал firstSpawnAcceptedAt, но после
bootstrap boundary самого ранкона. Та же логика применена в
isBootstrapMemberEvidenceCurrentForMember для confirmation evidence.
2026-05-29 00:03:17 +03:00
777genius
1f6c9fe34b feat(team): add targeted runtime pid liveness check
resolveTeamMemberRuntimeLiveness принимает опциональный targetedProcess
с pid + command — если строка процесса проходит team/agent verification,
liveness отмечается как 'runtime_process' даже когда полная process table
не нашла его (например при гонке snapshot vs spawn). Дополнительно для
direct-process backend разрешён fallback по --agent-name, когда команда
запущена без --agent-id.
2026-05-28 23:55:51 +03:00
777genius
90fe3c9107 fix(opencode): detect managed node_modules symlink permission failures
Распознаём отдельную диагностику для EPERM на создании managed
node_modules symlink под Windows и подсказываем пользователю
запустить приложение от имени Administrator. UI-подсказка и
provisioning hint показываются только для этого случая, обычный
Windows access-denied flow не затрагивается.
2026-05-28 23:55:28 +03:00
777genius
961770b7a7 fix(team): support OpenCode lead runtime sessions 2026-05-28 23:41:34 +03:00
777genius
9af0a0df2b perf(team): cache runtime command parsing 2026-05-28 23:13:26 +03:00
777genius
c357793c2f fix(security): harden command and path handling 2026-05-28 22:34:47 +03:00
777genius
97eb98466a perf(team): batch task presence updates 2026-05-28 21:56:36 +03:00
777genius
ff0543caf9 perf(team): cache transcript and telemetry scans 2026-05-28 21:30:32 +03:00
777genius
5bc9f6db7b fix(changes): hide suppressed opencode ledger imports 2026-05-28 21:24:35 +03:00
777genius
d35f03b396 fix(runtime): pass stored Codex key to status probes
Refs #189
2026-05-28 18:36:06 +03:00
777genius
6b8ab10414 fix(opencode): stabilize runtime message delivery 2026-05-28 16:39:04 +03:00
777genius
4458ec1fd7 fix(opencode): wire junction diagnostics on dev 2026-05-28 13:12:02 +03:00
777genius
8abf4ea7dd fix(opencode): harden Windows junction retry 2026-05-28 13:08:55 +03:00
ComradeSwarog
b12106d8f4 fix(test): use expect.any(String) for junction error message assertions
The failure.message passed to ensureOpenCodeProfileNodeModulesJunction
comes from normalizeCommandFailure which may produce a JSON-escaped
string when the error contains structured JSON in stdout. Using the
raw runtimeMessage literal causes a mismatch in CI. Switch to
expect.any(String) to accept any string value for the errorMessage
parameter while still verifying the call happens.
2026-05-28 13:08:55 +03:00
ComradeSwarog
cc3c9f7dc7 fix(opencode): address code review feedback — extract paths from error message, fix test imports
- Extract symlink source/target paths directly from the error message
  instead of reconstructing them from process.env (Codex P2 review)
- Add extractSymlinkSourcePath and extractSymlinkTargetPath functions
- Update ensureOpenCodeProfileNodeModulesJunction to accept optional
  errorMessage parameter and use extracted paths from it
- Fix unused imports in test (remove 'os', replace 'beforeEach' with
  'afterEach' per CodeRabbit review)
- Widen fs.statSync mock signatures to use Parameters<typeof fs.statSync>
  per CodeRabbit review
- Add tests for new extraction functions
- Pass errorMessage to ensureOpenCodeProfileNodeModulesJunction calls
  in CLI client tests
2026-05-28 13:08:55 +03:00
ComradeSwarog
597c690dbc fix(opencode): add Windows junction fallback for node_modules EPERM symlink error (#187)
On Windows 10 without Developer Mode, the OpenCode runtime fails to create
a symlink from shared-cache/config-node_modules to the profile's
node_modules directory. The EPERM error blocks the entire OpenCode provider
catalog, leaving it unavailable.

Changes:
- New openCodeWindowsNodeModulesJunction module that pre-creates a Windows
  directory junction (no Developer Mode required) before the runtime call
  when an EPERM symlink error is detected
- On Windows, loadView and loadProviderDirectory now detect EPERM symlink
  errors, extract the profile ID, create the junction, and retry the
  runtime command once before falling back to the error response
- Updated diagnostic hints to accurately reflect that the runtime does not
  yet include junction fallback, and that the next runtime update will
  include it
- Added unit tests for the junction module and retry behavior
2026-05-28 13:08:54 +03:00
777genius
c49d6c373e merge: dev into main
# Conflicts:
#	.github/workflows/reviewrouter-codex.yml
#	.github/workflows/reviewrouter-interaction.yml
2026-05-28 02:07:36 +03:00
777genius
1126b1ee38 fix(ci): restore dev validation 2026-05-28 01:47:43 +03:00
infiniti
fa36d7f3c0
fix(opencode): extend summary status timeout 2026-05-28 00:39:53 +03:00
infiniti
0cbba46083
fix(team): speed up provider runtime preflight 2026-05-27 23:54:10 +03:00
iliya
209b9c72ad fix: count OpenCode inventory fallback as connected 2026-05-27 23:43:25 +03:00
infiniti
c9e7e49a78
fix: show OpenCode inventory fallback as available 2026-05-27 23:00:32 +03:00
infiniti
e06c24a041
fix: add OpenCode status inventory fallback 2026-05-27 22:41:43 +03:00
777genius
3e45600e0e Merge branch 'dev' of https://github.com/777genius/agent-teams-ai into dev 2026-05-27 22:03:50 +03:00
iliya
21404894c2 fix: add Windows provider status fallback 2026-05-27 21:54:24 +03:00
777genius
46a525aea1 fix(cli-status): refresh auth after terminal close 2026-05-27 21:53:47 +03:00
777genius
877a81439b fix(member-log-stream): simplify member logs view 2026-05-27 21:53:27 +03:00
777genius
77e08af03f fix(team): propagate managed runtime settings env 2026-05-27 18:56:24 +03:00
777genius
7cc1a59bbc fix(team): preserve mixed provider runtime settings 2026-05-27 18:22:10 +03:00
infiniti
ebcc0e717f
fix(team): reconcile provisioned-but-not-alive bootstrap state 2026-05-27 12:16:41 +03:00
777genius
9d5f176597 test: stabilize runtime provider management assertion 2026-05-27 01:07:07 +03:00
Илия
3849c01955
fix(provenance): classify synthetic user turns
* fix(provenance): classify synthetic user turns

* fix(provenance): keep assistant display rendering intact

* fix(provenance): preserve source tool result rows
2026-05-26 23:51:17 +03:00
777genius
ab6ab1fc4c test(team): cover provisioned runtime recovery 2026-05-26 23:44:40 +03:00
777genius
c79b7d4234 fix(team): suppress unverified relay state claims 2026-05-26 23:44:40 +03:00
777genius
b15de780cb fix(codex-account): keep account snapshots fresh 2026-05-26 23:44:40 +03:00
777genius
f237318c29 fix(agent-teams): surface OpenCode runtime permissions 2026-05-26 19:46:24 +03:00
777genius
636beb5e42 fix(scripts): quote Windows shell invocations 2026-05-26 19:46:13 +03:00
777genius
58a0eb603d build(runtime): require Node 24 toolchain 2026-05-26 19:44:23 +03:00
777genius
5355570f2c test(context): cover unchanged lazy init 2026-05-26 19:01:43 +03:00
777genius
1eae8305ea fix(context): reset lazy project scope 2026-05-26 18:54:17 +03:00
777genius
1b36d1daa6 fix(context): clear project loading on ssh reset 2026-05-26 18:47:16 +03:00
777genius
2fdbf301b4 fix(context): guard project fetches by scope 2026-05-26 18:33:47 +03:00
777genius
636d121f5f fix(team): guard cross-team targets by context 2026-05-26 18:21:23 +03:00
777genius
7514bf05eb fix(recent-projects): guard context-scoped refreshes 2026-05-26 17:56:10 +03:00
777genius
d32db985b5 fix(context): clear switch state on direct ssh reset 2026-05-26 17:42:12 +03:00
777genius
c04a259cea fix(context): ignore stale team request scopes 2026-05-26 17:35:17 +03:00
777genius
255fa5aa47 fix(context): align first-visit switch state 2026-05-26 17:04:51 +03:00
777genius
e46868b6d7 fix(context): reset team caches on context changes 2026-05-26 17:00:41 +03:00
777genius
b46b53d667 fix(recent-projects): scope client cache by context 2026-05-26 16:35:28 +03:00
777genius
72633daa6e perf(recent-projects): stream codex session discovery 2026-05-26 16:08:25 +03:00
777genius
031e5eda2f fix(recent-projects): skip oversized codex session cache 2026-05-26 16:04:08 +03:00
777genius
8c86def84d fix(recent-projects): avoid stale scan diagnostics regressions 2026-05-26 13:46:33 +03:00
777genius
c2bc20bebd perf(recent-projects): bound codex session discovery 2026-05-26 13:24:49 +03:00
777genius
4640e1eea4 fix(startup): ignore stale opencode probe results 2026-05-26 10:39:50 +03:00
777genius
a8ac52b6f3 perf(startup): dedupe opencode version probes 2026-05-26 10:32:46 +03:00
777genius
b88ca42fe3 fix(startup): serialize provider runtime checks 2026-05-26 09:12:05 +03:00
777genius
33bbf949ec merge: dev into main
# Conflicts:
#	scripts/ci/verify-radix-presence-patch.mjs
2026-05-26 00:45:20 +03:00
777genius
b5d7da1ea8 fix(attachments): support claude gif delivery 2026-05-25 23:43:29 +03:00
777genius
0d4e6f5047 perf(startup): avoid provider refresh version probe 2026-05-25 23:37:12 +03:00
777genius
33463d3479 perf(startup): skip deferred cli version probe 2026-05-25 23:25:21 +03:00
777genius
a6dd0061a8 perf(startup): defer heavy startup work 2026-05-25 23:14:59 +03:00
777genius
43afc9f907 fix(jsonl): align count-only baseline parsing 2026-05-25 22:58:07 +03:00
777genius
13b3ace4fd test(jsonl): format baseline count imports 2026-05-25 22:36:14 +03:00
777genius
b0b2fa2d13 fix(jsonl): count baseline entries without materializing messages 2026-05-25 22:32:09 +03:00
777genius
e64fff8af0 fix(watcher): baseline large existing jsonl files 2026-05-25 22:26:55 +03:00
777genius
e88d3a1e98 feat(team): open persisted attachments in editor 2026-05-25 21:30:56 +03:00
777genius
63e16d1043 fix(workspace-trust): canonicalize git worktree trust roots 2026-05-25 21:30:56 +03:00
Илия
8e0731f47a
revert: revert KiloCode provider support
This reverts commit cc10485f0c.
2026-05-25 21:19:56 +03:00
Jan
cc10485f0c
feat(kilocode): add provider support
* Add KiloCode as a first-class provider with HTTP-based model catalog

Implements KiloCode (kilo.ai gateway) support following repo design principles,
independently of the OpenCode implementation.

Key changes:
- Add 'kilocode' to CliProviderId, TeamProviderId, MemberWorkSyncProviderId
- Create kilocode-model-catalog feature: HTTP client fetching models from
  kilo.ai /models endpoint (not /v1/models — different gateway path)
- Add KILO_API_KEY env var for authentication
- Wire kilocode into provider routing, capabilities, and UI labels
- Add 'kilo' brand icon alias in providerBrandIcons (auto-fetches from models.dev)
- KiloCode status is managed via the HTTP gateway, not the multimodel bridge

* Fix: preserve non-bridge providers (kilocode) when updating provider status

The multimodel bridge only returns status for anthropic/codex/gemini/opencode.
When checkAuthStatus replaced result.providers with the bridge response,
kilocode was lost from the provider list and never appeared in the UI.

Now merge bridge providers with the initial list, keeping any provider
not covered by the bridge so kilocode shows up in the Extensions panel.

* Fix: resolve KiloCode status after bridge merge, skip bridge refresh for non-bridge providers

- resolveKilocodeStatus() gives kilocode a settled verificationState:'verified' status
  so isHydratedMultimodelProviderStatus() returns true and the loading spinner stops
- Status reflects KILO_API_KEY presence: authenticated+supported when set, else clear message
- fetchCliStatus() now skips fetchCliProviderStatus for non-bridge providers (kilocode)
  so the Claude Code CLI is not queried for kilocode, preventing error status overwrites

* Add KiloCode to API key provider system in settings dialog

isApiKeyProviderId now includes kilocode, so the API key form renders
in the Provider Settings dialog instead of showing an empty modal.
Adds KILO_API_KEY config with placeholder and description.

* Fix KiloCode models endpoint: /api/gateway/models per docs

* Fix: short-circuit getProviderStatus/verifyProviderModels for kilocode

The Claude Code CLI only accepts anthropic and codex for --provider.
Calling it with kilocode caused the blinking modal error.

resolveKilocodeProviderStatus() returns status directly from env
without touching the CLI binary — no bridge, no --provider flag.

* Fix: resolveKilocodeProviderStatus reads from app key store via enrichProviderStatus

process.env.KILO_API_KEY was only set for users who configured it in their
shell environment. The UI stores the key in the app's encrypted key store
(ApiKeyService), which enrichProviderStatus checks via hasStoredProviderApiKey.

Now resolveKilocodeProviderStatus() calls providerConnectionService.enrichProviderStatus()
so both the app key store and env var are checked — the same way anthropic/gemini work.

* Wire KiloCode model catalog into provider status — models now load from gateway

- ProviderConnectionService: add setKilocodeModelCatalogFeature() and
  enrichKilocodeProviderStatus() which fetches models from the gateway API
  and populates provider.models when the API key is configured
- main/index.ts: create KilocodeModelCatalogFeature at startup and inject
  it into ProviderConnectionService, same lifecycle as Codex catalog

* Fix: skip Claude CLI probe for kilocode in prepareForProvisioning

The generic probe path calls probeClaudeRuntime with CLAUDE_CODE_ENTRY_PROVIDER=kilocode
which causes the CLI to hang — freezing the Create Team dialog until timeout.

Add an explicit kilocode case that short-circuits to an API key presence check
(via providerConnectionService.getConnectionInfo) without touching the Claude binary,
same pattern as the opencode adapter bypass.

* Fix vitest localStorage fallback

* test(kilocode): update provider visibility expectations

---------

Co-authored-by: 777genius <quantjumppro@gmail.com>
2026-05-25 21:12:37 +03:00
infiniti
9758fafd10
feat(team): support sent message revisions
* fix(opencode): recover empty bridge output sends

* fix(opencode): handle empty readiness bridge output

* fix(opencode): retry read-only bridge no-output

* fix(opencode): recover empty bridge output sends

---------

Co-authored-by: iliya <iliyazelenkog@gmail.com>

* fix(runtime-provider): clarify opencode model routes ux

* fix(team): show create dialog loading fallback

* feat(team): support revising sent messages

* test(team): cover sent message revision flow

* fix(opencode): harden local runtime bridge support

* fix(member-work-sync): recover stale nudge payload conflicts

* fix(runtime): gate codex install prompt on runtime status

* fix(team): persist incomplete launch state before cleanup

* fix(team): keep launch pending for dead runtime entries

* feat(logs): compact team log source controls

* fix(build): verify radix presence patch before build

* fix(renderer): recover failed dynamic imports

* fix(team): preserve task labels and change presence

* fix(logs): restore member process log source

* fix(team): require revision notice before editing

---------

Co-authored-by: iliya <iliyazelenkog@gmail.com>
Co-authored-by: 777genius <quantjumppro@gmail.com>
2026-05-25 21:11:59 +03:00
infiniti
bf41db266d
fix(opencode): explain managed profile link failures
Co-authored-by: iliya <iliyazelenkog@gmail.com>
2026-05-25 20:59:12 +03:00
777genius
86e700f031 fix(team): require revision notice before editing 2026-05-25 20:57:04 +03:00
777genius
7e0520cb4c fix(logs): restore member process log source 2026-05-25 17:17:11 +03:00
777genius
5513531053 fix(team): preserve task labels and change presence 2026-05-25 15:43:07 +03:00
777genius
62ef88300a feat(logs): compact team log source controls 2026-05-25 14:54:28 +03:00
777genius
79faaf1f9f fix(team): keep launch pending for dead runtime entries 2026-05-25 14:53:45 +03:00
777genius
c033a0cb87 fix(team): persist incomplete launch state before cleanup 2026-05-25 14:53:05 +03:00
777genius
53dec55b1d fix(runtime): gate codex install prompt on runtime status 2026-05-25 14:52:50 +03:00
777genius
8f4a4dd502 fix(member-work-sync): recover stale nudge payload conflicts 2026-05-25 14:34:14 +03:00
infiniti
2cee9cabaf
fix(opencode): harden local runtime bridge support 2026-05-25 14:31:57 +03:00
777genius
26a57f87d4 test(team): cover sent message revision flow 2026-05-25 01:22:57 +03:00
777genius
c04871747c fix(runtime-provider): clarify opencode model routes ux 2026-05-25 01:22:57 +03:00
infiniti
2b3a184bef
fix(opencode): recover empty bridge output sends
* fix(opencode): handle empty readiness bridge output

* fix(opencode): retry read-only bridge no-output

* fix(opencode): recover empty bridge output sends

---------

Co-authored-by: iliya <iliyazelenkog@gmail.com>
2026-05-25 00:41:54 +03:00
777genius
1bc8ccc07a fix(ci): restore workspace validation 2026-05-25 00:14:43 +03:00
infiniti
50f876f863
fix(opencode): retry read-only bridge no-output
* fix(opencode): handle empty readiness bridge output

* fix(opencode): retry read-only bridge no-output

---------

Co-authored-by: iliya <iliyazelenkog@gmail.com>
2026-05-24 23:22:34 +03:00
infiniti
47cea58543
feat(i18n): add expanded app locale support
* feat(i18n): add CJK app locale support

* feat(i18n): add Spanish Hindi and Portuguese locales

* feat(i18n): add French Arabic and Bengali locales

* feat(i18n): add Urdu Indonesian and German locales

* feat(i18n): add landing locales for Bengali Urdu and Indonesian

* fix(i18n): address locale review feedback

---------

Co-authored-by: iliya <iliyazelenkog@gmail.com>
2026-05-24 22:10:47 +03:00
777genius
776957b607 fix(team): keep runtime adapter lead activity idle 2026-05-24 20:43:11 +03:00
777genius
bbe09eb42e merge(dev): pull origin dev into refactor branch 2026-05-24 17:13:34 +03:00
777genius
a324f6cc66 fix(team): show stopped runtime from spawn status 2026-05-24 17:03:01 +03:00
777genius
4a4c67fcb9 fix(team): reconcile bootstrap runtime snapshots 2026-05-24 17:02:36 +03:00
Илия
049bc2ce7c
feat: add team log member filtering Merge pull request #151 from 777genius/feat/team-log-member-filter
feat: add team log member filtering
2026-05-24 16:59:11 +03:00
Илия
f2a5429a4b
refactor(team): extract provisioning service policies Merge pull request #149 from 777genius/refactor/team-provisioning-policies
refactor(team): extract provisioning service policies

Merge pull request #149 from 777genius/refactor/team-provisioning-policies
2026-05-24 16:10:05 +03:00
777genius
5abd096c61 fix: address log filter review feedback 2026-05-24 16:05:57 +03:00
777genius
7e8f4b377d feat(logs): add compact lead log source selector
- Add avatar trigger mode to MemberSelect for dense toolbar surfaces.

- Render the lead log source selector beside compact sidebar log search and filters.

- Cover toolbar accessory rendering, avatar trigger behavior and lead alias detection.
2026-05-24 15:58:38 +03:00
777genius
57931c0abd fix(renderer): defer model validation while providers load
- Treat checking, deferred and loading provider model catalog states as pending instead of unavailable.

- Show selected provider activity inside create and launch dialogs while keeping ready providers visible during checks.

- Remove the global provider status header so provider activity is scoped to launch flows.
2026-05-24 15:58:22 +03:00
777genius
7aa87f2278 fix(team): heal stale confirmed bootstrap diagnostics
- Carry bootstrap run ids from bootstrap-state into member evidence and compare them with current run identity.

- Allow small confirmation clock skew for delayed Anthropic app acceptance without accepting stale rapid relaunch evidence.

- Clean confirmed bootstrap members that only have stale persisted runtime pid diagnostics.

- Cover process-table unavailable, post-stop stale pid and mixed launch reconcile cases.
2026-05-24 15:57:50 +03:00
777genius
421997c457 chore: merge dev into team log member filter
# Conflicts:
#	src/renderer/components/layout/TeamTabSectionNav.tsx
#	src/renderer/components/team/ClaudeLogsFilterPopover.tsx
#	src/renderer/components/team/ClaudeLogsSection.tsx
#	src/renderer/components/team/members/MemberDetailDialog.tsx
#	src/renderer/components/ui/MemberSelect.tsx
2026-05-24 15:55:56 +03:00
Илия
e7a1070ce3
feat(i18n): add localization foundation Merge pull request #150 from 777genius/feat/ui-localization-foundation
feat(i18n): add localization foundation

Merge pull request #150 from 777genius/feat/ui-localization-foundation
2026-05-24 15:40:37 +03:00
777genius
3a7f9ea10b feat: add team log member filtering 2026-05-24 15:40:31 +03:00
777genius
6855d63ec6 feat(i18n): add localization foundation
Refs https://github.com/777genius/agent-teams-ai/issues/139
2026-05-24 15:37:24 +03:00
777genius
f6b2bc4cec fix(team): reject failed opencode session handles 2026-05-24 12:21:58 +03:00
777genius
95652c8990 refactor(team): extract provisioning service policies 2026-05-24 11:37:37 +03:00
777genius
cbf5356fdc fix(runtime): prefer shell node for GUI launches 2026-05-24 01:00:03 +03:00
777genius
e9cebe64ff feat: improve provider status startup hydration
Keep connected provider details visible while refreshes are in flight, restore reusable provider status UI, and separate fast startup summaries from heavier provider hydration. Replace the fixed 30s startup wait with an idle-aware scheduler with a 30s safety cap and cover the Electron timer binding crash.
2026-05-24 00:23:04 +03:00
777genius
91b153459a feat: add resilient cross-platform file watching
Share watcher fallback behavior across project, todo, team, and task file monitoring. Add polling fallback coverage for watcher-limit and startup failure cases so Linux EMFILE conditions degrade instead of amplifying renderer crashes.
2026-05-24 00:22:48 +03:00
777genius
b9cbdde502 fix(team): include runtime logs in launch failure artifacts
Refs: 777genius/agent-teams-ai#140
2026-05-23 23:33:54 +03:00
777genius
9518ce920a fix(startup): prevent recovery regressions 2026-05-23 17:22:52 +03:00
777genius
2be35c74ec fix(startup): repair deferred runtime refresh paths 2026-05-23 17:08:13 +03:00
777genius
ef77f36b8f fix(startup): hydrate deferred provider statuses 2026-05-23 16:31:46 +03:00
777genius
08725c4e33 perf(startup): lazy load dashboard runtime surfaces 2026-05-23 15:52:47 +03:00
777genius
6ac95505bc perf(startup): defer hidden renderer work 2026-05-23 15:34:30 +03:00
777genius
b4f2be87df perf(startup): shrink participant avatar assets 2026-05-23 15:13:02 +03:00
777genius
34a1b86b21 perf(startup): defer noncritical startup probes 2026-05-23 15:04:05 +03:00