0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
Commit graph

17 commits

Author SHA1 Message Date
Dane - AI (Mastra)
cf92428a76
chore(deps): update docker images (#28011)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| amazon/aws-cli | minor | `2.36.44` → `2.39.1` |
| clickhouse/clickhouse-server | minor | `26.6.1.1193` → `26.10.3.7` |
| cr.weaviate.io/semitechnologies/weaviate | minor | `1.39.13` →
`1.40.3` |
|
[docker.elastic.co/elasticsearch/elasticsearch](https://www.elastic.co/products/elasticsearch)
([source](https://redirect.github.com/elastic/elasticsearch)) | minor |
`9.4.3` → `9.5.5` |
| edoburu/pgbouncer | minor | `v1.25.2-p0` → `v1.26.1-p0` |
|
[ghcr.io/shopify/toxiproxy](https://redirect.github.com/Shopify/toxiproxy)
| minor | `2.12.0` → `2.13.0` |
| inngest/inngest | minor | `v1.34.0` → `v1.49.0` |
| mcr.microsoft.com/azure-storage/azurite | minor | `3.35.0` → `3.37.0`
|
| [mongo](https://hub.docker.com/_/mongo)
([source](https://redirect.github.com/docker-library/mongo)) | patch |
`7.0.37` → `7.0.45` |
| pgvector/pgvector | patch | `0.8.4-pg16` → `0.8.7-pg16` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/9505) for more information.

---

### Release Notes

<details>
<summary>elastic/elasticsearch
(docker.elastic.co/elasticsearch/elasticsearch)</summary>

###
[`v9.5.5`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.5.5):
Elasticsearch 9.5.5

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.5.4...v9.5.5)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.5.5-release-notes>

###
[`v9.5.4`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.5.4):
Elasticsearch 9.5.4

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.5.3...v9.5.4)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.5.4-release-notes>

###
[`v9.5.3`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.5.3):
Elasticsearch 9.5.3

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.5.2...v9.5.3)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.5.3-release-notes>

###
[`v9.5.2`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.5.2):
Elasticsearch 9.5.2

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.5.1...v9.5.2)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.5.2-release-notes>

###
[`v9.5.1`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.5.1):
Elasticsearch 9.5.1

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.5.0...v9.5.1)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.5.1-release-notes>

###
[`v9.5.0`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.5.0):
Elasticsearch 9.5.0

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.4.8...v9.5.0)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.5.0-release-notes>

###
[`v9.4.8`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.4.8):
Elasticsearch 9.4.8

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.4.7...v9.4.8)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.4.8-release-notes>

###
[`v9.4.7`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.4.7):
Elasticsearch 9.4.7

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.4.6...v9.4.7)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.4.7-release-notes>

###
[`v9.4.6`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.4.6):
Elasticsearch 9.4.6

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.4.5...v9.4.6)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.4.6-release-notes>

###
[`v9.4.5`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.4.5):
Elasticsearch 9.4.5

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.4.4...v9.4.5)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.4.5-release-notes>

