Commit Graph

14392 Commits

Author SHA1 Message Date
Spike Curtis 8dc4d76890 chore: add agent-connection-watch for workspaces (#24507)
<!--

If you have used AI to produce some or all of this PR, please ensure you have read our [AI Contribution guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING) before submitting.

-->

relates to GRU-18  
  
Adds basic implementation for Workspace Agent Connection Watch and tests.  
  
Missing are handling of logs.
2026-05-20 13:09:11 -04:00
Spike Curtis 05e47b9c0f fix: filter out cross-talk on TestPortForward (#25503)
<!--

If you have used AI to produce some or all of this PR, please ensure you have read our [AI Contribution guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING) before submitting.

-->

Fixes https://github.com/coder/internal/issues/1539  
  
Protects from port cross-talk by adding a short random prefix to our socket communication and instructing the service on the workspace agent side of the test to ignore any connections that don't use the prefix.
2026-05-20 13:08:57 -04:00
George K b229573c7e feat(provisioner/terraform): log resource replacement paths (#24935)
feat(provisioner/terraform): log resource replacement details

Log compact Terraform resource replacement warnings for non-prebuild claim builds.
The warnings include Terraform-reported replacement paths and before/after values
when Terraform does not mark the value, or a descendant of the value, sensitive.

Preserve Terraform sensitivity and unknown handling, and fall back to path-only or
pathless messages when value details are unavailable. Prebuild claims continue
using the existing full drift log path, including for pathless replacement actions
that were previously skipped.

Continue sending PlanComplete.ResourceReplacements only when Terraform reports
replacement paths.

Ref:
https://linear.app/codercom/issue/PLAT-135/bug-build-terraform-logs-dont-include-which-fields-have-changed
Ref: https://github.com/coder/coder/issues/16999
2026-05-20 09:25:34 -07:00
Danny Kopping 44b1edd4da fix: unify key-ops audit shape and surface per-key detail (#25534)
Adding missed commit from https://github.com/coder/coder/pull/25484

This formats the audit logs correctly

![image.png](https://app.graphite.com/user-attachments/assets/598d018b-cdf5-4a2c-8321-24ba2c650a1a.png)



<!--

If you have used AI to produce some or all of this PR, please ensure you have read our [AI Contribution guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING) before submitting.

-->
2026-05-20 17:33:26 +02:00
Michael Suchacz cd54861e4f fix(agent): set utf8 locale for tmux terminals (#25530)
> Mux is updating this PR on behalf of Mike.

## Summary
- Set a UTF-8 `LC_CTYPE` fallback for reconnecting PTYs when no
effective UTF-8 locale is present.
- Preserve non-empty `LC_ALL` so explicit user locale choices still win.
- Add tmux glyph regression coverage for reconnecting PTYs, plus unit
coverage for the env helper.
- Stabilize the tmux regression by keeping the pane alive until the
glyph output is observed.
- Keep the env helper unit test expectations OS-aware for Windows and
cover unhyphenated UTF8 locales.

## Validation
- `go test ./agent/reconnectingpty -run TestWithTerminalEnv -count=1`
- `go test ./agent -run '^TestAgent_ReconnectingPTY$/Buffered$'
-count=1`
- `go test ./agent -run '^TestAgent_ReconnectingPTY$' -count=1`
- `make lint`
- `git commit` pre-commit hook
- `git push` pre-push hook
2026-05-20 17:12:23 +02:00
Steven Masley 19a1fa5c13 chore: disable access url to get a try.coder.app in dev (#25510) 2026-05-20 08:49:23 -05:00
Danielle Maywood e73292fc89 fix(site): recover malformed subagent chat links (#25532) 2026-05-20 13:39:49 +00:00
Jaayden Halko 1ba54e2ca6 chore: cleanup structure of left sidebar (#25528)
This cleanups up the folder structure and breaks up files into a more
atomic structure. No functional changes should exist here.
2026-05-20 14:06:54 +01:00
Danny Kopping 00e8b40cb0 chore: surface key add/remove/keep counts in audit log (#25484) 2026-05-20 14:44:57 +02:00
Atif Ali 7ffeac711c fix: correct web terminal glyph rendering and tmux display (#25059)
The web terminal was rendering Claude Code and Codex incorrectly because
xterm's custom glyph renderer draws block and quadrant characters with
its own geometry. The reconnecting PTY screen backend also exposed
`screen.xterm-256color` to the user's shell, which made tmux rendering
issues harder to reason about.

This PR:

* Disables xterm custom glyph rendering so the selected terminal font
draws block and quadrant glyphs.
* Adds a tiny Powerline-only terminal symbol fallback font so common
prompt separators still render when custom glyphs are disabled.
* Configures the screen backend to keep the inner shell `TERM` aligned
with the browser terminal emulator, including background color erase
behavior.
* Tightens reconnecting PTY tests around prompt synchronization and
`TERM` assertions.

<!-- linear:table-colwidths:200,200 -->
| Before | After |
| -- | -- |
| <img
src="https://uploads.linear.app/e62091d9-44f5-421c-8e5c-df481fc99003/3c45efce-9d7e-43b4-b24f-88d4d23d294a/ba68155e-949e-4961-b0b2-124757cb07bb?signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRoIjoiL2U2MjA5MWQ5LTQ0ZjUtNDIxYy04ZTVjLWRmNDgxZmM5OTAwMy8zYzQ1ZWZjZS05ZDdlLTQzYjQtYjI0Zi04OGQ0ZDIzZDI5NGEvYmE2ODE1NWUtOTQ5ZS00OTYxLWIwYjItMTI0NzU3Y2IwN2JiIiwiaWF0IjoxNzc4MTgxNjUwLCJleHAiOjE4MDk3NTIyMTB9.45f1ZzBpWOF5OCJV0xHfICdpyRQ1UoGMbJjLYPqeAkg
" alt="Before: Claude Code logo rendering is distorted in the web
terminal outside and inside tmux" width="640" /> | <img
src="https://uploads.linear.app/e62091d9-44f5-421c-8e5c-df481fc99003/26b0a109-5e21-4000-b1b5-ddac87c409d4/46a301c2-a815-419a-92d2-c51cecdefe40?signature=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXRoIjoiL2U2MjA5MWQ5LTQ0ZjUtNDIxYy04ZTVjLWRmNDgxZmM5OTAwMy8yNmIwYTEwOS01ZTIxLTQwMDAtYjFiNS1kZGFjODdjNDA5ZDQvNDZhMzAxYzItYTgxNS00MTlhLTkyZDItYzUxY2VjZGVmZTQwIiwiaWF0IjoxNzc4MTgxNjUwLCJleHAiOjE4MDk3NTIyMTB9.SQVwUbtaf2OrpjRJPkRH3uc0nPqad0bNBVvcRyuR6NQ
" alt="After: Claude Code logo renders correctly in the web terminal
outside and inside tmux" width="640" /> |

## Validation

* `go test ./agent -run '^TestAgent_ReconnectingPTY$' -count=1`
* `pnpm --dir site test -- src/theme/constants.test.ts`
* `pnpm --dir site lint:types`
* `pnpm --dir site check`
* `pnpm --dir site build`
* `git commit` pre-commit hook passed
* `git push` pre-push hook ran and printed the repo CI monitoring hint

> Mux worked on this PR on Mike's behalf.

---------

Co-authored-by: Michael Suchacz <203725896+ibetitsmike@users.noreply.github.com>
2026-05-20 13:57:50 +02:00
Danielle Maywood 962b6850cf chore(site): update lexical to 0.44.0 (#25524) 2026-05-20 11:52:43 +01:00
Ethan e6fe9916d6 fix: pin chat timestamp chromatic ignore-mask width (#25522)
Follow-up to #25429, which wrapped `shortRelativeTime(chat.updated_at)`
in `<span data-chromatic="ignore">` to stop the chat row timestamp from
drifting `"46m" → "5m" → "now"` across Chromatic runs. Chromatic kept
flagging a sliver of change just to the left of the rendered text, even
though the area looks empty.

[Chromatic's docs](https://www.chromatic.com/docs/ignoring-elements/)
explain why: `data-chromatic="ignore"` masks pixel diffs **inside the
element's bounding rectangle**, but dimension changes of that rectangle
still trigger a diff. The wrapper span has no explicit width, so it
sizes to its text — `"46m"` (≈22px) shrinks to `"now"` (≈19px), the mask
shrinks by ~3px on its left edge, and that exposed strip is what
Chromatic was reporting.

Fix: pin the wrapper to `inline-block w-7 text-right`. `w-7` matches the
surrounding `w-7` column, and `text-right` keeps the trailing edge
anchored so the bounding rect is identical regardless of which
`shortRelativeTime` branch fired. The unread-dot branch is untouched and
keeps its own Chromatic coverage.
2026-05-20 19:55:54 +10:00
Michael Suchacz 0f429b89ab chore: remove dogfood skill disclosure guidance (#25523)
> Mux created this PR for Mike.

Removes the dogfood skill instruction and sample PR comment that told
agents to add a Mux disclosure when posting comments for Mike.

The PR comment template now starts directly with the dogfood results
while keeping the explicit guard to only post to GitHub when asked or
allowed.
2026-05-20 11:50:21 +02:00
Danielle Maywood 96e3c49670 feat: add chat sharing API (#24968) 2026-05-20 10:46:35 +01:00
Thomas Kosiewski 70ab2b9940 chore: switch helm to aqua backend and bump dogfood mise (#25521)
mise's aqua plugin now templates `{{.Version}}` with the leading `v`, so
the official `get.helm.sh` URLs resolve without the hand-rolled `http:`
workaround that was added when the version-prefix templating was broken.

Drops the templated URL block (and its explanatory comment) in favor of
plain `helm = "3.21.0"`. The regenerated lockfile picks up windows-amd64
(which the old workaround intentionally omitted) and replaces the
locally-computed blake3 checksum with the upstream sha256 sums.

Follow-up to #25520, which bumped the pinned version to 3.21.

---------

Signed-off-by: Thomas Kosiewski <tk@coder.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 11:34:30 +02:00
Michael Suchacz e105e3af45 test: cover personal skill API (#25365)
> Mux updated this PR on behalf of Mike.

## Stack Context

This PR is the API test coverage slice in the experimental personal
skills stack. The storage, schema, permissions, API, and SDK
implementation merged in #25363.

Stack order:
1. #25362 personal skill resolver
2. #25363 storage, permissions, API, and SDK
3. #25365 API test coverage
4. #25366 chattool and chatd integration
5. #25066 settings UI and docs
6. #25386 personal skills slash menu

## What?

Adds API and audit tests for personal skill CRUD, validation failures,
limits, authorization, soft-delete cleanup, and audit content tracking.

This PR is now test-only. It does not include migrations, generated
database code, or API implementation changes.

## Why?

The feature touches storage, permissions, and audit behavior. These
tests make the server behavior reviewable and protected without
re-reviewing the implementation that already merged in #25363.

## Validation

- `go test ./coderd -run '^(TestUserSkill|TestPatchUserSkill)' -count=1`
- `go test ./enterprise/coderd -run
'^TestUserSkillAuditDiffTracksContent$' -count=1`
- pre-commit hook via `gt modify --no-edit`
2026-05-20 11:27:09 +02:00
Danny Kopping dd3223451b feat: add AI providers HTTP CRUD handlers (#24894) 2026-05-20 10:21:36 +02:00
Danny Kopping fe01efeb21 fix(mise): upgrade helm to 3.21 to fix helm testdata generation (#25520)
With `helm=3.12.0`, when running `make -B
helm/coder/tests/testdata/.gen-golden` it doesn't respect the namespace
override defined in `helm/coder/tests/chart_test.go`:

```go
// runHelmTemplate runs helm template on the given chart with the given values and
// returns the raw output.
func runHelmTemplate(t testing.TB, helmPath, chartDir, valuesFilePath, namespace string) (string, error) {
	// Ensure that valuesFilePath exists
	if _, err := os.Stat(valuesFilePath); err != nil {
		return "", xerrors.Errorf("values file %q does not exist: %w", valuesFilePath, err)
	}

	cmd := exec.Command(helmPath, "template", chartDir, "-f", valuesFilePath, "--namespace", namespace)
	t.Logf("exec command: %v", cmd.Args)
	out, err := cmd.CombinedOutput()
	return string(out), err
}
```

This results in:

```diff
$ git diff | head
diff --git a/helm/coder/tests/testdata/auto_access_url_1_coder.golden b/helm/coder/tests/testdata/auto_access_url_1_coder.golden
index be09066fb1..a6a064e535 100644
--- a/helm/coder/tests/testdata/auto_access_url_1_coder.golden
+++ b/helm/coder/tests/testdata/auto_access_url_1_coder.golden
@@ -12,14 +12,14 @@ metadata:
     app.kubernetes.io/version: 0.1.0
     helm.sh/chart: coder-0.1.0
   name: coder
-  namespace: coder
+  namespace: default
```

Signed-off-by: Danny Kopping <danny@coder.com>
2026-05-20 10:15:10 +02:00
Mathias Fredriksson 1ddc89caa2 test(codersdk/toolsdk): scope err in SendTaskInput and GetTaskLogs subtests (#25434)
Fixes coder/internal#1475
Fixes CODAGT-364
2026-05-20 11:02:46 +03:00
Michael Suchacz 9c2e0aac88 fix(site/src/pages/AgentsPage): widen inline desktop preview to fill chat (#25497) 2026-05-20 08:42:30 +02:00
Ethan 4c362499f2 fix(site): keep workspace quota meter live-updated in Agents chat (#25468)
The workspace quota meter in the Agents chat sidebar previously only
refreshed on a full page reload, while the AI cost-usage meter rendered
next to it already polled every 60 seconds.

This change gives the Agents usage indicator the same 60s
workspace-quota polling and refreshes derived workspace caches
immediately when workspace-affecting chat tools complete.
`create_workspace`, `start_workspace`, and `stop_workspace` now
invalidate the workspace quota and `workspaces` query family, so both
the credit numbers and the workspace-count detail stay in sync.

`create_workspace` still invalidates the chat record to resolve
workspace bindings, and archive-and-delete uses the shared workspace
mutation invalidation helper so deleting an agent workspace refreshes
the same derived workspace data.

Closes CODAGT-444


Tested manually and it works perfectly.
2026-05-20 12:30:28 +10:00
Michael Suchacz 13bf0e11f1 docs(coderd/x/chatd): define AI provider glossary (#25411)
> Mux prepared this PR on behalf of Mike.

## Stack Context

This is PR 1 of 6 in the `mike/ai-providers` Graphite stack. The stack
migrates Agents chat provider configuration from legacy chat provider
tables to the unified AI provider tables used by the AI provider
administration surface.

See the stack comment for review order and links.

## What?

Adds a package-level `coderd/x/chatd/docs.go` glossary for AI Providers,
provider-scoped keys, user BYOK keys, and Agents as the consuming
feature area.

## Why?

Keeping the glossary next to chatd makes the migration language visible
where Agents consume AI Providers, without adding a separate PRD, root
context file, or ADR structure.
2026-05-20 01:37:38 +02:00
dependabot[bot] ce57ecc908 chore: bump google.golang.org/api from 0.278.0 to 0.280.0 (#25516)
Bumps
[google.golang.org/api](https://github.com/googleapis/google-api-go-client)
from 0.278.0 to 0.280.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/googleapis/google-api-go-client/releases">google.golang.org/api's
releases</a>.</em></p>
<blockquote>
<h2>v0.280.0</h2>
<h2><a
href="https://github.com/googleapis/google-api-go-client/compare/v0.279.0...v0.280.0">0.280.0</a>
(2026-05-19)</h2>
<h3>Features</h3>
<ul>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3591">#3591</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/55ba2fab69ee14286ad052f57ed90a726b071e86">55ba2fa</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3593">#3593</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/054d4b6054450d2be21f50fad64145a4e0125424">054d4b6</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3594">#3594</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/03829161b8cd77bf11f4a3a5d07a43f6b1904fbe">0382916</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3595">#3595</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/13e1ad2eeb540d19709df87ce9a0cfdb632f1bf3">13e1ad2</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3596">#3596</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/4c77865748dda2086de226e9401531c934cd909f">4c77865</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3598">#3598</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/ae2f33001826f523ecc6d2f141244e55fbac45c0">ae2f330</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3599">#3599</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/f82d2049187ed2ab7ee27831a1a78887c5969ca4">f82d204</a>)</li>
</ul>
<h2>v0.279.0</h2>
<h2><a
href="https://github.com/googleapis/google-api-go-client/compare/v0.278.0...v0.279.0">0.279.0</a>
(2026-05-12)</h2>
<h3>Features</h3>
<ul>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3585">#3585</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/09db0e346a6b567747dceee3872229a62c95124c">09db0e3</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3587">#3587</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/e87e376dbd590cffb3632c378e1ade4a9dacf3ce">e87e376</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3590">#3590</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/d4241eaef9ab3daad4fd4aaeccc118795cfc58a7">d4241ea</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md">google.golang.org/api's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/googleapis/google-api-go-client/compare/v0.279.0...v0.280.0">0.280.0</a>
(2026-05-19)</h2>
<h3>Features</h3>
<ul>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3591">#3591</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/55ba2fab69ee14286ad052f57ed90a726b071e86">55ba2fa</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3593">#3593</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/054d4b6054450d2be21f50fad64145a4e0125424">054d4b6</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3594">#3594</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/03829161b8cd77bf11f4a3a5d07a43f6b1904fbe">0382916</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3595">#3595</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/13e1ad2eeb540d19709df87ce9a0cfdb632f1bf3">13e1ad2</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3596">#3596</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/4c77865748dda2086de226e9401531c934cd909f">4c77865</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3598">#3598</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/ae2f33001826f523ecc6d2f141244e55fbac45c0">ae2f330</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3599">#3599</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/f82d2049187ed2ab7ee27831a1a78887c5969ca4">f82d204</a>)</li>
</ul>
<h2><a
href="https://github.com/googleapis/google-api-go-client/compare/v0.278.0...v0.279.0">0.279.0</a>
(2026-05-12)</h2>
<h3>Features</h3>
<ul>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3585">#3585</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/09db0e346a6b567747dceee3872229a62c95124c">09db0e3</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3587">#3587</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/e87e376dbd590cffb3632c378e1ade4a9dacf3ce">e87e376</a>)</li>
<li><strong>all:</strong> Auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3590">#3590</a>)
(<a
href="https://github.com/googleapis/google-api-go-client/commit/d4241eaef9ab3daad4fd4aaeccc118795cfc58a7">d4241ea</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/3887b09ecbbaf25fba1bf52227ad5ca4f89e9968"><code>3887b09</code></a>
chore(main): release 0.280.0 (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3592">#3592</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/f82d2049187ed2ab7ee27831a1a78887c5969ca4"><code>f82d204</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3599">#3599</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/13e7314e1377c0dd4e132a681b3130abc5843dbd"><code>13e7314</code></a>
chore(all): update all (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3597">#3597</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/ae2f33001826f523ecc6d2f141244e55fbac45c0"><code>ae2f330</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3598">#3598</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/4c77865748dda2086de226e9401531c934cd909f"><code>4c77865</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3596">#3596</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/13e1ad2eeb540d19709df87ce9a0cfdb632f1bf3"><code>13e1ad2</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3595">#3595</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/03829161b8cd77bf11f4a3a5d07a43f6b1904fbe"><code>0382916</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3594">#3594</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/054d4b6054450d2be21f50fad64145a4e0125424"><code>054d4b6</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3593">#3593</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/55ba2fab69ee14286ad052f57ed90a726b071e86"><code>55ba2fa</code></a>
feat(all): auto-regenerate discovery clients (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3591">#3591</a>)</li>
<li><a
href="https://github.com/googleapis/google-api-go-client/commit/e446d4cdeb5e63cd6916051edd2c56588eede309"><code>e446d4c</code></a>
chore(main): release 0.279.0 (<a
href="https://redirect.github.com/googleapis/google-api-go-client/issues/3586">#3586</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/googleapis/google-api-go-client/compare/v0.278.0...v0.280.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/api&package-manager=go_modules&previous-version=0.278.0&new-version=0.280.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-19 22:55:11 +00:00
dependabot[bot] f6a9e43185 chore: bump github.com/coder/terraform-provider-coder/v2 from 2.16.0 to 2.17.0 (#25515)
Bumps
[github.com/coder/terraform-provider-coder/v2](https://github.com/coder/terraform-provider-coder)
from 2.16.0 to 2.17.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/coder/terraform-provider-coder/releases">github.com/coder/terraform-provider-coder/v2's
releases</a>.</em></p>
<blockquote>
<h2>v2.17.0</h2>
<h2>What's Changed</h2>
<ul>
<li>build(deps): Bump golang.org/x/mod from 0.34.0 to 0.35.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/coder/terraform-provider-coder/pull/500">coder/terraform-provider-coder#500</a></li>
<li>build(deps): Bump crazy-max/ghaction-import-gpg from 6.3.0 to 7.0.0
by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/coder/terraform-provider-coder/pull/485">coder/terraform-provider-coder#485</a></li>
<li>build(deps): Bump goreleaser/goreleaser-action from 7.0.0 to 7.1.0
by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/coder/terraform-provider-coder/pull/502">coder/terraform-provider-coder#502</a></li>
<li>build(deps): Bump goreleaser/goreleaser-action from 7.1.0 to 7.2.1
by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/coder/terraform-provider-coder/pull/505">coder/terraform-provider-coder#505</a></li>
<li>build(deps): Bump golang.org/x/mod from 0.35.0 to 0.36.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/coder/terraform-provider-coder/pull/508">coder/terraform-provider-coder#508</a></li>
<li>chore: upgrade Go to 1.26 by <a
href="https://github.com/matifali"><code>@​matifali</code></a> in <a
href="https://redirect.github.com/coder/terraform-provider-coder/pull/494">coder/terraform-provider-coder#494</a></li>
<li>chore: warn when coder_agent dir breaks Desktop file sync by <a
href="https://github.com/zenithwolf1000"><code>@​zenithwolf1000</code></a>
in <a
href="https://redirect.github.com/coder/terraform-provider-coder/pull/507">coder/terraform-provider-coder#507</a></li>
<li>build(deps): Bump github.com/hashicorp/terraform-plugin-sdk/v2 from
2.38.1 to 2.40.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/coder/terraform-provider-coder/pull/506">coder/terraform-provider-coder#506</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/zenithwolf1000"><code>@​zenithwolf1000</code></a>
made their first contribution in <a
href="https://redirect.github.com/coder/terraform-provider-coder/pull/507">coder/terraform-provider-coder#507</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/coder/terraform-provider-coder/compare/v2.16.0...v2.17.0">https://github.com/coder/terraform-provider-coder/compare/v2.16.0...v2.17.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/coder/terraform-provider-coder/commit/35a52f2969dfd236df4ea370fdb84a70475e5bbd"><code>35a52f2</code></a>
build(deps): Bump github.com/hashicorp/terraform-plugin-sdk/v2 from
2.38.1 to...</li>
<li><a
href="https://github.com/coder/terraform-provider-coder/commit/c80aa71a5d8d03c8ebb7de2c02e34556fa98f04b"><code>c80aa71</code></a>
chore: warn when coder_agent dir breaks Desktop file sync (<a
href="https://redirect.github.com/coder/terraform-provider-coder/issues/507">#507</a>)</li>
<li><a
href="https://github.com/coder/terraform-provider-coder/commit/d1b758b3e04a35d3339fa838872bec137eb28e15"><code>d1b758b</code></a>
chore: upgrade Go to 1.26 (<a
href="https://redirect.github.com/coder/terraform-provider-coder/issues/494">#494</a>)</li>
<li><a
href="https://github.com/coder/terraform-provider-coder/commit/223b51b40f52bfdfcad65805f3bf94c31dfd531d"><code>223b51b</code></a>
build(deps): Bump golang.org/x/mod from 0.35.0 to 0.36.0 (<a
href="https://redirect.github.com/coder/terraform-provider-coder/issues/508">#508</a>)</li>
<li><a
href="https://github.com/coder/terraform-provider-coder/commit/fe03a1da39aaf2f1eb0945526d7a284339963262"><code>fe03a1d</code></a>
build(deps): Bump goreleaser/goreleaser-action from 7.1.0 to 7.2.1 (<a
href="https://redirect.github.com/coder/terraform-provider-coder/issues/505">#505</a>)</li>
<li><a
href="https://github.com/coder/terraform-provider-coder/commit/7da76fab022e71fd2ded14df27daa7de36e4980d"><code>7da76fa</code></a>
build(deps): Bump goreleaser/goreleaser-action from 7.0.0 to 7.1.0 (<a
href="https://redirect.github.com/coder/terraform-provider-coder/issues/502">#502</a>)</li>
<li><a
href="https://github.com/coder/terraform-provider-coder/commit/8f68c55762c371e4f4d3dcafd83688d0b613dffc"><code>8f68c55</code></a>
build(deps): Bump crazy-max/ghaction-import-gpg from 6.3.0 to 7.0.0 (<a
href="https://redirect.github.com/coder/terraform-provider-coder/issues/485">#485</a>)</li>
<li><a
href="https://github.com/coder/terraform-provider-coder/commit/99b6eee0c6467576672ad8ff5a4a68539ccba19b"><code>99b6eee</code></a>
build(deps): Bump golang.org/x/mod from 0.34.0 to 0.35.0 (<a
href="https://redirect.github.com/coder/terraform-provider-coder/issues/500">#500</a>)</li>
<li>See full diff in <a
href="https://github.com/coder/terraform-provider-coder/compare/v2.16.0...v2.17.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/coder/terraform-provider-coder/v2&package-manager=go_modules&previous-version=2.16.0&new-version=2.17.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-19 22:52:59 +00:00
dependabot[bot] 91c405caa4 chore: bump github.com/brianvoe/gofakeit/v7 from 7.14.0 to 7.15.0 (#25513)
Bumps
[github.com/brianvoe/gofakeit/v7](https://github.com/brianvoe/gofakeit)
from 7.14.0 to 7.15.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/brianvoe/gofakeit/commit/010dc54464bc1c104ee1bad3823325dd2e14d4dd"><code>010dc54</code></a>
email - better email generation with weighted mix and testing valid
email gen...</li>
<li><a
href="https://github.com/brianvoe/gofakeit/commit/794efc9b4520eb8f2df00b3db0aa8fb64e04d469"><code>794efc9</code></a>
password - space usage adjustment</li>
<li><a
href="https://github.com/brianvoe/gofakeit/commit/ee08eae8003a40768c47bacd76dfa5503a461752"><code>ee08eae</code></a>
Merge pull request <a
href="https://redirect.github.com/brianvoe/gofakeit/issues/392">#392</a>
from shubhamatkal/fix/password-guarantee-character-sets</li>
<li><a
href="https://github.com/brianvoe/gofakeit/commit/c38fe1a8fb22e850fbdbbe2a54d5954a60e13a65"><code>c38fe1a</code></a>
github - workflow less verbose</li>
<li><a
href="https://github.com/brianvoe/gofakeit/commit/22b91127ddcc896b66a389c2c00b73985091d11c"><code>22b9112</code></a>
datetime - yearly fix</li>
<li><a
href="https://github.com/brianvoe/gofakeit/commit/35520064411e85a403d4b41f22d3269604871e20"><code>3552006</code></a>
fix: guarantee at least one char per enabled set in Password()</li>
<li>See full diff in <a
href="https://github.com/brianvoe/gofakeit/compare/v7.14.0...v7.15.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/brianvoe/gofakeit/v7&package-manager=go_modules&previous-version=7.14.0&new-version=7.15.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-19 22:52:23 +00:00
Michael Suchacz 5a8d0016a5 feat: add personal skill storage, API, and SDK (#25363)
> Mux updated this PR on behalf of Mike.

## Stack Context

This PR is the storage, permissions, API, and SDK layer for experimental
personal skills. #25362 has landed on `main`, so this branch is
restacked directly on `main`.

Stack order:
1. #25363 storage, permissions, API, and SDK
2. #25365 API test coverage
3. #25366 chattool and chatd integration
4. #25066 settings UI and docs
5. #25386 personal skills slash menu

## What?

Adds the `user_skills` database table, generated queries, RBAC resources
and scopes, audit resource handling, experimental user-scoped CRUD
endpoints, SDK types, and generated API/site types.

Follow-up review and restack fixes:
- Enforce a bounded personal skill description in parser and database
constraints.
- Return `403 Forbidden` for unauthorized create and update attempts.
- Return explicit conflict responses when soft-deleted users are
targeted.
- Keep user admins out of personal skills, while site owners can read
and delete but not create or update.
- Document trigger-raised constraint names and keep schema constants
covered by tests.
- Reuse `UserSkillMetadata` in the full `UserSkill` SDK response type.
- Generate user skill IDs in Go instead of relying on a database
default.
- Rebase on latest `main` and renumber the user skills migration to
`000502_user_skills`.

## Why?

Personal skills need durable user-owned storage with owner
authorization, limited site-owner moderation, and a hidden API surface
before chatd can consume them.

## Validation

- `make gen`
- `go test ./coderd/database -run '^TestUserSkillSchemaConstants$'
-count=1`
- `go test ./coderd/database/dbauthz -run
'^TestMethodTestSuite/TestUserSkills$' -count=1`
- `go test ./coderd -run '^TestPatchUserSkill$' -count=1`
- `go test ./codersdk ./coderd/database/db2sdk`
- `make lint`
- pre-commit hook on `97fd58108d`
2026-05-20 00:09:09 +02:00
blinkagent[bot] 3c9c8c708d docs: remove Roo Code references (sunset) (#25477)
Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
2026-05-20 00:05:29 +05:00
Nick Vigilante 179023b3a0 docs: Split AI Gateway Auth docs to its own page (#25496)
The Authentication and BYOK docs are now part of their own section above
the Clients subsection. The original PR, coder/coder#25459, was based on
a ticket I generated to calculate the drift, but the contents of the
Linear ticket were geared more toward documenting _everything_ in the
code, which had too much scope and was confusing.

Fixes DOCS-148

<!--

If you have used AI to produce some or all of this PR, please ensure you
have read our [AI Contribution
guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING)
before submitting.

-->
2026-05-19 16:53:49 +00:00
Michael Suchacz 951a8e7237 feat: add intent labels to execute tool (#25482)
> Mux opened this PR on behalf of Mike.

Fixes CODAGT-451

Adds optional `model_intent` metadata to the built-in execute tool
schema so tool calls can carry a short user-facing intent label without
duplicating the command or duration.

The Agents UI now composes that intent with the existing execute command
and duration fields, displaying labels like `Checking repository state
using git fetch origin for 2.3s` while keeping the shell command visible
as the audit-relevant action.

Existing execute calls without an intent keep the previous `Ran
<command>` fallback label, so only intent-bearing calls get the new
composed label.
2026-05-19 18:47:12 +02:00
dylanhuff-at-coder 441854daa8 feat: add user secrets client utilities (#25370)
Add frontend API methods, mocks, and form helpers for user secrets CRUD. The new client methods cover list, get, create, update, and delete requests, including URL encoding for secret names used in route paths.

Add user secret form utilities for create and update payload construction, required create field checks, and structured API validation error mapping back to form fields. User secret name validation now lives in codersdk with tests, and coderd returns field-level validation errors for create, update, and uniqueness conflicts so the frontend can show backend-owned validation results consistently.
2026-05-19 09:30:31 -07:00
dependabot[bot] 01492e0e7b chore: bump github.com/go-git/go-git/v5 from 5.19.0 to 5.19.1 (#25494)
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git)
from 5.19.0 to 5.19.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/go-git/go-git/releases">github.com/go-git/go-git/v5's
releases</a>.</em></p>
<blockquote>
<h2>v5.19.1</h2>
<h2>What's Changed</h2>
<ul>
<li>v5: plumbing: transport/ssh, Shell-quote path by <a
href="https://github.com/hiddeco"><code>@​hiddeco</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2068">go-git/go-git#2068</a></li>
<li>v5: git: submodule, Fix relative URL resolution by <a
href="https://github.com/hiddeco"><code>@​hiddeco</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2070">go-git/go-git#2070</a></li>
<li>v5: git: submodule, canonical remote for relative URLs by <a
href="https://github.com/hiddeco"><code>@​hiddeco</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2074">go-git/go-git#2074</a></li>
<li>v5: git: submodule, error on remote without URLs by <a
href="https://github.com/hiddeco"><code>@​hiddeco</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2078">go-git/go-git#2078</a></li>
<li>v5: plumbing: format/idxfile, Validate offset64 indices by <a
href="https://github.com/hiddeco"><code>@​hiddeco</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2084">go-git/go-git#2084</a></li>
<li>v5: *: Reject malformed variable-length integers by <a
href="https://github.com/hiddeco"><code>@​hiddeco</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2092">go-git/go-git#2092</a></li>
<li>v5: plumbing: format/packfile, Tighten delta validation by <a
href="https://github.com/hiddeco"><code>@​hiddeco</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2091">go-git/go-git#2091</a></li>
<li>v5: Add <code>worktreeFilesystem</code> wrapper for worktree and
hardening by <a
href="https://github.com/hiddeco"><code>@​hiddeco</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2100">go-git/go-git#2100</a></li>
<li>v5: config: validate submodule names by <a
href="https://github.com/hiddeco"><code>@​hiddeco</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2082">go-git/go-git#2082</a></li>
<li>build: Update module github.com/go-git/go-git/v5 to v5.19.0
[SECURITY] (releases/v5.x) by <a
href="https://github.com/go-git-renovate"><code>@​go-git-renovate</code></a>[bot]
in <a
href="https://redirect.github.com/go-git/go-git/pull/2111">go-git/go-git#2111</a></li>
<li>v5: git: Allow MkdirAll on worktree-root paths by <a
href="https://github.com/hiddeco"><code>@​hiddeco</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2117">go-git/go-git#2117</a></li>
<li>v5: git: Stop validating symlink target paths by <a
href="https://github.com/pjbgf"><code>@​pjbgf</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2116">go-git/go-git#2116</a></li>
<li>v5: plumbing: format decoder input bounds and contracts by <a
href="https://github.com/hiddeco"><code>@​hiddeco</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2125">go-git/go-git#2125</a></li>
<li>plumbing: format/packfile, cap delta chain depth in parser by <a
href="https://github.com/pjbgf"><code>@​pjbgf</code></a> in <a
href="https://redirect.github.com/go-git/go-git/pull/2137">go-git/go-git#2137</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/go-git/go-git/compare/v5.19.0...v5.19.1">https://github.com/go-git/go-git/compare/v5.19.0...v5.19.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/go-git/go-git/commit/3c3be601aa6c0fd0d536c0d1e4f898b4c60e65fe"><code>3c3be60</code></a>
Merge pull request <a
href="https://redirect.github.com/go-git/go-git/issues/2137">#2137</a>
from go-git/validate-v5</li>
<li><a
href="https://github.com/go-git/go-git/commit/3fba897bd9e84b1aec170fa708b80e297b7d6cf6"><code>3fba897</code></a>
plumbing: format/packfile, cap delta chain depth in parser</li>
<li><a
href="https://github.com/go-git/go-git/commit/a97d6601c85e017bb64c2b0f2e3169f6ef6a6709"><code>a97d660</code></a>
Merge pull request <a
href="https://redirect.github.com/go-git/go-git/issues/2125">#2125</a>
from hiddeco/v5/format-input-bounds</li>
<li><a
href="https://github.com/go-git/go-git/commit/aeaa125c8af8e4c4c95b574c22c5633e97fc436e"><code>aeaa125</code></a>
plumbing: format/objfile, require Header before Read</li>
<li><a
href="https://github.com/go-git/go-git/commit/1f38e171218526ea254a73187a52f0648253c1b8"><code>1f38e17</code></a>
plumbing: format/packfile, bound inflate size</li>
<li><a
href="https://github.com/go-git/go-git/commit/f7545a02529e03998d6a7219140dc0e6644ad337"><code>f7545a0</code></a>
plumbing: format/idxfile, bound nr by file size</li>
<li><a
href="https://github.com/go-git/go-git/commit/170b88181f385913a457a08b68c88956fb3f8e4f"><code>170b881</code></a>
Merge pull request <a
href="https://redirect.github.com/go-git/go-git/issues/2116">#2116</a>
from pjbgf/symlink-v5</li>
<li><a
href="https://github.com/go-git/go-git/commit/7b6d994467f06630268904aa3c441b6de7248b31"><code>7b6d994</code></a>
Merge pull request <a
href="https://redirect.github.com/go-git/go-git/issues/2117">#2117</a>
from hiddeco/v5/worktree-fs-mkdirall-root-noop</li>
<li><a
href="https://github.com/go-git/go-git/commit/f0709b32f8fbb87c16cd63c6762d2cd515f36541"><code>f0709b3</code></a>
git: Stop validating symlink target paths</li>
<li><a
href="https://github.com/go-git/go-git/commit/776d00f11d336f26862d0f2bab987b217f3a7844"><code>776d00f</code></a>
git: Allow MkdirAll on worktree-root paths</li>
<li>Additional commits viewable in <a
href="https://github.com/go-git/go-git/compare/v5.19.0...v5.19.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/go-git/go-git/v5&package-manager=go_modules&previous-version=5.19.0&new-version=5.19.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/coder/coder/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-19 16:20:21 +00:00
Michael Suchacz 47b90afce6 fix(coderd/x/chatd/chatadvisor): truncate oversized advisor questions (#25489)
Advisor tool calls currently reject questions over 2000 runes, which can
leave the parent model retrying the same invalid call.

This documents the limit in the advisor tool schema and guidance, then
truncates oversized questions rune-safely before building the nested
advisor prompt.

> Mux working on behalf of Mike.
2026-05-19 17:57:14 +02:00
Cian Johnston ce7f41f56d fix: bump MaxChatFileIDs from 20 to 50 (#25492)
Fixes CODAGT-456
2026-05-19 16:53:30 +01:00
Ethan 1e8c8d7dba fix(coderd/x/chatd): drop orphan provider tool calls on replay (#25491)
Anthropic replay can fail when stored history contains a
provider-executed tool call like `web_search` without the matching
provider-executed result. That orphaned call is incomplete
provider-internal state, so replaying it can make an otherwise usable
chat unreplayable even though there is no search result to preserve.

This fixes replay by dropping orphan provider-executed tool calls from
the model-visible prompt, preserving signed reasoning and the rest of
the assistant content, then revalidating before the request. We do not
synthesize tool results or drop reasoning. The database can retain the
historical artifact for inspection, while Anthropic only sees replayable
content.

This matches permissively licensed prior art. Vercel AI SDK
(Apache-2.0), used by mux, keeps incomplete tool state in UI/history but
omits it from model requests with `convertToModelMessages(..., {
ignoreIncompleteToolCalls: true })`. LangChain, LiteLLM, and OpenAI
Agents (MIT for the relevant open-source code) also preserve Anthropic
signed reasoning as opaque replay data. Coder applies that model-visible
replay boundary explicitly because our persisted history is already in
provider-message form.

This matches mux, is cleaner than the older idea around not persisting
the search query tool, and the model handles the repaired prompt fine.

Closes CODAGT-448

## Before

<img width="963" height="491" alt="image"
src="https://github.com/user-attachments/assets/a7788ebf-2728-4420-90cf-5e4f6905bdf7"
/>

## After

<img width="842" height="513" alt="image"
src="https://github.com/user-attachments/assets/ae39c262-7586-4e2d-b7db-1b639a7e8e15"
/>
2026-05-20 01:28:02 +10:00
Steven Masley 51b531f5b3 chore: 'go generate' mockgen to use go tool wrapper (#25490)
Calling `mockgen` relies on the executable in the `$PATH`. Using `go
tool` uses the one defined in `go.mod`
2026-05-19 14:53:13 +00:00
Steven Masley 1afc6d4fd0 feat: structured disconnect attribution for agent logs (#25191)
Implements
[PLAT-60](https://linear.app/codercom/issue/PLAT-60/enhance-disconnect-logs-with-structured-reason-attribution):
adds structured disconnect attribution to disconnect logs throughout the
agent and tailnet packages.

Every disconnect log site now carries structured slog fields. All
existing logs remain; existing messages are preserved with the fields
added alongside.

New fields on disconnect log lines:

- `connect_type` — which layer disconnected: `server_to_agent`,
`agent_to_client`, or `client_to_server`
- `disconnect_reason` — categorical reason: `graceful`, `network_error`,
`server_shutdown`, etc.
- `disconnect_expected` — whether the disconnect is normal operation
(`true`) or should be investigated (`false`)
- `disconnect_initiator` — who started it: `client`, `agent`, `server`,
or `network` (control-plane sites only)
- `disconnect_detail` — free-form supplemental info (where useful)

## What's covered

**Control plane (`server_to_agent`):** coordination RPC, DERP map
subscriber, agent runLoop, agent Close, `BasicCoordination.Close`,
`Controller.run`.

**Data plane (`agent_to_client`):** SSH sessions, reconnecting PTY,
JetBrains port-forwarding.

<details>
<summary>Control-plane sites</summary>

| Site | Reason | Initiator |
|---|---|---|
| `agent/agent.go` `runLoop` EOF | `network_error` | `network` |
| `agent/agent.go` `runCoordinator` deferred exit | `server_shutdown` /
`graceful` / `network_error` | `agent` / `server` / `network` |
| `agent/agent.go` `runDERPMapSubscriber` deferred exit | same (shared
`classifyCoordinatorRPCExit`) | same |
| `agent/agent.go` `Close` shutdown timeout | `server_shutdown` + detail
| `agent` |
| `agent/agent.go` `Close` clean coord disconnect | `server_shutdown` |
`agent` |
| `tailnet/controllers.go` `BasicCoordination.Close` | `graceful` or
`network_error` | `c.initiator` |
| `tailnet/controllers.go` `Controller.run` `net.ErrClosed` |
`network_error` | `network` |

</details>

<details>
<summary>Data-plane sites</summary>

| Site | Reason | Notes |
|---|---|---|
| `agent/agentssh/agentssh.go` SSH session closed | free-form
(`graceful`, `process exited with error status: N`, etc.) | Also sets
`closeCause("normal exit")` for clean exits so coderd's
`connection_log.DisconnectReason` is no longer empty |
| `agent/reconnectingpty/server.go` PTY closed | `server_shutdown`,
error string, or `graceful` | |
| `agent/agentssh/jetbrainstrack.go` channel closed | `normal close` or
error string | Previously passed empty reason |

</details>

<details>
<summary>Bug fix</summary>

The deferred `disconnected from coordination RPC` log no longer fires
when the initial `Coordinate()` RPC call fails before any connection is
established.

</details>

Refs PLAT-60.

---

_This PR was prepared by Coder Agents on behalf of @Emyrk._
**Manually QA'd a lot of common disconnects**

---------

Co-authored-by: Coder Agents <noreply@coder.com>
2026-05-19 09:47:03 -05:00
Michael Suchacz c9c933a300 chore: add dogfood skill (#25488) 2026-05-19 16:10:00 +02:00
Zach 6832ca3cd9 fix(testutil): use dedicated http.Client in OAuth2Config (#25407)
http.DefaultTransport is shared with httptest.Server, which calls
CloseIdleConnections on it during Close. Parallel subtests sharing this
transport could see their in-flight requests broken with 'net/http:
HTTP/1.x transport connection broken: http: CloseIdleConnections
called'. Most visibly this flaked TestExternalAuthCallback/ValidateURL.

Lazily create a dedicated http.Client per OAuth2Config so its idle
connection pool is not affected by unrelated httptest.Server.Close
calls.

Generated with assistance from Coder Agents.
2026-05-19 08:01:05 -06:00
Mathias Fredriksson a5d5f5b797 chore(pty/ptytest): log scanner errors during shutdown (#25485) 2026-05-19 13:26:01 +00:00
dependabot[bot] 0e36c78cc6 chore: bump the coder-modules group across 2 directories with 2 updates (#25480)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-19 11:00:34 +00:00
Bartek Gatz ba0df64390 chore(site): update Codernauts roster to 47 entries (#25427)
Replace the original 13-person roster with the full 47-person list,
sorted alphabetically by first name.

cc @DanielleMaywood for review

> [!NOTE]
> This PR was authored by Coder Agents.
2026-05-19 12:59:06 +02:00
Cian Johnston 85289464b6 fix(cli): remove unnecessary PTY from TestServerCreateAdminUser/Validates (#25444)
Fixes https://linear.app/codercom/issue/PLAT-224

The Validates subtest only checks that `Run()` returns a validation
error and never reads PTY output. We don't need it in this test, so
removing.

> 🤖 Generated by Coder Agents
2026-05-19 10:35:50 +01:00
Paweł Banaszewski c0b4180206 fix: fix race in setupInjectedToolTest (#25455)
Fixes race condition in `setupInjectedToolTest`.

To reproduce add short sleep to AsyncRecorder.RecordToolUsage method
(inside newly spawned go-routine):
https://github.com/coder/coder/blob/46821525f7d2f7466735463898fb6e054c169f85/aibridge/recorder/recorder.go#L254-L258

Upstream request counter can reach 2 while no recording has been done
since asyncRecorder does it asynchronously:
https://github.com/coder/coder/blob/46821525f7d2f7466735463898fb6e054c169f85/aibridge/internal/integrationtest/setupbridge.go#L242-L244

Added consuming request to `setupInjectedToolTest` so
`newInterceptionProcessor` handler finishes before returning from
`setupInjectedToolTest` which guarantees that all recordings are done:
https://github.com/coder/coder/blob/46821525f7d2f7466735463898fb6e054c169f85/aibridge/bridge.go#L282

Fixes: https://github.com/coder/internal/issues/1526
2026-05-19 09:36:38 +02:00
Ethan 9444eddf4e feat(coderd/x/chatd): allow attach_file in root plan-mode chats (#25388)
`attach_file` was registered for plan-mode turns but never added to
`builtinPlanToolAllowed`, so the per-turn `ActiveTools` allowlist
filtered it out and calls failed with `Tool not active in this turn:
attach_file`. This was an omission rather than a deliberate block — the
tool (#24280) landed shortly after plan mode (#24236) and no subsequent
edit to the allowlist picked it up.

Add `attach_file` under the `isRootChat` case, matching how other
artifact-producing tools (`propose_plan`, `write_file`, `edit_files`)
are gated. The tool only reads from the workspace and writes to
chat-attachment storage, so it preserves plan mode's invariant of not
making implementation changes to the workspace. Subagents in plan mode
remain restricted to the minimal read-only surface.
2026-05-19 17:01:23 +10:00
Ethan ca9e0a1a6b test: cache providers for external-agent and ai-task-app-id (#25378)
Removes `SkipCacheProviders: true` from the `external-agent` and
`ai-task-app-id` subtests of `TestProvision` so they go through
`testutil.CacheTFProviders` like every other coder/coder-using test.
Today both bypass the local provider mirror and hit
`registry.terraform.io` on every CI run, which flakes on transient 5xx
responses. The flag was originally added in #19286 as a workaround for
an unreleased provider build; that workaround has been stale since
`coder/coder v2.10.0` shipped.

This won't fix the flake outright. The first run after merge and any
future test-name/file-content change are still cache misses that go to
the registry. But in steady state on `main` the Actions cache will be
hit and `terraform init` runs fully offline, which should drop registry
exposure from ~every run to the small handful of cache-miss cases.

Relates to https://github.com/coder/internal/issues/1353
Relates to https://github.com/coder/internal/issues/1193
2026-05-19 16:47:22 +10:00
Rowan Smith 9cf359475b fix: update tailscale fork to fix TSMP/ICMP callback leak (#25469)
Updates `github.com/coder/tailscale` to
[`v1.1.1-0.20260519043957-6f014ff9434f`](https://github.com/coder/tailscale/commit/6f014ff9434f8c7c4b5b0b0450cbaf2e8b4a52af)
to include the fix from
[coder/tailscale#122](https://github.com/coder/tailscale/pull/122),
which ports the upstream
[tailscale/tailscale#18113](https://github.com/tailscale/tailscale/pull/18113)
fix for TSMP/ICMP callback leaks.

Fixes #25380

> Generated with [Coder Agents](https://coder.com) by @rowansmithau
2026-05-19 15:19:09 +10:00
Danielle Maywood 170a6e1fe9 feat: add chat sharing foundation (#25041) 2026-05-18 22:32:05 +01:00
Yevhenii Shcherbina 2732378da2 feat: audit group AI budget mutations (#25374)
Relates to
https://linear.app/codercom/issue/AIGOV-284/add-group-budgets-table-and-crud-api

Adds audit-log support for `group_ai_budget` mutations. Without it, an
admin could silently lower a spend limit from `$500` to `$50` or delete
a budget entirely, with no record of who performed the action.

Both write (`create-or-update`) and delete actions now produce audit log
entries, including before/after diffs for `spend_limit_micros`.

Depends on #25203.

## Old Version
<img width="1340" height="456" alt="image"
src="https://github.com/user-attachments/assets/e9ff52fb-a905-4aef-a4ee-7cdc58e68b75"
/>

## New Version (see
https://github.com/coder/coder/pull/25374/changes/9d22833de87cc106c24142c1d471a3f71872bf67)
<img width="1347" height="496" alt="image"
src="https://github.com/user-attachments/assets/1b9bbfa1-f86d-48e3-a0b1-266eb76f851f"
/>
2026-05-18 15:17:20 -04:00
Kyle Carberry 385146000b feat: record created_at/completed_at on reasoning ChatMessageParts (#24789)
Records reasoning start and end times on persisted reasoning
`ChatMessagePart`s so reasoning duration can be computed for stored
chats. Backend-only: no SSE changes and no frontend rendering ship in
this PR.

The `created_at` field on `ChatMessagePart` is extended to also be
present on `reasoning` parts (it previously appeared only on `tool-call`
and `tool-result`), and a new `completed_at` field is added for
`reasoning` parts.

### How timestamps are recorded

- `StreamPartTypeReasoningStart`: stamp `startedAt = dbtime.Now()` on
the active reasoning state.
- `StreamPartTypeReasoningEnd`: stamp `completedAt = dbtime.Now()` and
append both into parallel `[]time.Time` slices on `stepResult`.
- Persistence reads the slices in occurrence order (reasoning has no
provider-side ID) and applies them to the matching `ChatMessagePart` via
`buildAssistantPartsForPersist`. The first reasoning block's stamps go
onto the first reasoning part, and so on.
- `flushActiveState` flushes partial reasoning interrupted before
`StreamPartTypeReasoningEnd` with `startedAt` from the active state and
`completedAt = dbtime.Now()` at the interruption.

### Why two fields, not one?

Tool calls and results are point events. The frontend computes their
duration by subtracting the call's `created_at` from the result's
`created_at`. Reasoning is one assistant part that brackets a span, so
we record both endpoints on the part itself.

### Why not stamp in `PartFromContent`?

Same rationale as #24101: `PartFromContent` is called during both SSE
publishing and persistence. Stamping there would yield incorrect
persistence-time timestamps for reasoning blocks that finished much
earlier in the step. Instead we capture in the chatloop and apply during
persistence.

<details><summary>Implementation plan</summary>

- `codersdk/chats.go`: extend `CreatedAt`'s `variants` to include
`reasoning?`; add `CompletedAt *time.Time` with `variants:"reasoning?"`.
- `coderd/x/chatd/chatloop/chatloop.go`: extend `reasoningState` with
`startedAt`; extend `stepResult` and `PersistedStep` with parallel
`[]time.Time` reasoning slices; stamp on
`ReasoningStart`/`ReasoningEnd`; thread the slices through all
`PersistStep` call sites including the interrupt-safe path; record
partial reasoning in `flushActiveState`.
- `coderd/x/chatd/attachments.go`: walk reasoning parts in occurrence
order and apply `step.ReasoningStartedAt[i]` to `part.CreatedAt` and
`step.ReasoningCompletedAt[i]` to `part.CompletedAt`.

### Tests

- `codersdk/chats_test.go` round-trips `created_at` + `completed_at` on
reasoning parts and verifies omission when absent and partial
interrupted parts.
- `coderd/x/chatd/chatprompt/chatprompt_test.go` asserts
`PartFromContent(ReasoningContent{})` does NOT stamp timestamps.
- `coderd/x/chatd/chatloop/chatloop_test.go`
`TestRun_ReasoningTimestamps` drives a stream with two reasoning blocks
and verifies parallel slices, monotonicity, ordering, non-zero values,
and content-block ordering.
`TestRun_InterruptedReasoningFlushesTimestamps` cancels mid-reasoning
and verifies `flushActiveState` records a non-zero pair.
- `coderd/x/chatd/attachments_test.go` covers
`buildAssistantPartsForPersist` for normal interleaved reasoning,
partial (zero `completed_at`), and missing slices.

</details>

> Generated by Coder Agents.

Co-authored-by: Coder Agent <agent@coder.com>
2026-05-18 12:30:30 -04:00
Danielle Maywood 46821525f7 fix(site): refine execute tool transcript UI (#25432) 2026-05-18 14:44:43 +01:00