Commit Graph

3857 Commits

Author SHA1 Message Date
Peter Steinberger
f6205de73a refactor: split feishu helpers and tests 2026-03-24 17:12:25 -07:00
Peter Steinberger
5cdb50abe6 refactor: unify Google Generative AI normalization 2026-03-24 17:09:11 -07:00
Peter Steinberger
561acd1675 test: tighten shared card schema coverage 2026-03-24 17:04:07 -07:00
Tak Hoffman
639706f298 fix: ignore moved child rows in subagent status 2026-03-24 18:57:42 -05:00
Peter Steinberger
d4fda79ff7 fix: add merged message tool schema guardrail (#53715) (thanks @lndyzwdxhs) 2026-03-24 16:53:56 -07:00
Tak Hoffman
e48a0b80a8 fix: ignore moved subagent children on stale parents 2026-03-24 18:46:37 -05:00
Aria
63b0036248 fix: normalize baseUrl for custom Google Generative AI providers
Custom providers using `api: "google-generative-ai"` (e.g. a paid
Google tier) resolved in the model picker but failed at runtime with
HTTP 404 because the base URL lacked the required `/v1beta` path
segment and provider normalization was gated on the provider key
being exactly `"google"`.

Two targeted fixes, both keyed on the semantic `api` field rather
than provider name strings:

1. `models-config.providers.ts` — change the normalization gate from
   `normalizedKey === "google"` to
   `normalizedProvider?.api === "google-generative-ai"` and add
   `normalizeGoogleBaseUrl()` to ensure the canonical `/v1beta` suffix.

2. `pi-embedded-runner/model.ts` — apply
   `normalizeGoogleGenerativeAiBaseUrl()` in three resolution paths
   (`applyConfiguredProviderOverrides`, `buildInlineProviderModels`,
   fallback model construction) so the base URL is corrected at
   runtime regardless of how the model was discovered.

No changes to name-only call sites (`model-selection`,
`live-model-filter`, `model-forward-compat`); those paths are not
required for custom provider resolution and broadening their provider
checks would incorrectly capture unrelated providers like
`google-antigravity`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 16:42:56 -07:00
Peter Steinberger
6f6468027a refactor: dedupe test and runtime seams 2026-03-24 23:33:30 +00:00
Tak Hoffman
907b5254f6 fix: ignore stale rows in subagent kill cascade 2026-03-24 18:12:48 -05:00
Tak Hoffman
a03bbca4df fix: cascade bulk subagent kills past stale rows 2026-03-24 17:43:21 -05:00
Tak Hoffman
b6031a98e7 fix: ignore stale rows in subagent steer 2026-03-24 17:38:38 -05:00
Tak Hoffman
fee9d4cf37 fix: dedupe stale child completion announces 2026-03-24 17:25:14 -05:00
Tak Hoffman
2c5c5acb1b fix: ignore stale rows in subagent admin kill 2026-03-24 17:25:14 -05:00
Tak Hoffman
c90ae1ee7f fix: prefer latest subagent rows for session control 2026-03-24 17:25:14 -05:00
Tak Hoffman
b8a0258618 fix: ignore stale rows in subagent activity checks 2026-03-24 17:25:14 -05:00
Vincent Koc
e28b516fb5 fix(slack): trim DM reply overhead and restore Codex auto transport (#53957)
* perf(slack): instrument runtime and trim DM overhead

* perf(slack): lazy-init draft previews

* perf(slack): add turn summary diagnostics

* perf(core): trim repeated runtime setup noise

* perf(core): preselect default web search providers

* perf(agent): restore OpenAI auto transport defaults

* refactor(slack): drop temporary perf wiring

* fix(slack): address follow-up review notes

* fix(security): tighten slack and runtime defaults

* style(web-search): fix import ordering

* style(agent): remove useless spread fallback

* docs(changelog): note slack runtime hardening
2026-03-24 15:03:40 -07:00
Tak Hoffman
c541cde0f6 fix: dedupe restarted descendant session counts 2026-03-24 16:52:50 -05:00
Tak Hoffman
e24704d5eb fix: dedupe active child session counts 2026-03-24 16:52:50 -05:00
Peter Steinberger
23a4ae4759 refactor: dedupe test helpers and harnesses 2026-03-24 21:41:46 +00:00
Tak Hoffman
51e59983a1 fix: report deduped subagent totals 2026-03-24 16:13:25 -05:00
Tak Hoffman
69d6e95c2a fix: dedupe stale subagent rows in reply views 2026-03-24 16:07:19 -05:00
Peter Steinberger
bcd61f0a38 refactor: dedupe helpers and source seams 2026-03-24 21:00:36 +00:00
Tak Hoffman
caa718a554 fix: steer ended subagent orchestrators with live descendants 2026-03-24 15:27:19 -05:00
Tak Hoffman
e99c270684 fix: allow follow-up sends to finished subagents 2026-03-24 15:20:39 -05:00
Tak Hoffman
f6a0cdc25a fix: let subagent kill cascade through ended parents 2026-03-24 15:15:01 -05:00
Vincent Koc
aaf2d6359e fix(test): satisfy cli backend config typing 2026-03-24 13:06:20 -07:00
Devin Robison
c2fb7f1948 Adjust CLI backend environment handling before spawn (#53921)
security(agents): sanitize CLI backend env overrides before spawn
2026-03-24 12:58:10 -07:00
Tak Hoffman
231d62582f fix: prefer current subagent targets over stale rows 2026-03-24 14:38:34 -05:00
Peter Steinberger
4029ce738c test: speed up targeted unit suites 2026-03-24 19:36:08 +00:00
Tak Hoffman
91b1e41132 fix: ignore stale bulk subagent kill targets 2026-03-24 14:17:28 -05:00
Peter Steinberger
a4327ad544 refactor: dedupe tests and harden suite isolation 2026-03-24 19:16:19 +00:00
Tak Hoffman
870c52aac7 fix: ignore stale subagent send targets 2026-03-24 14:05:00 -05:00
Tak Hoffman
627ab895e2 fix: ignore stale subagent kill targets 2026-03-24 13:57:03 -05:00
Tak Hoffman
03ed0bccf1 fix: ignore stale subagent steer targets 2026-03-24 13:00:48 -05:00
scoootscooob
8633c7fa73 Providers: fix kimi fallback normalization 2026-03-24 10:58:03 -07:00
scoootscooob
9acb4c8fbc Providers: fix kimi-coding thinking normalization 2026-03-24 10:58:03 -07:00
Tak Hoffman
d25b4a2943 fix: fail closed when subagent steer remap fails 2026-03-24 12:55:43 -05:00
Tak Hoffman
7ab46301a9 fix: continue subagent kill after session store write failures 2026-03-24 12:46:58 -05:00
Peter Steinberger
822563d1ab fix: unify pi runner usage snapshot fallback 2026-03-24 10:33:18 -07:00
Vincent Koc
f2475a7f70 fix(slack): improve interactive reply parity (#53389)
* fix(slack): improve interactive reply parity

* fix(slack): isolate reply interactions from plugins

* docs(changelog): note slack interactive parity fixes

* fix(slack): preserve preview text for local agent replies

* fix(agent): preserve directive text in local previews
2026-03-24 10:23:10 -07:00
Peter Steinberger
398d58fb8a fix: stabilize logging config imports 2026-03-24 17:21:28 +00:00
Tak Hoffman
2990446b21 fix: avoid duplicate orphaned subagent resumes 2026-03-24 12:08:44 -05:00
Peter Steinberger
8e9e2d2f4e refactor(auth): unify external CLI credential sync 2026-03-24 10:03:00 -07:00
Tak Hoffman
129b1b5037 fix: return structured errors for subagent control send failures 2026-03-24 11:54:30 -05:00
giulio-leone
bbe6f7fdd9 fix(auth): protect fresher codex reauth state
- invalidate cached Codex CLI credentials when auth.json changes within the TTL window
- skip external CLI sync when the stored Codex OAuth credential is newer
- cover both behaviors with focused regression tests

Refs #53466

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 09:53:24 -07:00
Tak Hoffman
ada703a7b4 fix: preserve session cleanup hooks after subagent announce 2026-03-24 11:44:10 -05:00
Tak Hoffman
79ef86c305 fix: preserve cleanup hooks after subagent register failure 2026-03-24 11:32:19 -05:00
Tak Hoffman
3e9ff16645 fix(discord): avoid bundling pi-ai runtime deps 2026-03-24 11:17:08 -05: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