###
[`v9.4.4`](https://redirect.github.com/elastic/elasticsearch/releases/tag/v9.4.4):
Elasticsearch 9.4.4

[Compare
Source](https://redirect.github.com/elastic/elasticsearch/compare/v9.4.3...v9.4.4)

Downloads: <https://elastic.co/downloads/elasticsearch>
Release notes:
<https://www.elastic.co/docs/release-notes/elasticsearch#elasticsearch-9.4.4-release-notes>

</details>

<details>
<summary>Shopify/toxiproxy (ghcr.io/shopify/toxiproxy)</summary>

###
[`v2.13.0`](https://redirect.github.com/Shopify/toxiproxy/blob/HEAD/CHANGELOG.md#2130---2026-10-14)

[Compare
Source](https://redirect.github.com/Shopify/toxiproxy/compare/v2.12.0...v2.13.0)

- Reject slicer toxics with `average_size` <= 0 or `size_variation`
outside `[0, average_size]`,
and stop the slicer from recursing forever on degenerate sizes
([#&#8203;774](https://redirect.github.com/Shopify/toxiproxy/issues/774),
[@&#8203;iyaz-shaikh](https://redirect.github.com/iyaz-shaikh))
- Add optional bearer token auth for the HTTP API via
`TOXIPROXY_AUTH_TOKEN`, supported by the Go
client and `toxiproxy-cli`, and warn when the API is unauthenticated on
a non-loopback address

([#&#8203;774](https://redirect.github.com/Shopify/toxiproxy/issues/774),
[@&#8203;iyaz-shaikh](https://redirect.github.com/iyaz-shaikh))
- Fix removing a toxic hanging forever, and freezing the whole HTTP API,
when the downstream
toxic or connection is already gone
([#&#8203;760](https://redirect.github.com/Shopify/toxiproxy/issues/760),
[@&#8203;matheusgb](https://redirect.github.com/matheusgb))
- Fix the bandwidth toxic hanging or panicking when `rate` <= 0
([#&#8203;764](https://redirect.github.com/Shopify/toxiproxy/issues/764),
[@&#8203;jaideeppyne](https://redirect.github.com/jaideeppyne))
- Update go version to 1.27
([#&#8203;777](https://redirect.github.com/Shopify/toxiproxy/issues/777),
[@&#8203;The-Black-Fox](https://redirect.github.com/The-Black-Fox))
- Update various go packages

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 6am every weekday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend Renovate
CLI](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNzUuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjE5Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJhdXRvbWF0aW9uIl19-->

---------

Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-29 15:53:50 +00:00
Dane - AI (Mastra)
ac5d4354a7
chore(deps): update docker images (#19042) 2026-07-07 13:52:18 +02:00
Dane - AI (Mastra)
37e4076b2d
chore(deps): update pgvector/pgvector docker tag to v0.8.2 (#15527) 2026-04-20 15:30:36 +02:00
Taofeeq Oluderu
d63ffdbb2c
feat: background task execution for agents (#15307)
## Summary

Agents can now dispatch slow tool calls to run asynchronously while the
conversation keeps streaming. The LLM receives a placeholder result
immediately and continues generating; when the background tool finishes,
its result flows back into the loop (if still open) or the message list
for the LLM to process when queried.

```
User: "Research Solana for me, and what's Bitcoin's price?"

Agent: crypto-price runs synchronously → "Bitcoin is at $68,434"
       crypto-research dispatched to background → "I'm researching Solana…"
       (stream closes, UI shows 1 background task running)
       when background task is done, result is injected into the agent message list 
       UI shows 1 background task compeleted
//User can ask agent other question and even when background task is still running
User: what's the result of the research
Agent: agent processes solana research result → full analysis
```

## Architecture

Three subsystems working together:

1. **PubSub** (reuses the existing workflows pubsub) — two topics:
- `background-tasks` with group subscription so workers compete for each
dispatch / cancel message (only one worker picks up each task)
- `background-tasks-result` with fan-out so every process hears
lifecycle events (`task.running`, `task.completed`, `task.failed`,
`task.cancelled`, `task.output`)

Retries are delegated to the pubsub layer via `nack()` +
`deliveryAttempt` tracking — no manual re-dispatch on the manager.

2. **Storage** — new `BackgroundTasksStorage` domain. `TaskFilter`
supports status, agent / thread / resource / run / tool filters, date
range (`fromDate` / `toDate` / `dateFilterBy`), ordering, and pagination
(`page` / `perPage`). `listTasks()` returns `{ tasks, total }`.

3. **Agentic loop** — `tool-call-step` resolves bg config (LLM
`_background` override → agent → tool → manager defaults), dispatches
via `createBackgroundTask()`, and returns a placeholder.
`backgroundTaskCheckStep` pauses the loop between LLM iterations with
configurable `waitTimeoutMs` (Strategy B — process results as they
arrive). `isTaskCompleteStep` skips scoring while a task is still
pending.

## Key features

- **`createBackgroundTask(manager, options)`** — self-contained per-task
handle with `dispatch()`, `cancel()`, `waitForCompletion()`. Per-task
`TaskContext` (executor, `onChunk`, `onResult`, `onComplete`,
`onFailed`) is keyed by task ID so concurrent streams never share state.
- **Schema + prompt injection** — `_background` field added to
bg-eligible tool schemas (both JSON Schema and Zod) + generated system
prompt section listing bg-eligible tools and defaults.
- **HTTP API** — `/api/background-tasks/stream` (SSE),
`/api/background-tasks` (list with filters + pagination),
`/api/background-tasks/:taskId` (get by ID). The SSE route uses a
snapshot-then-tail pattern so clients can connect at any time and
receive the current state of running tasks before tailing live events.
- **Client SDK** — `client.listBackgroundTasks`,
`client.getBackgroundTask`, `client.streamBackgroundTasks` on
`MastraClient`.
- **Playground hook** — `useBackgroundTaskStream` accumulates events in
a `Record<taskId, BackgroundTaskEvent>` map with `runningTasks` /
`completedTasks` / `failedTasks` derivations. Wired into the studio so
users are notified when bg tool calls finish.
- **Progress streaming** — executor receives `onProgress(chunk)` for
tools that emit intermediate `tool-output` chunks during long-running
execution.
- **Recovery** — on startup, stale `running` tasks reset to pending (if
retries remain) or marked failed; orphaned `pending` tasks
re-dispatched.
- **Cleanup** — configurable TTLs for completed / failed task records
with a periodic interval.
- **Concurrency** — global + per-agent limits with `queue` / `reject` /
`fallback-sync` backpressure strategies.
- **Sub-agent awareness** — `listAgentTools` derives a
`ToolBackgroundConfig` from sub-agents whose tools or config enable
background execution, so the parent can dispatch the sub-agent
invocation itself as a background task. New
`agent.disableBackgroundTasks()` / `enableBackgroundTasks()` so a
sub-agent wrapped as a bg task doesn't also dispatch its own tools as
additional bg tasks.

## Configuration

Four levels, with the LLM override always winning:

```
LLM _background override in tool args   ← highest priority
        ↓
Agent backgroundTasks.tools config
        ↓
Tool background config
        ↓
Manager defaults
        ↓
Default: foreground, 5min timeout, 0 retries   ← lowest priority
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5 (Explain Like I'm 5)

This PR lets AI agents start slow tasks (like long web research) in the
background and keep talking to the user immediately. The agent returns a
small placeholder now, the background task runs separately, and its real
result is injected back into the conversation when it's ready.

---

## Summary

This PR implements a full background-task execution system for agents
that enables long-running tool calls to run asynchronously while
conversations continue streaming. It touches agent orchestration,
pub/sub, storage, HTTP APIs, client SDKs, UI/playground, and multiple
storage adapters.

Key components
- BackgroundTaskManager: queueing, dispatch, execution, retries,
cancellation, lifecycle events, concurrency controls (global +
per-agent), cleanup TTLs, startup recovery, streaming, and shutdown.
- Storage domain: new BackgroundTasksStorage abstraction with
list/filter/pagination; implementations added for InMemory, Postgres,
MongoDB, DynamoDB, LibSQL, MSSQL, ClickHouse, Cloudflare D1/DO/KV,
Convex, LanceDB, Upstash/Redis.
- Pub/Sub: reuses workflows pubsub with two topics (grouped
`background-tasks` for dispatch/cancel; fan-out
`background-tasks-result` for lifecycle events), adds deliveryAttempt
tracking and nack/redelivery; EventEmitterPubSub and Google Cloud PubSub
updated for grouped subscriptions and exactly-once semantics.
- Agent loop integration: tool-call-step resolves background config
(priority: per-call LLM _background override → agent → tool → manager),
creates per-task handles (dispatch/cancel/waitForCompletion), dispatches
tasks and returns placeholders; backgroundTaskCheckStep waits between
LLM iterations (configurable waitTimeoutMs, process-as-arrive strategy);
isTaskCompleteStep skips scoring while background pending; system prompt
and schema injection add optional _background per-call override.
- APIs and SDKs: server endpoints GET /api/background-tasks/stream (SSE
snapshot-then-tail), GET /api/background-tasks (list with
filters/pagination), GET /api/background-tasks/:taskId; MastraClient
additions: listBackgroundTasks, getBackgroundTask, streamBackgroundTasks
(robust SSE parsing).
- Playground & UI: useBackgroundTaskStream hook, thread/composer badges
showing running/completed/failed counts, tooling UI adjustments
(ToolBadge withoutArgs, tool-fallback handling).
- Types & stream chunks: new BackgroundTask types and agent chunk
variants: background-task-started, -completed, -failed, -progress; UI
metadata field runningBackgroundTasksCount updated accordingly.
- Examples & tests: example cryptoResearchAgent/cryptoPriceTool;
comprehensive tests added for manager, storage domains, server handlers,
client, pubsub group behavior, and end-to-end background task flows.

Defaults and behavior
- Background dispatch is opt-in (foreground by default).
- Default timeout: 5 minutes (300_000 ms); default retries: 0.
- Backpressure strategies: queue / reject / fallback-sync.
- Per-task context supports onProgress streaming, onResult injection,
and onComplete/onFailed callbacks.

Files and scope
- Adds background-tasks domain under packages/core and new storage
domains across multiple stores, updates pubsub implementations,
agent/workflow loop changes, server routes/schemas, client SDK
methods/tests, playground hook/UI, changesets, and a dev docker-compose
pubsub emulator for testing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 07:55:29 -07:00
Abhi Aiyer
302c3eec83
feat(pg): add halfvec type support for large dimension embeddings (#11002)
Adds `vectorType` option to PgVector's `createIndex()` for choosing
between full precision (`vector`) and half precision (`halfvec`)
storage.

Fixes #10999.

halfvec uses 2 bytes per dimension instead of 4, allowing indexes on
embeddings up to 4000 dimensions. Useful for models like
`text-embedding-3-large` (3072 dimensions).

```typescript
await pgVector.createIndex({
  indexName: 'large-embeddings',
  dimension: 3072,
  metric: 'cosine',
  vectorType: 'halfvec',
});
```

Also updates docker-compose files to use pgvector 0.8.0 (halfvec
requires >= 0.7.0).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added halfvec support for half-precision embeddings (2-byte dims),
enabling indexes up to 4,000 dimensions.
* Introduced optional vectorType parameter to choose 'vector' or
'halfvec' for an index.
  * Index metadata (describe/list) now reports the selected vectorType.

* **Bug Fixes / Validation**
* Added validation and clear error when halfvec is requested but not
supported.

* **Tests**
* Added comprehensive tests for halfvec detection, index creation,
queries, and operator selection.

* **Chores**
* Updated local Docker Compose pgvector image to 0.8.0 for halfvec
compatibility.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: NikAiyer <nick.aiyer@gmail.com>
2025-12-09 13:26:57 -06:00
Ehindero Israel
4bd54cd66a Update openApiSpecWriter example to display logs 2024-11-29 21:39:17 +01:00
Joshua Folorunsho
0bb407a707 update port 2024-11-29 11:19:44 +01:00
Joshua Folorunsho
7250b131b4 add redis to docker yaml 2024-11-29 10:08:04 +01:00
Joshua Folorunsho
f078485440 update docker compose file 2024-11-28 14:10:57 +01:00
Joshua Folorunsho
8eb41fb418 remove unused files 2024-11-28 14:09:29 +01:00
Joshua Folorunsho
803e5de72e rename kepler to mastra 2024-10-02 13:05:58 +01:00
Taofeeq Oluder
ea110409a8 arkw to kepler in packages/core 2024-09-12 17:05:54 +01:00
Andrew Bettke
244d44a03f FUTR-228: Update inngest docker containers to also discover apps running on port 3000. 2024-08-28 11:09:59 -04:00
Shane Thomas
4e6052ba1d Fix broken admin 2024-08-27 16:19:26 -05:00
Shane Thomas
9913b04029 More hacky fixes 2024-08-22 13:20:38 -07:00
Andrew Bettke
acda90f91e FUTR-67: Define callback route body. 2024-08-15 10:27:02 -04:00
Andrew Bettke
6980f7b6e6 FUTR-65: Setup local inngest dev server to test example function registration. 2024-08-14 11:14:44 -04:00