Commit Graph

287 Commits

Author SHA1 Message Date
Peter Steinberger
0402ae327e test: generate hook install archives 2026-05-06 02:39:15 +01:00
Peter Steinberger
538605ff44 [codex] Extract filesystem safety primitives (#77918)
* refactor: extract filesystem safety primitives

* refactor: use fs-safe for file access helpers

* refactor: reuse fs-safe for media reads

* refactor: use fs-safe for image reads

* refactor: reuse fs-safe in qqbot media opener

* refactor: reuse fs-safe for local media checks

* refactor: consume cleaner fs-safe api

* refactor: align fs-safe json option names

* fix: preserve fs-safe migration contracts

* refactor: use fs-safe primitive subpaths

* refactor: use grouped fs-safe subpaths

* refactor: align fs-safe api usage

* refactor: adapt private state store api

* chore: refresh proof gate

* refactor: follow fs-safe json api split

* refactor: follow reduced fs-safe surface

* build: default fs-safe python helper off

* fix: preserve fs-safe plugin sdk aliases

* refactor: consolidate fs-safe usage

* refactor: unify fs-safe store usage

* refactor: trim fs-safe temp workspace usage

* refactor: hide low-level fs-safe primitives

* build: use published fs-safe package

* fix: preserve outbound recovery durability after rebase

* chore: refresh pr checks
2026-05-06 02:15:17 +01:00
Vincent Koc
61383aff4b fix(hooks): avoid session memory filename collisions
Add collision suffixes for session-memory fallback filenames so repeated same-minute reset/new captures do not overwrite earlier archives.
2026-05-05 01:03:59 -07:00
Vincent Koc
5a0d6c7ad8 fix(gateway): keep reset and refresh paths responsive (#77701)
* fix(hooks): keep session memory slugging off reset hot path

* fix(hooks): run session memory capture asynchronously

* fix(cli): avoid stuck gateway command exits

* fix(gateway): cache empty read-only model catalog

* fix(doctor): stop stale TUI clients for WhatsApp responsiveness
2026-05-05 00:59:13 -07:00
Iroh
f126f72d63 fix(windows): resolve Gmail helper PATHEXT shims
Resolve Gmail setup and watcher helper binaries through Windows PATH/PATHEXT before spawning, without executing where.exe during lookup. Cover gcloud, gog, and tailscale, including the documented CLI Gmail run path, and route long-lived gog .cmd/.bat shims through a pinned cmd.exe wrapper.

Co-authored-by: Iroh <175496729+Angfr95@users.noreply.github.com>
Co-authored-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
2026-05-05 00:21:34 -05:00
simplyclever914
9de06e3dee Format compaction PR changes and validate locally
- apply oxfmt formatting to changed files
- keep replay-safety, typed hook, and changelog fixes
- validated targeted tests, oxfmt check, and check:changed locally
2026-05-03 14:43:13 +01:00
simplyclever914
cb4f4f5f3a Address compaction review feedback
- gate the compaction continuation retry on existing replay side-effect metadata
- type the bundled compaction notifier hook without explicit any
- add an Unreleased changelog entry
2026-05-03 14:43:13 +01:00
simplyclever914
e84ceb47f6 Make compaction visible and resume final replies
When an automatic compaction happens mid-turn, chat users currently see a long stall and the run can finish without a final visible answer.

This adds an optional bundled compaction notifier hook and a one-shot compacted-transcript continuation retry when a compaction produced no user-visible final payload.
2026-05-03 14:43:13 +01:00
amsminn
177fb7e84d fix: preserve slack hook alert content 2026-05-02 11:43:46 +01:00
Peter Steinberger
2f44ffc8a7 refactor: route plugin metadata consumers through snapshots 2026-05-02 08:41:24 +01:00
Peter Steinberger
238867ca51 refactor: trim hook helper exports 2026-05-02 07:27:05 +01:00
Peter Steinberger
4fd1b17cf0 refactor: trim hooks local exports 2026-05-01 23:12:53 +01:00
Pavan Kumar Gondhi
86251f4391 fix: block workspace CLOUDSDK_PYTHON override and always set trusted interpreter for gcloud (#74492)
* fix: address issue

* docs: add changelog entry for PR merge
2026-05-01 18:35:03 +05:30
Peter Steinberger
e816235c2d refactor: narrow dead reexports 2026-05-01 08:18:52 +01:00
Peter Steinberger
ad3e4dbcce refactor: trim unused exports 2026-05-01 07:55:40 +01:00
Peter Steinberger
42d73fd955 refactor: remove dead private helpers 2026-05-01 06:55:26 +01:00
Logan Ye
3af661384c fix(hooks): deduplicate boot-md startup tasks by workspaceDir (#74194) 2026-04-29 02:48:31 -07:00
Vincent Koc
b69b508d20 docs(hooks/bundled/readme): cover session compaction and message events
The bundled hooks README listed only command/agent/gateway events and
ended with a stale "More event types coming soon (session lifecycle,
agent errors, etc.)" line, but production code now triggers:

- session:compact:before / session:compact:after via
  src/agents/pi-embedded-runner/compaction-hooks.ts
- message:received via src/auto-reply/reply/dispatch-from-config.ts
- message:sent via src/infra/outbound/deliver.ts

Updates the "Event Types" list with the four real production event
names, drops the stale coming-soon line, and aligns the InternalHookEvent
interface example with the actual InternalHookEventType union (adds
"message" and refreshes the action examples). HOOK.md authors that target
session lifecycle or message routing now have a real surface to subscribe
to instead of relying on tribal knowledge or the type definitions.
2026-04-29 00:29:29 -07:00
Peter Steinberger
e27fe55aa8 refactor: simplify plugin cache boundaries 2026-04-29 04:33:15 +01:00
EVA
1adaa28dc8 [plugin sdk] Add generic plugin host-hook contracts (#72287)
Merged via squash.

Prepared head SHA: 68e5f2ce19
Co-authored-by: 100yenadmin <239388517+100yenadmin@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
2026-04-27 17:07:02 -07:00
Peter Steinberger
7f3f108521 refactor(config): migrate plugin config access 2026-04-27 12:35:58 +01:00
Vincent Koc
97e64196a0 fix(hooks): use local timezone for session-memory filenames (#72408) 2026-04-26 16:04:10 -07:00
Shakker
1a193b2d96 fix: scope cold plugin manifests to index 2026-04-26 03:47:45 +01:00
Peter Steinberger
4c0e9a4b2e fix(plugins): honor inferred agent model defaults 2026-04-25 19:40:32 +01:00
Peter Steinberger
b34ece705f fix: retire idle bundled MCP runtimes 2026-04-25 07:49:12 +01:00
Vincent Koc
8154337cb6 fix(whatsapp): emit message received hooks (#71217)
* fix(whatsapp): emit message received hooks

* fix(whatsapp): harden message received hooks
2026-04-24 13:05:10 -07:00
Vincent Koc
3bd2ee78b6 feat(plugins): expose hook correlation fields
Expose first-class hook correlation fields for plugin message and run lifecycle hooks, including frozen diagnostic trace copies for plugin-facing events.
2026-04-24 11:37:34 -07:00
Peter Steinberger
5d0887574b feat(plugin-sdk): add conversation binding hooks 2026-04-24 04:24:07 +01:00
Mariano
10a9acbf29 fix: keep root memory uppercase (#70621)
Thanks @mbelinky.
2026-04-23 16:10:36 +01:00
Peter Steinberger
1412ee8a85 test(hooks): remove duplicate loader cases 2026-04-23 11:31:47 +01:00
Peter Steinberger
39a907d7f4 test(hooks): drop unobservable loader smoke 2026-04-23 11:30:15 +01:00
Peter Steinberger
6488e0dd0c test: keep hook and slack tests on public boundaries 2026-04-22 19:09:18 +01:00
Vincent Koc
e593122465 fix(hooks): standardize outbound routing metadata 2026-04-22 10:53:44 -07:00
Ayaan Zaidi
81e0022b4d refactor(gateway): unify startup task execution 2026-04-22 21:31:19 +05:30
Peter Steinberger
0f4ec84a2c fix: fail closed on plugin integrity drift 2026-04-22 14:59:52 +01:00
Peter Steinberger
b70531bf24 docs: generalize core channel examples 2026-04-22 06:47:41 +01:00
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