Commit Graph

97 Commits

Author SHA1 Message Date
Carlos Florêncio 358a41a8a7 feat(agent): pin managed runtimes and add update awareness (#2906) 2026-08-22 22:08:45 +00:00
Carlos Florêncio 94e7b0245f feat(routing): add dynamic agent profile routing (#2698) 2026-08-21 22:04:17 +01:00
nova28 66efcb88e1 feat(automation): export workspace automations as reviewable YAML (#2898)
Co-authored-by: nova28 <17953305+nova28@users.noreply.github.com>
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
2026-08-21 22:03:35 +01:00
nova28 e9b6f45381 fix: stop update_agent_profile from renaming agents when only the model changes (#2849)
Co-authored-by: nova28 <17953305+nova28@users.noreply.github.com>
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
2026-08-20 17:56:02 +01:00
WaleWangPW 8686df51f9 fix(agent): fail-closed profile secret resolution + preserve user-modified profiles (#2839)
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
2026-08-20 12:55:34 +01:00
João Manso f17c4242f3 fix(web): keep the model selector visible for sessions with an agent config key (#2715)
Co-authored-by: Joao Manso <X363081@bcpcorp.net>
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
2026-08-16 20:10:40 +01:00
Carlos Florêncio e86202647e fix(runtime): recover stale npm metadata (#2714) 2026-08-16 17:41:43 +01:00
João Salavisa 6ee45128b6 fix(backend): report missing agent profile and unknown agent as 404 (#2636)
Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 18:46:19 +01:00
João Salavisa cb965b77c4 test(backend): cover settings, workflow and utility handler routes (#2634)
Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 17:47:35 +01:00
João Salavisa 37f4992ed5 fix(agents): expose kandev MCP tools to custom TUI agents (#2603)
Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-13 17:25:00 +01:00
Carlos Florêncio 45c9ba5554 fix(agents): add validated managed runtime recovery (#2580) 2026-08-13 12:14:01 +01:00
Clément Fiere 7e207c6fd1 feat: add agent profile duplicate (#2550) 2026-08-12 11:19:12 +01:00
Aulma 31907ba651 feat(web): restructure settings and unify page chrome behind PageShell (#2322)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-11 19:34:52 +02:00
Clément Fiere e4bc3be8b1 feat: no silent model fallback — explicit failure, gone models, per-profile fallback (#2385)
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
2026-08-09 21:44:25 +01:00
Carlos Florêncio 1928f258bf feat: use agent profiles for utility agents (#2430) 2026-08-09 18:36:08 +01:00
Carlos Florêncio cd1d19ae65 feat: resolve model-dependent provider options (#2404) 2026-08-08 17:13:50 +01:00
Jean-Emmanuel Losi 92e2256544 fix(acp): let Cursor sessions leave fast mode (parameterizedModelPicker) (#2307) 2026-08-06 14:13:05 +01:00
nova28 6b40d5b2ec feat(automation): make the automation the object, with its own runs destination (#2190)
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
2026-08-06 11:18:59 +01:00
Carlos Florêncio 80e4d77bb1 feat(secrets): add scoped repository secret environments (#2237) 2026-08-05 23:05:54 +01:00
Clément Fiere 6b938b61cb feat(settings): add enable/disable toggle for agent profiles (#2248)
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
2026-08-05 21:21:51 +01:00
Carlos Florêncio 01beeb3753 fix: handle same-version agent runtime updates (#2120) 2026-08-01 11:18:37 +01:00
nova28 cfa875d9d6 feat(agents): accept command_args when creating custom TUI agents (#2053) 2026-07-30 19:03:18 +01:00
Carlos Florêncio 35d1a85d74 fix: recover failed agent resumes and managed runtimes (#1991) 2026-07-28 09:23:30 +01:00
Carlos Florêncio 2bd2bae2ea feat: improve agent runtime update flow (#1982) 2026-07-27 19:34:13 +01:00
Carlos Florêncio d0d084bdc6 feat(agents): add user-managed runtime updates (#1950) 2026-07-27 12:21:47 +01:00
João Salavisa a7005e5d2f chore: revert agent subscription usage in settings and chat tooltip (#1940)
* chore: revert agent subscription usage in settings and chat tooltip

Reverts #1697 (55c8b461b). The subscription usage plugin now covers this,
so the built-in Settings > Agents section and the context-doughnut tooltip
rows are no longer needed.

Conflicts resolved to preserve later work on the same files:
- token-usage-display.tsx/.test.tsx: kept the pinnable tooltip (#1869),
  the rebuilt context-window layout (#1741), and the ACP/API source row
  (#1752); removed only SessionUsageRows and its imports.
- settings/agents/page.tsx: #1741 moved <AgentUsageSection /> above the
  pre-existing <Separator />, so the revert missed the JSX; removed it
  and kept the separator.
- agent-usage-section.tsx/.test.tsx: deleted (later changes were cosmetic
  tweaks to the section itself).

Office-side subscription surfaces (dashboard quota card, agent detail
QuotaCard, internal/agent/usage clients) predate #1697 and are untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(usage): keep #1697 client fixes when reverting its UI surface

#1697 bundled two things: the Settings > Agents section plus doughnut
tooltip rows, and a set of genuine bug fixes to the underlying provider
usage clients. Reverting it wholesale threw away the second group, which
is still live code behind the office dashboard quota card and the agent
detail QuotaCard.

Restores the client layer to its post-#1697 state (billing.go, cache.go,
client_claude.go, client_codex.go, fileutil.go, types.go and the two
client tests), fixing the defects CodeRabbit flagged on #1940:

- billing type is recomputed per call again instead of being frozen for
  the process lifetime by sync.OnceValue, so login/logout is observed
  without a backend restart
- usage cache regains fetch coalescing and short negative caching, so a
  provider outage no longer means one outbound call per request
- Claude usage parses float utilization and the richer limits[] array
  instead of failing to decode
- Claude token refresh patches only claudeAiOauth in a decoded map and
  writes atomically via temp+rename, preserving unknown keys in the
  credentials file the real CLI shares
- Codex reads tokens.access_token rather than a nonexistent flat token
  field, and its doc comment matches the ~/.codex/auth.json path

The removed UI/API surface stays reverted: GET /api/v1/agents/usage, the
host usage lister, the settings section, and the tooltip rows.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-26 12:04:25 +01:00
Carlos Florêncio bc218dfbbe feat: add workspace sources from files panel (#1900)
* feat: add workspace sources from files panel

* fix: preserve worktree identity during recovery

* feat: unify workspace source actions

* fix: validate recovered workspace repositories

* fix: harden workspace source filesystem boundaries

* test: split workspace repository chip coverage

* fix: restrict repository rescan recovery paths

* fix: stabilize workspace source CI checks

* test: canonicalize workspace source paths

* test: align workspace source container paths

* fix: populate direct workspace repository names

* test: preserve git fixture rewrites across restarts

* test: isolate backend git fixture config

* fix: resume remote workspace executions before creation

* fix: preserve ssh agent identity during resume

* fix: preserve SSH workspace across backend restart

* fix: simplify workspace actions trigger

* fix: refine add workspace repositories UX

* docs: narrow workspace source UX updates

* fix: avoid phantom turn on session resume

* test(web): normalize workspace source request headers

* feat(web): streamline workspace source picker

* docs: remove trailing spaces from workspace source plan

* fix: prevent resume status from creating phantom turns

* fix(web): stabilize workspace source attachment

* refactor(web): extract workspace source store contract

* fix: avoid phantom turns on idle agent resume

* fix: address backend static analysis findings

* fix: preserve agentctl readiness status value

* fix: preserve resume messages without active turns

* fix: resume agents from promoted workspace root

* chore: merge origin/main into feature/add-new-repo-folder-d97

* feat(web): explain workspace source consequences

* test(websocket): count session activity subscription
2026-07-25 21:29:53 +01:00
Carlos Florêncio 2f6be0c777 fix(agents): harden ACP launcher configuration (#1917) 2026-07-24 16:36:44 +01:00
Mathieu Virbel b4239d885e feat(agents): add configurable command prefix for sandboxed ACP launch (#1888) 2026-07-24 10:29:37 +01:00
Carlos Florêncio 9e484d7e89 feat: improve ACP model configuration summaries (#1723) 2026-07-17 18:47:59 +01:00
Carlos Florêncio 16da501fc4 feat(office): route agents through execution profiles (#1725) 2026-07-17 18:47:09 +01:00
João Salavisa 55c8b461be feat: surface agent subscription usage in settings and chat tooltip (#1697)
* feat: surface agent subscription usage in settings and chat tooltip

Adds live subscription rate-limit visibility for Claude Code and Codex:

- GET /api/v1/agents/usage lists per-agent utilization windows (plan, percent,
  reset time) for host agents with subscription credentials; ?fresh=true
  bypasses the 5-minute cache with a 15s per-provider clamp.
- Fixes both existing usage clients: Claude parsed float utilization as int
  (decode failure) and now reads the richer limits[] array incl. per-model
  weekly windows; Codex read a nonexistent auth.json field and response
  headers - now reads tokens.access_token, parses the body windows, and
  refreshes OAuth tokens on 401. Token refresh persists without dropping
  unknown credential fields.
- Settings > Agents gains a Subscription Usage section; the chat context
  doughnut tooltip shows the session agent's windows, fetched fresh on hover.
- Shared UsageWindowRows component (bars, Good/High/Critical status,
  reset countdowns) keeps settings, tooltip, and office surfaces consistent.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: recompute agent billing type on every read

Subscription billing detection for Claude and Codex was cached with
sync.OnceValue for the process lifetime, so logging in with OAuth after
the backend started never flipped billing badges or office usage checks
until restart. Detection now re-reads the credential files on each call
and reuses the usage clients' HasSubscriptionCredentials checks. Also
adds a regression assertion that fractional-second resets_at timestamps
parse under the RFC3339 layout.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: address subscription usage review feedback

- serialize empty utilization windows as arrays, not null
- sanitize per-agent usage errors in the API (raw provider errors are
  logged server-side; they can carry credential paths/response bodies)
- persist refreshed CLI credentials via atomic temp-file rename
- keep previous settings usage on transient refresh failure; drop stale
  tooltip usage (and its memo) when a fresh fetch fails
- add controller tests for SubscriptionUsage mapping and fresh propagation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: coalesce concurrent usage fetches and guard codex token refresh

- serialize usage-cache fetches per key with a double-checked lock so
  concurrent fresh requests make one provider call instead of a burst
- reject codex refresh responses with an empty access_token instead of
  persisting them and wiping working credentials
- pin the usage-rows reset fixture 30s under the day boundary so the
  formatted value is deterministic on fast runners

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: coalesce failed usage fetches with short negative caching

Concurrent lookups after a fetch error each retried the provider once
the per-key lock rotated. Failures are now cached for 15 seconds (never
longer than the caller's staleness bound), so bursts share one error
result and the provider gets a breather before the next retry.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: keep stale usage through failed refreshes and skip caching cancellations

Track the last success and last failure independently in the usage
cache: a failed fresh refresh no longer evicts a still-valid success
(non-fresh callers keep the stale value while fresh callers share the
recent error), and a caller-cancelled context no longer records a
negative entry that would penalize other callers.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* test: synchronize concurrent usage-cache tests with a channel barrier

Replaces the sleep-widened race window in the coalescing tests with a
started/release barrier per the backend testing guidelines, and dedupes
the two concurrent-caller tests into one helper.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-15 08:50:21 +01:00
Carlos Florêncio 8a2404251d fix: guard agent profile orphan cleanup (#1659) 2026-07-11 12:31:21 +01:00
José Almeida 1971f850e2 fix: use maintained codex acp bridge (#1656) 2026-07-10 16:09:21 +01:00
Carlos Florêncio 8b90ec2593 feat: improve office onboarding and workspace flows (#1606) 2026-07-08 12:07:38 +01:00
José Almeida 8922a9a2ee fix(backend): prefer local copilot CLI over npx at launch (#1384)
* fix(backend): prefer local copilot CLI over npx at launch

IsInstalled probed the copilot binary for the UI badge but launch always
ran `npx -y @github/copilot`, paying an npm registry round-trip every
start — minutes behind a private registry. Reuse the env-correct binary
check (standalone LookPath, SSH preflight probe) so when copilot is on
PATH the lifecycle runs it directly; containerized runtimes keep npx.

* fix(backend): make SSH native-binary probe non-fatal on transport error

The native-binary probe is an optimisation, not a requirement. A transient
SSH transport error (MaxSessions, reset) made "Verifying agent binary"
abort the launch, blaming copilot before npx was tried. Treat probe
transport errors as a miss and fall through to the required default-command
probe, which reports failures with proper context. Also call
NativeBinaryName() once.

* fix(backend): clear stale native-binary metadata before SSH probe

A pre-existing or stale MetadataKeyNativeBinary in req.Metadata could make
the command builder prefer copilot --acp on an npx-only host even when this
probe misses. Clear it up front so only a positive probe re-sets it.

* refactor(backend): use resolved RuntimeName for native-binary check

buildExecutionFromInstance re-derived the runtime from req.ExecutorType
while promoteWorkspaceExecution read execution.RuntimeName. Use the already
resolved execution.RuntimeName (set from rt.Name()) in both, so the two call
sites are consistent.

* fix(backend): reflect local copilot CLI in profile command preview

The profile setup command preview always rendered `npx -y @github/copilot`
because PreviewAgentCommand built the command without the native-binary
probe. The preview is not bound to an executor, so assume the default
standalone host and probe PATH (mirroring the standalone launch path): show
`copilot --acp` when the CLI is installed, npx otherwise.
2026-06-18 13:07:40 +01:00
Carlos Florêncio bebb46a189 fix: support postgres initial agent setup (#1410) 2026-06-17 09:54:44 +01:00
Carlos Florêncio 66871a6282 fix: initialize postgres schemas (#1365) 2026-06-14 17:47:40 +01:00
Carlos Florêncio 64140ae942 fix(acpdbg): read claude agent models and modes from configOptions (#1310) 2026-06-08 22:44:02 +01:00
Nicolas Lenepveu aac2afbf93 fix(agent-settings): stop reseeding agent profiles the user deleted (#1305) 2026-06-08 17:49:34 +01:00
João Salavisa 5143a76e35 fix(agents): emit --dangerously-skip-permissions for Claude CLI passthrough (#1262)
* fix(agents): emit --dangerously-skip-permissions for Claude CLI passthrough (#1261)

Claude ACP declared empty PermSettings in passthrough mode, so the launch path's
PermissionValues map (which carries the profile's DangerouslySkipPermissions
toggle) had no matching CLI-flag mapping to emit. Bypass / auto-approve was
silently ignored. Wire the permission setting to --dangerously-skip-permissions
and skip the key in seedCLIFlags so the toggle does not double-surface in the
curated cli_flags list.

* test(agents): use PermissionKeyDangerouslySkipPermissions constant in claude_acp_test

* test(agents): use constant in claude_acp_test failure message too

---------

Co-authored-by: Kandev Agent <agent@kandev.dev>
2026-06-03 10:14:03 +01:00
Carlos Florêncio 7917c95496 feat(backend): inject MCP servers in CLI passthrough mode per agent (#1158) 2026-06-03 00:09:05 +01:00
Nicolas Lenepveu 72e3a49718 fix(watcher): self-heal orphaned watchers when agent profile is soft-deleted (#1094) 2026-06-02 23:17:56 +01:00
Carlos Florêncio bf7762d939 fix(agents): split codex acp flags from agentctl auto-approve (#1253) 2026-06-02 23:10:02 +01:00
Carlos Florêncio 036aee6e19 fix(agents): add Cursor auto-approve and always-allow permission UI (#1198) 2026-05-31 17:13:00 +01:00
Carlos Florêncio f1dbad1dbd feat(cli-mode): auto-inject task prompt + dynamic submit sequence + passthrough UX fixes (#923) 2026-05-25 19:14:36 +01:00
Evgeny Klinnikov 90c652c8e2 feat: add per-agent-profile environment variables (#1040) 2026-05-25 08:14:45 +01:00
Carlos Florêncio 7407204fe1 fix(office): isolate kanban and office workspace selection (#1019) 2026-05-22 22:10:11 +01:00
Carlos Florêncio 0b2085688b feat(office): autonomous agent management layer (#914) 2026-05-16 20:07:57 +01:00
Carlos Florêncio a5108de926 fix(windows): make conpty Close idempotent and kill orphan agentctl (#900) 2026-05-15 16:04:35 +01:00