Commit Graph

349 Commits

Author SHA1 Message Date
Saurabh
afc649255c fix: match guild-level entries in Discord exec allowlist (#55175) 2026-03-26 16:56:58 -07:00
Peter Steinberger
bdeb7d859b test: stabilize discord monitor ci mocks 2026-03-26 23:54:59 +00:00
Peter Steinberger
d25c4fd6c5 test: tighten discord lifecycle gateway mocks 2026-03-26 23:44:43 +00:00
joelnishanth
5b85d0efa4 discord: fix stale-socket reconnect crash from uncaught reconnect-exhausted error 2026-03-26 16:33:43 -07:00
Peter Steinberger
22348914cf refactor: centralize discord gateway ownership 2026-03-26 23:25:27 +00:00
Peter Steinberger
bfad32aa16 refactor: share directory config listers 2026-03-26 23:20:26 +00:00
Peter Steinberger
5f2876911a fix: harden discord gateway cleanup (#55373) (thanks @Takhoffman) 2026-03-26 16:07:13 -07:00
Tak Hoffman
a79c9d50f7 fix(discord): guard gateway cleanup races 2026-03-26 16:07:13 -07:00
Peter Steinberger
d72115c9df refactor: genericize speech provider config surface 2026-03-26 22:48:57 +00:00
Peter Steinberger
2c6d099b01 refactor: plugin-own speech provider config 2026-03-26 22:28:24 +00:00
Tak Hoffman
d00dc5f46b fix(ci): repair discord and telegram follow-ups 2026-03-26 16:33:05 -05:00
Peter Steinberger
6aa9bec8d7 fix: export shared channel action enum helpers 2026-03-26 21:21:44 +00:00
Peter Steinberger
0c0f1e34cb refactor: split telegram polling and sdk surfaces 2026-03-26 21:13:16 +00:00
Tak Hoffman
0805078118 fix(ci): format discord provider follow-up 2026-03-26 16:05:25 -05:00
Tak Hoffman
aeee72426d fix(ci): restore discord provider test seams 2026-03-26 15:59:51 -05:00
Peter Steinberger
37894d0f1a test: dedupe discord provider proxy overrides 2026-03-26 20:43:02 +00:00
Tak Hoffman
53d3b8e92d fix(ci): clean up discord harness types 2026-03-26 15:39:20 -05:00
Tak Hoffman
a39e57a1bd fix(ci): repair discord harness regressions 2026-03-26 15:39:20 -05:00
Peter Steinberger
236e041ef9 test: share discord monitor fixtures 2026-03-26 20:12:21 +00:00
Tak Hoffman
b20ae13c6b fix(ci): repair discord message handler tests 2026-03-26 14:49:06 -05:00
Peter Steinberger
e8f9d68bec test: share cli command and discord test helpers 2026-03-26 19:37:14 +00:00
Tak Hoffman
53f15afade fix(ci): repair discord regression tests 2026-03-26 14:23:57 -05:00
Peter Steinberger
4069844795 refactor: share discord outbound session routing 2026-03-26 18:51:02 +00:00
Nimrod Gutman
a3b85e1583 fix(discord): force fresh gateway reconnects (#54697)
* fix(discord): force fresh gateway reconnects

* fix(discord): harden forced reconnect teardown

* fix(discord): retry after socket drain timeouts

* fix(discord): guard forced socket teardown

* fix(discord): stop cleanly during reconnect drain
2026-03-26 12:05:00 +02:00
Harold Hunt
3c3fd8c386 Discord: log rejected native command deploy failures (#54118)
Merged via squash.

Prepared head SHA: be250f9620
Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com>
Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com>
Reviewed-by: @huntharo
2026-03-25 09:19:46 -04:00
Peter Steinberger
b7f2b0d7b9 refactor: align pairing replies, daemon hints, and feishu mention policy 2026-03-25 04:22:53 -07:00
Peter Steinberger
8b80690a1a test: accept fenced discord pairing codes (#54058) (thanks @byungsker) 2026-03-24 23:09:04 -07:00
Peter Steinberger
57e2223eec test: align pairing reply assertions 2026-03-25 05:48:31 +00:00
Peter Steinberger
6c3e767289 refactor: centralize Discord gateway supervision 2026-03-24 22:47:12 -07:00
sfwn
9ab226d275 fix(discord): remove safety error listener after teardown to prevent leak 2026-03-24 22:31:03 -07:00
sfwn
731016472c fix(discord): prevent uncaught gateway errors from crashing the process
Move cleanup() after disconnect() in waitForDiscordGatewayStop so the
error listener is still active during disconnect. Add a safety error
listener in the lifecycle finally block to suppress late errors emitted
by Carbon during teardown.

Fixes the "Max reconnect attempts (0) reached after code 1006" uncaught
exception that kills the entire gateway process when a Discord WebSocket
drops and reconnection fails.
2026-03-24 22:31:03 -07:00
Peter Steinberger
fe84148724 test: collapse messaging target test suites 2026-03-25 04:52:36 +00:00
Ted Li
5799322d9e Discord: resolve /think autocomplete from session model (#49176)
* Discord: use session model for /think autocomplete

* Discord: use cached session store in think autocomplete

* Discord: align think autocomplete with effective bound route

* Discord: fix think autocomplete route-resolution test mocks

* Discord: stabilize think autocomplete CI coverage

* Discord: gate think autocomplete context behind auth

* Discord: share slash auth for think autocomplete

* Discord: localize think autocomplete auth gate

* Discord: drop think autocomplete auth gating

* Discord: align native autocomplete auth and route readiness

* Discord: use effective route for model picker

---------

Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-03-24 20:13:11 -05:00
Peter Steinberger
6f6468027a refactor: dedupe test and runtime seams 2026-03-24 23:33:30 +00:00
Peter Steinberger
3dc139b0c0 test: speed up discord monitor suites 2026-03-24 22:17:12 +00:00
Peter Steinberger
14e3c2de5f test: speed up discord channel suites 2026-03-24 21:48:07 +00:00
Peter Steinberger
23a4ae4759 refactor: dedupe test helpers and harnesses 2026-03-24 21:41:46 +00:00
Vincent Koc
783cbd1e9d fix(ci): refresh plugin sdk baseline and formatting 2026-03-24 11:45:37 -07:00
Bob
7fab2c2897 fix(discord): notify user on discord when inbound worker times out (#53823)
* fix(discord): notify user on discord when inbound worker times out.

* fix(discord): notify user on discord when inbound worker times out.

* Discord: await timeout fallback reply

* Discord: add changelog for timeout reply fix (#53823) (thanks @Kimbo7870)

---------

Co-authored-by: VioGarden <111024100+VioGarden@users.noreply.github.com>
Co-authored-by: Onur Solmaz <2453968+osolmaz@users.noreply.github.com>
2026-03-24 19:01:12 +01:00
Peter Steinberger
5edba12f79 test: speed up discord slack telegram suites 2026-03-24 16:26:58 +00:00
Tak Hoffman
3e9ff16645 fix(discord): avoid bundling pi-ai runtime deps 2026-03-24 11:17:08 -05:00
Peter Steinberger
1d4db9920d test: speed up discord extension suites 2026-03-24 15:57:16 +00:00
Peter Steinberger
781295c14b refactor: dedupe test and script helpers 2026-03-24 15:48:35 +00:00
David Guttman
aa91000a5d feat(discord): add autoThreadName 'generated' strategy (#43366)
* feat(discord): add autoThreadName 'generated' strategy

Adds async thread title generation for auto-created threads:
- autoThread: boolean - enables/disables auto-threading
- autoThreadName: 'message' | 'generated' - naming strategy
- 'generated' uses LLM to create concise 3-6 word titles
- Includes channel name/description context for better titles
- 10s timeout with graceful fallback

* Discord: support non-key auth for generated thread titles

* Discord: skip fallback auto-thread rename

* Discord: normalize generated thread title first content line

* Discord: split thread title generation helpers

* Discord: tidy thread title generation constants and order

* Discord: use runtime fallback model resolution for thread titles

* Discord: resolve thread-title model aliases

* Discord: fallback thread-title model selection to runtime defaults

* Agents: centralize simple completion runtime

* fix(discord): pass apiKey to complete() for thread title generation

The setRuntimeApiKey approach only works for full agent runs that use
authStorage.getApiKey(). The pi-ai complete() function expects apiKey
directly in options or falls back to env vars — it doesn't read from
authStorage.runtimeOverrides.

Fixes thread title generation for Claude/Anthropic users.

* fix(agents): return exchanged Copilot token from prepareSimpleCompletionModel

The recent thread-title fix (3346ba6) passes prepared.auth.apiKey to
complete(). For github-copilot, this was still the raw GitHub token
rather than the exchanged runtime token, causing auth failures.

Now setRuntimeApiKeyForCompletion returns the resolved token and
prepareSimpleCompletionModel includes it in auth.apiKey, so both the
authStorage path and direct apiKey pass-through work correctly.

* fix(agents): catch auth lookup exceptions in completion model prep

getApiKeyForModel can throw for credential issues (missing profile, etc).
Wrap in try/catch to return { error } for fail-soft handling rather than
propagating rejected promises to callers like thread title generation.

* Discord: strip markdown wrappers from generated thread titles

* Discord/agents: align thread-title model and local no-auth completion headers

* Tests: import fresh modules for mocked thread-title/simple-completion suites

* Agents: apply exchanged Copilot baseUrl in simple completions

* Discord: route thread runtime imports through plugin SDK

* Lockfile: add Discord pi-ai runtime dependency

* Lockfile: regenerate Discord pi-ai runtime dependency entries

* Agents: use published Copilot token runtime module

* Discord: refresh config baseline and lockfile

* Tests: split extension runs by isolation

* Discord: add changelog for generated thread titles (#43366) (thanks @davidguttman)

---------

Co-authored-by: Onur Solmaz <onur@textcortex.com>
Co-authored-by: Onur Solmaz <2453968+osolmaz@users.noreply.github.com>
2026-03-24 16:27:19 +01:00
Peter Steinberger
88f49c27a0 test: speed up discord extension suites 2026-03-24 15:16:18 +00:00
Vincent Koc
29ad211e76 fix(plugins): unblock Discord/Slack message tool sends and Feishu media (#52991)
* fix(plugins): unblock Discord and Slack message tool payloads

* docs(changelog): note Discord Slack and Feishu message fixes
2026-03-23 09:04:57 -07:00
Peter Steinberger
b393effba6 test: harden channel suite isolation 2026-03-23 12:57:43 +00:00
Peter Steinberger
fc9739313c test: harden channel suite isolation 2026-03-23 11:09:12 +00:00
Peter Steinberger
abf2157b18 fix: sync agent and autoreply e2e updates 2026-03-23 01:33:40 -07:00
Peter Steinberger
5f05c92922 test: harden no-isolate reply teardown 2026-03-23 00:37:32 -07:00