Commit Graph

251 Commits

Author SHA1 Message Date
Peter Steinberger
d8cf947f6b perf(gateway): streamline startup sidecars 2026-04-20 20:52:42 +01:00
Peter Steinberger
cf7b906216 perf: defer unconfigured gateway hooks 2026-04-20 19:47:35 +01:00
Peter Steinberger
df525b90f2 chore(lint): enable unnecessary type parameter rule 2026-04-18 18:31:13 +01:00
Vincent Koc
dfed74b254 fix(hooks): honor configured ollama slug timeout (#66455) 2026-04-14 10:28:09 +01:00
Subash Natarajan
575202b06e fix(hooks): pass workspaceDir in gateway session reset internal hook context (#64735)
* fix(hooks): pass workspaceDir in gateway session reset internal hook context

The gateway path (performGatewaySessionReset) omitted workspaceDir when
creating the internal hook event, while the plugin hook path
(emitGatewayBeforeResetPluginHook) in the same file correctly resolved and
passed it.  This caused the session-memory handler to fall back to
resolveAgentWorkspaceDir from the session key, which for default-agent
keys resolves to the shared default workspace instead of the per-agent
workspace.  Daily notes and memory files were written to the wrong
workspace in multi-agent setups.

Closes #64528

* docs(changelog): add session-memory workspace reset note

* fix(changelog): remove conflict markers

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-14 02:19:07 +01:00
Ptah.ai
8c43768e27 fix: expose telegram topic names in agent context (#65973) (thanks @ptahdunbar)
* feat(telegram): expose forum topic names in agent context

Telegram Bot API does not provide a method to look up forum topic names
by thread ID. This adds an in-memory LRU cache that learns topic names
from service messages (forum_topic_created, forum_topic_edited,
forum_topic_closed, forum_topic_reopened) and seeds from
reply_to_message.forum_topic_created as a fallback for pre-existing
topics.

The resolved topic name is surfaced as:
- TopicName in MsgContext (available to {{TopicName}} in templates)
- topic_name in the agent prompt metadata block
- topicName in plugin hook event metadata

Includes unit tests for the topic-name-cache module (11 tests including
eviction and read-recency).

Known limitation: cache is in-memory only; after a restart it falls back
to the creation-time name until a rename event is observed.

* refactor(telegram): distill topic name flow

* fix: expose telegram topic names in agent context (#65973) (thanks @ptahdunbar)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-04-13 23:38:14 +05:30
Vincent Koc
97d1b88e3f fix(cycles): split plugin runtime contract leaf types 2026-04-11 15:39:32 +01:00
Vincent Koc
74e7b8d47b fix(cycles): bulk extract leaf type surfaces 2026-04-11 13:26:50 +01:00
Vincent Koc
7308e72fac fix(cycles): continue seam extraction 2026-04-11 10:43:22 +01:00
Peter Steinberger
780e0898b0 test: simplify typed conversions 2026-04-11 01:34:25 +01:00
Agustin Rivera
851294126b Redact Gmail watcher startup args from log tail (#62661)
* fix(logging): redact gmail watcher startup args

* fix(logging): normalize redaction formatting

* fix(logging): harden gmail watcher log redaction

* fix(logging): honor configured log tail redaction

* fix(logging): skip redact pattern resolution when off

* fix(logging): reuse compiled redact regexes

* chore: untrack USER.md (covered by .gitignore)

* chore: untrack USER.md (covered by .gitignore)

* fix(logging): avoid double-resolution in log-tail redaction

* fix(logging): redact across line boundaries for multiline patterns

* fix(logging): guard redactSensitiveLines against empty input

* chore(changelog): add Gmail watcher log redaction entry

---------

Co-authored-by: Devin Robison <drobison@nvidia.com>
2026-04-10 14:07:28 -06:00
Mariano
03e19c5436 fix(gateway): restore dreaming startup reconciliation (#64258)
* gateway: restore dreaming startup reconciliation

* gateway: harden dreaming startup reconciliation

---------

Co-authored-by: mbelinky <mbelinky@users.noreply.github.com>
2026-04-10 15:02:19 +02:00
Peter Steinberger
e0ad3e79e6 refactor: dedupe normalization lowercase helpers 2026-04-07 22:57:52 +01:00
Peter Steinberger
67dc6e82b9 refactor: dedupe misc lowercase helpers 2026-04-07 22:24:32 +01:00
Peter Steinberger
a5991e8017 refactor: dedupe approval and routing readers 2026-04-07 07:36:11 +01:00
Peter Steinberger
8c7dd66a7b refactor: dedupe string readers 2026-04-07 05:06:54 +01:00
Peter Steinberger
59eb291c6e refactor: dedupe string list helpers 2026-04-07 05:06:54 +01:00
Peter Steinberger
3d23103081 refactor: dedupe hook gateway error formatting 2026-04-07 02:03:34 +01:00
Peter Steinberger
8a40cd7ed4 refactor: dedupe core helper error formatting 2026-04-07 02:03:34 +01:00
Vincent Koc
79a0c71874 chore(lint): drop stale transcript type import 2026-04-06 17:06:18 +01:00
Vincent Koc
a797068206 refactor(lint): tighten channel and config defaults 2026-04-06 17:06:18 +01:00
Peter Steinberger
a8436f0220 fix: resolve rebased type drift 2026-04-06 17:02:10 +01:00
Peter Steinberger
9100923395 fix(ci): repair tsgo regressions 2026-04-06 16:53:21 +01:00
Vincent Koc
87b2a6a16a refactor(lint): type tool factories and runtime helpers 2026-04-06 16:53:02 +01:00
Vincent Koc
c109a7623b refactor(lint): type shared runtime seams 2026-04-06 16:46:08 +01:00
Peter Steinberger
c17985aa9f test: align hook install unsafe flag assertion 2026-04-04 05:27:57 +01:00
Peter Steinberger
64b971b2b0 fix: resolve config write test drift 2026-04-04 05:25:57 +01:00
Peter Steinberger
5b144655f2 test(ci): align channel defaults and clean stale hook tests 2026-04-04 04:51:33 +01:00
Peter Steinberger
6b003a7f2b refactor(cli): reuse install safety overrides 2026-04-04 12:35:58 +09:00
JD Davis
8a8ea94228 CLI: forward unsafe flag to linked hook-pack probes 2026-04-04 12:34:55 +09:00
Peter Steinberger
41e16a883b fix(cli): honor unsafe override for linked installs 2026-04-04 12:22:49 +09:00
Vincent Koc
4265a59892 fix(config): hide legacy internal hook handlers 2026-04-04 04:26:51 +09:00
Peter Steinberger
03a43fe231 refactor(plugins): genericize core channel seams 2026-04-03 19:09:21 +01:00
Peter Steinberger
ab96520bba refactor(plugins): move channel behavior into plugins 2026-04-03 19:09:20 +01:00
Vincent Koc
f911bbc353 refactor(plugins): separate activation from enablement (#59844)
* refactor(plugins): separate activation from enablement

* fix(cli): sanitize verbose plugin activation reasons
2026-04-03 03:22:37 +09:00
Peter Steinberger
0711cb4a05 fix(hooks): reduce registration log noise 2026-03-31 14:59:22 +01:00
fuller-stack-dev
235908c30e fix: support multi-kind plugins for dual slot ownership (#57507) (thanks @fuller-stack-dev)
* feat(plugins): support multi-kind plugins for dual slot ownership

* fix: address review feedback on multi-kind plugin support

- Use sorted normalizeKinds() for kind-mismatch comparison in loader.ts
  (fixes order-sensitive JSON.stringify for arrays)
- Derive slot-to-kind reverse mapping from SLOT_BY_KIND in slots.ts
  (removes hardcoded ternary that would break for future slot types)
- Use shared hasKind() helper in config-state.ts instead of inline logic

* fix: don't disable dual-kind plugin that still owns another slot

When a new plugin takes over one slot, a dual-kind plugin that still
owns the other slot must not be disabled — otherwise context engine
resolution fails at runtime.

* fix: exempt dual-kind plugins from memory slot disablement

A plugin with kind: ["memory", "context-engine"] must stay enabled even
when it loses the memory slot, so its context engine role can still load.

* fix: address remaining review feedback

- Pass manifest kind (not hardcoded "memory") in early memory gating
- Extract kindsEqual() helper for DRY kind comparison in loader.ts
- Narrow slotKeyForPluginKind back to single PluginKind with JSDoc
- Reject empty array in parsePluginKind
- Add kindsEqual tests

* fix: use toSorted() instead of sort() per lint rules

* plugins: include default slot ownership in disable checks and gate dual-kind memory registration
2026-03-31 10:06:48 +05:30
joelnishanth
f849b8de97 hooks: default hooks.internal.enabled to true so bundled hooks load on fresh installs
Made-with: Cursor
2026-03-30 22:00:54 +05:30
Peter Steinberger
fef688fb7a test: dedupe utility and config suites 2026-03-28 00:26:55 +00:00
Harold Hunt
7d18799bbe Hooks: pass inbound attachment arrays to plugins (#55452)
Merged via squash.

Prepared head SHA: 062f8d0513
Co-authored-by: huntharo <5617868+huntharo@users.noreply.github.com>
Reviewed-by: @huntharo
2026-03-27 17:23:24 -04:00
Ayaan Zaidi
765182dcc6 fix: skip session:patch hook clone without listeners 2026-03-25 16:12:39 +05:30
Gracie Gould
3e2e9bc238 fix: isolate session:patch hook payload (#53880) (thanks @graciegould)
* gateway: make session:patch hook typed and non-blocking

* gateway(test): add session:patch hook coverage

* docs(gateway): clarify session:patch security note

* fix: address review feedback on session:patch hook

Remove unused createInternalHookEvent import and fix doc example
to use inline event.type check matching existing hook examples.

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

* fix: isolate hook payload to prevent mutation leaking into response

Shallow-copy sessionEntry and patch in the session:patch hook event
so fire-and-forget handlers cannot mutate objects used by the
response path.

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

* fix: isolate session:patch hook payload (#53880) (thanks @graciegould)

---------

Co-authored-by: “graciegould” <“graciegould5@gmail.com”>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-25 15:59:38 +05:30
Peter Steinberger
4ee41cc6f3 refactor(cli): separate json payload output from logging 2026-03-22 23:19:17 +00:00
Peter Steinberger
f075e2eebd perf: lazy-load hook install runtime helpers 2026-03-22 21:52:42 +00:00
Jacob Tomlinson
2e246b47b9 docs: fix hook load order, command event payload, and session-memory confirmation 2026-03-22 21:09:36 +00:00
Peter Steinberger
e3151af6bc refactor(cli): extract hook pack update flow 2026-03-22 12:02:52 -07:00
Peter Steinberger
23a6e0ccd3 refactor: share remaining runtime listener state 2026-03-22 18:09:45 +00:00
Peter Steinberger
5cb2f45585 refactor(hooks): unify hook policy resolution 2026-03-22 09:59:51 -07:00
Peter Steinberger
42f23619e3 fix(hooks): harden workspace hook loading 2026-03-22 09:38:09 -07:00
Peter Steinberger
b70b7b0d94 test: trim more local test startup overhead 2026-03-22 09:35:36 +00:00