diff --git a/.changeset/card-links-open-session.md b/.changeset/card-links-open-session.md deleted file mode 100644 index 2629a17ef6c..00000000000 --- a/.changeset/card-links-open-session.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@mastra/factory': patch ---- - -Factory card links that agents post (in Slack threads, GitHub comments and tool results) now open the card's session directly, the same as clicking the card on its board. Before, they opened the board with the card highlighted in the list, so you had to find and click the card again. diff --git a/.changeset/clever-carpets-enter.md b/.changeset/clever-carpets-enter.md deleted file mode 100644 index 864bb4a742d..00000000000 --- a/.changeset/clever-carpets-enter.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'@mastra/factory': minor ---- - -Organization admins can now create skills for one Factory from Settings › Skills, without redeploying. Choose **New skill**, give it a name, description and instructions, and the Factory's sessions can load it from their next start. A phase of the Factory's boards can also run it as `runner.skill`. Created skills show a **Custom** badge and can be edited or deleted from the same page. Creating and deleting are recorded in the audit log as `factory.skill.created` and `factory.skill.deleted`. - -A board phase runs a created skill by its name, like any other skill: - -```ts -await factory.upsertBoard( - { - key: 'notes', - name: 'Release notes', - phases: [ - { key: 'queued', name: 'Queued', kind: 'resting', nextPhases: ['writing'] }, - { key: 'writing', name: 'Writing', kind: 'working', runner: { context: 'writer', skill: 'release-notes' }, nextPhases: ['done'] }, - { key: 'done', name: 'Done', kind: 'terminal' }, - ], - }, - // Each project listed must have created `release-notes`; a board for 'all' projects may only run the app's skills. - { projects: [{ orgId, factoryProjectId }] }, -); -``` - -If the app later ships a skill under the same name, the app's skill takes over the name and the Factory's text becomes an edit of it, which **Revert to original** removes. diff --git a/.changeset/flush-diff-lines.md b/.changeset/flush-diff-lines.md deleted file mode 100644 index c4411d48629..00000000000 --- a/.changeset/flush-diff-lines.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@mastra/playground-ui': patch ---- - -`CodeDiff` with a file header now shows its lines flush against the header and the card's bottom edge, so stacked diffs in a `CodeDiffList` read like a pull request with no blank band above the first line or below the last. The horizontal scrollbar only takes room when lines overflow, and none on platforms with overlay scrollbars. Diffs without a header keep their padding. diff --git a/.changeset/pre.json b/.changeset/pre.json index 1af639fe419..41985cc88f3 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -195,8 +195,7 @@ "@mastra/s3": "0.6.5", "@mastra/sprites": "0.1.2", "@mastra/vercel": "1.6.3", - "@mastra/json-render": "0.0.0", - "@mastra/platform": "0.1.0-alpha.0" + "@mastra/json-render": "0.0.0" }, "changesets": [ "@mastra_auth-better-auth-30464-dependencies", @@ -225,10 +224,8 @@ "create-factory-tag-lookup-errors", "cuddly-symbols-laugh", "curly-pillows-argue", - "curvy-nights-bet", "cute-swans-march", "daytona-sdk-package-rename", - "dry-worlds-sit", "durable-agent-replay-takeover", "durable-recover-processor-errors", "e2b-run-as-user-mount-owner", @@ -258,7 +255,6 @@ "factory-personal-custom-providers", "factory-phase-session-owner", "factory-pr-joins-external-card", - "factory-preferences-in-my-account", "factory-pull-request-reopen", "factory-recent-repos-picker", "factory-remove-provider-list-routes", @@ -295,7 +291,6 @@ "knowledge-host-move-page", "knowledge-reembed-existing", "knowledge-scope-values-no-colons", - "knowledge-store-scope-declarations", "late-falcons-listen", "lazy-suns-dream", "legal-spies-kiss", @@ -328,10 +323,6 @@ "plain-lands-refuse", "plain-search-groups", "plan-feedback-revises", - "platform-browser", - "platform-knowledge-listing-pins", - "platform-memory-initial", - "platform-memory-read-only-and-working-memory", "plenty-boats-travel", "plenty-buckets-relate", "plenty-clouds-search", diff --git a/.changeset/quiet-logs-arrive.md b/.changeset/quiet-logs-arrive.md deleted file mode 100644 index ba86c08b369..00000000000 --- a/.changeset/quiet-logs-arrive.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@mastra/otel-bridge': patch ---- - -Fixed Mastra logs being dropped by `OtelBridge` in apps on OpenTelemetry JS SDK 3. The bridge now finds a `LoggerProvider` registered through `@opentelemetry/api` (SDK 3) as well as one registered through `@opentelemetry/api-logs` (SDK 2), including when it is registered after the bridge is created. When no provider is registered, the bridge now says so once at debug level. Fixes [#29695](https://github.com/mastra-ai/mastra/issues/29695). diff --git a/.changeset/vast-parks-unite.md b/.changeset/vast-parks-unite.md deleted file mode 100644 index ab1ec12e0d0..00000000000 --- a/.changeset/vast-parks-unite.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'mastra': minor ---- - -Added `mastra api factory skill create` to create a skill for one Factory project. `mastra api factory skill update` now also updates a skill the project created, and `mastra api factory skill revert` deletes one. Only organization admins can create skills. - -```sh -mastra api factory skill create '{"name":"release-notes","content":"---\nname: release-notes\ndescription: Write release notes for a merged change\n---\n\n# Release notes\n"}' -``` diff --git a/client-sdks/client-js/CHANGELOG.md b/client-sdks/client-js/CHANGELOG.md index 58275b661c1..259d4cfb224 100644 --- a/client-sdks/client-js/CHANGELOG.md +++ b/client-sdks/client-js/CHANGELOG.md @@ -1,12 +1,5 @@ # @mastra/client-js -## 1.60.1-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - ## 1.60.1-alpha.5 ### Patch Changes diff --git a/client-sdks/client-js/package.json b/client-sdks/client-js/package.json index 69c40fc0d56..c49cdf68829 100644 --- a/client-sdks/client-js/package.json +++ b/client-sdks/client-js/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/client-js", - "version": "1.60.1-alpha.6", + "version": "1.60.1-alpha.5", "description": "The official TypeScript library for the Mastra Client API", "author": "", "type": "module", diff --git a/client-sdks/react/CHANGELOG.md b/client-sdks/react/CHANGELOG.md index 78123e64677..d0c193625ae 100644 --- a/client-sdks/react/CHANGELOG.md +++ b/client-sdks/react/CHANGELOG.md @@ -1,13 +1,5 @@ # @mastra/react -## 1.15.1-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/client-js@1.60.1-alpha.6 - ## 1.15.1-alpha.5 ### Patch Changes diff --git a/client-sdks/react/package.json b/client-sdks/react/package.json index 528fb72cbaf..1452ae643a6 100644 --- a/client-sdks/react/package.json +++ b/client-sdks/react/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/react", - "version": "1.15.1-alpha.6", + "version": "1.15.1-alpha.5", "repository": { "type": "git", "url": "git+https://github.com/mastra-ai/mastra.git", diff --git a/deployers/cloud/CHANGELOG.md b/deployers/cloud/CHANGELOG.md index d8e74d50130..f3674e28354 100644 --- a/deployers/cloud/CHANGELOG.md +++ b/deployers/cloud/CHANGELOG.md @@ -1,13 +1,5 @@ # @mastra/deployer-cloud -## 1.84.0-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/deployer@1.84.0-alpha.6 - ## 1.84.0-alpha.5 ### Patch Changes diff --git a/deployers/cloud/package.json b/deployers/cloud/package.json index 1508f332b90..4a2b88e1a25 100644 --- a/deployers/cloud/package.json +++ b/deployers/cloud/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/deployer-cloud", - "version": "1.84.0-alpha.6", + "version": "1.84.0-alpha.5", "description": "", "type": "module", "files": [ diff --git a/docs/src/content/en/integrations/observability/opentelemetry.mdx b/docs/src/content/en/integrations/observability/opentelemetry.mdx index 3c72c571eda..d2527be1ca8 100644 --- a/docs/src/content/en/integrations/observability/opentelemetry.mdx +++ b/docs/src/content/en/integrations/observability/opentelemetry.mdx @@ -13,13 +13,13 @@ Mastra supports OpenTelemetry (OTEL) through an exporter for sending traces and ## Exporter -The OpenTelemetry exporter sends your traces and logs using standardized [OpenTelemetry Semantic Conventions for GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/). This ensures broad compatibility with platforms like Agnost AI, Dash0, Datadog, Laminar, Latitude, MLflow, New Relic, Sazabi, Sentry, SigNoz, telemetry.dev, Traceloop, and more. +The OpenTelemetry exporter sends your traces and logs using standardized [OpenTelemetry Semantic Conventions for GenAI](https://opentelemetry.io/docs/specs/semconv/gen-ai/). This ensures broad compatibility with platforms like Datadog, New Relic, Sentry, SigNoz, MLflow, Latitude, Dash0, Traceloop, Laminar, telemetry.dev, Sazabi, Agnost AI, and more. ### Installation Each provider requires specific protocol packages. Install the base exporter plus the protocol package for your provider: -#### For HTTP/Protobuf providers (Agnost AI, Laminar, Latitude, MLflow, New Relic, Sentry, SigNoz, telemetry.dev) +#### For HTTP/Protobuf providers (SigNoz, New Relic, Sentry, Laminar, MLflow, Latitude, telemetry.dev, Agnost AI) ```bash npm2yarn npm install @mastra/otel-exporter@latest @opentelemetry/exporter-trace-otlp-proto @@ -31,7 +31,7 @@ npm install @mastra/otel-exporter@latest @opentelemetry/exporter-trace-otlp-prot npm install @mastra/otel-exporter@latest @opentelemetry/exporter-trace-otlp-grpc @grpc/grpc-js ``` -#### For HTTP/JSON providers (Sazabi, Traceloop) +#### For HTTP/JSON providers (Traceloop, Sazabi) ```bash npm2yarn npm install @mastra/otel-exporter@latest @opentelemetry/exporter-trace-otlp-http @@ -44,13 +44,129 @@ All providers support zero-config setup via environment variables. Set the appro | Provider | Environment Variables | | - | - | | Dash0 | `DASH0_API_KEY` (required), `DASH0_ENDPOINT` (required), `DASH0_DATASET` (optional) | -| Laminar | `LMNR_PROJECT_API_KEY` (required), `LAMINAR_ENDPOINT` (optional) | -| New Relic | `NEW_RELIC_LICENSE_KEY` (required), `NEW_RELIC_ENDPOINT` (optional) | | SigNoz | `SIGNOZ_API_KEY` (required), `SIGNOZ_REGION` (optional), `SIGNOZ_ENDPOINT` (optional) | +| New Relic | `NEW_RELIC_LICENSE_KEY` (required), `NEW_RELIC_ENDPOINT` (optional) | | Traceloop | `TRACELOOP_API_KEY` (required), `TRACELOOP_DESTINATION_ID`, `TRACELOOP_ENDPOINT` (optional) | +| Laminar | `LMNR_PROJECT_API_KEY` (required), `LAMINAR_ENDPOINT` (optional) | ### Provider configurations +#### Sentry + +[Sentry](https://sentry.io/) accepts OpenTelemetry traces and logs through its OTLP endpoints. In Sentry, open [**Project Settings** > **Client Keys (DSN)**](https://sentry.io/settings/projects/) and copy the OTLP traces endpoint and authentication header. Add both values to your environment: + +```bash title=".env" +SENTRY_OTLP_ENDPOINT=https://o000000.ingest.sentry.io/api/0000000/integration/otlp/v1/traces +SENTRY_OTLP_AUTH_HEADER="sentry sentry_key=..." +``` + +Use the `custom` provider with HTTP/Protobuf: + +```typescript title="src/mastra/index.ts" +new OtelExporter({ + provider: { + custom: { + endpoint: process.env.SENTRY_OTLP_ENDPOINT!, + protocol: 'http/protobuf', + headers: { + 'x-sentry-auth': process.env.SENTRY_OTLP_AUTH_HEADER!, + }, + }, + }, +}) +``` + +See [Sentry's OTLP documentation](https://docs.sentry.io/concepts/otlp/) for endpoint setup, supported signals, and current ingestion limits. + +Choose an exporter based on your setup: + +- `OtelExporter`: Sends vendor-neutral traces and logs over OTLP. Use it with an existing OpenTelemetry pipeline or when you want backend portability. +- [`SentryExporter`](/integrations/observability/sentry): Uses the Sentry SDK to map Mastra span types to Sentry operations, add AI monitoring attributes, and capture span errors as Sentry issues. + +#### MLflow + +[MLflow](https://mlflow.org/docs/latest/genai/tracing/integrations/listing/mastra) supports native Mastra tracing through its OTLP endpoint at `/v1/traces`. Use the `custom` provider with HTTP/Protobuf and include the experiment header so traces are routed to the correct MLflow experiment: + +```typescript title="src/mastra/index.ts" +new OtelExporter({ + provider: { + custom: { + endpoint: `${process.env.MLFLOW_TRACKING_URI}/v1/traces`, + protocol: 'http/protobuf', + headers: { + 'x-mlflow-experiment-id': process.env.MLFLOW_EXPERIMENT_ID, + }, + }, + }, +}) +``` + +#### Latitude + +[Latitude](https://latitude.so) is an open-source LLM observability and evaluation platform that ingests OTLP traces. Use the `custom` provider with HTTP/Protobuf, pointing at Latitude's ingestion endpoint and authenticating with your API key and project slug: + +```typescript title="src/mastra/index.ts" +new OtelExporter({ + provider: { + custom: { + endpoint: 'https://ingest.latitude.so/v1/traces', + protocol: 'http/protobuf', + headers: { + Authorization: `Bearer ${process.env.LATITUDE_API_KEY}`, + 'X-Latitude-Project': process.env.LATITUDE_PROJECT, + }, + }, + }, +}) +``` + +Sign up at [console.latitude.so](https://console.latitude.so/login), or self-host and point the endpoint at your own ingestion host. + +#### telemetry.dev + +[telemetry.dev](https://telemetry.dev) ingests OTLP/HTTP protobuf traces and normalizes OpenTelemetry GenAI semantic conventions into model, provider, token, latency, and cost fields. Use the `custom` provider with your project API key: + +```bash title=".env" +TELEMETRY_DEV_API_KEY=td_live_... +``` + +```typescript title="src/mastra/index.ts" +new OtelExporter({ + provider: { + custom: { + endpoint: 'https://ingest.telemetry.dev/v1/traces', + protocol: 'http/protobuf', + headers: { + Authorization: `Bearer ${process.env.TELEMETRY_DEV_API_KEY}`, + }, + }, + }, +}) +``` + +#### Sazabi + +[Sazabi](https://sazabi.com) is an AI-native observability platform that ingests OTLP traces. In Sazabi, add a Mastra log source and copy its intake URL. The URL carries your project key, so no auth header is needed: + +```bash title=".env" +SAZABI_INTAKE_URL=https://... +``` + +Use the `custom` provider with HTTP/JSON: + +```typescript title="src/mastra/index.ts" +new OtelExporter({ + provider: { + custom: { + endpoint: process.env.SAZABI_INTAKE_URL!, + protocol: 'http/json', + }, + }, +}) +``` + +See [Sazabi's Mastra guide](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/mastra) for the full setup. + #### Agnost AI [Agnost AI](https://agnost.ai) ingests OTLP/HTTP protobuf traces and groups them into conversations and users for production agent monitoring. Use the `custom` provider with your organization ID: @@ -149,6 +265,138 @@ Get your Dash0 endpoint from your dashboard. It should be in the format `ingress ::: +#### `SigNoz` + +[SigNoz](https://signoz.io/) is an open-source APM alternative with built-in Tracing support. + +##### Zero-Config Setup + +```bash title=".env" +# Required +SIGNOZ_API_KEY=your-api-key + +# Optional +SIGNOZ_REGION=us # 'us' | 'eu' | 'in' +SIGNOZ_ENDPOINT=https://my-signoz.example.com # For self-hosted +``` + +```typescript title="src/mastra/index.ts" +new OtelExporter({ provider: { signoz: {} } }) +``` + +##### Explicit Configuration + +```typescript title="src/mastra/index.ts" +new OtelExporter({ + provider: { + signoz: { + apiKey: process.env.SIGNOZ_API_KEY, + region: 'us', // 'us' | 'eu' | 'in' + // endpoint: 'https://my-signoz.example.com', // For self-hosted + }, + }, +}) +``` + +#### New Relic + +[New Relic](https://newrelic.com/) provides complete observability with AI monitoring capabilities. + +##### Zero-Config Setup + +```bash title=".env" +# Required +NEW_RELIC_LICENSE_KEY=your-license-key + +# Optional +NEW_RELIC_ENDPOINT=https://otlp.eu01.nr-data.net # For EU region +``` + +```typescript title="src/mastra/index.ts" +new OtelExporter({ provider: { newrelic: {} } }) +``` + +##### Explicit Configuration + +```typescript title="src/mastra/index.ts" +new OtelExporter({ + provider: { + newrelic: { + apiKey: process.env.NEW_RELIC_LICENSE_KEY, + // endpoint: 'https://otlp.eu01.nr-data.net', // For EU region + }, + }, +}) +``` + +#### Traceloop + +[Traceloop](https://www.traceloop.com/) specializes in LLM observability with automatic prompt tracking. + +##### Zero-Config Setup + +```bash title=".env" +# Required +TRACELOOP_API_KEY=your-api-key + +# Optional +TRACELOOP_DESTINATION_ID=my-destination +TRACELOOP_ENDPOINT=https://custom.traceloop.com +``` + +```typescript title="src/mastra/index.ts" +new OtelExporter({ provider: { traceloop: {} } }) +``` + +##### Explicit Configuration + +```typescript title="src/mastra/index.ts" +new OtelExporter({ + provider: { + traceloop: { + apiKey: process.env.TRACELOOP_API_KEY, + destinationId: 'my-destination', // Optional + }, + }, +}) +``` + +#### Laminar + +[Laminar](https://laminar.sh/) provides specialized LLM observability and analytics. + +##### Zero-Config Setup + +```bash title=".env" +# Required +LMNR_PROJECT_API_KEY=your-api-key + +# Optional +LAMINAR_ENDPOINT=https://api.lmnr.ai/v1/traces +``` + +```typescript title="src/mastra/index.ts" +new OtelExporter({ provider: { laminar: {} } }) +``` + +##### Explicit Configuration + +```typescript title="src/mastra/index.ts" +new OtelExporter({ + provider: { + laminar: { + apiKey: process.env.LMNR_PROJECT_API_KEY, + }, + }, +}) +``` + +:::tip Laminar-Native Exporter + +For Laminar-specific features like native span paths, metadata, and tags rendering in the Laminar dashboard, consider using the dedicated [`@mastra/laminar`](/integrations/observability/laminar) exporter instead. It provides optimized integration with Laminar's platform. + +::: + #### Datadog [Datadog](https://www.datadoghq.com/) APM provides application performance monitoring with distributed tracing. To send traces to Datadog via OTLP, you need the Datadog Agent running with OTLP ingestion enabled. @@ -217,254 +465,6 @@ For Datadog-specific features like automatic span type mapping, LLM span categor ::: -#### Laminar - -[Laminar](https://laminar.sh/) provides specialized LLM observability and analytics. - -##### Zero-Config Setup - -```bash title=".env" -# Required -LMNR_PROJECT_API_KEY=your-api-key - -# Optional -LAMINAR_ENDPOINT=https://api.lmnr.ai/v1/traces -``` - -```typescript title="src/mastra/index.ts" -new OtelExporter({ provider: { laminar: {} } }) -``` - -##### Explicit Configuration - -```typescript title="src/mastra/index.ts" -new OtelExporter({ - provider: { - laminar: { - apiKey: process.env.LMNR_PROJECT_API_KEY, - }, - }, -}) -``` - -:::tip Laminar-Native Exporter - -For Laminar-specific features like native span paths, metadata, and tags rendering in the Laminar dashboard, consider using the dedicated [`@mastra/laminar`](/integrations/observability/laminar) exporter instead. It provides optimized integration with Laminar's platform. - -::: - -#### Latitude - -[Latitude](https://latitude.so) is an open-source LLM observability and evaluation platform that ingests OTLP traces. Use the `custom` provider with HTTP/Protobuf, pointing at Latitude's ingestion endpoint and authenticating with your API key and project slug: - -```typescript title="src/mastra/index.ts" -new OtelExporter({ - provider: { - custom: { - endpoint: 'https://ingest.latitude.so/v1/traces', - protocol: 'http/protobuf', - headers: { - Authorization: `Bearer ${process.env.LATITUDE_API_KEY}`, - 'X-Latitude-Project': process.env.LATITUDE_PROJECT, - }, - }, - }, -}) -``` - -Sign up at [console.latitude.so](https://console.latitude.so/login), or self-host and point the endpoint at your own ingestion host. - -#### MLflow - -[MLflow](https://mlflow.org/docs/latest/genai/tracing/integrations/listing/mastra) supports native Mastra tracing through its OTLP endpoint at `/v1/traces`. Use the `custom` provider with HTTP/Protobuf and include the experiment header so traces are routed to the correct MLflow experiment: - -```typescript title="src/mastra/index.ts" -new OtelExporter({ - provider: { - custom: { - endpoint: `${process.env.MLFLOW_TRACKING_URI}/v1/traces`, - protocol: 'http/protobuf', - headers: { - 'x-mlflow-experiment-id': process.env.MLFLOW_EXPERIMENT_ID, - }, - }, - }, -}) -``` - -#### New Relic - -[New Relic](https://newrelic.com/) provides complete observability with AI monitoring capabilities. - -##### Zero-Config Setup - -```bash title=".env" -# Required -NEW_RELIC_LICENSE_KEY=your-license-key - -# Optional -NEW_RELIC_ENDPOINT=https://otlp.eu01.nr-data.net # For EU region -``` - -```typescript title="src/mastra/index.ts" -new OtelExporter({ provider: { newrelic: {} } }) -``` - -##### Explicit Configuration - -```typescript title="src/mastra/index.ts" -new OtelExporter({ - provider: { - newrelic: { - apiKey: process.env.NEW_RELIC_LICENSE_KEY, - // endpoint: 'https://otlp.eu01.nr-data.net', // For EU region - }, - }, -}) -``` - -#### Sazabi - -[Sazabi](https://sazabi.com) is an AI-native observability platform that ingests OTLP traces. In Sazabi, add a Mastra log source and copy its intake URL. The URL carries your project key, so no auth header is needed: - -```bash title=".env" -SAZABI_INTAKE_URL=https://... -``` - -Use the `custom` provider with HTTP/JSON: - -```typescript title="src/mastra/index.ts" -new OtelExporter({ - provider: { - custom: { - endpoint: process.env.SAZABI_INTAKE_URL!, - protocol: 'http/json', - }, - }, -}) -``` - -See [Sazabi's Mastra guide](https://docs.sazabi.com/catalogs/log-sources/send-to-an-endpoint/mastra) for the full setup. - -#### Sentry - -[Sentry](https://sentry.io/) accepts OpenTelemetry traces and logs through its OTLP endpoints. In Sentry, open [**Project Settings** > **Client Keys (DSN)**](https://sentry.io/settings/projects/) and copy the OTLP traces endpoint and authentication header. Add both values to your environment: - -```bash title=".env" -SENTRY_OTLP_ENDPOINT=https://o000000.ingest.sentry.io/api/0000000/integration/otlp/v1/traces -SENTRY_OTLP_AUTH_HEADER="sentry sentry_key=..." -``` - -Use the `custom` provider with HTTP/Protobuf: - -```typescript title="src/mastra/index.ts" -new OtelExporter({ - provider: { - custom: { - endpoint: process.env.SENTRY_OTLP_ENDPOINT!, - protocol: 'http/protobuf', - headers: { - 'x-sentry-auth': process.env.SENTRY_OTLP_AUTH_HEADER!, - }, - }, - }, -}) -``` - -See [Sentry's OTLP documentation](https://docs.sentry.io/concepts/otlp/) for endpoint setup, supported signals, and current ingestion limits. - -Choose an exporter based on your setup: - -- `OtelExporter`: Sends vendor-neutral traces and logs over OTLP. Use it with an existing OpenTelemetry pipeline or when you want backend portability. -- [`SentryExporter`](/integrations/observability/sentry): Uses the Sentry SDK to map Mastra span types to Sentry operations, add AI monitoring attributes, and capture span errors as Sentry issues. - -#### SigNoz - -[SigNoz](https://signoz.io/) is an open-source APM alternative with built-in Tracing support. - -##### Zero-Config Setup - -```bash title=".env" -# Required -SIGNOZ_API_KEY=your-api-key - -# Optional -SIGNOZ_REGION=us # 'us' | 'eu' | 'in' -SIGNOZ_ENDPOINT=https://my-signoz.example.com # For self-hosted -``` - -```typescript title="src/mastra/index.ts" -new OtelExporter({ provider: { signoz: {} } }) -``` - -##### Explicit Configuration - -```typescript title="src/mastra/index.ts" -new OtelExporter({ - provider: { - signoz: { - apiKey: process.env.SIGNOZ_API_KEY, - region: 'us', // 'us' | 'eu' | 'in' - // endpoint: 'https://my-signoz.example.com', // For self-hosted - }, - }, -}) -``` - -#### telemetry.dev - -[telemetry.dev](https://telemetry.dev) ingests OTLP/HTTP protobuf traces and normalizes OpenTelemetry GenAI semantic conventions into model, provider, token, latency, and cost fields. Use the `custom` provider with your project API key: - -```bash title=".env" -TELEMETRY_DEV_API_KEY=td_live_... -``` - -```typescript title="src/mastra/index.ts" -new OtelExporter({ - provider: { - custom: { - endpoint: 'https://ingest.telemetry.dev/v1/traces', - protocol: 'http/protobuf', - headers: { - Authorization: `Bearer ${process.env.TELEMETRY_DEV_API_KEY}`, - }, - }, - }, -}) -``` - -#### Traceloop - -[Traceloop](https://www.traceloop.com/) specializes in LLM observability with automatic prompt tracking. - -##### Zero-Config Setup - -```bash title=".env" -# Required -TRACELOOP_API_KEY=your-api-key - -# Optional -TRACELOOP_DESTINATION_ID=my-destination -TRACELOOP_ENDPOINT=https://custom.traceloop.com -``` - -```typescript title="src/mastra/index.ts" -new OtelExporter({ provider: { traceloop: {} } }) -``` - -##### Explicit Configuration - -```typescript title="src/mastra/index.ts" -new OtelExporter({ - provider: { - traceloop: { - apiKey: process.env.TRACELOOP_API_KEY, - destinationId: 'my-destination', // Optional - }, - }, -}) -``` - #### Custom/Generic OTEL Endpoints For other OTEL-compatible platforms or custom collectors: @@ -525,7 +525,7 @@ If the matching log exporter package isn't installed, log export is silently dis new OtelExporter({ // Provider configuration (required) provider: { - // Use one of: dash0, laminar, newrelic, signoz, traceloop, custom + // Use one of: dash0, signoz, newrelic, traceloop, laminar, custom }, // Per-signal toggles. Both default to true. @@ -577,10 +577,10 @@ Choose the right protocol package based on your provider: | - | - | - | | Dash0 | gRPC | `@opentelemetry/exporter-trace-otlp-grpc` | | Datadog | gRPC | `@opentelemetry/exporter-trace-otlp-grpc` | -| Laminar | HTTP/Protobuf | `@opentelemetry/exporter-trace-otlp-proto` | -| New Relic | HTTP/Protobuf | `@opentelemetry/exporter-trace-otlp-proto` | | SigNoz | HTTP/Protobuf | `@opentelemetry/exporter-trace-otlp-proto` | +| New Relic | HTTP/Protobuf | `@opentelemetry/exporter-trace-otlp-proto` | | Traceloop | HTTP/JSON | `@opentelemetry/exporter-trace-otlp-http` | +| Laminar | HTTP/Protobuf | `@opentelemetry/exporter-trace-otlp-proto` | | Custom | Varies | Depends on your collector | :::warning diff --git a/docs/src/content/en/reference/agents/durable-agent.mdx b/docs/src/content/en/reference/agents/durable-agent.mdx index b381f2a9544..5e7bf3a0aea 100644 --- a/docs/src/content/en/reference/agents/durable-agent.mdx +++ b/docs/src/content/en/reference/agents/durable-agent.mdx @@ -440,7 +440,7 @@ Returns: `boolean`. `true` when this process aborted the run locally or can see #### `abortThreadStream({ threadId, resourceId?, expectedRunId? })` -Aborts the active run on a memory thread with the same abort request as `abortRunStream()`. When this process runs the thread's active run, the abort applies here. When this process has observed the run through `subscribeToThread()`, the abort request is published to the process executing the run, and nothing stops in this process. When the process never saw the run, it looks the run up in the background through the thread's lease and asks the process executing it to stop, publishing the request over the shared PubSub. That lookup runs asynchronously. The method returns before the lookup finishes. The server route [`POST /agents/:agentId/threads/abort`](/reference/server/routes#thread-cancellation-routes) awaits the lookup when the abort wasn't resolved in this process, which is how it reports whether a run on another process was asked to stop. +Aborts the active run on a memory thread with the same abort request as `abortRunStream()`. The run is resolved from this process's thread runtime, so it must have been started here or observed through `subscribeToThread()` on this process. The server route `POST /agents/:agentId/threads/abort` uses this method. Pass `expectedRunId` when the request must only stop a specific run. If another queued run becomes active before the request is handled, the method returns `false` without aborting the successor. Omit `expectedRunId` to abort whichever run is active when the request is handled. @@ -452,7 +452,7 @@ const aborted = durableAgent.abortThreadStream({ }) ``` -Returns: `boolean`. `true` when this process aborted the run, or when the abort request was published to the process executing it. A published request doesn't confirm that the other process stopped the run. `false` is this process's own result: it had no run of the thread's to stop, the active run didn't match `expectedRunId`, or `localOnly: true` kept the abort local and left a run owned by another process alone. An `expectedRunId` mismatch and `localOnly: true` leave the run running by design. Otherwise `false` doesn't rule out a forwarded abort: the background lookup still publishes an abort request to the process holding the lease when it finishes, or finds nothing to publish. A failed lookup or publish is logged as a warning through the Mastra logger. Use the thread-abort route above when you need the forwarded outcome reported. +Returns: `boolean`. `false` when this process has no active run recorded for the thread or the active run doesn't match `expectedRunId`. No abort request is sent in either case. ### Recovery diff --git a/docs/src/content/en/reference/client-js/mastra-client.mdx b/docs/src/content/en/reference/client-js/mastra-client.mdx index 9de478a891e..1c34280cd35 100644 --- a/docs/src/content/en/reference/client-js/mastra-client.mdx +++ b/docs/src/content/en/reference/client-js/mastra-client.mdx @@ -56,7 +56,7 @@ You can also pass `requestContext` as a `Record`. name: 'retries', type: 'number', description: - "The number of times a request will be retried on failure before throwing an error. Retries apply to read requests (GET, HEAD, OPTIONS) by default, and to the observability queries that read server state even though they are sent as POST (aggregateTraces, aggregateSpans, queryTraceThreads, querySpans). Write requests (POST, PUT, PATCH, DELETE) are sent once unless you set `retries` here, so a server error can't repeat a state-changing request. Methods that accept request options, such as `createFeedback()` and `replaceFeedback()`, can also set `retries` per call, and that count takes precedence over this one. This count covers transport retries only: `createScore()`, `createFeedback()`, and `replaceFeedback()` also retry missing-trace and missing-span responses for up to 30 seconds unless you pass `anchorRetryTimeoutMs: 0`, as described in the observability reference under Signal write options.", + "The number of times a request will be retried on failure before throwing an error. Retries apply to read requests (GET, HEAD, OPTIONS) by default, and to the observability queries that read server state even though they are sent as POST (aggregateTraces, aggregateSpans, queryTraceThreads, querySpans). Write requests (POST, PUT, PATCH, DELETE) are sent once unless you set this explicitly, so a server error can't repeat a state-changing request.", isOptional: true, defaultValue: '3 for read requests, 0 for write requests', }, diff --git a/docs/src/content/en/reference/client-js/observability.mdx b/docs/src/content/en/reference/client-js/observability.mdx index 9940a39181c..e2d9ab0ce00 100644 --- a/docs/src/content/en/reference/client-js/observability.mdx +++ b/docs/src/content/en/reference/client-js/observability.mdx @@ -520,7 +520,7 @@ await mastraClient.replaceFeedback({ }) ``` -Use the normalized timestamp from the create response's `data` when available. OSS rejects changes to the original trace or timestamp with `409`. Platform uses the timestamp as part of record identity, so preserve it there too. The client preserves the replacement body across retries, but each accepted PUT retry is a new replacement and can supersede another edit. PUT requests get no transport retries by default, but a client configured with `retries` applies that count here too, and anchor retries stay on unless you turn them off. Pass `{ retries: 0, anchorRetryTimeoutMs: 0 }` as the second argument to disable both transport and anchor retries. `retries: 0` is only redundant when the client has no `retries` configured. +Use the normalized timestamp from the create response's `data` when available. OSS rejects changes to the original trace or timestamp with `409`. Platform uses the timestamp as part of record identity, so preserve it there too. The client preserves the replacement body across retries, but each accepted PUT retry is a new replacement and can supersede another edit. Pass `{ retries: 0, anchorRetryTimeoutMs: 0 }` as the second argument to disable automatic retries. ### Deleting feedback and scores diff --git a/explorations/longmemeval/CHANGELOG.md b/explorations/longmemeval/CHANGELOG.md index 4c5879ae698..e1e42689119 100644 --- a/explorations/longmemeval/CHANGELOG.md +++ b/explorations/longmemeval/CHANGELOG.md @@ -1,12 +1,5 @@ # @mastra/longmemeval -## 1.1.43-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - ## 1.1.43-alpha.5 ### Patch Changes diff --git a/explorations/longmemeval/package.json b/explorations/longmemeval/package.json index c86ccf7075f..6a8b5f54d28 100644 --- a/explorations/longmemeval/package.json +++ b/explorations/longmemeval/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/longmemeval", - "version": "1.1.43-alpha.6", + "version": "1.1.43-alpha.5", "description": "LongMemEval benchmark implementation for Mastra Memory", "scripts": { "test": "vitest", diff --git a/integrations/opencode/CHANGELOG.md b/integrations/opencode/CHANGELOG.md index d0af7db25ce..13aec392a11 100644 --- a/integrations/opencode/CHANGELOG.md +++ b/integrations/opencode/CHANGELOG.md @@ -1,12 +1,5 @@ # @mastra/opencode -## 0.1.43-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - ## 0.1.43-alpha.5 ### Patch Changes diff --git a/integrations/opencode/package.json b/integrations/opencode/package.json index 5829b3071b6..160397f5e4d 100644 --- a/integrations/opencode/package.json +++ b/integrations/opencode/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/opencode", - "version": "0.1.43-alpha.6", + "version": "0.1.43-alpha.5", "description": "OpenCode plugin for Mastra Observational Memory", "type": "module", "main": "./dist/index.js", diff --git a/mastracode/factory-ui/src/api/types.ts b/mastracode/factory-ui/src/api/types.ts index 8a539ac17ca..2e67ee10840 100644 --- a/mastracode/factory-ui/src/api/types.ts +++ b/mastracode/factory-ui/src/api/types.ts @@ -157,11 +157,8 @@ export interface FactorySkillInfo { description: string; /** SKILL.md body with the frontmatter removed. */ content: string; - /** - * Shipped with Factory, the app's `factory-skills/` folder, `MastraFactory({ skills })`, or `project` for a skill - * this Factory created. Absent from older servers. - */ - origin?: 'bundled' | 'folder' | 'code' | 'project'; + /** Shipped with Factory, the app's `factory-skills/` folder, or `MastraFactory({ skills })`. Absent from older servers. */ + origin?: 'bundled' | 'folder' | 'code'; /** True for a skill Factory ships, including when the app overrides it. Absent from older servers. */ builtIn?: boolean; /** Set when the SKILL.md fails runtime parsing/validation; the agent will not be able to load the skill. */ @@ -172,8 +169,6 @@ export interface FactorySkillInfo { edited?: { updatedBy: string; updatedAt: string }; /** True when the original SKILL.md changed since the project's edit was made. */ originalChanged?: boolean; - /** Set for a skill this Factory created (`origin: 'project'`): who saved it last, and when. */ - created?: { updatedBy: string; updatedAt: string }; } export interface FactorySkillsResponse { diff --git a/mastracode/factory-ui/src/hooks/useFactorySkills.ts b/mastracode/factory-ui/src/hooks/useFactorySkills.ts index 769da4bfd18..f342dbf738c 100644 --- a/mastracode/factory-ui/src/hooks/useFactorySkills.ts +++ b/mastracode/factory-ui/src/hooks/useFactorySkills.ts @@ -19,66 +19,42 @@ export function useFactorySkillsQuery(factoryProjectId?: string) { }); } -/** Sends one write to a project's skills and returns the skill it leaves, or null when it deleted the skill. */ -async function sendSkillWrite( +async function sendSkillEdit( baseUrl: string, - path: string, - method: 'POST' | 'PUT' | 'DELETE', - body?: Record, -): Promise { - const res = await fetch(`${baseUrl}${path}`, { - method, - credentials: 'include', - headers: { 'content-type': 'application/json', Accept: 'application/json' }, - ...(body ? { body: JSON.stringify(body) } : {}), - }); - const json = (await res.json().catch(() => undefined)) as - | { skill?: FactorySkillInfo | null; message?: string; error?: string } + factoryProjectId: string, + name: string, + init: { method: 'PUT'; content: string } | { method: 'DELETE' }, +): Promise { + const res = await fetch( + `${baseUrl}/web/factory/projects/${encodeURIComponent(factoryProjectId)}/skills/${encodeURIComponent(name)}`, + { + method: init.method, + credentials: 'include', + headers: { 'content-type': 'application/json', Accept: 'application/json' }, + ...(init.method === 'PUT' ? { body: JSON.stringify({ content: init.content }) } : {}), + }, + ); + const body = (await res.json().catch(() => undefined)) as + | { skill?: FactorySkillInfo; message?: string; error?: string } | undefined; - if (!res.ok || !json || json.skill === undefined) { - throw new Error(json?.message ?? json?.error ?? `Request failed (${res.status})`); + if (!res.ok || !body?.skill) { + throw new Error(body?.message ?? body?.error ?? `Request failed (${res.status})`); } - return json.skill; + return body.skill; } -const skillsPath = (factoryProjectId: string) => `/web/factory/projects/${encodeURIComponent(factoryProjectId)}/skills`; - -/** Refreshes the skills, and the boards, whose phases flag a skill that is missing. */ -function useInvalidateSkills(factoryProjectId: string | undefined) { - const queryClient = useQueryClient(); - return () => - Promise.all([ - queryClient.invalidateQueries({ queryKey: queryKeys.factorySkills(factoryProjectId) }), - queryClient.invalidateQueries({ queryKey: queryKeys.boardCatalog(factoryProjectId) }), - ]); -} - -/** - * Save (`content`) or revert (`content: null`) a project's edit of one skill. For a skill the project created, - * saving updates it and `content: null` deletes it. - */ +/** Save (`content`) or revert (`content: null`) a project's edit of one skill. */ export function useFactorySkillEditMutation(factoryProjectId: string | undefined) { const { baseUrl } = useApiConfig(); - const invalidate = useInvalidateSkills(factoryProjectId); + const queryClient = useQueryClient(); return useMutation({ mutationFn: ({ name, content }: { name: string; content: string | null }) => - sendSkillWrite( + sendSkillEdit( baseUrl, - `${skillsPath(factoryProjectId!)}/${encodeURIComponent(name)}`, - content === null ? 'DELETE' : 'PUT', - content === null ? undefined : { content }, + factoryProjectId!, + name, + content === null ? { method: 'DELETE' } : { method: 'PUT', content }, ), - onSuccess: invalidate, - }); -} - -/** Creates a skill for one Factory project. Mirrors `POST /web/factory/projects/:id/skills`. */ -export function useFactorySkillCreateMutation(factoryProjectId: string | undefined) { - const { baseUrl } = useApiConfig(); - const invalidate = useInvalidateSkills(factoryProjectId); - return useMutation({ - mutationFn: ({ name, content }: { name: string; content: string }) => - sendSkillWrite(baseUrl, skillsPath(factoryProjectId!), 'POST', { name, content }), - onSuccess: invalidate, + onSuccess: () => queryClient.invalidateQueries({ queryKey: queryKeys.factorySkills(factoryProjectId) }), }); } diff --git a/mastracode/factory-ui/src/ui/domains/boardConfig/__tests__/FactorySkillsSection.msw.test.tsx b/mastracode/factory-ui/src/ui/domains/boardConfig/__tests__/FactorySkillsSection.msw.test.tsx index 55c8a17905c..3b4431ccfb6 100644 --- a/mastracode/factory-ui/src/ui/domains/boardConfig/__tests__/FactorySkillsSection.msw.test.tsx +++ b/mastracode/factory-ui/src/ui/domains/boardConfig/__tests__/FactorySkillsSection.msw.test.tsx @@ -5,14 +5,13 @@ import { describe, expect, it } from 'vitest'; import { builtinBoardCatalog } from '../../../../../e2e/ui/board-catalog'; import { server } from '../../../../../e2e/ui/msw-server'; -import { TEST_BASE_URL, renderWithProviders, waitForMutationsIdle } from '../../../../../e2e/ui/render'; +import { TEST_BASE_URL, renderWithProviders } from '../../../../../e2e/ui/render'; import type { BoardCatalogResponse, FactorySkillInfo, FactorySkillsResponse } from '../../../../api/types'; import { FactorySkillsSection } from '../components/FactorySkillsSection'; const SKILLS_URL = `${TEST_BASE_URL}/web/factory/skills`; const BOARDS_URL = `${TEST_BASE_URL}/web/factory/projects/fp-1/boards`; const SKILL_URL = `${TEST_BASE_URL}/web/factory/projects/fp-1/skills/:name`; -const CREATE_URL = `${TEST_BASE_URL}/web/factory/projects/fp-1/skills`; const bundled = { origin: 'bundled', builtIn: true } as const; @@ -50,7 +49,7 @@ function serve({ const { content } = (await request.json()) as { content: string }; const name = String(params.name); writes.push({ method: 'PUT', name, content }); - if (!content.includes(`name: ${JSON.stringify(name)}\n`)) { + if (!content.includes(`name: ${name}\n`)) { return HttpResponse.json({ error: 'invalid_skill', message: 'name must match' }, { status: 400 }); } const description = JSON.parse(/^description: (.*)$/m.exec(content)![1]) as string; @@ -68,34 +67,9 @@ function serve({ ); return HttpResponse.json({ skill: current.find(skill => skill.name === name) }); }), - http.post(CREATE_URL, async ({ request }) => { - const { name, content } = (await request.json()) as { name: string; content: string }; - writes.push({ method: 'POST', name, content }); - if (current.some(skill => skill.name === name)) { - return HttpResponse.json( - { error: 'skill_exists', message: `A skill named "${name}" already exists. Edit it instead.` }, - { status: 409 }, - ); - } - const description = JSON.parse(/^description: (.*)$/m.exec(content)![1]) as string; - const created: FactorySkillInfo = { - name, - description, - content: content.slice(content.indexOf('\n---\n') + 5).trim(), - origin: 'project', - builtIn: false, - created: { updatedBy: 'admin-1', updatedAt: '2026-11-17T00:00:00.000Z' }, - }; - current = [...current, created]; - return HttpResponse.json({ skill: created }, { status: 201 }); - }), http.delete(SKILL_URL, ({ params }) => { const name = String(params.name); writes.push({ method: 'DELETE', name }); - if (current.find(skill => skill.name === name)?.origin === 'project') { - current = current.filter(skill => skill.name !== name); - return HttpResponse.json({ skill: null }); - } const original = catalog.find(skill => skill.name === name)!; current = current.map(skill => skill.name === name ? { ...original, edited: undefined, originalChanged: undefined } : skill, @@ -245,7 +219,7 @@ describe('FactorySkillsSection', () => { { method: 'PUT', name: 'changelog-lint', - content: '---\nname: "changelog-lint"\ndescription: "Our lint: check # first"\n---\n\n# Lint\n', + content: '---\nname: changelog-lint\ndescription: "Our lint: check # first"\n---\n\n# Lint\n', }, ]); expect(await within(card('changelog-lint')).findByText('Edited')).toBeInTheDocument(); @@ -383,125 +357,6 @@ describe('FactorySkillsSection', () => { }); }); - describe('creating a skill', () => { - it('creates a skill for this Factory and lists it as custom', async () => { - const { writes } = serve(); - const user = userEvent.setup(); - const { client } = renderSection(); - - await user.click(await screen.findByRole('button', { name: 'New skill' })); - const dialog = await screen.findByRole('dialog', { name: 'New skill' }); - const create = within(dialog).getByRole('button', { name: 'Create' }); - expect(create).toBeDisabled(); - await user.type(within(dialog).getByRole('textbox', { name: 'Name' }), 'release-notes'); - expect(create).toBeDisabled(); - await user.type(within(dialog).getByRole('textbox', { name: 'Description' }), 'Write notes: what # changed'); - await user.click(create); - - await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument()); - expect(writes).toEqual([ - { - method: 'POST', - name: 'release-notes', - content: '---\nname: "release-notes"\ndescription: "Write notes: what # changed"\n---\n\n\n', - }, - ]); - const created = await screen.findByRole('button', { name: /^release-notes/ }); - expect(within(created).getByText('Custom')).toBeInTheDocument(); - expect(within(card('changelog-lint')).queryByText('Custom')).not.toBeInTheDocument(); - await waitForMutationsIdle(client); - }); - - it('keeps an all-digit name a string in the SKILL.md it sends', async () => { - const { writes } = serve(); - const user = userEvent.setup(); - const { client } = renderSection(); - - await user.click(await screen.findByRole('button', { name: 'New skill' })); - const dialog = await screen.findByRole('dialog', { name: 'New skill' }); - await user.type(within(dialog).getByRole('textbox', { name: 'Name' }), '123'); - await user.type(within(dialog).getByRole('textbox', { name: 'Description' }), 'Numbered'); - await user.click(within(dialog).getByRole('button', { name: 'Create' })); - - await waitFor(() => expect(writes).toHaveLength(1)); - expect(writes[0]).toMatchObject({ method: 'POST', name: '123' }); - expect(writes[0].content).toMatch(/^---\nname: "123"\n/); - await waitForMutationsIdle(client); - }); - - it('explains a name agents cannot use and keeps Create disabled', async () => { - const { writes } = serve(); - const user = userEvent.setup(); - renderSection(); - - await user.click(await screen.findByRole('button', { name: 'New skill' })); - const dialog = await screen.findByRole('dialog', { name: 'New skill' }); - await user.type(within(dialog).getByRole('textbox', { name: 'Name' }), 'Release_Notes'); - await user.type(within(dialog).getByRole('textbox', { name: 'Description' }), 'Write release notes'); - - expect(within(dialog).getByText(/lowercase letters, digits, and single hyphens/)).toBeInTheDocument(); - expect(within(dialog).getByRole('button', { name: 'Create' })).toBeDisabled(); - expect(writes).toEqual([]); - }); - - it('shows why the server refused it and keeps the editor open', async () => { - serve(); - const user = userEvent.setup(); - const { client } = renderSection(); - - await user.click(await screen.findByRole('button', { name: 'New skill' })); - const dialog = await screen.findByRole('dialog', { name: 'New skill' }); - await user.type(within(dialog).getByRole('textbox', { name: 'Name' }), 'changelog-lint'); - await user.type(within(dialog).getByRole('textbox', { name: 'Description' }), 'Mine'); - await user.click(within(dialog).getByRole('button', { name: 'Create' })); - - expect(await within(dialog).findByRole('alert')).toHaveTextContent( - 'A skill named "changelog-lint" already exists. Edit it instead.', - ); - expect(screen.getByRole('dialog', { name: 'New skill' })).toBeInTheDocument(); - await waitForMutationsIdle(client); - }); - - it('offers no New skill to members who are not admins', async () => { - serve({ canEdit: false }); - renderSection(); - - expect(await screen.findByRole('button', { name: 'View configure-factory-rules' })).toBeInTheDocument(); - expect(screen.queryByRole('button', { name: 'New skill' })).not.toBeInTheDocument(); - }); - }); - - it('deletes a skill this Factory created once confirmed, and offers no revert for it', async () => { - const releaseNotes: FactorySkillInfo = { - name: 'release-notes', - description: 'Write release notes', - content: '# Notes', - origin: 'project', - builtIn: false, - created: { updatedBy: 'admin-1', updatedAt: '2026-11-17T00:00:00.000Z' }, - }; - const { writes } = serve({ catalog: [...skills, releaseNotes] }); - const user = userEvent.setup(); - const { client } = renderSection(); - - await user.click(await screen.findByRole('button', { name: 'Edit release-notes' })); - const dialog = await screen.findByRole('dialog', { name: 'Edit skill' }); - expect(within(dialog).queryByRole('button', { name: 'Revert to original' })).not.toBeInTheDocument(); - await user.click(within(dialog).getByRole('button', { name: 'Delete' })); - expect(within(dialog).getByText(/Delete release-notes\?/)).toBeInTheDocument(); - expect(writes).toEqual([]); - - // Keep backs out without deleting. - await user.click(within(dialog).getByRole('button', { name: 'Keep' })); - await user.click(within(dialog).getByRole('button', { name: 'Delete' })); - await user.click(within(dialog).getByRole('button', { name: 'Delete skill' })); - - await waitFor(() => expect(screen.queryByRole('dialog')).not.toBeInTheDocument()); - expect(writes).toEqual([{ method: 'DELETE', name: 'release-notes' }]); - await waitFor(() => expect(screen.queryByRole('button', { name: /^release-notes/ })).not.toBeInTheDocument()); - await waitForMutationsIdle(client); - }); - it('surfaces a load failure from the server', async () => { serve(); server.use(http.get(SKILLS_URL, () => HttpResponse.json({ error: 'boom' }, { status: 500 }))); diff --git a/mastracode/factory-ui/src/ui/domains/boardConfig/components/FactorySkillsSection.tsx b/mastracode/factory-ui/src/ui/domains/boardConfig/components/FactorySkillsSection.tsx index c3ca6dc5fb0..377b31ae655 100644 --- a/mastracode/factory-ui/src/ui/domains/boardConfig/components/FactorySkillsSection.tsx +++ b/mastracode/factory-ui/src/ui/domains/boardConfig/components/FactorySkillsSection.tsx @@ -17,7 +17,6 @@ import { FactorySkillEditorDialog } from '../../settings/components/FactorySkill import { IconFileText } from '@mastra/playground-ui/icons/central/IconFileText'; import { IconPencil } from '@mastra/playground-ui/icons/central/IconPencil'; import { IconCodeBrackets } from '@mastra/playground-ui/icons/central/IconCodeBrackets'; -import { IconPlusMedium } from '@mastra/playground-ui/icons/central/IconPlusMedium'; /** Skills some board's settings already show: the ones its phases run. None while the boards are unknown. */ function boardSkillNames(boards: InstalledBoardInfo[] | undefined): Set { @@ -68,7 +67,6 @@ function SkillCard({ skill, factoryId, canEdit }: { skill: FactorySkillInfo; fac {skill.builtIn && skill.origin !== undefined && skill.origin !== 'bundled' && ( Overridden by app )} - {skill.origin === 'project' && Custom} {skill.edited && Edited} {skill.error ? ( @@ -108,20 +106,6 @@ function SkillCard({ skill, factoryId, canEdit }: { skill: FactorySkillInfo; fac ); } -/** Opens the editor on a new skill; admins of an open Factory only. */ -function NewSkillButton({ factoryId }: { factoryId: string }) { - const [creating, setCreating] = useState(false); - - return ( -
- - {creating && setCreating(false)} />} -
- ); -} - /** * The skills no board phase runs. A skill a phase runs lives on that phase's page, so it isn't listed twice. */ @@ -136,7 +120,6 @@ export function FactorySkillsSection({ factoryId }: { factoryId?: string }) { return (
- {factoryId !== undefined && canEdit && } {loading && ( Loading skills… diff --git a/mastracode/factory-ui/src/ui/domains/boardConfig/components/PhaseConfig.tsx b/mastracode/factory-ui/src/ui/domains/boardConfig/components/PhaseConfig.tsx index af4aaf5544a..f9076fe2a9f 100644 --- a/mastracode/factory-ui/src/ui/domains/boardConfig/components/PhaseConfig.tsx +++ b/mastracode/factory-ui/src/ui/domains/boardConfig/components/PhaseConfig.tsx @@ -59,7 +59,6 @@ function SkillBadges({ skill, missing }: { skill?: FactorySkillInfo; missing: bo {missing && Not found} {skill?.error && Failed to load} {skill?.builtIn && skill.origin !== undefined && skill.origin !== 'bundled' && Overridden by app} - {skill?.origin === 'project' && Custom} {skill?.edited && Edited} ); diff --git a/mastracode/factory-ui/src/ui/domains/chat/components/TranscriptNotifications.tsx b/mastracode/factory-ui/src/ui/domains/chat/components/TranscriptNotifications.tsx index 3797602c7b4..4e3daecbbb1 100644 --- a/mastracode/factory-ui/src/ui/domains/chat/components/TranscriptNotifications.tsx +++ b/mastracode/factory-ui/src/ui/domains/chat/components/TranscriptNotifications.tsx @@ -1,11 +1,4 @@ -import { - Activity, - ActivityHeader, - ActivityIcon, - ActivityLabel, - NotificationActivity, -} from '@mastra/playground-ui/components/ai/activity'; -import { Badge } from '@mastra/playground-ui/components/Badge'; +import { NotificationActivity } from '@mastra/playground-ui/components/ai/activity'; import { Button } from '@mastra/playground-ui/components/Button'; import { Txt } from '@mastra/playground-ui/components/Txt'; import { cn } from '@mastra/playground-ui/utils/cn'; @@ -169,46 +162,8 @@ function WaitingSessionActions({ factoryId, waiting }: { factoryId: string; wait ); } -const NOTIFICATION_SOURCE_NAMES: Record = { - 'factory-session': 'Factory session', - github: 'GitHub', - gitlab: 'GitLab', - linear: 'Linear', - jira: 'Jira', - slack: 'Slack', -}; - -/** A readable name for a notification source; unknown sources fall back to their id in sentence case. */ -export function notificationSourceName(source: string): string { - if (Object.hasOwn(NOTIFICATION_SOURCE_NAMES, source)) return NOTIFICATION_SOURCE_NAMES[source]; - const words = source.replace(/[-_]+/g, ' ').trim(); - return words ? words.charAt(0).toUpperCase() + words.slice(1) : source; -} - export function NotificationSummaryCard({ entry }: { entry: NotificationSummaryEntry }) { - const sources = Object.entries(entry.bySource).filter(([, count]) => count > 0); - const counted = entry.pending > 0 && sources.length > 0; - const urgent = (entry.byPriority.urgent ?? 0) > 0 || (entry.byPriority.high ?? 0) > 0; - - return ( - - - - - - Notifications - - {counted ? `${entry.pending} new` : entry.message} - - {counted && - sources.map(([source, count]) => ( - - {sources.length > 1 ? `${notificationSourceName(source)} ${count}` : notificationSourceName(source)} - - ))} - - - ); + return ; } export function notificationMetadata(entry: MessageEntry): Array { diff --git a/mastracode/factory-ui/src/ui/domains/chat/components/__tests__/TranscriptNotifications.msw.test.tsx b/mastracode/factory-ui/src/ui/domains/chat/components/__tests__/TranscriptNotifications.msw.test.tsx index 7196cd9da9e..f84f8327594 100644 --- a/mastracode/factory-ui/src/ui/domains/chat/components/__tests__/TranscriptNotifications.msw.test.tsx +++ b/mastracode/factory-ui/src/ui/domains/chat/components/__tests__/TranscriptNotifications.msw.test.tsx @@ -56,80 +56,22 @@ describe('Transcript notifications', () => { }); describe('when pending notifications are summarized', () => { - it('says how many are new and names their source', () => { + it('puts the summary in the transcript under its own label', () => { renderEntries([ { kind: 'notification_summary', id: 'summary', - message: 'factory-session: 1', - pending: 1, - bySource: { 'factory-session': 1 }, - byPriority: { low: 1 }, - notificationIds: ['1'], + message: '2 pull requests and 1 issue need attention.', + pending: 3, + bySource: { github: 3 }, + byPriority: { high: 3 }, + notificationIds: ['1', '2', '3'], }, ]); - const summary = screen.getByRole('group', { name: 'Notification summary' }); - expect(summary).toHaveAttribute('data-notification-state', 'summary'); - expect(within(summary).getByText('Notifications')).toBeVisible(); - expect(within(summary).getByText('1 new')).toBeVisible(); - expect(within(summary).getByText('Factory session')).toBeVisible(); - expect(within(summary).queryByText('factory-session: 1')).not.toBeInTheDocument(); - expect(within(summary).queryByRole('button')).not.toBeInTheDocument(); - }); - - it('counts each source when several are pending, including ones it has no name for', () => { - renderEntries([ - { - kind: 'notification_summary', - id: 'summary', - message: 'github: 3, my-webhook: 1', - pending: 4, - bySource: { github: 3, 'my-webhook': 1 }, - byPriority: { high: 3, low: 1 }, - notificationIds: ['1', '2', '3', '4'], - }, - ]); - - const summary = within(screen.getByRole('group', { name: 'Notification summary' })); - expect(summary.getByText('4 new')).toBeVisible(); - expect(summary.getByText('GitHub 3')).toBeVisible(); - expect(summary.getByText('My webhook 1')).toBeVisible(); - }); - - it('falls back to the summary text when it carries no counts', () => { - renderEntries([ - { - kind: 'notification_summary', - id: 'summary', - message: 'No pending notifications', - pending: 0, - bySource: {}, - byPriority: {}, - notificationIds: [], - }, - ]); - - const summary = within(screen.getByRole('group', { name: 'Notification summary' })); - expect(summary.getByText('No pending notifications')).toBeVisible(); - }); - - it('names a source that collides with a built-in object key from its id', () => { - renderEntries([ - { - kind: 'notification_summary', - id: 'summary', - message: '__proto__: 1', - pending: 1, - bySource: JSON.parse('{"__proto__": 1}') as Record, - byPriority: { low: 1 }, - notificationIds: ['1'], - }, - ]); - - const summary = within(screen.getByRole('group', { name: 'Notification summary' })); - expect(summary.getByText('1 new')).toBeVisible(); - expect(summary.getByText('Proto')).toBeVisible(); + const notification = within(screen.getByRole('group', { name: 'Notification: Notification summary' })); + expect(notification.getByText('2 pull requests and 1 issue need attention.')).toBeVisible(); + expect(notification.queryByRole('button')).not.toBeInTheDocument(); }); }); }); diff --git a/mastracode/factory-ui/src/ui/domains/settings/components/FactorySkillEditorDialog.tsx b/mastracode/factory-ui/src/ui/domains/settings/components/FactorySkillEditorDialog.tsx index 37e049e425b..24f7de88238 100644 --- a/mastracode/factory-ui/src/ui/domains/settings/components/FactorySkillEditorDialog.tsx +++ b/mastracode/factory-ui/src/ui/domains/settings/components/FactorySkillEditorDialog.tsx @@ -14,31 +14,20 @@ import { SkillSimpleForm } from '@mastra/playground-ui/domains/skills/skill-simp import { useState } from 'react'; import type { FactorySkillInfo } from '../../../../api/types'; -import { useFactorySkillCreateMutation, useFactorySkillEditMutation } from '../../../../hooks/useFactorySkills'; +import { useFactorySkillEditMutation } from '../../../../hooks/useFactorySkills'; interface FactorySkillEditorDialogProps { - /** The skill to open; without one the dialog creates a new skill. */ - skill?: FactorySkillInfo; + skill: FactorySkillInfo; /** The Factory project whose copy of the skill is edited; without one the skill is view-only. */ factoryId?: string; canEdit: boolean; onClose: () => void; } -/** The names the server accepts: what agents call the skill by, and its folder name. */ -const SKILL_NAME_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/; -const MAX_SKILL_NAME_LENGTH = 64; - -function nameProblem(name: string): string | undefined { - if (name === '' || (SKILL_NAME_RE.test(name) && name.length <= MAX_SKILL_NAME_LENGTH)) return undefined; - return 'Use up to 64 lowercase letters, digits, and single hyphens, such as release-notes.'; -} - /** * Writes the editor's fields back as a SKILL.md. Values are JSON-quoted, which - * YAML reads as the same strings, so descriptions with `:` or `#` stay intact - * and a name such as `123` stays a string, and frontmatter fields the editor - * does not show are kept. + * YAML reads as the same strings, so descriptions with `:` or `#` stay intact, + * and frontmatter fields the editor does not show are kept. */ export function composeSkillMarkdown({ name, @@ -52,7 +41,7 @@ export function composeSkillMarkdown({ instructions: string; }): string { const fields = [ - `name: ${JSON.stringify(name)}`, + `name: ${name}`, `description: ${JSON.stringify(description)}`, ...Object.entries(frontmatter ?? {}).map(([key, value]) => `${key}: ${JSON.stringify(value)}`), ]; @@ -65,119 +54,77 @@ function viewOnlyReason(factoryId: string | undefined, canEdit: boolean): string return undefined; } -function dialogTitle(creating: boolean, readOnly: boolean): string { - if (creating) return 'New skill'; - return readOnly ? 'View skill' : 'Edit skill'; -} - /** - * Opens a Factory skill in the shared skill editor, or creates one. Admins save an edit for this Factory - * project, revert it to the original, or delete a skill this Factory created; everyone else views it. + * Opens a Factory skill in the shared skill editor. Admins save the edit for + * this Factory project or revert it to the original; everyone else views it. */ export function FactorySkillEditorDialog({ skill, factoryId, canEdit, onClose }: FactorySkillEditorDialogProps) { - const creating = skill === undefined; - const [name, setName] = useState(skill?.name ?? ''); - const [description, setDescription] = useState(skill?.description ?? ''); - const [instructions, setInstructions] = useState(skill?.content ?? ''); - const [confirmingDelete, setConfirmingDelete] = useState(false); + const [description, setDescription] = useState(skill.description); + const [instructions, setInstructions] = useState(skill.content); const edit = useFactorySkillEditMutation(factoryId); - const create = useFactorySkillCreateMutation(factoryId); - const pending = edit.isPending || create.isPending; - const error = create.error ?? edit.error; const readOnlyReason = viewOnlyReason(factoryId, canEdit); - const createdHere = skill?.origin === 'project'; - const changed = description !== (skill?.description ?? '') || instructions !== (skill?.content ?? ''); - const invalidName = creating ? nameProblem(name) : undefined; - const canCreate = name !== '' && !invalidName && description.trim() !== ''; - const markdown = () => composeSkillMarkdown({ name, description, frontmatter: skill?.frontmatter, instructions }); + const changed = description !== skill.description || instructions !== skill.content; - const save = () => edit.mutate({ name, content: markdown() }, { onSuccess: onClose }); - const submitCreate = () => create.mutate({ name, content: markdown() }, { onSuccess: onClose }); - const revert = () => edit.mutate({ name, content: null }, { onSuccess: onClose }); + const save = () => + edit.mutate( + { + name: skill.name, + content: composeSkillMarkdown({ name: skill.name, description, frontmatter: skill.frontmatter, instructions }), + }, + { onSuccess: onClose }, + ); + const revert = () => edit.mutate({ name: skill.name, content: null }, { onSuccess: onClose }); return ( !open && onClose()}> - {dialogTitle(creating, readOnlyReason !== undefined)} + {readOnlyReason ? 'View skill' : 'Edit skill'} {readOnlyReason ?? - (creating - ? 'The skill belongs to this Factory only. Agents can load it from their next session, and a board phase can run it.' - : 'Changes apply to this Factory only. Agents pick them up from their next session; running sessions keep the version they started with.')} + 'Changes apply to this Factory only. Agents pick them up from their next session; running sessions keep the version they started with.'}
- {skill?.edited && skill.originalChanged && ( + {skill.edited && skill.originalChanged && ( The original changed since this was edited. Revert to use the new original. )} setName(value.trim())} - nameReadOnly={!creating} + name={skill.name} + onNameChange={() => {}} + nameReadOnly description={description} onDescriptionChange={setDescription} instructions={instructions} onInstructionsChange={setInstructions} readOnly={readOnlyReason !== undefined} /> - {invalidName && ( - - {invalidName} - - )}
- {error && ( + {edit.error && ( - {error.message} + {edit.error.message} )} - {confirmingDelete ? ( - <> - - Delete {name}? Cards entering a phase that runs it won't start until the phase gets another skill. - - - - - ) : ( - <> - {readOnlyReason ? 'Close' : 'Cancel'} - {!readOnlyReason && skill?.edited && ( - - )} - {!readOnlyReason && createdHere && ( - - )} - {!readOnlyReason && creating && ( - - )} - {!readOnlyReason && !creating && ( - - )} - + {readOnlyReason ? 'Close' : 'Cancel'} + {!readOnlyReason && skill.edited && ( + + )} + {!readOnlyReason && ( + )}
diff --git a/mastracode/factory-ui/src/ui/pages/__tests__/CardDraftPage.msw.test.tsx b/mastracode/factory-ui/src/ui/pages/__tests__/CardDraftPage.msw.test.tsx index a0a01139f08..217eeb7882a 100644 --- a/mastracode/factory-ui/src/ui/pages/__tests__/CardDraftPage.msw.test.tsx +++ b/mastracode/factory-ui/src/ui/pages/__tests__/CardDraftPage.msw.test.tsx @@ -63,35 +63,6 @@ function renderAt(path: string) { return { router, ...renderWithProviders(, createQueryClient()) }; } -describe('a card with sessions', () => { - it("opens the thread of the session its current phase runs in, as a chat's link to the card does", async () => { - stubDraftRoute(); - server.use( - http.get(`${TEST_BASE_URL}/web/factory/projects/${FACTORY_ID}/work-items`, () => - HttpResponse.json({ - workItems: [ - { - ...linearCard, - stages: ['execute'], - sessions: { - triage: { sessionId: 'session-triage', threadId: 'thread-triage' }, - work: { sessionId: 'session-work', threadId: 'thread-work' }, - }, - }, - ], - }), - ), - ); - const { router } = renderAt(`/factories/${FACTORY_ID}/cards/${CARD_ID}`); - - await waitFor(() => - expect(router.state.location.pathname).toBe( - `/factories/${FACTORY_ID}/workspaces/session-work/threads/thread-work`, - ), - ); - }); -}); - describe('a card without a session', () => { it('opens on a draft titled after the card that creates nothing until the first prompt', async () => { const route = stubDraftRoute(); diff --git a/mastracode/factory/CHANGELOG.md b/mastracode/factory/CHANGELOG.md index 9211ee00385..718cd80014c 100644 --- a/mastracode/factory/CHANGELOG.md +++ b/mastracode/factory/CHANGELOG.md @@ -1,15 +1,5 @@ # @mastra/factory -## 0.29.0-alpha.7 - -### Patch Changes - -- The **Activity** sort in the Factory sidebar now orders sessions that share a status by their last update instead of their creation date, the same as **Last updated** does. An older session that was updated since no longer sinks below a newer one that was left alone. ([#30656](https://github.com/mastra-ai/mastra/pull/30656)) - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/code-sdk@1.19.1-alpha.7 - ## 0.29.0-alpha.6 ### Minor Changes diff --git a/mastracode/factory/README.md b/mastracode/factory/README.md index d192f6ceaad..58cb2cef3b1 100644 --- a/mastracode/factory/README.md +++ b/mastracode/factory/README.md @@ -772,7 +772,6 @@ A phase's `runner.skill` runs a skill when a card enters the phase. Use a built- 1. **Code skills** — passed to `new MastraFactory({ skills })`, created with `createSkill()` from `@mastra/core/skills`. 2. **Folder skills** — `src/mastra/factory-skills//SKILL.md` in your app. `mastra build` copies the folder into the build output. The older `src/mastra/public/factory-skills` still works; when both exist, `src/mastra/factory-skills` wins. Factory also looks in `public/factory-skills`, `factory-skills` and `output/factory-skills` under the working directory, and uses the first that exists. Supporting files, such as `references/`, can sit next to `SKILL.md`. 3. **Built-in skills** shipped with `@mastra/factory`. -4. **Factory skills** — skills an organization admin created for one Factory in Settings › Skills (see [Create skills for one Factory](#create-skills-for-one-factory)). They only fill names the first three don't use. A skill with the same name as a built-in skill replaces it, for the built-in boards too. A code skill replaces the whole folder skill of the same name, including its supporting files. Repository skills in a project's own repository never replace these. @@ -835,20 +834,6 @@ An edited skill shows an **Edited** badge. When the original changes after the e Saves and reverts are recorded in the audit log as `factory.skill.updated` and `factory.skill.reverted`. The API is `PUT` and `DELETE` on `/web/factory/projects/:id/skills/:name`, and `GET /web/factory/skills?projectId=` lists a Factory's skills with its edits. -### Create skills for one Factory - -Organization admins can also add a skill to one Factory without changing the app. Open Settings › Skills, choose **New skill**, enter a name, a description and instructions, and choose **Create**. The name uses 1–64 lowercase letters, digits and single hyphens, such as `release-notes`, and can't be one an app or built-in skill already uses; edit that skill instead. - -A created skill belongs to that Factory only and shows a **Custom** badge. Its sessions can load it from their next start, like any other skill, and a phase of its boards can run it as `runner.skill`. `factory.upsertBoard()` accepts a board that runs a created skill only when `projects` lists the projects, and each of them must have created it; a board for `'all'` projects may only run the app's skills. Choose **Edit** to change it, and **Delete** to remove it; a phase that runs a deleted skill shows it as missing, and cards entering that phase fail to start until you pick another skill. A repository skill with the same name is hidden in that Factory's sessions, as it is for app skills. - -If your app later ships a skill under the same name, the app's skill takes over the name and the Factory's text becomes an edit of it: it keeps applying, the editor notes that the original changed, and **Revert to original** switches to the app's skill. - -Creating and deleting are recorded in the audit log as `factory.skill.created` and `factory.skill.deleted`; changes to a created skill as `factory.skill.updated`. The API is `POST /web/factory/projects/:id/skills` with `{ "name", "content" }`, where `content` is the full `SKILL.md` whose frontmatter `name` matches; `PUT` and `DELETE` on `/web/factory/projects/:id/skills/:name` update and delete it. `GET /web/factory/skills?projectId=` lists created skills with `origin: "project"`. From the CLI: - -```bash -mastra api factory skill create '{"name":"release-notes","content":"---\nname: release-notes\ndescription: Write release notes for a merged change\n---\n\n# Release notes\n"}' -``` - ### Execute a custom board Custom boards can create linked items, start working roles, transition through bound tools, and react to completed tool results. Board and phase identifiers contain 1–128 letters, digits, underscores, or hyphens and start with a letter or digit. Identifiers are case-sensitive and cannot contain surrounding whitespace. diff --git a/mastracode/factory/package.json b/mastracode/factory/package.json index 134ab365c61..f9a3055c702 100644 --- a/mastracode/factory/package.json +++ b/mastracode/factory/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/factory", - "version": "0.29.0-alpha.7", + "version": "0.29.0-alpha.6", "description": "Mastra Software Factory module: the server core behind the Mastra Software Factory — storage domains, integrations, and surfaces for agent-powered software delivery", "type": "module", "publishConfig": { diff --git a/mastracode/factory/src/boards/board-writes.test.ts b/mastracode/factory/src/boards/board-writes.test.ts index 315a26f4304..bfab7a8d94c 100644 --- a/mastracode/factory/src/boards/board-writes.test.ts +++ b/mastracode/factory/src/boards/board-writes.test.ts @@ -5,14 +5,12 @@ import { join } from 'node:path'; import { LibSQLFactoryStorage } from '@mastra/libsql'; import { PgFactoryStorage } from '@mastra/pg'; -import { describe, expect, it, onTestFinished, vi } from 'vitest'; +import { describe, expect, it, onTestFinished } from 'vitest'; -import { projectSkillNamesOf } from '../skills/catalog.js'; import type { EmitAuditInput } from '../storage/domains/audit/domain.js'; import { StoredBoardsStorage } from '../storage/domains/boards/base.js'; import type { StoredPhaseInput } from '../storage/domains/boards/base.js'; import { FactoryProjectsStorage } from '../storage/domains/projects/base.js'; -import { SkillOverridesStorage } from '../storage/domains/skill-overrides/base.js'; import { WorkItemsStorage } from '../storage/domains/work-items/base.js'; import { BoardWriteError, BoardWrites } from './board-writes.js'; import type { BoardWriter } from './board-writes.js'; @@ -59,107 +57,20 @@ describe.each(['libsql', ...(postgresUrl ? ['postgres'] : [])])('board writes on const projects = factoryStorage.registerDomain(new FactoryProjectsStorage()); const workItems = factoryStorage.registerDomain(new WorkItemsStorage()); const storage = factoryStorage.registerDomain(new StoredBoardsStorage()); - const skillOverrides = factoryStorage.registerDomain(new SkillOverridesStorage()); await factoryStorage.init(); onTestFinished(() => factoryStorage.close()); const orgId = `org-${randomUUID()}`; const project = await projects.create({ orgId, userId: 'admin', input: { name: 'Acme' } }); const scope = { orgId, factoryProjectId: project.id }; - const boards = new ProjectBoardCache({ - codeRegistry: createBoardRegistry(), - storage, - projects, - projectSkills: projectSkillNamesOf(skillOverrides), - recheckMs: 0, - warn: () => {}, - }); + const boards = new ProjectBoardCache({ codeRegistry: createBoardRegistry(), storage, projects, warn: () => {} }); const audits: EmitAuditInput[] = []; const writer: BoardWriter = { id: 'admin', audit: async input => void audits.push(input) }; const writes = new BoardWrites({ storage, boards, workItems }); const served = async (key: string) => (await boards.describe(scope)).registry.get(key); - return { storage, workItems, skillOverrides, scope, boards, writes, writer, audits, served }; + return { storage, workItems, scope, boards, writes, writer, audits, served }; } - it("runs a skill the project created, and flags the phase once it's deleted", async () => { - const { writes, writer, scope, boards, skillOverrides } = await setup(); - const notes = { - key: 'notes', - name: 'Release notes', - phases: [ - { key: 'queued', name: 'Queued', kind: 'resting', nextPhases: ['writing'] }, - { - key: 'writing', - name: 'Writing', - kind: 'working', - runner: { context: 'writer', skill: 'release-notes' }, - nextPhases: ['done'], - }, - { key: 'done', name: 'Done', kind: 'terminal' }, - ], - } satisfies { key: string; name: string; phases: StoredPhaseInput[] }; - const skill = { orgId: scope.orgId, projectId: scope.factoryProjectId, skillName: 'release-notes' }; - - expect(await refusal(() => writes.create(scope, notes, writer))).toMatchObject({ - status: 422, - code: 'unknown_skill', - }); - - await skillOverrides.create({ - ...skill, - content: '---\nname: release-notes\ndescription: Write release notes\n---\n\n# Notes\n', - updatedBy: 'admin', - }); - await writes.create(scope, notes, writer); - expect((await boards.describe(scope)).details.get('notes')?.problems).toEqual([]); - - // Another project has no such skill. - const other = { orgId: scope.orgId, factoryProjectId: randomUUID() }; - expect(await boards.projectSkillNames(other)).toEqual(new Set()); - - await skillOverrides.delete(skill); - expect((await boards.describe(scope)).details.get('notes')?.problems).toEqual([ - expect.stringContaining("runs skill 'release-notes', but no such skill exists"), - ]); - }); - - it("fails a write with the storage error, not unknown_skill, when the project's skills can't be read", async () => { - const { writes, writer, scope, skillOverrides, storage } = await setup(); - vi.spyOn(skillOverrides, 'list').mockRejectedValueOnce(new Error('connection reset')); - await expect(writes.create(scope, bugs, writer)).rejects.toThrow('connection reset'); - expect(await storage.get(scope, 'bugs')).toBeNull(); - }); - - it("flags a created skill as missing only while the project's skills can't be read", async () => { - const { writes, writer, scope, boards, skillOverrides } = await setup(); - const project = { orgId: scope.orgId, projectId: scope.factoryProjectId }; - const create = (skillName: string) => - skillOverrides.create({ - ...project, - skillName, - content: `---\nname: ${skillName}\ndescription: A skill\n---\n\n# ${skillName}\n`, - updatedBy: 'admin', - }); - await create('release-notes'); - const runsNotes = { - ...bugs, - phases: bugs.phases.map(phase => - phase.key === 'fixing' ? { ...phase, runner: { context: 'work', skill: 'release-notes' } } : phase, - ), - }; - await writes.create(scope, runsNotes, writer); - const problems = async () => (await boards.describe(scope)).details.get('bugs')?.problems; - expect(await problems()).toEqual([]); - - // Another save moves the revision; the names read after it fails once. - await create('changelog'); - vi.spyOn(skillOverrides, 'list').mockRejectedValueOnce(new Error('connection reset')); - expect(await problems()).toEqual([expect.stringContaining("runs skill 'release-notes', but no such skill exists")]); - - // The revision hasn't moved since, but the next load reads the names again. - expect(await problems()).toEqual([]); - }); - it('creates a board, serves it at once, and records who did it', async () => { const { writes, writer, scope, audits, served } = await setup(); const row = await writes.create(scope, bugs, writer); diff --git a/mastracode/factory/src/boards/board-writes.ts b/mastracode/factory/src/boards/board-writes.ts index 7fb5dbccdc3..8de8de6ee11 100644 --- a/mastracode/factory/src/boards/board-writes.ts +++ b/mastracode/factory/src/boards/board-writes.ts @@ -37,10 +37,7 @@ import { workBoard } from './work.js'; export interface BoardWritesDeps { storage: StoredBoardsStorage; /** The per-project boards: the code boards and their seeds, skills, and the cache to invalidate. */ - boards: Pick< - ProjectBoardCache, - 'describe' | 'invalidate' | 'codeRegistry' | 'codeSkills' | 'projectSkillNames' | 'seedFor' - >; + boards: Pick; /** Read to refuse edits that would strand cards; the retired Review board's cards leave `review` through it. */ workItems: Pick; } @@ -123,12 +120,10 @@ export class BoardWrites { } /** - * Validates a definition the way `defineBoard()` does, plus the skills its runners name: the app's, - * and `projectSkills`, the skills the project it is stored in created. `null` leaves the runners' - * skills unchecked, for a caller that checks them per project. A code board's copy is also checked - * against the code behaviour of its board and phase keys. + * Validates a definition the way `defineBoard()` does, plus the skills its runners name. A code + * board's copy is also checked against the code behaviour of its board and phase keys. */ - validate(input: unknown, projectSkills?: ReadonlySet | null): StoredBoardInput { + validate(input: unknown): StoredBoardInput { const { boards } = this.deps; const parsed = storedBoardInputSchema.safeParse(input); if (!parsed.success) { @@ -142,8 +137,7 @@ export class BoardWrites { } } const board = code ? compileStoredBoard(parsed.data, code) : compileStoredBoard(parsed.data); - if (projectSkills === null) return parsed.data; - const problems = findBoardSkillProblems(boardRegistryOf([board]), boards.codeSkills, undefined, projectSkills); + const problems = findBoardSkillProblems(boardRegistryOf([board]), boards.codeSkills); const unknown = problems.filter(problem => problem.includes(UNKNOWN_SKILL)); if (unknown.length > 0) throw new BoardWriteError(422, { error: 'unknown_skill', message: unknown.join(' ') }); return parsed.data; @@ -153,7 +147,7 @@ export class BoardWrites { async create(scope: StoredBoardScope, input: unknown, writer: BoardWriter): Promise { const key = (input as { key?: unknown } | null)?.key; if (typeof key === 'string') this.refuseCodeBoard(key, 'create'); - const board = this.validate(input, await this.deps.boards.projectSkillNames(scope)); + const board = this.validate(input); // Factory stores its boards only into a project that has none, so they go in first. await this.deps.boards.describe(scope); const row = await stored(() => @@ -228,7 +222,7 @@ export class BoardWrites { // The project's first load stores Factory's boards. if (seed) await boards.describe(scope); const row = await this.existing(scope, key); - const input = this.validate({ key, ...definition }, await boards.projectSkillNames(scope)); + const input = this.validate({ key, ...definition }); if (row.revision === expectedRevision && sameBoardDefinition(row, input)) { return { row, written: false }; } diff --git a/mastracode/factory/src/boards/project-boards.ts b/mastracode/factory/src/boards/project-boards.ts index c58f6d42db0..c39e12bd0c6 100644 --- a/mastracode/factory/src/boards/project-boards.ts +++ b/mastracode/factory/src/boards/project-boards.ts @@ -123,24 +123,9 @@ interface CacheEntry { boards: ProjectBoards; version: string | null; reviewInUse: boolean; - /** The project's skill revision the boards' skill problems were checked at. */ - skillsRevision: number; checkedAt: number; } -/** - * The skills a project created (Settings › Skills), which its boards' runners may name besides the app's. - * `revision` moves whenever the project's skills change, so loads recheck the names only then. - */ -export interface ProjectSkillNames { - revision(scope: StoredBoardScope): Promise; - names(scope: StoredBoardScope): Promise>; -} - -const NO_PROJECT_SKILLS: ReadonlySet = new Set(); -/** Recorded when the project's skills couldn't be read; never a stored revision, so the next load rereads them. */ -const UNREAD_SKILLS_REVISION = -1; - export interface ProjectBoardCacheOptions { /** The code boards, built-ins included when enabled. */ codeRegistry: BoardRegistry; @@ -162,8 +147,6 @@ export interface ProjectBoardCacheOptions { ops: FactoryStorageOps, ) => Promise> | null>; codeSkills?: readonly InlineSkill[]; - /** The skills each project created. Without it, runners may only name the app's skills. */ - projectSkills?: ProjectSkillNames; /** * Whether the project still uses the retired Review board (an open card is stored on it). Such * a project is served Review alongside its boards; without this, no project is. @@ -230,7 +213,6 @@ export class ProjectBoardCache implements ProjectBoardSource { readonly #warned = new Set(); readonly #seeded = new Set(); readonly #codeSkills: readonly InlineSkill[]; - readonly #projectSkills: ProjectSkillNames | undefined; readonly #seeds: ReadonlyMap; /** Boards the app upserted for every project, which a project with no boards gets before Factory's. */ readonly #appBoards = new Map(); @@ -246,7 +228,6 @@ export class ProjectBoardCache implements ProjectBoardSource { this.#occupiedPhases = options.occupiedPhases; this.#projects = options.projects; this.#codeSkills = options.codeSkills ?? []; - this.#projectSkills = options.projectSkills; this.#recheckMs = options.recheckMs ?? DEFAULT_RECHECK_MS; this.#now = options.now ?? Date.now; this.#warn = options.warn ?? (message => console.warn(`[factory] ${message}`)); @@ -365,39 +346,6 @@ export class ProjectBoardCache implements ProjectBoardSource { return this.#codeSkills; } - /** - * The skills the project created, which its runners may name besides the app's. Throws when they can't be - * read, so a board write fails with the storage error instead of refusing a skill the project has. - */ - async projectSkillNames(scope: StoredBoardScope): Promise> { - return this.#projectSkills ? this.#projectSkills.names(scope) : NO_PROJECT_SKILLS; - } - - /** - * The names for a load, or undefined when they can't be read: the load still serves the boards, flags their - * created skills as missing, and doesn't cache what it compiled without them. - */ - async #readProjectSkillNames(scope: StoredBoardScope): Promise | undefined> { - try { - return await this.projectSkillNames(scope); - } catch (error) { - this.#warnOnce( - `project-skills:${scopeKey(scope)}`, - `Could not read the skills project ${scope.factoryProjectId} created; boards that run them show them as missing: ${error instanceof Error ? error.message : String(error)}`, - ); - return undefined; - } - } - - async #projectSkillsRevision(scope: StoredBoardScope): Promise { - if (!this.#projectSkills) return 0; - try { - return await this.#projectSkills.revision(scope); - } catch { - return UNREAD_SKILLS_REVISION; - } - } - /** Makes the next load reread the project. The loaded boards keep serving sync reads until then. */ invalidate(scope: StoredBoardScope): void { const key = scopeKey(scope); @@ -430,30 +378,14 @@ export class ProjectBoardCache implements ProjectBoardSource { const current = this.#entries.get(key); const version = await this.#storage.readVersion(scope); const reviewInUse = (await this.#reviewBoardInUse?.(scope)) ?? false; - let skillsRevision = await this.#projectSkillsRevision(scope); - if ( - current && - current.version === version && - current.reviewInUse === reviewInUse && - current.skillsRevision === skillsRevision && - skillsRevision !== UNREAD_SKILLS_REVISION - ) { + if (current && current.version === version && current.reviewInUse === reviewInUse) { if ((this.#generations.get(key) ?? 0) === generation) current.checkedAt = this.#now(); return current.boards; } const snapshot = await this.#consistentSnapshot(scope); - const projectSkills = await this.#readProjectSkillNames(scope); - // Compiled without the names, the boards flag their skills as missing: the next load reads them again. - if (projectSkills === undefined) skillsRevision = UNREAD_SKILLS_REVISION; - const boards = this.#compile(scope, snapshot.boards, reviewInUse, projectSkills ?? NO_PROJECT_SKILLS); + const boards = this.#compile(scope, snapshot.boards, reviewInUse); if ((this.#generations.get(key) ?? 0) === generation) { - this.#entries.set(key, { - boards, - version: snapshot.version, - reviewInUse, - skillsRevision, - checkedAt: this.#now(), - }); + this.#entries.set(key, { boards, version: snapshot.version, reviewInUse, checkedAt: this.#now() }); } return boards; } @@ -547,12 +479,7 @@ export class ProjectBoardCache implements ProjectBoardSource { }; } - #compile( - scope: StoredBoardScope, - rows: readonly StoredBoardRecord[], - reviewInUse: boolean, - projectSkills: ReadonlySet, - ): ProjectBoards { + #compile(scope: StoredBoardScope, rows: readonly StoredBoardRecord[], reviewInUse: boolean): ProjectBoards { const byKey = new Map(rows.map(row => [row.key, row])); const details = new Map(this.#codeDetails); const problems: string[] = []; @@ -594,7 +521,7 @@ export class ProjectBoardCache implements ProjectBoardSource { report(row, merged.problems); details.set(code.id, { ...details.get(code.id)!, - problems: [...merged.problems, ...this.#skillProblems(merged.board, projectSkills)], + problems: [...merged.problems, ...this.#skillProblems(merged.board)], }); boards.push(merged.board); } @@ -621,7 +548,7 @@ export class ProjectBoardCache implements ProjectBoardSource { continue; } boards.push(board); - details.set(row.key, { source: 'stored', editable: true, problems: this.#skillProblems(board, projectSkills) }); + details.set(row.key, { source: 'stored', editable: true, problems: this.#skillProblems(board) }); } return { registry: boardRegistryOf(boards), @@ -630,8 +557,8 @@ export class ProjectBoardCache implements ProjectBoardSource { }; } - #skillProblems(board: InstalledBoard, projectSkills?: ReadonlySet): string[] { - return findBoardSkillProblems(boardRegistryOf([board]), this.#codeSkills, undefined, projectSkills); + #skillProblems(board: InstalledBoard): string[] { + return findBoardSkillProblems(boardRegistryOf([board]), this.#codeSkills); } #warnOnce(key: string, message: string, debug = false): void { diff --git a/mastracode/factory/src/boards/stored-board-runtime.test.ts b/mastracode/factory/src/boards/stored-board-runtime.test.ts index f343ea20b94..ae067c8a583 100644 --- a/mastracode/factory/src/boards/stored-board-runtime.test.ts +++ b/mastracode/factory/src/boards/stored-board-runtime.test.ts @@ -1077,45 +1077,6 @@ describe.each(['libsql', ...(postgresUrl ? ['postgres'] : [])])( ).rejects.toMatchObject({ code: 'project_not_found' }); }, 60_000); - it('lets a board run a skill the named projects created, and refuses it where one has none', async () => { - stubModel(); - const orgId = `org-${randomUUID()}`; - const replica = await boot(await isolatedDatabase(), orgId); - const [withSkill, without] = [await createProject(replica, 'With'), await createProject(replica, 'Without')]; - const created = await replica.send('POST', `/web/factory/projects/${withSkill}/skills`, { - name: 'release-notes', - content: '---\nname: release-notes\ndescription: Write release notes\n---\n\n# Notes\n', - }); - expect(created.status, JSON.stringify(created.json)).toBe(201); - const notes: StoredBoardInput = { - ...bugsBoard, - key: 'notes', - name: 'Notes', - phases: bugsBoard.phases.map(phase => - phase.key === 'fixing' ? { ...phase, runner: { context: 'work', skill: 'release-notes' } } : phase, - ), - }; - const scope = (factoryProjectId: string) => ({ orgId, factoryProjectId }); - - // A list with a project that lacks the skill is refused before any project is written. - await expect( - replica.factory.upsertBoard(notes, { projects: [scope(withSkill), scope(without)] }), - ).rejects.toMatchObject({ code: 'unknown_skill' }); - expect(await replica.boards.get(scope(withSkill), 'notes')).toBeNull(); - // A board for every project may only run the app's skills. - await expect(replica.factory.upsertBoard(notes, { projects: 'all' })).rejects.toMatchObject({ - code: 'unknown_skill', - }); - - expect(await replica.factory.upsertBoard(notes, { projects: [scope(withSkill)] })).toMatchObject({ - inserted: [scope(withSkill)], - }); - // Saved again, it is checked against the project's skills as an edit is. - expect(await replica.factory.upsertBoard(notes, { projects: [scope(withSkill)] })).toMatchObject({ - unchanged: [scope(withSkill)], - }); - }, 60_000); - it('stores the Work board the README shows for replacing Work in every project, over edits and cards in Triage, and keeps it through a reset', async () => { stubModel(); // The README, not the changeset: `changeset version` deletes changesets. diff --git a/mastracode/factory/src/factory.ts b/mastracode/factory/src/factory.ts index eebd320456d..609aeabd036 100644 --- a/mastracode/factory/src/factory.ts +++ b/mastracode/factory/src/factory.ts @@ -194,7 +194,6 @@ import { observeSessionThreadTitle } from './session/thread-title-mirror.js'; import { FactoryWorkItemStateProcessor } from './session/work-item-state-processor.js'; import { shareSessionListChanges } from './session-list-changes.js'; import { assertFactorySkills, findBoardSkillProblems } from './skills/app-skills.js'; -import { projectSkillNamesOf } from './skills/catalog.js'; import { createSpaStaticMiddleware, resolveUiDistDir } from './spa-static.js'; import { createStateSigner } from './state-signing.js'; import { observeAgentGitAction } from './storage/domains/audit/agent-audit.js'; @@ -736,9 +735,7 @@ export class MastraFactory { * project gets none. This lasts for the process, so run it at every startup. A Work or app * board's key keeps that board's code behaviour, * so the definition is checked as an edit is; a new key gets none (no tool, source-closed or - * event rules). The board is validated as the boards API validates it; a runner may name a skill a - * project created in Settings › Skills only when `projects` lists the projects, and each listed - * project must have it, while a board for `'all'` projects may only run the app's skills. Each write is audited + * event rules). The board is validated once, as the boards API does, and each write is audited * as `factory.board.created` or `factory.board.updated` by `system:factory`. Refusals throw a * `BoardWriteError` (`invalid_board`, `unknown_skill`, `code_behaviour`, `phase_in_use` when cards * sit in a phase it removes, `board_in_use` when the key is `review` and the retired Review board @@ -776,8 +773,7 @@ export class MastraFactory { ); } const { writes, boards, projects, audit } = store; - // Named projects may have created the skills their runners name, so those are checked per project below. - const input = writes.validate(board, options.projects === 'all' ? undefined : null); + const input = writes.validate(board); // Work and app boards are stored per project like any other. writes.refuseCodeBoard(input.key, 'edit'); await projects.ensureReady(); @@ -795,7 +791,6 @@ export class MastraFactory { message: `Project "${scope.factoryProjectId}" does not exist.`, }); } - writes.validate(input, await boards.projectSkillNames(scope)); } } const result: { inserted: StoredBoardScope[]; updated: StoredBoardScope[]; unchanged: StoredBoardScope[] } = { @@ -1126,10 +1121,6 @@ export class MastraFactory { storage: storedBoardsStorage, projects: factoryProjectsStorage, codeSkills: this.#skills, - // Runners may also name the skills a project created in Settings › Skills. - ...(storage.isDomainReady('skill-overrides') - ? { projectSkills: projectSkillNamesOf(skillOverridesStorage) } - : {}), // A project still using the retired Review board keeps it; work items are read once they're ready. ...(storage.isDomainReady('work-items') ? { diff --git a/mastracode/factory/src/links.test.ts b/mastracode/factory/src/links.test.ts index 5043dbf0702..9fd23b91c99 100644 --- a/mastracode/factory/src/links.test.ts +++ b/mastracode/factory/src/links.test.ts @@ -15,7 +15,7 @@ describe('factory links', () => { it('builds nothing when no public URL is configured', () => { vi.stubEnv('MASTRACODE_PUBLIC_URL', ' '); expect(factoryUiOrigin()).toBeNull(); - expect(factoryWorkItemUrl({ factoryProjectId: 'f', workItemId: 'i' })).toBeUndefined(); + expect(factoryWorkItemUrl({ factoryProjectId: 'f', board: 'work', workItemId: 'i' })).toBeUndefined(); }); it('links boards, cards, sessions, settings and rules', () => { @@ -24,7 +24,9 @@ describe('factory links', () => { // The Review board is retired; a board keyed `review` now is a custom board like any other. expect(factoryBoardUrl('f 1', 'review')).toBe(`${base}/boards/review`); expect(factoryBoardUrl('f 1', 'ops')).toBe(`${base}/boards/ops`); - expect(factoryWorkItemUrl({ factoryProjectId: 'f 1', workItemId: 'i 1' })).toBe(`${base}/cards/i%201`); + expect(factoryWorkItemUrl({ factoryProjectId: 'f 1', board: 'work', workItemId: 'i-1' })).toBe( + `${base}/work?item=i-1`, + ); expect(factorySessionUrl({ factoryProjectId: 'f 1', sessionId: 's', threadId: 't' })).toBe( `${base}/workspaces/s/threads/t`, ); diff --git a/mastracode/factory/src/links.ts b/mastracode/factory/src/links.ts index 70f81dca6e9..c3b55ead910 100644 --- a/mastracode/factory/src/links.ts +++ b/mastracode/factory/src/links.ts @@ -25,12 +25,14 @@ export function factoryBoardUrl(factoryProjectId: string, board: string): string return factoryUrl(factoryProjectId, boardSegment(board)); } -/** - * A card, opened as the board opens it on a click: the UI sends the link on to the session the card - * shows (its current phase's, else its last visited one's), or to a draft that starts one. - */ -export function factoryWorkItemUrl(input: { factoryProjectId: string; workItemId: string }): string | undefined { - return factoryUrl(input.factoryProjectId, `/cards/${encodeURIComponent(input.workItemId)}`); +/** A card opened on its board. */ +export function factoryWorkItemUrl(input: { + factoryProjectId: string; + board: string; + workItemId: string; +}): string | undefined { + const query = new URLSearchParams({ item: input.workItemId }); + return factoryUrl(input.factoryProjectId, `${boardSegment(input.board)}?${query}`); } export function factorySessionUrl(input: { diff --git a/mastracode/factory/src/routes/boards.ts b/mastracode/factory/src/routes/boards.ts index 7c2db25dc68..98cd77fc40f 100644 --- a/mastracode/factory/src/routes/boards.ts +++ b/mastracode/factory/src/routes/boards.ts @@ -31,10 +31,7 @@ export interface BoardRoutesDeps extends RouteDependencies { workItems: Pick; storage: StoredBoardsStorage; /** The per-project boards: the code boards and their seeds, skills, and the cache to invalidate. */ - boards: Pick< - ProjectBoardCache, - 'describe' | 'invalidate' | 'codeRegistry' | 'codeSkills' | 'projectSkillNames' | 'seedFor' - >; + boards: Pick; } type Resolved = StoredBoardScope & { userId: string }; diff --git a/mastracode/factory/src/routes/contracts.ts b/mastracode/factory/src/routes/contracts.ts index e39e17f4e87..847cb6fca48 100644 --- a/mastracode/factory/src/routes/contracts.ts +++ b/mastracode/factory/src/routes/contracts.ts @@ -1474,8 +1474,6 @@ const skillNameSchema = z .regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/); const skillPathSchema = z.object({ id: uuidSchema, name: skillNameSchema }); const skillResponseSchema = z.object({ skill: entitySchema }); -/** `skill` is null when the request deleted a skill the project created. */ -const skillRevertResponseSchema = z.object({ skill: entitySchema.nullable() }); /** Adds the runtime's SKILL.md validation errors, checking the frontmatter name against `directoryName` when given. */ function refineSkillContent(content: string, context: z.RefinementCtx, directoryName?: string) { @@ -1498,12 +1496,6 @@ export const skillOverrideSaveRequestSchema = skillPathSchema .extend({ content: skillContentSchema }) .superRefine((input, context) => refineSkillContent(input.content, context, input.name)); -/** A new skill's SKILL.md must load under the name it is created with, exactly as the runtime validates it. */ -export const skillCreateBodySchema = z - .object({ name: skillNameSchema, content: skillContentSchema }) - .strict() - .superRefine((input, context) => refineSkillContent(input.content, context, input.name)); - export const FACTORY_ROUTE_CONTRACTS = { projectList: { method: 'GET', @@ -2082,18 +2074,10 @@ export const FACTORY_ROUTE_CONTRACTS = { querySchema: z.object({ projectId: uuidSchema.optional() }), responseSchema: z.object({ skills: z.array(entitySchema), canEdit: z.boolean().optional() }), }, - skillCreate: { - method: 'POST', - path: '/web/factory/projects/:id/skills', - description: 'Create a skill for one Factory project', - pathSchema: projectPathSchema, - bodySchema: skillCreateBodySchema, - responseSchema: skillResponseSchema, - }, skillOverrideSave: { method: 'PUT', path: '/web/factory/projects/:id/skills/:name', - description: "Save a project's SKILL.md for a Factory skill: an edit of an app skill, or a skill it created", + description: "Save a project's edited SKILL.md for a Factory skill", pathSchema: skillPathSchema, bodySchema: skillOverrideBodySchema, responseSchema: skillResponseSchema, @@ -2101,10 +2085,9 @@ export const FACTORY_ROUTE_CONTRACTS = { skillOverrideRevert: { method: 'DELETE', path: '/web/factory/projects/:id/skills/:name', - description: - "Revert a project's edited Factory skill to its original SKILL.md, or delete a skill the project created", + description: "Revert a project's edited Factory skill to its original SKILL.md", pathSchema: skillPathSchema, - responseSchema: skillRevertResponseSchema, + responseSchema: skillResponseSchema, }, } as const satisfies Record; diff --git a/mastracode/factory/src/routes/skills.test.ts b/mastracode/factory/src/routes/skills.test.ts index 7af28503db3..6742fcde079 100644 --- a/mastracode/factory/src/routes/skills.test.ts +++ b/mastracode/factory/src/routes/skills.test.ts @@ -626,12 +626,10 @@ describe('project skill edit routes', () => { writeFileSync(join(projectDir, 'factory-skills', dir, 'SKILL.md'), content); } - /** `afterAudit` runs once each write is audited, before the route responds, as another request could. */ - async function setup({ afterAudit }: { afterAudit?: () => Promise } = {}) { + async function setup() { const seed = await createFactoryStorageForTests(); const admins = new Set([ADMIN.workosId]); const auth = fakeRouteAuth({ isOrganizationAdmin: async (_org, userId) => admins.has(userId) }); - const auditDomain = new AuditDomain({ auth, audit: seed.audit, projects: seed.projects }); const routes = new SkillRoutes({ auth, controllerId: 'code', @@ -639,12 +637,7 @@ describe('project skill edit routes', () => { overrides: { projects: seed.projects, storage: seed.skillOverrides, - audit: { - emit: async input => { - await auditDomain.emit(input); - await afterAudit?.(); - }, - }, + audit: new AuditDomain({ auth, audit: seed.audit, projects: seed.projects }), }, }).routes(); const projectA = await seed.projects.create({ orgId: 'org-1', userId: ADMIN.workosId, input: { name: 'A' } }); @@ -668,12 +661,6 @@ describe('project skill edit routes', () => { }); const revert = (user: TestAuthUser, projectId: string, name: string) => request(user, `/web/factory/projects/${projectId}/skills/${name}`, { method: 'DELETE' }); - const create = (user: TestAuthUser, projectId: string, name: string, content: string) => - request(user, `/web/factory/projects/${projectId}/skills`, { - method: 'POST', - headers: { 'content-type': 'application/json' }, - body: JSON.stringify({ name, content }), - }); const list = async (user: TestAuthUser, projectId: string) => { const response = await request(user, `/web/factory/skills?projectId=${projectId}`); expect(response.status).toBe(200); @@ -685,7 +672,6 @@ describe('project skill edit routes', () => { content: string; origin: string; edited?: { updatedBy: string; updatedAt: string }; - created?: { updatedBy: string; updatedAt: string }; originalChanged?: boolean; }[]; }; @@ -698,203 +684,10 @@ describe('project skill edit routes', () => { project: event.factoryProjectId, targets: event.targets, })); - return { seed, projectA, projectB, elsewhere, save, revert, create, list, skill, auditActions }; + return { seed, projectA, projectB, elsewhere, save, revert, list, skill, auditActions }; } const editedPlan = (body: string) => `---\nname: factory-plan\ndescription: Our planning rules\n---\n\n${body}\n`; - const releaseNotes = (body: string) => - `---\nname: release-notes\ndescription: Write release notes for a merged change\n---\n\n${body}\n`; - - describe('creating skills', () => { - it('creates a skill for its project only, lists it as a project skill, and records it', async () => { - const { projectA, projectB, create, list, auditActions } = await setup(); - const response = await create(ADMIN, projectA.id, 'release-notes', releaseNotes('# Notes')); - expect(response.status).toBe(201); - expect(((await response.json()) as { skill: unknown }).skill).toMatchObject({ - name: 'release-notes', - description: 'Write release notes for a merged change', - content: '# Notes', - origin: 'project', - builtIn: false, - created: { updatedBy: ADMIN.workosId }, - }); - - const a = await list(ADMIN, projectA.id); - const created = a.skills.find(s => s.name === 'release-notes'); - expect(created).toMatchObject({ origin: 'project', content: '# Notes' }); - expect(created?.edited).toBeUndefined(); - // The catalog stays sorted by name with created skills among the others. - const names = a.skills.map(s => s.name); - expect(names).toEqual([...names].sort()); - expect((await list(ADMIN, projectB.id)).skills.map(s => s.name)).not.toContain('release-notes'); - expect(await auditActions()).toEqual([ - { action: 'factory.skill.created', project: projectA.id, targets: [{ type: 'skill', id: 'release-notes' }] }, - ]); - }); - - it('creates a skill with an all-digit name when the SKILL.md quotes it, as the settings editor writes it', async () => { - const { projectA, create, skill } = await setup(); - const response = await create( - ADMIN, - projectA.id, - '123', - '---\nname: "123"\ndescription: "Numbered"\n---\n\n# 123\n', - ); - expect(response.status).toBe(201); - expect(await skill(ADMIN, projectA.id, '123')).toMatchObject({ origin: 'project', description: 'Numbered' }); - }); - - it('answers a create or save with the skill it stored, even when another admin deletes it at once', async () => { - let deleteAfterAudit: (() => Promise) | undefined; - const { seed, projectA, create, save } = await setup({ - afterAudit: async () => void (await deleteAfterAudit?.()), - }); - const scope = { orgId: 'org-1', projectId: projectA.id, skillName: 'release-notes' }; - deleteAfterAudit = () => seed.skillOverrides.delete(scope); - - const created = await create(ADMIN, projectA.id, 'release-notes', releaseNotes('# Notes')); - expect(created.status).toBe(201); - expect(((await created.json()) as { skill: unknown }).skill).toMatchObject({ - name: 'release-notes', - content: '# Notes', - origin: 'project', - }); - expect(await seed.skillOverrides.get(scope)).toBeNull(); - - deleteAfterAudit = undefined; - await create(ADMIN, projectA.id, 'release-notes', releaseNotes('# Notes')); - deleteAfterAudit = () => seed.skillOverrides.delete(scope); - const saved = await save(ADMIN, projectA.id, 'release-notes', releaseNotes('# Shorter')); - expect(saved.status).toBe(200); - expect(((await saved.json()) as { skill: unknown }).skill).toMatchObject({ - content: '# Shorter', - origin: 'project', - }); - }); - - it('updates a created skill, then deletes it', async () => { - const { projectA, create, save, revert, list, auditActions } = await setup(); - expect((await create(ADMIN, projectA.id, 'release-notes', releaseNotes('# Notes'))).status).toBe(201); - - const updated = await save(ADMIN, projectA.id, 'release-notes', releaseNotes('# Shorter notes')); - expect(updated.status).toBe(200); - expect(((await updated.json()) as { skill: unknown }).skill).toMatchObject({ - content: '# Shorter notes', - origin: 'project', - }); - - const deleted = await revert(ADMIN, projectA.id, 'release-notes'); - expect(deleted.status).toBe(200); - expect(await deleted.json()).toEqual({ skill: null }); - expect((await list(ADMIN, projectA.id)).skills.map(s => s.name)).not.toContain('release-notes'); - // Gone, so neither a save nor a second delete finds it. - expect((await save(ADMIN, projectA.id, 'release-notes', releaseNotes('# Again'))).status).toBe(404); - expect((await revert(ADMIN, projectA.id, 'release-notes')).status).toBe(404); - expect((await auditActions()).map(event => event.action).sort()).toEqual([ - 'factory.skill.created', - 'factory.skill.deleted', - 'factory.skill.updated', - ]); - }); - - it('refuses a name an app skill or another created skill already has', async () => { - writeLocalSkill('deploy-notes', '---\nname: deploy-notes\ndescription: Folder skill\n---\n\n# Folder\n'); - const { projectA, projectB, create, skill } = await setup(); - const builtIn = await create(ADMIN, projectA.id, 'factory-plan', editedPlan('# Not a new skill')); - expect(builtIn.status).toBe(409); - expect(await builtIn.json()).toEqual({ - error: 'skill_exists', - message: 'A skill named "factory-plan" already exists. Edit it instead.', - }); - const folder = '---\nname: deploy-notes\ndescription: Mine\n---\n\n# Mine\n'; - expect((await create(ADMIN, projectA.id, 'deploy-notes', folder)).status).toBe(409); - - expect((await create(ADMIN, projectA.id, 'release-notes', releaseNotes('# First'))).status).toBe(201); - expect((await create(ADMIN, projectA.id, 'release-notes', releaseNotes('# Second'))).status).toBe(409); - expect((await skill(ADMIN, projectA.id, 'release-notes')).content).toBe('# First'); - // Another project may use the name. - expect((await create(ADMIN, projectB.id, 'release-notes', releaseNotes('# Other'))).status).toBe(201); - expect((await skill(ADMIN, projectA.id, 'factory-plan')).edited).toBeUndefined(); - }); - - it('creates one skill when two admins create the same name at once', async () => { - const { projectA, create, seed } = await setup(); - const statuses = await Promise.all( - ['# One', '# Two', '# Three'].map(body => create(ADMIN, projectA.id, 'release-notes', releaseNotes(body))), - ).then(responses => responses.map(response => response.status).sort()); - expect(statuses).toEqual([201, 409, 409]); - expect(await seed.skillOverrides.list({ orgId: 'org-1', projectId: projectA.id })).toHaveLength(1); - }); - - it('rejects a skill the runtime could not load, or a name that is not a skill name', async () => { - const { projectA, create, seed } = await setup(); - const cases = [ - [ - 'release-notes', - '---\nname: other-notes\ndescription: Renamed\n---\n\n# Notes\n', - /must match directory name/, - ], - ['release-notes', '---\nname: release-notes\n---\n\n# Notes\n', /description/i], - ['Release Notes', '---\nname: Release Notes\ndescription: x\n---\n\n# Notes\n', /Invalid/i], - ['release-notes', '', /Too small/], - ] as const; - for (const [name, content, message] of cases) { - const response = await create(ADMIN, projectA.id, name, content); - expect(response.status).toBe(400); - const body = (await response.json()) as { error: string; message: string }; - expect(body.error).toBe('invalid_skill'); - expect(body.message).toMatch(message); - } - expect(await seed.skillOverrides.list({ orgId: 'org-1', projectId: projectA.id })).toEqual([]); - }); - - it('refuses creation from members who are not org admins and in other organizations', async () => { - const { projectA, elsewhere, create, seed, auditActions } = await setup(); - const member = await create(MEMBER, projectA.id, 'release-notes', releaseNotes('# Notes')); - expect(member.status).toBe(403); - expect(await member.json()).toEqual({ - error: 'forbidden', - message: 'Organization administrator access is required to create skills.', - }); - expect((await create(ADMIN, elsewhere.id, 'release-notes', releaseNotes('# Notes'))).status).toBe(404); - expect((await create(ADMIN, 'not-a-uuid', 'release-notes', releaseNotes('# Notes'))).status).toBe(404); - expect(await seed.skillOverrides.list({ orgId: 'org-1', projectId: projectA.id })).toEqual([]); - expect(await auditActions()).toEqual([]); - }); - - it('treats a created skill as an edit once the app ships a skill of the same name', async () => { - const { projectA, create, revert, skill } = await setup(); - expect((await create(ADMIN, projectA.id, 'release-notes', releaseNotes('# Ours'))).status).toBe(201); - - writeLocalSkill('release-notes', releaseNotes('# From the app')); - expect(await skill(ADMIN, projectA.id, 'release-notes')).toMatchObject({ - origin: 'folder', - content: '# Ours', - edited: { updatedBy: ADMIN.workosId }, - originalChanged: true, - }); - - // Reverting drops the project's text for the app's skill. - const reverted = await revert(ADMIN, projectA.id, 'release-notes'); - expect(((await reverted.json()) as { skill: unknown }).skill).toMatchObject({ - origin: 'folder', - content: '# From the app', - }); - }); - - it('creates over an edit whose skill the app no longer has', async () => { - writeLocalSkill('release-notes', releaseNotes('# From the app')); - const { projectA, save, create, skill } = await setup(); - expect((await save(ADMIN, projectA.id, 'release-notes', releaseNotes('# Edited'))).status).toBe(200); - rmSync(join(projectDir, 'factory-skills', 'release-notes'), { recursive: true }); - - expect((await create(ADMIN, projectA.id, 'release-notes', releaseNotes('# Ours now'))).status).toBe(201); - expect(await skill(ADMIN, projectA.id, 'release-notes')).toMatchObject({ - origin: 'project', - content: '# Ours now', - }); - }); - }); it("serves an admin's edit to its project only, with who edited it", async () => { const { projectA, projectB, save, list, skill, auditActions } = await setup(); diff --git a/mastracode/factory/src/routes/skills.ts b/mastracode/factory/src/routes/skills.ts index 1cb6f693e9e..9e0d1bb1c9f 100644 --- a/mastracode/factory/src/routes/skills.ts +++ b/mastracode/factory/src/routes/skills.ts @@ -6,19 +6,13 @@ import { registerApiRoute } from '@mastra/core/server'; import type { InlineSkill } from '@mastra/core/skills'; import type { Context } from 'hono'; -import { - createdSkillInfo, - hashSkillContent, - listFactorySkills, - originalSkillInfo, - readFactorySkillOriginals, -} from '../skills/catalog.js'; +import { hashSkillContent, listFactorySkills, readFactorySkillOriginals } from '../skills/catalog.js'; import { formatSkillMessage, resolveSkillInvocation, SkillInvocationError } from '../skills/service.js'; import type { AuditEmitter } from '../storage/domains/audit/domain.js'; import type { FactoryProjectsStorage } from '../storage/domains/projects/base.js'; import type { SkillOverridesStorage } from '../storage/domains/skill-overrides/base.js'; import type { SourceControlStorageHandle } from '../storage/domains/source-control/base.js'; -import { FACTORY_ROUTE_CONTRACTS, skillCreateBodySchema, skillOverrideSaveRequestSchema } from './contracts.js'; +import { FACTORY_ROUTE_CONTRACTS, skillOverrideSaveRequestSchema } from './contracts.js'; import type { RouteDependencies } from './route.js'; import { loose, Route } from './route.js'; @@ -51,10 +45,7 @@ export interface SkillRoutesDeps extends RouteDependencies { /** Per-project skill edits. Without it the catalog lists originals only and edit routes are not served. */ overrides?: { projects: Pick; - storage: Pick< - SkillOverridesStorage, - 'ensureReady' | 'list' | 'get' | 'upsert' | 'create' | 'updateCreated' | 'delete' - >; + storage: Pick; audit: AuditEmitter; }; } @@ -148,6 +139,12 @@ export class SkillRoutes extends Route { return !auth.enabled() || (await auth.isOrganizationAdmin(c, orgId)); } + async #catalogEntry(scope: { orgId: string; projectId: string }, name: string) { + const { overrides, skills } = this.deps; + const edits = overrides ? await overrides.storage.list(scope) : []; + return (await listFactorySkills(skills, edits)).find(skill => skill.name === name); + } + routes(): ApiRoute[] { const { controllerId, controller, authorizeSessionAddress: customAuthorize } = this.deps; const authorize = @@ -235,27 +232,23 @@ export class SkillRoutes extends Route { ); } const name = path.data.name; + const original = (await readFactorySkillOriginals(this.deps.skills)).get(name); + if (!original) return c.json({ error: 'not_found', message: `Skill "${name}" not found.` }, 404); const scope = { orgId: access.orgId, projectId: access.projectId, skillName: name }; await overrides!.storage.ensureReady(); - const original = (await readFactorySkillOriginals(this.deps.skills)).get(name); - // Without an original, the name can only be a skill this project created. - if (!original && (await overrides!.storage.get(scope))?.kind !== 'created') { - return c.json({ error: 'not_found', message: `Skill "${name}" not found.` }, 404); - } if (revert) { if (await overrides!.storage.delete(scope)) { await overrides!.audit.emit({ context: c, input: { - action: original ? 'factory.skill.reverted' : 'factory.skill.deleted', + action: 'factory.skill.reverted', targets: [{ type: 'skill', id: name }], factoryProjectId: access.projectId, }, }); } - // The response describes what the delete left, not a reread another write could change. - return c.json({ skill: original ? originalSkillInfo(name, original) : null }); + return c.json({ skill: await this.#catalogEntry(access, name) }); } let body: unknown; @@ -274,72 +267,22 @@ export class SkillRoutes extends Route { 400, ); } - const write = { ...scope, content: request.data.content, updatedBy: access.userId }; - // A created skill is only updated while it exists, so a save racing a delete doesn't bring it back. - const saved = original - ? await overrides!.storage.upsert({ ...write, baseHash: hashSkillContent(original.raw), kind: 'edit' }) - : await overrides!.storage.updateCreated(write); - if (!saved) return c.json({ error: 'not_found', message: `Skill "${name}" not found.` }, 404); + await overrides!.storage.upsert({ + ...scope, + content: request.data.content, + baseHash: hashSkillContent(original.raw), + updatedBy: access.userId, + }); await overrides!.audit.emit({ context: c, input: { action: 'factory.skill.updated', targets: [{ type: 'skill', id: name }], factoryProjectId: access.projectId, - metadata: { origin: original?.origin ?? 'project' }, + metadata: { origin: original.origin }, }, }); - return c.json({ skill: original ? originalSkillInfo(name, original, saved) : createdSkillInfo(saved) }); - }; - - const handleSkillCreate = async (context: unknown) => { - const c = loose(context); - const { overrides } = this.deps; - const path = FACTORY_ROUTE_CONTRACTS.skillCreate.pathSchema.safeParse({ id: c.req.param('id') }); - if (!path.success) return c.json({ error: 'Project not found' }, 404); - const access = await this.#projectAccess(c, path.data.id); - if ('response' in access) return access.response; - if (!(await this.#canEdit(c, access.orgId))) { - return c.json( - { error: 'forbidden', message: 'Organization administrator access is required to create skills.' }, - 403, - ); - } - - let body: unknown; - try { - body = await c.req.json(); - } catch { - return c.json({ error: 'invalid_request', message: 'Invalid JSON body.' }, 400); - } - const request = skillCreateBodySchema.safeParse(body); - if (!request.success) { - return c.json( - { error: 'invalid_skill', message: request.error.issues.map(issue => issue.message).join('\n') }, - 400, - ); - } - const { name, content } = request.data; - const exists = { error: 'skill_exists', message: `A skill named "${name}" already exists. Edit it instead.` }; - if ((await readFactorySkillOriginals(this.deps.skills)).has(name)) return c.json(exists, 409); - await overrides!.storage.ensureReady(); - const created = await overrides!.storage.create({ - orgId: access.orgId, - projectId: access.projectId, - skillName: name, - content, - updatedBy: access.userId, - }); - if (!created) return c.json(exists, 409); - await overrides!.audit.emit({ - context: c, - input: { - action: 'factory.skill.created', - targets: [{ type: 'skill', id: name }], - factoryProjectId: access.projectId, - }, - }); - return c.json({ skill: createdSkillInfo(created) }, 201); + return c.json({ skill: await this.#catalogEntry(access, name) }); }; return [ @@ -350,11 +293,6 @@ export class SkillRoutes extends Route { }), ...(this.deps.overrides ? [ - registerApiRoute(FACTORY_ROUTE_CONTRACTS.skillCreate.path, { - method: FACTORY_ROUTE_CONTRACTS.skillCreate.method, - requiresAuth: false, - handler: context => handleSkillCreate(context), - }), registerApiRoute(FACTORY_ROUTE_CONTRACTS.skillOverrideSave.path, { method: FACTORY_ROUTE_CONTRACTS.skillOverrideSave.method, requiresAuth: false, diff --git a/mastracode/factory/src/skills/app-skills.ts b/mastracode/factory/src/skills/app-skills.ts index b118eb4c596..191bcc3346f 100644 --- a/mastracode/factory/src/skills/app-skills.ts +++ b/mastracode/factory/src/skills/app-skills.ts @@ -28,19 +28,15 @@ export function assertFactorySkills(skills: unknown): readonly InlineSkill[] { return Object.freeze([...skills]); } -const NO_PROJECT_SKILLS: ReadonlySet = new Set(); - /** * Problems with the skills board phases name in `runner.skill`, found at * startup instead of when a card first enters the phase. A skill is found when - * it is a code skill, a folder skill in the app's `factory-skills/`, bundled, - * or one of `projectSkills`, the skills a project created for its own boards. + * it is a code skill, a folder skill in the app's `factory-skills/`, or bundled. */ export function findBoardSkillProblems( boards: BoardRegistry, codeSkills: readonly InlineSkill[], localSkillsPath: string | undefined = resolveLocalFactorySkillsPath(), - projectSkills: ReadonlySet = NO_PROJECT_SKILLS, ): string[] { const codeNames = new Set(codeSkills.map(skill => skill.name)); const problems: string[] = []; @@ -52,11 +48,10 @@ export function findBoardSkillProblems( const found = codeNames.has(skill) || FACTORY_SKILL_NAMES.has(skill) || - projectSkills.has(skill) || (localSkillsPath !== undefined && existsSync(join(localSkillsPath, skill, 'SKILL.md'))); if (!found) { problems.push( - `${where} runs skill '${skill}', but no such skill exists. Pass it in MastraFactory({ skills }), add factory-skills/${skill}/SKILL.md, or create it in Settings › Skills.`, + `${where} runs skill '${skill}', but no such skill exists. Pass it in MastraFactory({ skills }) or add factory-skills/${skill}/SKILL.md.`, ); } else if (REVIEW_ONLY_FACTORY_SKILLS.has(skill) && context !== 'review') { problems.push( diff --git a/mastracode/factory/src/skills/catalog.ts b/mastracode/factory/src/skills/catalog.ts index 6b0f8979189..f33895c2768 100644 --- a/mastracode/factory/src/skills/catalog.ts +++ b/mastracode/factory/src/skills/catalog.ts @@ -16,9 +16,7 @@ import type { InlineSkill } from '@mastra/core/skills'; import { validateSkillContent } from '@mastra/core/skills'; import type { SkillSource } from '@mastra/core/workspace'; -import type { ProjectSkillNames } from '../boards/project-boards.js'; -import type { StoredBoardScope } from '../storage/domains/boards/base.js'; -import type { SkillOverrideRecord, SkillOverridesStorage } from '../storage/domains/skill-overrides/base.js'; +import type { SkillOverrideRecord } from '../storage/domains/skill-overrides/base.js'; import { FACTORY_SKILL_NAMES, FACTORY_SKILLS_MOUNT, @@ -29,9 +27,6 @@ import { /** Where a skill comes from: shipped with Factory, the app's `factory-skills/` folder, or `MastraFactory({ skills })`. */ export type FactorySkillOrigin = 'bundled' | 'folder' | 'code'; -/** Where a listed skill comes from: an original's origin, or `project` for a skill the project created. */ -export type FactorySkillCatalogOrigin = FactorySkillOrigin | 'project'; - export interface FactorySkillInfo { name: string; description: string; @@ -39,15 +34,13 @@ export interface FactorySkillInfo { content: string; /** Frontmatter fields besides `name` and `description` (license, user-invocable, …), so an editor can keep them. */ frontmatter?: Record; - origin: FactorySkillCatalogOrigin; + origin: FactorySkillOrigin; /** True for the skills Factory ships, including when the app overrides one. */ builtIn: boolean; /** Set when the SKILL.md fails the runtime's parsing/validation, so the agent will not be able to load it. */ error?: string; /** Set when the project has an edited copy; `description` and `content` then come from the edit. */ edited?: { updatedBy: string; updatedAt: string }; - /** Set for a skill the project created (`origin: 'project'`): who saved it last, and when. */ - created?: { updatedBy: string; updatedAt: string }; /** True when the code, folder, or bundled SKILL.md changed since the project's edit was made. */ originalChanged?: boolean; } @@ -127,73 +120,33 @@ export async function readFactorySkillOriginals( return originals; } -/** The catalog entry of a skill the project created, from its stored row. */ -export function createdSkillInfo(created: SkillOverrideRecord): FactorySkillInfo { - return { - name: created.skillName, - ...parseSkillMarkdown(created.skillName, created.content), - origin: 'project', - builtIn: false, - created: { updatedBy: created.updatedBy, updatedAt: created.updatedAt.toISOString() }, - }; -} - -/** The catalog entry of a code, folder, or bundled skill, showing the project's `edit` of it when it has one. */ -export function originalSkillInfo( - name: string, - { raw, origin }: FactorySkillOriginal, - edit?: SkillOverrideRecord, -): FactorySkillInfo { - const builtIn = FACTORY_SKILL_NAMES.has(name); - if (!edit) return { name, ...parseSkillMarkdown(name, raw), origin, builtIn }; - return { - name, - ...parseSkillMarkdown(name, edit.content), - origin, - builtIn, - edited: { updatedBy: edit.updatedBy, updatedAt: edit.updatedAt.toISOString() }, - originalChanged: hashSkillContent(raw) !== edit.baseHash, - }; -} - /** * List the skills the Factory skill mount serves, sorted by name. With a * project's `overrides`, edited skills show the edited text, who edited them, - * and whether the original changed since, and the project's created skills - * are listed with origin `project`. Edits of skills that no longer exist are - * not listed, matching what sessions load. A created skill whose name an app - * skill later takes is listed as that skill's edit. + * and whether the original changed since. Edits of skills that no longer + * exist are not listed, matching what sessions load. */ export async function listFactorySkills( codeSkills: readonly InlineSkill[] = [], overrides: readonly SkillOverrideRecord[] = [], ): Promise { const edits = new Map(overrides.map(override => [override.skillName, override])); - const originals = await readFactorySkillOriginals(codeSkills); - const created = overrides.filter(override => override.kind === 'created' && !originals.has(override.skillName)); - return [ - ...created.map(createdSkillInfo), - ...[...originals].map(([name, original]) => originalSkillInfo(name, original, edits.get(name))), - ].sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0)); -} - -/** - * Reads the skills each project created, for its boards' runners. A created skill an app skill later - * shadows still counts: a runner naming it finds the app's skill. - */ -export function projectSkillNamesOf( - storage: Pick, -): ProjectSkillNames { - const projectScope = (scope: StoredBoardScope) => ({ orgId: scope.orgId, projectId: scope.factoryProjectId }); - return { - revision: async scope => { - await storage.ensureReady(); - return storage.revision(projectScope(scope)); - }, - names: async scope => { - await storage.ensureReady(); - const overrides = await storage.list(projectScope(scope)); - return new Set(overrides.filter(override => override.kind === 'created').map(override => override.skillName)); - }, - }; + const skills: FactorySkillInfo[] = []; + for (const [name, { raw, origin }] of await readFactorySkillOriginals(codeSkills)) { + const edit = edits.get(name); + const builtIn = FACTORY_SKILL_NAMES.has(name); + if (!edit) { + skills.push({ name, ...parseSkillMarkdown(name, raw), origin, builtIn }); + continue; + } + skills.push({ + name, + ...parseSkillMarkdown(name, edit.content), + origin, + builtIn, + edited: { updatedBy: edit.updatedBy, updatedAt: edit.updatedAt.toISOString() }, + originalChanged: hashSkillContent(raw) !== edit.baseHash, + }); + } + return skills; } diff --git a/mastracode/factory/src/storage/domains/audit/actions.ts b/mastracode/factory/src/storage/domains/audit/actions.ts index 6327c6116b9..37749afbcbe 100644 --- a/mastracode/factory/src/storage/domains/audit/actions.ts +++ b/mastracode/factory/src/storage/domains/audit/actions.ts @@ -11,7 +11,7 @@ export const AUDIT_ACTIONS = { intake_order: ['updated', 'evaluator_updated'], session: ['owner_transferred'], board: ['created', 'updated', 'deleted', 'reset'], - skill: ['created', 'updated', 'reverted', 'deleted'], + skill: ['updated', 'reverted'], intake_route: ['created', 'updated', 'deleted', 'reordered', 'rerouted'], sandbox_env: ['set', 'updated', 'deleted'], } as const; diff --git a/mastracode/factory/src/storage/domains/skill-overrides/base.test.ts b/mastracode/factory/src/storage/domains/skill-overrides/base.test.ts index b473d137660..c1f82448eae 100644 --- a/mastracode/factory/src/storage/domains/skill-overrides/base.test.ts +++ b/mastracode/factory/src/storage/domains/skill-overrides/base.test.ts @@ -60,84 +60,6 @@ describe.each(['libsql', ...(postgresUrl ? ['postgres'] : [])])('SkillOverridesS expect(await overrides.revision(scope)).toBe(3); }); - it('creates a skill once per project, replacing only an edit stored under its name', async () => { - const { overrides, orgId } = await makeStorage(); - const scope = { orgId, projectId: 'project-a' }; - const create = (content: string) => - overrides.create({ ...scope, skillName: 'release-notes', content, updatedBy: 'user-1' }); - - const first = await create('first'); - expect(first).toMatchObject({ skillName: 'release-notes', content: 'first', kind: 'created', baseHash: '' }); - expect(await overrides.revision(scope)).toBe(1); - expect(await create('second')).toBeNull(); - expect(await overrides.revision(scope)).toBe(1); - expect(await overrides.get({ ...scope, skillName: 'release-notes' })).toEqual(first); - // Saving it keeps it a created skill when asked to. - await overrides.upsert({ - ...scope, - skillName: 'release-notes', - content: 'third', - baseHash: '', - kind: 'created', - updatedBy: 'user-1', - }); - expect(await overrides.get({ ...scope, skillName: 'release-notes' })).toMatchObject({ - kind: 'created', - content: 'third', - }); - - // An edit left behind by a removed app skill gives way to a created skill. - await save(overrides, scope, 'old-app-skill', 'edited'); - expect((await overrides.get({ ...scope, skillName: 'old-app-skill' }))?.kind).toBe('edit'); - expect( - await overrides.create({ ...scope, skillName: 'old-app-skill', content: 'mine', updatedBy: 'user-2' }), - ).toMatchObject({ - kind: 'created', - content: 'mine', - updatedBy: 'user-2', - }); - }); - - it('updates a created skill only while it exists, and never turns an edit into one', async () => { - const { overrides, orgId } = await makeStorage(); - const scope = { orgId, projectId: 'project-a' }; - const update = (skillName: string, content: string) => - overrides.updateCreated({ ...scope, skillName, content, updatedBy: 'user-2' }); - - expect(await update('release-notes', 'nothing yet')).toBeNull(); - await overrides.create({ ...scope, skillName: 'release-notes', content: 'first', updatedBy: 'user-1' }); - expect(await update('release-notes', 'second')).toMatchObject({ - kind: 'created', - content: 'second', - updatedBy: 'user-2', - }); - expect(await overrides.revision(scope)).toBe(2); - - // Deleted first, a late save finds nothing and stores nothing. - await overrides.delete({ ...scope, skillName: 'release-notes' }); - expect(await update('release-notes', 'late')).toBeNull(); - expect(await overrides.get({ ...scope, skillName: 'release-notes' })).toBeNull(); - - await save(overrides, scope, 'factory-plan', 'edited'); - expect(await update('factory-plan', 'not mine')).toBeNull(); - expect(await overrides.get({ ...scope, skillName: 'factory-plan' })).toMatchObject({ - kind: 'edit', - content: 'edited', - }); - }); - - it('creates one skill when the same name is created concurrently', async () => { - const { overrides, orgId } = await makeStorage(); - const scope = { orgId, projectId: 'project-a' }; - const results = await Promise.all( - Array.from({ length: 6 }, (_, i) => - overrides.create({ ...scope, skillName: 'release-notes', content: `content ${i}`, updatedBy: 'user-1' }), - ), - ); - expect(results.filter(result => result !== null)).toHaveLength(1); - expect(await overrides.revision(scope)).toBe(1); - }); - it('counts every concurrent save once', async () => { const { overrides, orgId } = await makeStorage(); const scope = { orgId, projectId: 'project-a' }; diff --git a/mastracode/factory/src/storage/domains/skill-overrides/base.ts b/mastracode/factory/src/storage/domains/skill-overrides/base.ts index 786d9abbc63..5b51029f5dd 100644 --- a/mastracode/factory/src/storage/domains/skill-overrides/base.ts +++ b/mastracode/factory/src/storage/domains/skill-overrides/base.ts @@ -1,22 +1,15 @@ import { FactoryStorageDomain } from '@mastra/core/storage'; import type { CollectionSchema, FactoryStorageOps } from '@mastra/core/storage'; -/** - * `edit` replaces a skill the app serves and stops applying when that skill is removed. `created` is a skill - * the project added itself, served even when the app has no skill of that name. - */ -export type SkillOverrideKind = 'edit' | 'created'; - -/** A project's SKILL.md for one Factory skill: an edited copy of an app skill, or a skill the project created. */ +/** A project's edited copy of one Factory skill's SKILL.md. */ export interface SkillOverrideRecord { orgId: string; projectId: string; skillName: string; - /** The full SKILL.md, frontmatter included. */ + /** The full edited SKILL.md, frontmatter included. */ content: string; - /** sha256 of the original SKILL.md an edit was made against; empty for a created skill. */ + /** sha256 of the original SKILL.md the edit was made against. */ baseHash: string; - kind: SkillOverrideKind; updatedBy: string; updatedAt: Date; } @@ -45,8 +38,6 @@ export const SKILL_OVERRIDES_SCHEMA: CollectionSchema = { skill_name: { type: 'text' }, content: { type: 'text' }, base_hash: { type: 'text' }, - // Added after the first release; rows stored before it are edits. - kind: { type: 'text', default: 'edit' }, updated_by: { type: 'text' }, updated_at: { type: 'timestamp' }, }, @@ -78,7 +69,6 @@ interface SkillOverrideDbRow extends Record { skill_name: string; content: string; base_hash: string; - kind: string; updated_by: string; updated_at: Date; } @@ -98,7 +88,6 @@ function toRecord(row: SkillOverrideDbRow): SkillOverrideRecord { skillName: row.skill_name, content: row.content, baseHash: row.base_hash, - kind: row.kind === 'created' ? 'created' : 'edit', updatedBy: row.updated_by, updatedAt: row.updated_at, }; @@ -154,20 +143,13 @@ export class SkillOverridesStorage extends FactoryStorageDomain { return row ? toRecord(row) : null; } - /** Saves the project's SKILL.md for a skill, replacing any stored one. `kind` defaults to `edit`. */ async upsert({ content, baseHash, - kind = 'edit', updatedBy, skillName, ...scope - }: SkillScope & { - content: string; - baseHash: string; - kind?: SkillOverrideKind; - updatedBy: string; - }): Promise { + }: SkillScope & { content: string; baseHash: string; updatedBy: string }): Promise { await this.#ensureRevisionRow(scope); return this.storage.withTransaction(async ops => { const now = await this.#bumpRevision(ops, scope); @@ -179,7 +161,6 @@ export class SkillOverridesStorage extends FactoryStorageDomain { skill_name: skillName, content, base_hash: baseHash, - kind, updated_by: updatedBy, updated_at: now, }, @@ -188,46 +169,6 @@ export class SkillOverridesStorage extends FactoryStorageDomain { }); } - /** - * Stores a skill the project created, or returns `null` when the project already created one by that name. - * An edit stored under the name is replaced: its skill is gone from the app, so nothing served it. - */ - create(input: SkillScope & { content: string; updatedBy: string }): Promise { - return this.#writeCreated(input, existing => existing?.kind !== 'created'); - } - - /** - * Saves a new SKILL.md for a skill the project created, or returns `null` when it has no created skill by - * that name, so a save that loses a race with a delete doesn't create the skill again. - */ - updateCreated(input: SkillScope & { content: string; updatedBy: string }): Promise { - return this.#writeCreated(input, existing => existing?.kind === 'created'); - } - - /** Writes a created skill when `canWrite` accepts the row stored under its name, else returns `null`. */ - async #writeCreated( - { content, updatedBy, skillName, ...scope }: SkillScope & { content: string; updatedBy: string }, - canWrite: (existing: SkillOverrideDbRow | null) => boolean, - ): Promise { - await this.#ensureRevisionRow(scope); - return this.storage.withTransaction(async ops => { - // Lock the revision row first, so concurrent writes of one name serialize and each sees the last. - const result: { written?: SkillOverrideDbRow } = {}; - await ops.updateAtomic('factory_skill_override_revisions', projectWhere(scope), async row => { - const skill = { ...projectWhere(scope), skill_name: skillName }; - if (!canWrite(await ops.findOne('factory_skill_overrides', skill))) return null; - const now = new Date(); - result.written = await ops.upsertOne( - 'factory_skill_overrides', - ['org_id', 'factory_project_id', 'skill_name'], - { ...skill, content, base_hash: '', kind: 'created', updated_by: updatedBy, updated_at: now }, - ); - return { revision: row.revision + 1, updated_at: now }; - }); - return result.written ? toRecord(result.written) : null; - }); - } - /** False when the skill had no override; the revision only moves when a row was removed. */ async delete({ skillName, ...scope }: SkillScope): Promise { await this.#ensureRevisionRow(scope); diff --git a/mastracode/factory/src/tools/read-tools.test.ts b/mastracode/factory/src/tools/read-tools.test.ts index 7cc892b56ae..a26333523e9 100644 --- a/mastracode/factory/src/tools/read-tools.test.ts +++ b/mastracode/factory/src/tools/read-tools.test.ts @@ -246,16 +246,16 @@ describe('factory_list_work_items', () => { expect(result.items.find(row => row.id === 'a')?.number).toBe(12); }); - it('links each card to the page that opens its session when a public URL is configured', async () => { + it('links each card on its board when a public URL is configured', async () => { vi.stubEnv('MASTRACODE_PUBLIC_URL', 'https://factory.example.com'); try { const { run } = setup({ items: rows }); const result = await run<{ items: Array<{ id: string; url: string | null }> }>('factory_list_work_items', {}); expect(result.items.find(row => row.id === 'a')?.url).toBe( - 'https://factory.example.com/factories/project-1/cards/a', + 'https://factory.example.com/factories/project-1/work?item=a', ); expect(result.items.find(row => row.id === 'c')?.url).toBe( - 'https://factory.example.com/factories/project-1/cards/c', + 'https://factory.example.com/factories/project-1/boards/release?item=c', ); } finally { vi.unstubAllEnvs(); diff --git a/mastracode/factory/src/tools/read-tools.ts b/mastracode/factory/src/tools/read-tools.ts index 2d1720e2222..d11749ab36b 100644 --- a/mastracode/factory/src/tools/read-tools.ts +++ b/mastracode/factory/src/tools/read-tools.ts @@ -169,6 +169,7 @@ function workItemUrl(item: Card) { return ( factoryWorkItemUrl({ factoryProjectId: item.factoryProjectId, + board: boardForWorkItem(item), workItemId: item.id, }) ?? null ); diff --git a/mastracode/factory/src/tools/work-item-tools.test.ts b/mastracode/factory/src/tools/work-item-tools.test.ts index 9de9d8b0fdf..c6d52fb1758 100644 --- a/mastracode/factory/src/tools/work-item-tools.test.ts +++ b/mastracode/factory/src/tools/work-item-tools.test.ts @@ -815,7 +815,7 @@ describe("a card's work requested from a chat", () => { env.run('factory_transition_work_item', { workItem: PULL_REQUEST_URL, stage: 'pr-review', rerun: true }), ).resolves.toMatchObject({ workItemId: card.id, - url: `https://factory.example.com/factories/project-1/cards/${card.id}`, + url: `https://factory.example.com/factories/project-1/work?item=${card.id}`, stage: 'pr-review', reran: true, }); @@ -885,7 +885,7 @@ describe("a card's work requested from a chat", () => { ).resolves.toMatchObject({ workItemId: card.id, status: 'pending', - url: `https://factory.example.com/factories/project-1/cards/${card.id}`, + url: `https://factory.example.com/factories/project-1/work?item=${card.id}`, }); // Who the card's review session reports to when its run ends. diff --git a/mastracode/factory/src/tools/work-item-tools.ts b/mastracode/factory/src/tools/work-item-tools.ts index 8074a59f5f0..f3f1f341cf4 100644 --- a/mastracode/factory/src/tools/work-item-tools.ts +++ b/mastracode/factory/src/tools/work-item-tools.ts @@ -72,6 +72,7 @@ function briefItem(item: Card) { url: factoryWorkItemUrl({ factoryProjectId: item.factoryProjectId, + board: boardForWorkItem(item), workItemId: item.id, }) ?? null, }; @@ -165,6 +166,7 @@ export function createFactoryWorkItemTools( url = factoryWorkItemUrl({ factoryProjectId: item.factoryProjectId, + board: boardForWorkItem(item), workItemId: item.id, }) ?? null; await follow(item, 'started'); @@ -285,6 +287,7 @@ export function createFactoryWorkItemTools( const url = factoryWorkItemUrl({ factoryProjectId: item.factoryProjectId, + board: boardForWorkItem(item), workItemId: item.id, }) ?? null; const sameStage = item.stages.length === 1 && item.stages[0] === stage; diff --git a/mastracode/factory/src/workspace.test.ts b/mastracode/factory/src/workspace.test.ts index 59d54cd4d48..bde9fcb7bac 100644 --- a/mastracode/factory/src/workspace.test.ts +++ b/mastracode/factory/src/workspace.test.ts @@ -158,7 +158,6 @@ import type { SkillOverridesStorage } from './storage/domains/skill-overrides/ba import { createFactoryStorageForTests } from './storage/test-utils.js'; import { createWorkspaceFactory, - FACTORY_SKILLS_MOUNT, FactorySkillSource, REVIEW_ONLY_FACTORY_SKILLS, FactoryWorkspaceRegistry, @@ -1724,50 +1723,6 @@ describe('GitHub session workspace preparation', () => { expect(await workspace.skills?.get('removed-app-skill')).toBeFalsy(); }); - it('gives sessions in the project that created a skill that skill, and drops it once deleted', async () => { - const { skillOverrides } = await createFactoryStorageForTests(); - const { resolver } = await createLocalFactory(undefined, undefined, skillOverrides); - addProject(); - addProject({ id: 'project-2', repoFullName: 'octocat/other' }); - for (const id of ['session-reused', 'session-1', 'session-2']) addSession({ id }); - addSession({ id: 'session-other', projectRepositoryId: 'project-2' }); - const reusedContext = createGithubRequestContext('project-1', 'session-reused'); - const reused = (await resolver({ requestContext: reusedContext }))!; - await reused.skills?.maybeRefresh(); - // Prime the reuse record, as a session's first turn does. - await resolver({ requestContext: reusedContext }); - const notesIn = async (workspace: Awaited>>) => { - await workspace!.skills?.maybeRefresh(); - return workspace!.skills?.get('release-notes'); - }; - - const created = await skillOverrides.create({ - orgId: 'org-1', - projectId: 'project-1', - skillName: 'release-notes', - content: '---\nname: release-notes\ndescription: Write release notes\n---\n\n# Release notes\n', - updatedBy: 'admin-1', - }); - expect(created?.kind).toBe('created'); - - const session = await resolver({ requestContext: createGithubRequestContext('project-1', 'session-1') }); - const notes = await notesIn(session); - expect(notes?.description).toBe('Write release notes'); - expect(notes?.instructions).toContain('# Release notes'); - expect((await session!.skills?.list())?.map(skill => skill.name)).toContain('release-notes'); - expect(await resolver({ requestContext: reusedContext })).toBe(reused); - expect((await reused.skills?.get('release-notes'))?.instructions).toContain('# Release notes'); - const other = await resolver({ requestContext: createGithubRequestContext('project-2', 'session-other') }); - expect(await notesIn(other)).toBeFalsy(); - - await skillOverrides.delete({ orgId: 'org-1', projectId: 'project-1', skillName: 'release-notes' }); - expect( - await notesIn(await resolver({ requestContext: createGithubRequestContext('project-1', 'session-2') })), - ).toBeFalsy(); - expect(await resolver({ requestContext: reusedContext })).toBe(reused); - expect(await reused.skills?.get('release-notes')).toBeFalsy(); - }); - it('serves the original skills while edits cannot be read, and the edit once they can', async () => { const { skillOverrides } = await createFactoryStorageForTests(); const { resolver } = await createLocalFactory(undefined, undefined, skillOverrides); @@ -3944,81 +3899,6 @@ describe('FactorySkillSource layering', () => { expect(names).toEqual(['repo-only-skill', 'README.md']); }); - it("hides a repository skill named after a skill the project created, and not after another's edit", async () => { - const overrides = new Map([ - [ - 'release-notes', - { content: '---\nname: release-notes\ndescription: notes\n---\n', updatedAt: new Date(), created: true }, - ], - // An edit of an app skill the app no longer has serves nothing, so it reserves nothing. - [ - 'removed-app-skill', - { content: '---\nname: removed-app-skill\ndescription: gone\n---\n', updatedAt: new Date() }, - ], - ]); - const source = new FactorySkillSource( - repoFallback(['release-notes', 'removed-app-skill', 'repo-only-skill']), - [repoRoot], - undefined, - async () => true, - [], - async () => overrides, - ); - - expect((await source.readdir(repoRoot)).map(entry => entry.name)).toEqual([ - 'removed-app-skill', - 'repo-only-skill', - ]); - expect((await source.readdir(FACTORY_SKILLS_MOUNT)).map(entry => entry.name)).toContain('release-notes'); - expect(String(await source.readFile(path.join(FACTORY_SKILLS_MOUNT, 'release-notes', 'SKILL.md')))).toContain( - 'name: release-notes', - ); - }); - - it('serves a created skill whose name only a folder without a SKILL.md uses', async () => { - const localRoot = await makeLocalRoot({}); - // The app removed its release-notes skill but left the folder behind. - await fs.mkdir(path.join(localRoot, 'release-notes', 'references'), { recursive: true }); - const content = '---\nname: release-notes\ndescription: notes\n---\n\n# Ours\n'; - const source = new FactorySkillSource( - repoFallback([]), - [repoRoot], - localRoot, - async () => true, - [], - async () => new Map([['release-notes', { content, updatedAt: new Date(), created: true }]]), - ); - const skillDir = path.join(FACTORY_SKILLS_MOUNT, 'release-notes'); - - expect((await source.readdir(FACTORY_SKILLS_MOUNT)).map(entry => entry.name)).toContain('release-notes'); - expect((await source.readdir(skillDir)).map(entry => entry.name).sort()).toEqual(['SKILL.md', 'references']); - expect(await source.exists(path.join(skillDir, 'SKILL.md'))).toBe(true); - expect(String(await source.readFile(path.join(skillDir, 'SKILL.md')))).toBe(content); - }); - - it('serves a created skill whose name a stray file in the app skills folder uses', async () => { - const localRoot = await makeLocalRoot({}); - await fs.writeFile(path.join(localRoot, 'release-notes'), 'not a skill'); - const content = '---\nname: release-notes\ndescription: notes\n---\n\n# Ours\n'; - const source = new FactorySkillSource( - repoFallback([]), - [repoRoot], - localRoot, - async () => true, - [], - async () => new Map([['release-notes', { content, updatedAt: new Date(), created: true }]]), - ); - const skillDir = path.join(FACTORY_SKILLS_MOUNT, 'release-notes'); - - expect((await source.readdir(FACTORY_SKILLS_MOUNT)).find(entry => entry.name === 'release-notes')).toEqual({ - name: 'release-notes', - type: 'directory', - }); - expect(await source.readdir(skillDir)).toEqual([{ name: 'SKILL.md', type: 'file' }]); - expect((await source.stat(skillDir)).type).toBe('directory'); - expect(String(await source.readFile(path.join(skillDir, 'SKILL.md')))).toBe(content); - }); - it('picks up app-local skills added after the source was created', async () => { const localRoot = await makeLocalRoot({}); const source = new FactorySkillSource(repoFallback(['late-skill']), [repoRoot], localRoot); diff --git a/mastracode/factory/src/workspace.ts b/mastracode/factory/src/workspace.ts index 3d164fafedf..a2b0c81e867 100644 --- a/mastracode/factory/src/workspace.ts +++ b/mastracode/factory/src/workspace.ts @@ -203,14 +203,10 @@ class CodeSkillSource implements SkillSource { } } -/** - * A project's SKILL.md for one skill: an edit served in place of the original's, or, with `created`, a skill - * the project added that is served even when the app has no skill of that name. - */ +/** A project's edited SKILL.md, served in place of the original's. */ export interface FactorySkillOverride { content: string; updatedAt: Date; - created?: boolean; } const NO_SKILL_OVERRIDES: ReadonlyMap = new Map(); @@ -269,8 +265,8 @@ export class FactorySkillSource implements SkillSource { /** * The edit replacing this path, when it is a skill's SKILL.md. Only the instructions are - * edited; the skill's other files still come from its layer. `exists` and `readdir` only - * consult created skills, so an edit whose skill was removed from the app is never discovered. + * edited; the skill's other files still come from its layer. `exists` and `readdir` never + * consult edits, so an edit whose skill was removed from the app is never discovered. */ async #overrideFor(relativePath: string): Promise { const [skillName, file, ...rest] = relativePath.split(path.sep); @@ -278,57 +274,13 @@ export class FactorySkillSource implements SkillSource { return (await this.skillOverrides()).get(skillName); } - /** - * True when a code, folder, or bundled skill has this name, so a created skill of the name is its edit - * instead. Only a SKILL.md makes a skill, as for the catalog: a folder left without one serves nothing. - */ - async #servedByLayer(skillName: string): Promise { - const skillFile = path.join(skillName, 'SKILL.md'); - if (this.#codeSource && (await this.#codeSource.exists(skillName))) return true; - if (this.#localSource && (await this.#localSource.exists(skillFile))) return true; - return this.#bundledSource.exists(skillFile); - } - - /** Names of the skills the project created that no layer serves; each is a directory holding only its SKILL.md. */ - async #createdSkillNames(): Promise { - const names: string[] = []; - for (const [name, override] of await this.skillOverrides()) { - if (override.created && !(await this.#servedByLayer(name))) names.push(name); - } - return names; - } - - /** The created skill this mount-relative path is in (its directory or its SKILL.md), when no layer serves it. */ - async #createdSkillAt(relativePath: string): Promise<{ file: boolean; override: FactorySkillOverride } | undefined> { - const [skillName, file, ...rest] = relativePath.split(path.sep); - if (!skillName || rest.length > 0 || (file !== undefined && file !== 'SKILL.md')) return undefined; - const override = (await this.skillOverrides()).get(skillName); - if (!override?.created || (await this.#servedByLayer(skillName))) return undefined; - return { file: file !== undefined, override }; - } - - /** A created skill's folder: its SKILL.md, plus whatever an app skill left in a folder of the same name. */ - async #createdSkillEntries(relativePath: string): Promise { - const entries = new Map(); - for (const source of [this.#bundledSource, this.#localSource]) { - try { - for (const entry of (await source?.readdir(relativePath)) ?? []) entries.set(entry.name, entry); - } catch { - // Nothing under the name in this layer, or a file rather than a folder. - } - } - entries.set('SKILL.md', { name: 'SKILL.md', type: 'file' }); - return [...entries.values()]; - } - async exists(skillPath: string): Promise { if (!this.#isFactoryPath(skillPath)) return this.fallback.exists(skillPath); const relative = this.#factoryPath(skillPath); if (await this.#isHiddenReviewPath(relative)) return false; if (await this.#ownedByCode(relative)) return this.#codeSource!.exists(relative); if (this.#localSource && (await this.#localSource.exists(relative))) return true; - if (await this.#bundledSource.exists(relative)) return true; - return (await this.#createdSkillAt(relative)) !== undefined; + return this.#bundledSource.exists(relative); } async stat(skillPath: string): Promise { @@ -345,16 +297,6 @@ export class FactorySkillSource implements SkillSource { modifiedAt: override.updatedAt, }; } - const created = await this.#createdSkillAt(relative); - if (created) { - return { - name: relative, - type: 'directory', - size: 0, - createdAt: created.override.updatedAt, - modifiedAt: created.override.updatedAt, - }; - } return (await this.#layerFor(relative)).stat(relative); } @@ -372,11 +314,6 @@ export class FactorySkillSource implements SkillSource { const relative = this.#factoryPath(skillPath); if (await this.#isHiddenReviewPath(relative)) throw skillSourceEnoent(skillPath); if (relative !== '' && (await this.#ownedByCode(relative))) return this.#codeSource!.readdir(relative); - const created = relative === '' ? undefined : await this.#createdSkillAt(relative); - if (created) { - if (created.file) throw skillSourceEnoent(skillPath); - return this.#createdSkillEntries(relative); - } const [bundledExists, localExists] = await Promise.all([ this.#bundledSource.exists(relative), this.#localSource?.exists(relative) ?? Promise.resolve(false), @@ -384,21 +321,16 @@ export class FactorySkillSource implements SkillSource { if (!bundledExists && !localExists && !(relative === '' && this.#codeSource)) { throw skillSourceEnoent(skillPath); } - const [bundledEntries, localEntries, codeEntries, createdNames] = await Promise.all([ + const [bundledEntries, localEntries, codeEntries] = await Promise.all([ bundledExists ? this.#bundledSource.readdir(relative) : [], localExists ? this.#localSource!.readdir(relative) : [], relative === '' && this.#codeSource ? this.#codeSource.readdir('') : [], - relative === '' ? this.#createdSkillNames() : [], ]); const merged = new Map(); for (const entry of bundledEntries) merged.set(entry.name, entry); // Local entries override bundled names; code skills override both. for (const entry of localEntries) merged.set(entry.name, entry); for (const entry of codeEntries) merged.set(entry.name, entry); - // Created skills only fill names no layer serves a skill under; a stray file of that name doesn't hide one. - for (const name of createdNames) { - if (merged.get(name)?.type !== 'directory') merged.set(name, { name, type: 'directory' }); - } const entries = [...merged.values()]; if (relative !== '' || (await this.isReviewSession())) return entries; return entries.filter(entry => !REVIEW_ONLY_FACTORY_SKILLS.has(entry.name)); @@ -412,14 +344,13 @@ export class FactorySkillSource implements SkillSource { } /** - * Names the Factory mount serves: bundled skills plus the app's code and local skills and the - * project's created skills. Repository skills with these names are hidden so they cannot collide - * with Factory's copy. Recomputed per scan so skill refreshes pick up local changes. + * Names the Factory mount serves: bundled skills plus the app's code and local skills. + * Repository skills with these names are hidden so they cannot collide with + * Factory's copy. Recomputed per scan so skill refreshes pick up local changes. */ async #reservedNames(): Promise> { const reserved = new Set(FACTORY_SKILL_NAMES); for (const entry of (await this.#codeSource?.readdir('')) ?? []) reserved.add(entry.name); - for (const name of await this.#createdSkillNames()) reserved.add(name); if (!this.#localSource) return reserved; try { for (const entry of await this.#localSource.readdir('')) { @@ -1334,13 +1265,7 @@ export function createWorkspaceFactory(options: CreateWorkspaceFactoryOptions = return { revision: snapshot.revision, overrides: new Map( - snapshot.overrides.map( - o => - [ - o.skillName, - { content: o.content, updatedAt: o.updatedAt, ...(o.kind === 'created' ? { created: true } : {}) }, - ] as const, - ), + snapshot.overrides.map(o => [o.skillName, { content: o.content, updatedAt: o.updatedAt }] as const), ), }; })(); diff --git a/mastracode/mastra-factory/CHANGELOG.md b/mastracode/mastra-factory/CHANGELOG.md index b938042f061..3e728bb0198 100644 --- a/mastracode/mastra-factory/CHANGELOG.md +++ b/mastracode/mastra-factory/CHANGELOG.md @@ -1,12 +1,5 @@ # create-factory -## 0.5.0-alpha.6 - -### Patch Changes - -- Updated dependencies [[`bfcb0f7`](https://github.com/mastra-ai/mastra/commit/bfcb0f738dc0891014c0802d4d0fc5982fca83ee), [`383a19d`](https://github.com/mastra-ai/mastra/commit/383a19d0474ea150b8e209e20963ee6f6206393e)]: - - mastra@1.40.0-alpha.6 - ## 0.5.0-alpha.5 ### Minor Changes diff --git a/mastracode/mastra-factory/package.json b/mastracode/mastra-factory/package.json index 30939f36c00..f0b372819e8 100644 --- a/mastracode/mastra-factory/package.json +++ b/mastracode/mastra-factory/package.json @@ -1,6 +1,6 @@ { "name": "create-factory", - "version": "0.5.0-alpha.6", + "version": "0.5.0-alpha.5", "description": "Create a Mastra Factory project: an agent-powered software delivery environment built on Mastra. Run `npm create factory` to scaffold and get started.", "type": "module", "license": "Apache-2.0", diff --git a/mastracode/sdk/CHANGELOG.md b/mastracode/sdk/CHANGELOG.md index f8ab5314ff4..3fd577e1d73 100644 --- a/mastracode/sdk/CHANGELOG.md +++ b/mastracode/sdk/CHANGELOG.md @@ -1,13 +1,5 @@ # @mastra/code-sdk -## 1.19.1-alpha.7 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/client-js@1.60.1-alpha.6 - ## 1.19.1-alpha.6 ### Patch Changes diff --git a/mastracode/sdk/package.json b/mastracode/sdk/package.json index d2e5e6c32e1..1d7781cf804 100644 --- a/mastracode/sdk/package.json +++ b/mastracode/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/code-sdk", - "version": "1.19.1-alpha.7", + "version": "1.19.1-alpha.6", "description": "Mastra Code SDK: the agent core behind Mastra Code (everything except the TUI) — build your own UIs and surfaces on top of it", "type": "module", "publishConfig": { diff --git a/mastracode/tui/CHANGELOG.md b/mastracode/tui/CHANGELOG.md index 50052a8f505..9be7e44fab1 100644 --- a/mastracode/tui/CHANGELOG.md +++ b/mastracode/tui/CHANGELOG.md @@ -1,13 +1,5 @@ # mastracode -## 0.50.1-alpha.7 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/code-sdk@1.19.1-alpha.7 - ## 0.50.1-alpha.6 ### Patch Changes diff --git a/mastracode/tui/package.json b/mastracode/tui/package.json index 7eac0c32e71..e124dfceaee 100644 --- a/mastracode/tui/package.json +++ b/mastracode/tui/package.json @@ -1,6 +1,6 @@ { "name": "mastracode", - "version": "0.50.1-alpha.7", + "version": "0.50.1-alpha.6", "description": "", "type": "module", "files": [ diff --git a/observability/otel-bridge/src/bridge.test.ts b/observability/otel-bridge/src/bridge.test.ts index c63d1d8fa21..6a622a29f79 100644 --- a/observability/otel-bridge/src/bridge.test.ts +++ b/observability/otel-bridge/src/bridge.test.ts @@ -15,7 +15,7 @@ import { InternalSpans, SamplingStrategyType, SpanType, TracingEventType } from import { InMemoryStore } from '@mastra/core/storage'; import { createTool } from '@mastra/core/tools'; import { DefaultObservabilityInstance, Observability, TestExporter } from '@mastra/observability'; -import { context, isSpanContextValid, logs as coreLogs, trace } from '@opentelemetry/api'; +import { context, isSpanContextValid, trace } from '@opentelemetry/api'; import { logs as otelLogs, SeverityNumber } from '@opentelemetry/api-logs'; import { InMemoryLogRecordExporter, LoggerProvider, SimpleLogRecordProcessor } from '@opentelemetry/sdk-logs'; import { BasicTracerProvider, InMemorySpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base'; @@ -1010,88 +1010,6 @@ describe('OtelBridge', () => { }); }); - // An app on OpenTelemetry JS SDK 3 registers its LoggerProvider with `logs` - // from `@opentelemetry/api`. That registry is separate from the one in - // `@opentelemetry/api-logs`, which SDK 2 apps use. (#29695) - describe('LoggerProvider registered through @opentelemetry/api', () => { - function makeLogEvent(message: string): LogEvent { - return { type: 'log', log: { logId: 'log-1', timestamp: new Date(), level: 'info', message } }; - } - - function makeProvider() { - const exporter = new InMemoryLogRecordExporter(); - const provider = new LoggerProvider({ processors: [new SimpleLogRecordProcessor({ exporter })] }); - return { exporter, provider }; - } - - /** Runs `fn` with nothing in the api-logs registry, as in an app that only has SDK 3. */ - async function withOnlyCoreRegistry(fn: () => Promise): Promise { - otelLogs.disable(); - try { - await fn(); - } finally { - coreLogs.disable(); - otelLogs.setGlobalLoggerProvider(loggerProvider); - } - } - - it('delivers Mastra logs to the app log exporter (#29695)', async () => { - await withOnlyCoreRegistry(async () => { - const { exporter, provider } = makeProvider(); - coreLogs.setGlobalLoggerProvider(provider); - - const bridge = new OtelBridge(); - await bridge.onLogEvent(makeLogEvent('from an SDK 3 app')); - - expect(exporter.getFinishedLogRecords().map(record => record.body)).toEqual(['from an SDK 3 app']); - await bridge.shutdown(); - }); - }); - - it('delivers Mastra logs when the provider is registered after the bridge is constructed', async () => { - await withOnlyCoreRegistry(async () => { - const bridge = new OtelBridge(); - await bridge.onLogEvent(makeLogEvent('before registration')); - - const { exporter, provider } = makeProvider(); - coreLogs.setGlobalLoggerProvider(provider); - await bridge.onLogEvent(makeLogEvent('after registration')); - - expect(exporter.getFinishedLogRecords().map(record => record.body)).toEqual(['after registration']); - await bridge.shutdown(); - }); - }); - - it('flushes the provider on flush()', async () => { - await withOnlyCoreRegistry(async () => { - const { provider } = makeProvider(); - const forceFlush = vi.spyOn(provider, 'forceFlush'); - coreLogs.setGlobalLoggerProvider(provider); - - const bridge = new OtelBridge(); - await bridge.flush(); - - expect(forceFlush).toHaveBeenCalledTimes(1); - await bridge.shutdown(); - }); - }); - - it('says once at debug level that logs are not exported when no provider is registered anywhere', async () => { - await withOnlyCoreRegistry(async () => { - const debug = vi.fn(); - const bridge = new OtelBridge(); - bridge.__setLogger({ debug, info: vi.fn(), warn: vi.fn(), error: vi.fn() } as any); - - await bridge.onLogEvent(makeLogEvent('dropped')); - await bridge.onLogEvent(makeLogEvent('dropped again')); - - const notes = debug.mock.calls.filter(([message]) => String(message).includes('logger provider')); - expect(notes).toHaveLength(1); - await bridge.shutdown(); - }); - }); - }); - describe('custom providers', () => { it('should use a custom tracerProvider to create spans without touching the global', async () => { trace.disable(); diff --git a/observability/otel-bridge/src/bridge.ts b/observability/otel-bridge/src/bridge.ts index 57292ac9fa3..eb4337a0efd 100644 --- a/observability/otel-bridge/src/bridge.ts +++ b/observability/otel-bridge/src/bridge.ts @@ -26,7 +26,6 @@ import { TracingEventType } from '@mastra/core/observability'; import { BaseExporter, getExternalParentId } from '@mastra/observability'; import type { BaseExporterConfig } from '@mastra/observability'; import { SpanConverter, convertLog, getSpanKind } from '@mastra/otel-exporter'; -import * as otelApi from '@opentelemetry/api'; import { trace as otelTrace, context as otelContext, isSpanContextValid, TraceFlags } from '@opentelemetry/api'; import type { Span as OtelSpan, Context as OtelContext, Link, TracerProvider, Tracer } from '@opentelemetry/api'; import { logs as otelLogs } from '@opentelemetry/api-logs'; @@ -44,41 +43,6 @@ function toOtelLinks(links: SpanLink[]): Link[] { .map(context => ({ context })); } -type LogsApi = { getLoggerProvider(): LoggerProvider }; - -/** - * The global logs registries an app can register its LoggerProvider with. - * - * OpenTelemetry JS SDK 3 registers through `logs` from `@opentelemetry/api` - * (1.10 and later). SDK 2 registers through `logs` from `@opentelemetry/api-logs`. - * The two registries do not see each other, so the bridge has to look at both. - * - * `logs` is read off the namespace because `@opentelemetry/api` below 1.10 does - * not export it, and a named import would fail to link there. - */ -function globalLogsApis(): LogsApi[] { - const coreLogs = (otelApi as { logs?: LogsApi }).logs; - return coreLogs ? [coreLogs, otelLogs] : [otelLogs]; -} - -/** With no provider registered, both logs APIs return their own proxy, which drops every record. */ -function isUnregisteredProxy(provider: LoggerProvider): boolean { - return typeof (provider as { _setDelegate?: unknown })._setDelegate === 'function'; -} - -/** - * The LoggerProvider the app registered globally, from whichever registry holds one. - * `registered` is false when neither does, and `provider` is then a no-op proxy. - */ -function getGlobalLoggerProvider(): { provider: LoggerProvider; registered: boolean } { - const apis = globalLogsApis(); - for (const api of apis) { - const provider = api.getLoggerProvider(); - if (!isUnregisteredProxy(provider)) return { provider, registered: true }; - } - return { provider: apis[0]!.getLoggerProvider(), registered: false }; -} - const SETUP_DOCS_URL = 'https://mastra.ai/reference/observability/tracing/bridges/otel#setup-requirements'; export type OtelBridgeConfig = BaseExporterConfig & { @@ -113,7 +77,6 @@ export type OtelBridgeConfig = BaseExporterConfig & { export class OtelBridge extends BaseExporter implements ObservabilityBridge { name = 'otel'; private tracerProvider: TracerProvider; - /** The provider passed in config, or the global one the current `otelLogger` came from. */ private loggerProvider: LoggerProvider; private otelTracer: Tracer; private otelLogger: OtelLogger; @@ -123,7 +86,6 @@ export class OtelBridge extends BaseExporter implements ObservabilityBridge { private hasCustomTracerProvider: boolean; private hasCustomLoggerProvider: boolean; private warnedNoTracerProvider = false; - private notedNoLoggerProvider = false; constructor(config: OtelBridgeConfig = {}) { super(config); @@ -131,37 +93,10 @@ export class OtelBridge extends BaseExporter implements ObservabilityBridge { this.hasCustomLoggerProvider = config.loggerProvider !== undefined; this.tracerProvider = config.tracerProvider ?? otelTrace.getTracerProvider(); this.otelTracer = this.tracerProvider.getTracer('@mastra/otel-bridge', '1.0.0'); - this.loggerProvider = config.loggerProvider ?? getGlobalLoggerProvider().provider; + this.loggerProvider = config.loggerProvider ?? otelLogs.getLoggerProvider(); this.otelLogger = this.loggerProvider.getLogger('@mastra/otel-bridge', '1.0.0'); } - /** - * The logger to emit through. - * - * Without a `loggerProvider` in config, the global provider is looked up on - * every call: the OTEL SDK is often registered after the bridge is constructed, - * and which registry it lands in depends on the SDK line the app is on. - */ - private resolveLogger(): OtelLogger { - if (this.hasCustomLoggerProvider) return this.otelLogger; - - const { provider, registered } = getGlobalLoggerProvider(); - if (provider !== this.loggerProvider) { - this.loggerProvider = provider; - this.otelLogger = provider.getLogger('@mastra/otel-bridge', '1.0.0'); - } - if (!registered && !this.notedNoLoggerProvider) { - this.notedNoLoggerProvider = true; - this.logger.debug( - '[OtelBridge] No OpenTelemetry logger provider is registered globally, so Mastra logs will not be ' + - 'exported through OpenTelemetry. Register one (for example with `logRecordProcessors` on `NodeSDK`, or ' + - '`logs.setGlobalLoggerProvider(provider)`), or pass it directly with `new OtelBridge({ loggerProvider })`. ' + - `See ${SETUP_DOCS_URL}`, - ); - } - return this.otelLogger; - } - /** * Handle Mastra tracing events * @@ -181,7 +116,7 @@ export class OtelBridge extends BaseExporter implements ObservabilityBridge { * * If the user has not registered a LoggerProvider (e.g. via @opentelemetry/sdk-logs * or NodeSDK's logRecordProcessor option), the API returns a no-op logger and - * emit() is a no-op — the bridge degrades gracefully, with one debug line. + * emit() is a silent no-op — the bridge degrades gracefully. * * Trace correlation: * - If the log carries a spanId we have an OTEL span for, emit under that span's @@ -202,7 +137,7 @@ export class OtelBridge extends BaseExporter implements ObservabilityBridge { const logContext = this.resolveLogContext(params.traceId, params.spanId); - this.resolveLogger().emit({ + this.otelLogger.emit({ timestamp: params.timestamp, severityNumber: params.severityNumber, severityText: params.severityText, @@ -540,10 +475,10 @@ export class OtelBridge extends BaseExporter implements ObservabilityBridge { */ async flush(): Promise { // Re-resolve the global providers on every flush: the OTEL SDK is often - // registered after the bridge is constructed, and the logs API only returns - // the real provider once one has been registered. + // registered after the bridge is constructed, and `otelLogs.getLoggerProvider()` + // only returns the real provider once one has been registered. const tracerProvider = this.hasCustomTracerProvider ? this.tracerProvider : otelTrace.getTracerProvider(); - const loggerProvider = this.hasCustomLoggerProvider ? this.loggerProvider : getGlobalLoggerProvider().provider; + const loggerProvider = this.hasCustomLoggerProvider ? this.loggerProvider : otelLogs.getLoggerProvider(); await this.flushProvider(tracerProvider, 'tracer'); await this.flushProvider(loggerProvider, 'logger'); } diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 724c31ede6d..cc38e39c071 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,17 +1,5 @@ # mastra -## 1.40.0-alpha.6 - -### Patch Changes - -- The Factory sidebar now groups sessions by board and shows a second line under each session by default, with when it last changed and its pull request. Turn on **Compact view** or set **Group** to **None** in the sidebar's properties menu to get one line per session or a single list back. Settings you already changed keep their values; the rest follow the new defaults. ([#30656](https://github.com/mastra-ai/mastra/pull/30656)) - -- Factory **Settings** now shows theme and completion sound on **My account**, next to your profile and log out, instead of on a separate **Preferences** page. Settings opens on **My account**, and old Preferences links go there. ([#30658](https://github.com/mastra-ai/mastra/pull/30658)) - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/deployer@1.84.0-alpha.6 - ## 1.40.0-alpha.5 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index a0c4ce4afa6..234afa84cc2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "mastra", - "version": "1.40.0-alpha.6", + "version": "1.40.0-alpha.5", "license": "Apache-2.0", "description": "cli for mastra", "type": "module", diff --git a/packages/cli/src/commands/api/descriptors.test.ts b/packages/cli/src/commands/api/descriptors.test.ts index 36f4faeb37b..64b77cad46a 100644 --- a/packages/cli/src/commands/api/descriptors.test.ts +++ b/packages/cli/src/commands/api/descriptors.test.ts @@ -151,7 +151,6 @@ describe('api command descriptors', () => { factoryBoardDelete: ['boardDelete', ['id', 'boardKey'], true, true, false], factoryBoardReset: ['boardReset', ['id', 'boardKey'], true, true, false], factorySkills: ['skillList', [], true, false, false], - factorySkillCreate: ['skillCreate', ['id'], true, true, false], factorySkillUpdate: ['skillOverrideSave', ['id', 'name'], true, true, false], factorySkillRevert: ['skillOverrideRevert', ['id', 'name'], false, false, false], 'factoryIntake-routeList': ['intakeRouteList', ['id'], true, false, false], diff --git a/packages/cli/src/commands/api/factory-route-metadata.generated.ts b/packages/cli/src/commands/api/factory-route-metadata.generated.ts index 3d2e09a68ba..c9ef27e8c5b 100644 --- a/packages/cli/src/commands/api/factory-route-metadata.generated.ts +++ b/packages/cli/src/commands/api/factory-route-metadata.generated.ts @@ -76,7 +76,7 @@ export const FACTORY_API_ROUTE_METADATA = { "contractKey": "skillOverrideRevert", "method": "DELETE", "path": "/web/factory/projects/:id/skills/:name", - "description": "Revert a project's edited Factory skill to its original SKILL.md, or delete a skill the project created", + "description": "Revert a project's edited Factory skill to its original SKILL.md", "pathParams": [ "id", "name" @@ -1111,25 +1111,6 @@ export const FACTORY_API_ROUTE_METADATA = { "kind": "record" } }, - "POST /web/factory/projects/:id/skills": { - "contractKey": "skillCreate", - "method": "POST", - "path": "/web/factory/projects/:id/skills", - "description": "Create a skill for one Factory project", - "pathParams": [ - "id" - ], - "queryParams": [], - "bodyParams": [ - "content", - "name" - ], - "hasQuery": false, - "hasBody": true, - "responseShape": { - "kind": "single" - } - }, "POST /web/factory/projects/:id/work-items": { "contractKey": "workItemCreate", "method": "POST", @@ -1245,7 +1226,7 @@ export const FACTORY_API_ROUTE_METADATA = { "contractKey": "skillOverrideSave", "method": "PUT", "path": "/web/factory/projects/:id/skills/:name", - "description": "Save a project's SKILL.md for a Factory skill: an edit of an app skill, or a skill it created", + "description": "Save a project's edited SKILL.md for a Factory skill", "pathParams": [ "id", "name" @@ -1433,18 +1414,11 @@ export const FACTORY_API_ROUTE_SCHEMAS = { "type": "object", "properties": { "skill": { - "anyOf": [ - { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - }, - { - "type": "null" - } - ] + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} } }, "required": [ @@ -12564,66 +12538,6 @@ export const FACTORY_API_ROUTE_SCHEMAS = { "additionalProperties": {} } }, - "POST /web/factory/projects/:id/skills": { - "path": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "id": { - "type": "string", - "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$" - } - }, - "required": [ - "id" - ] - }, - "body": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "name": { - "$ref": "#/$defs/__schema0" - }, - "content": { - "$ref": "#/$defs/__schema1" - } - }, - "required": [ - "name", - "content" - ], - "additionalProperties": false, - "$defs": { - "__schema0": { - "type": "string", - "maxLength": 64, - "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$" - }, - "__schema1": { - "type": "string", - "minLength": 1, - "maxLength": 200000 - } - } - }, - "response": { - "$schema": "https://json-schema.org/draft/2020-12/schema", - "type": "object", - "properties": { - "skill": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} - } - }, - "required": [ - "skill" - ] - } - }, "POST /web/factory/projects/:id/work-items": { "path": { "$schema": "https://json-schema.org/draft/2020-12/schema", @@ -13445,7 +13359,6 @@ export const FACTORY_API_ROUTE_CATALOG = { "intakeRouteAgain": "POST /web/factory/projects/:id/intake/not-routed/:decisionId/route-again", "intakeTest": "POST /web/factory/projects/:id/intake/test", "workItemStart": "POST /web/factory/projects/:id/runs/start", - "skillCreate": "POST /web/factory/projects/:id/skills", "workItemCreate": "POST /web/factory/projects/:id/work-items", "workItemAutomationRun": "POST /web/factory/projects/:id/work-items/:workItemId/automation-runs", "workItemTransition": "POST /web/factory/projects/:id/work-items/:workItemId/transition", diff --git a/packages/cli/src/commands/api/index.ts b/packages/cli/src/commands/api/index.ts index 2ab6bcc3aea..7a75ca36e00 100644 --- a/packages/cli/src/commands/api/index.ts +++ b/packages/cli/src/commands/api/index.ts @@ -873,21 +873,9 @@ export function registerApiCommand(program: CommanderCommand): void { const factorySkill = factory .command('skill') - .description("Create and edit a Factory project's skills; organization admins only"); - addAction(factorySkill, 'create', FACTORY_API_ROUTE_CATALOG.skillCreate, { - description: 'Create a skill for one Factory project; the frontmatter name must match the skill name', - input: 'required', - routePlacement: 'origin', - examples: [ - { - description: 'Create a release-notes skill for one project', - command: `mastra api factory skill create '{"name":"release-notes","content":"---\\nname: release-notes\\ndescription: Write release notes for a merged change\\n---\\n\\n# Release notes\\n"}'`, - }, - ], - }); + .description("Edit a Factory project's skills; organization admins only"); addAction(factorySkill, 'update', FACTORY_API_ROUTE_CATALOG.skillOverrideSave, { - description: - 'Save a SKILL.md for one Factory project: an edit of an app skill, or a skill the project created; the frontmatter name must match the skill name', + description: 'Save an edited SKILL.md for one Factory project; the frontmatter name must match the skill name', input: 'required', routePlacement: 'origin', examples: [ @@ -898,8 +886,7 @@ export function registerApiCommand(program: CommanderCommand): void { ], }); addAction(factorySkill, 'revert', FACTORY_API_ROUTE_CATALOG.skillOverrideRevert, { - description: - "Revert a Factory project's edit so the skill uses its original SKILL.md, or delete a skill the project created", + description: "Revert a Factory project's edit so the skill uses its original SKILL.md", routePlacement: 'origin', }); diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index d110e1b9408..bbfc39d8cec 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,26 +1,5 @@ # @mastra/core -## 1.84.0-alpha.6 - -### Minor Changes - -- Knowledge storage can supply scope declarations, access rules included. ([#29428](https://github.com/mastra-ai/mastra/pull/29428)) - - A store returns declarations from `getScopeDeclarations()` (none by default). Knowledge merges them under its config's: the config wins on a key both declare, and a declaration that doesn't compile is skipped with a warning. When stored scopes come from a skipped declaration, the declaration check's error names that declaration and why it was skipped, so it can be fixed in the store. The store's answer is reused for 30 seconds and read again after `renameScopeDeclaration`, so a declaration the store adds, removes or changes (access rules included) applies within that window without a store read on every call. Revoking access through the store can therefore take up to 30 seconds to take effect. - - ```ts - class ImportingKnowledgeStorage extends InMemoryKnowledgeStorage { - override async getScopeDeclarations() { - return { - 'imports:$name': {}, - 'linear:$account:$connection': { access: [{ principal: 'imports:all', role: 'viewer' }] }, - }; - } - } - ``` - - Runs that hold `imports:all` then read every Linear connection's pages. - ## 1.84.0-alpha.5 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index 949cfe5b907..4329a7c80ce 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/core", - "version": "1.84.0-alpha.6", + "version": "1.84.0-alpha.5", "license": "Apache-2.0", "type": "module", "main": "dist/index.js", diff --git a/packages/create-mastra/CHANGELOG.md b/packages/create-mastra/CHANGELOG.md index dc0f5119c2d..03f86055703 100644 --- a/packages/create-mastra/CHANGELOG.md +++ b/packages/create-mastra/CHANGELOG.md @@ -1,7 +1,5 @@ # create-mastra -## 1.40.0-alpha.6 - ## 1.40.0-alpha.5 ## 1.40.0-alpha.4 diff --git a/packages/create-mastra/package.json b/packages/create-mastra/package.json index 8b7e2a925cf..0744e745f85 100644 --- a/packages/create-mastra/package.json +++ b/packages/create-mastra/package.json @@ -1,6 +1,6 @@ { "name": "create-mastra", - "version": "1.40.0-alpha.6", + "version": "1.40.0-alpha.5", "description": "Create Mastra apps with one command", "license": "Apache-2.0", "type": "module", diff --git a/packages/deployer/CHANGELOG.md b/packages/deployer/CHANGELOG.md index 72d55907ebf..2fc77b65d96 100644 --- a/packages/deployer/CHANGELOG.md +++ b/packages/deployer/CHANGELOG.md @@ -1,13 +1,5 @@ # @mastra/deployer -## 1.84.0-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/server@1.84.0-alpha.6 - ## 1.84.0-alpha.5 ### Patch Changes diff --git a/packages/deployer/package.json b/packages/deployer/package.json index abc382ff30c..07eeddd9540 100644 --- a/packages/deployer/package.json +++ b/packages/deployer/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/deployer", - "version": "1.84.0-alpha.6", + "version": "1.84.0-alpha.5", "description": "", "type": "module", "files": [ diff --git a/packages/mcp-docs-server/CHANGELOG.md b/packages/mcp-docs-server/CHANGELOG.md index 2307b3d0e56..3149add7065 100644 --- a/packages/mcp-docs-server/CHANGELOG.md +++ b/packages/mcp-docs-server/CHANGELOG.md @@ -1,12 +1,5 @@ # @mastra/mcp-docs-server -## 1.3.14-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - ## 1.3.14-alpha.5 ### Patch Changes diff --git a/packages/mcp-docs-server/package.json b/packages/mcp-docs-server/package.json index 36fc0ac104d..9e637087ae9 100644 --- a/packages/mcp-docs-server/package.json +++ b/packages/mcp-docs-server/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/mcp-docs-server", - "version": "1.3.14-alpha.6", + "version": "1.3.14-alpha.5", "description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.", "type": "module", "main": "dist/index.js", diff --git a/packages/platform/CHANGELOG.md b/packages/platform/CHANGELOG.md index 34736d81589..940100dac15 100644 --- a/packages/platform/CHANGELOG.md +++ b/packages/platform/CHANGELOG.md @@ -1,35 +1,3 @@ # @mastra/platform -## 0.1.0-alpha.1 - -### Minor Changes - -- Added `PlatformBrowser`, a Stagehand browser backed by a Mastra Platform browser session. By default it provisions a session with `POST /v1/browsers/sessions` on the Platform and connects to the returned CDP URL; pass `cdpUrl` to connect to a session you already provisioned, with no token or API call. The access token falls back to `MASTRA_PLATFORM_ACCESS_TOKEN` / `MASTRA_PLATFORM_SECRET_KEY`, the project to `MASTRA_PROJECT_ID`, and the API URL to `MASTRA_BROWSER_API_URL`. `@mastra/platform` now depends on `@mastra/stagehand` at runtime. ([#29428](https://github.com/mastra-ai/mastra/pull/29428)) - - ```ts - import { PlatformBrowser } from '@mastra/platform'; - - const agent = new Agent({ name: 'browser-agent', model, browser: new PlatformBrowser() }); - ``` - -- Added `@mastra/platform`: hosted Mastra Platform Memory and Knowledge clients, with Platform Sandbox and Filesystem re-exported from `@mastra/platform-workspace`. `PlatformMemory` is a drop-in `memory` for `Agent` that loads observations and recent messages from a Platform Memory instance and saves each turn back; observation and reflection run on the Platform. `PlatformMemoryClient` exposes the same API directly. Credentials fall back to `MASTRA_PLATFORM_ACCESS_TOKEN` / `MASTRA_PLATFORM_SECRET_KEY`. `PlatformMemory` uses `MASTRA_MEMORY_INSTANCE_ID`; `PlatformKnowledge` uses `MASTRA_KNOWLEDGE_INSTANCE_ID`. `PlatformKnowledge` takes every scope declaration and access rule from its instance, Memory's and Platform importers' included, and has no `scopes` option. Agents read imported pages when their runs hold the scope an importer's rule grants (for now `imports:all`). ([#29428](https://github.com/mastra-ai/mastra/pull/29428)) - - ```ts - import { PlatformMemory, PlatformKnowledge, PlatformSandbox, PlatformFilesystem } from '@mastra/platform'; - - const agent = new Agent({ name: 'assistant', model, memory: new PlatformMemory() }); - ``` - -### Patch Changes - -- `PlatformKnowledge` now supports listing pins: `knowledge_pin` with `kind: 'list'` pins a page's listing on hosted Knowledge instead of refusing it as an old storage adapter. ([#29428](https://github.com/mastra-ai/mastra/pull/29428)) - -- `PlatformMemory` fixes for read-only runs and working memory: ([#29428](https://github.com/mastra-ai/mastra/pull/29428)) - - - A read-only run (`memory: { options: { readOnly: true } }`) now sees the thread's observations and unobserved messages, read through the Memory instance's read-only context route. Before, it got no stored context at all. It still saves nothing and starts no observation. - - The `workingMemory` option now delivers what it says: `readonly` and `tool` add the resource's stored working memory to each run's prompt, read fresh each run; `tool` also tells the agent to update it with `updateWorkingMemory`; `off` leaves it out. Before, stored working memory never reached the prompt in any mode. - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - See [release notes](https://github.com/mastra-ai/mastra/releases) for published changes. diff --git a/packages/platform/package.json b/packages/platform/package.json index ca690d37ca0..c2e3bf94000 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/platform", - "version": "0.1.0-alpha.1", + "version": "0.1.0-alpha.0", "description": "Mastra Platform hosted Memory, Knowledge, Browser, and workspace clients", "type": "module", "main": "dist/index.js", diff --git a/packages/playground-ui/CHANGELOG.md b/packages/playground-ui/CHANGELOG.md index 5ba7925a391..6ca9957c50c 100644 --- a/packages/playground-ui/CHANGELOG.md +++ b/packages/playground-ui/CHANGELOG.md @@ -1,14 +1,5 @@ # @mastra/playground-ui -## 69.1.0-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/client-js@1.60.1-alpha.6 - - @mastra/react@1.15.1-alpha.6 - ## 69.1.0-alpha.5 ### Patch Changes diff --git a/packages/playground-ui/package.json b/packages/playground-ui/package.json index 6c1b54a190e..1a8aa76db5c 100644 --- a/packages/playground-ui/package.json +++ b/packages/playground-ui/package.json @@ -1,7 +1,7 @@ { "name": "@mastra/playground-ui", "type": "module", - "version": "69.1.0-alpha.6", + "version": "69.1.0-alpha.5", "description": "Mastra Playground components", "sideEffects": [ "**/*.css" diff --git a/packages/playground-ui/src/ds/components/CodeDiff/code-diff.css b/packages/playground-ui/src/ds/components/CodeDiff/code-diff.css index e1a83211f0d..f7ddb710e59 100644 --- a/packages/playground-ui/src/ds/components/CodeDiff/code-diff.css +++ b/packages/playground-ui/src/ds/components/CodeDiff/code-diff.css @@ -12,10 +12,3 @@ --diffs-bg-separator-override: var(--muted); --diffs-fg-number-override: var(--placeholder); } - -/* Under a file header the lines run flush from the header to the card's bottom edge, like a pull request. - The horizontal scrollbar only takes room when lines overflow. */ -.code-diff[data-header] { - --diffs-gap-block: 0px; - --diffs-overflow-override: auto; -} diff --git a/packages/playground-ui/src/ds/components/CodeDiff/code-diff.tsx b/packages/playground-ui/src/ds/components/CodeDiff/code-diff.tsx index f469a21ce05..69ebe8f8d51 100644 --- a/packages/playground-ui/src/ds/components/CodeDiff/code-diff.tsx +++ b/packages/playground-ui/src/ds/components/CodeDiff/code-diff.tsx @@ -97,11 +97,7 @@ export function CodeDiff({ className, layout, overflow = 'wrap', header, ref, .. }; return ( -
+
{header ? ( @huggingface/transformers': '-' @@ -2060,7 +2060,7 @@ importers: dependencies: voyageai: specifier: ^0.3.1 - version: 0.3.1(encoding@0.1.14)(onnxruntime-node@1.24.3) + version: 0.3.1(encoding@0.1.14)(onnxruntime-node@1.30.0) devDependencies: '@internal/ai-sdk-v4': specifier: workspace:* @@ -2508,16 +2508,16 @@ importers: version: 22.19.15 msw: specifier: ^2.12.11 - version: 2.15.0(@types/node@22.19.15)(typescript@6.0.3) + version: 2.15.0(@types/node@22.19.15)(typescript@7.0.2) tsdown: specifier: 0.23.1 - version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@6.0.3) + version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@7.0.2) typescript: specifier: catalog:ts6 - version: 6.0.3 + version: 7.0.2 vitest: specifier: 'catalog:' - version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) mastracode/factory-ui: dependencies: @@ -2605,7 +2605,7 @@ importers: version: 30.1.3(@noble/hashes@2.4.0) msw: specifier: ^2.15.0 - version: 2.15.0(@types/node@22.19.15)(typescript@6.0.3) + version: 2.15.0(@types/node@22.19.15)(typescript@7.0.2) react-grab: specifier: ^0.1.50 version: 0.1.50(react@19.3.1) @@ -2614,13 +2614,13 @@ importers: version: 4.3.3 typescript: specifier: catalog:ts6 - version: 6.0.3 + version: 7.0.2 vite: specifier: ^8.3.5 version: 8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) vitest: specifier: 'catalog:' - version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) mastracode/mastra-factory: dependencies: @@ -2790,19 +2790,19 @@ importers: version: 22.19.15 msw: specifier: ^2.12.11 - version: 2.15.0(@types/node@22.19.15)(typescript@6.0.3) + version: 2.15.0(@types/node@22.19.15)(typescript@7.0.2) tsdown: specifier: 0.23.1 - version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@6.0.3) + version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@7.0.2) tsx: specifier: 'catalog:' version: 4.23.15 typescript: specifier: catalog:ts6 - version: 6.0.3 + version: 7.0.2 vitest: specifier: 'catalog:' - version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) mastracode/tui: dependencies: @@ -2935,16 +2935,16 @@ importers: version: 6.0.0 tsdown: specifier: 0.23.1 - version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@6.0.3) + version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@7.0.2) tsx: specifier: 'catalog:' version: 4.23.15 typescript: specifier: catalog:ts6 - version: 6.0.3 + version: 7.0.2 vitest: specifier: 'catalog:' - version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) observability/_test-utils: devDependencies: @@ -3256,7 +3256,7 @@ importers: version: 5.14.0(@opentelemetry/api@1.10.0) '@langfuse/otel': specifier: ^5.14.0 - version: 5.14.0(@opentelemetry/api@1.10.0)(@opentelemetry/core@2.12.0(@opentelemetry/api@1.10.0))(@opentelemetry/exporter-trace-otlp-http@0.300.0(@opentelemetry/api@1.10.0))(@opentelemetry/otlp-exporter-base@0.300.0(@opentelemetry/api@1.10.0))(@opentelemetry/sdk-trace-base@2.12.0(@opentelemetry/api@1.10.0)) + version: 5.14.0(@opentelemetry/api@1.10.0)(@opentelemetry/core@2.12.0(@opentelemetry/api@1.10.0))(@opentelemetry/exporter-trace-otlp-http@0.300.0(@opentelemetry/api@1.10.0))(@opentelemetry/otlp-exporter-base@0.300.0(@opentelemetry/api@1.10.0))(@opentelemetry/sdk-trace-base@2.12.1(@opentelemetry/api@1.10.0)) '@mastra/observability': specifier: workspace:* version: link:../mastra @@ -3278,7 +3278,7 @@ importers: version: 1.10.0 '@opentelemetry/sdk-trace-base': specifier: ^2.12.0 - version: 2.12.0(@opentelemetry/api@1.10.0) + version: 2.12.1(@opentelemetry/api@1.10.0) '@types/node': specifier: 22.19.15 version: 22.19.15 @@ -3424,16 +3424,16 @@ importers: version: link:../../packages/core '@opentelemetry/context-async-hooks': specifier: ^2.12.0 - version: 2.12.0(@opentelemetry/api@1.10.0) + version: 2.12.1(@opentelemetry/api@1.10.0) '@opentelemetry/sdk-logs': specifier: ^0.223.0 - version: 0.223.0(@opentelemetry/api@1.10.0) + version: 0.223.2(@opentelemetry/api@1.10.0) '@opentelemetry/sdk-trace-base': specifier: ^2.12.0 - version: 2.12.0(@opentelemetry/api@1.10.0) + version: 2.12.1(@opentelemetry/api@1.10.0) '@opentelemetry/sdk-trace-node': specifier: ^2.12.0 - version: 2.12.0(@opentelemetry/api@1.10.0) + version: 2.12.1(@opentelemetry/api@1.10.0) '@types/node': specifier: 22.19.15 version: 22.19.15 @@ -4358,13 +4358,13 @@ importers: version: ai@5.0.283(zod@4.6.7) tsdown: specifier: 0.23.1 - version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@6.0.3) + version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@7.0.2) typescript: specifier: catalog:ts6 - version: 6.0.3 + version: 7.0.2 vitest: specifier: 'catalog:' - version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) zod: specifier: 'catalog:' version: 4.6.7 @@ -4586,13 +4586,13 @@ importers: version: 5.1.0(vitest@5.1.0) tsdown: specifier: 0.23.1 - version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@6.0.3) + version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@7.0.2) typescript: specifier: catalog:ts6 - version: 6.0.3 + version: 7.0.2 vitest: specifier: 'catalog:' - version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) packages/connect: dependencies: @@ -4653,10 +4653,10 @@ importers: dependencies: '@a2a-js/sdk-v0_3': specifier: npm:@a2a-js/sdk@~0.3.14 - version: '@a2a-js/sdk@0.3.14(@bufbuild/protobuf@2.13.0)(@grpc/grpc-js@1.14.5)(express@5.3.0(supports-color@10.2.2))' + version: '@a2a-js/sdk@0.3.14(@bufbuild/protobuf@2.16.0)(@grpc/grpc-js@1.14.7)(express@5.3.0(supports-color@10.2.2))' '@a2a-js/sdk-v1': specifier: npm:@a2a-js/sdk@~1.0.1 - version: '@a2a-js/sdk@1.0.1(@bufbuild/protobuf@2.13.0)(@grpc/grpc-js@1.14.5)(express@5.3.0(supports-color@10.2.2))' + version: '@a2a-js/sdk@1.0.1(@bufbuild/protobuf@2.16.0)(@grpc/grpc-js@1.14.7)(express@5.3.0(supports-color@10.2.2))' '@ai-sdk/provider-utils-v6': specifier: npm:@ai-sdk/provider-utils@4.0.66 version: '@ai-sdk/provider-utils@4.0.66(zod@4.6.7)' @@ -5123,13 +5123,13 @@ importers: version: 2.1.0 hono-openapi: specifier: ^1.5.0 - version: 1.5.0(@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@6.0.3)))(arktype@2.2.9)(hono@4.13.17)(valibot@1.5.0(typescript@6.0.3))(zod-to-json-schema@3.25.2(zod@4.6.7))(zod@4.6.7) + version: 1.5.0(@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@7.0.2)))(arktype@2.2.9)(hono@4.13.17)(valibot@1.5.0(typescript@7.0.2))(zod-to-json-schema@3.25.2(zod@4.6.7))(zod@4.6.7) stacktrace-parser: specifier: ^0.1.11 version: 0.1.11 tsdown: specifier: 0.23.1 - version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@6.0.3) + version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@7.0.2) tsx: specifier: 'catalog:' version: 4.23.15 @@ -5138,10 +5138,10 @@ importers: version: 5.10.0 typescript: specifier: catalog:ts6 - version: 6.0.3 + version: 7.0.2 vitest: specifier: 'catalog:' - version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) zod: specifier: 'catalog:' version: 4.6.7 @@ -5764,16 +5764,16 @@ importers: version: 1.6.0 tsdown: specifier: 0.23.1 - version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@6.0.3) + version: 0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@7.0.2) tsx: specifier: 'catalog:' version: 4.23.15 typescript: specifier: catalog:ts6 - version: 6.0.3 + version: 7.0.2 vitest: specifier: 'catalog:' - version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) packages/platform: dependencies: @@ -6039,7 +6039,7 @@ importers: version: 30.1.3(@noble/hashes@2.4.0) msw: specifier: ^2.15.0 - version: 2.15.0(@types/node@22.19.15)(typescript@6.0.3) + version: 2.15.0(@types/node@22.19.15)(typescript@7.0.2) react-grab: specifier: ^0.1.50 version: 0.1.50(react@19.3.1) @@ -6051,13 +6051,13 @@ importers: version: 1.4.0 typescript: specifier: catalog:ts6 - version: 6.0.3 + version: 7.0.2 vite: specifier: ^8.3.5 version: 8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) vitest: specifier: 'catalog:' - version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) packages/playground-ui: dependencies: @@ -10125,7 +10125,7 @@ importers: version: 7.0.2 vitest: specifier: 'catalog:' - version: 5.1.0(@opentelemetry/api@1.9.1)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + version: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) workspaces/docker: dependencies: @@ -12777,9 +12777,6 @@ packages: '@bufbuild/protobuf@1.10.1': resolution: {integrity: sha512-wJ8ReQbHxsAfXhrf9ixl0aYbZorRuOWpBNzm8pL8ftmSxQx/wnJD5Eg861NwJU/czy2VXFIebCeZnZrI9rktIQ==} - '@bufbuild/protobuf@2.13.0': - resolution: {integrity: sha512-acq7c49vxfm1ggJ95P70TX7ABDM0vxr1SYD3BB0o0jnBLB4OAqeHyKuN+cD3w80gXEDQ2zxHpR6CUeA+O/aU9g==} - '@bufbuild/protobuf@2.16.0': resolution: {integrity: sha512-FWa0sPlqYGJgpTs6OxBRcL/AW4JT0OIO+W1ajerluoTVh8CV0B7XM1qsNCRgnkSCkRCgOICKHRQlY17jrsm0+Q==} @@ -14902,10 +14899,6 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - '@grpc/grpc-js@1.14.5': - resolution: {integrity: sha512-7VZM+SVdEcUUqSQeNI3zM8Qs/BhQKZndPo2h5VkYkAM8Iz0wJIa8mKV5ekQGqG8UUsnkQ0NMxIxwkIHYvj0qOw==} - engines: {node: '>=12.10.0'} - '@grpc/grpc-js@1.14.7': resolution: {integrity: sha512-W4W/fcBMGRVtG6dW2c7cw2mnpS3hvbBd+oQXjh2iYFTZDk1JJmcNqkM5KSaPubQpamlUUurrlb7G1s9NJeERmQ==} engines: {node: '>=12.10.0'} @@ -16463,16 +16456,6 @@ packages: peerDependencies: '@modelcontextprotocol/server': ^2.4.0 - '@modelcontextprotocol/sdk@1.32.1': - resolution: {integrity: sha512-2DdE+SJDtzLEEWzY1ZjY7Q+VcPhcV1KisD3zI4u0XZyktsjHum1mwbMI+JaulUBi2OZk+KJAi2uPXzxichPkdw==} - engines: {node: '>=18'} - peerDependencies: - '@cfworker/json-schema': ^4.1.1 - zod: 4.6.7 - peerDependenciesMeta: - '@cfworker/json-schema': - optional: true - '@modelcontextprotocol/sdk@1.32.2': resolution: {integrity: sha512-SWsVtH/0vULSQStoZ6xxH2K09Li8fXYTMC64ZeogCdpZ3XSi1eCPOByV1OpuJxuI3OcmHhosDWYyii07tpPsLw==} engines: {node: '>=18'} @@ -23185,11 +23168,6 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - baseline-browser-mapping@2.11.0: - resolution: {integrity: sha512-oCu2wfipvX3AePSgmOuKkIywOu+8n9psz7hXYmk56ghpu3+7KzNIBopaOs4c9BrtdnTtW30unG9GTfHo7EwERQ==} - engines: {node: '>=6.0.0'} - hasBin: true - baseline-browser-mapping@2.11.35: resolution: {integrity: sha512-GNk8KX52CHqeNKGk8+7tZnQab/2k1t/BgrUHPKNdijzpEhF1saPQZHVKb6m5loSAxB39gyrTYw34Qf9CQ3u1qQ==} engines: {node: '>=6.0.0'} @@ -23388,11 +23366,6 @@ packages: browserify-zlib@0.1.4: resolution: {integrity: sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==} - browserslist@4.28.7: - resolution: {integrity: sha512-JxV13hNrFxqjOc8alRbq9dK1MM79NEXYpma2B2J4wAtpWS5zIEIKqWPGCl7N4o7Uc7B7itylh7SuDujATRyyTw==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - browserslist@4.29.5: resolution: {integrity: sha512-khTmKu5NGYTotqcYo8Bew2k4RAE9PuXRSFRXG2lQBrCEQHyeQ/vX6gKMxfokwywBsLiXZMnHsmWMG1pnO8J7uQ==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -26747,10 +26720,6 @@ packages: js-base64@3.9.6: resolution: {integrity: sha512-LjkzbLtU6Lx6fjXMYGEACEB7rdtqZtxkBe9aS1ZpDNUyWgUivw3yBEIhQ37OVygJYRt+C+9e9fVT8PpFzH2Hww==} - js-cookie@3.0.7: - resolution: {integrity: sha512-z/wZZgDrkNV1eA0ULjM/F9/50Ya8fbzgKneSpoPsXSGd0KnpdtHfOZWK+GcwLk+EZbS4F9RBhU+K2RgzuDaItw==} - engines: {node: '>=20'} - js-cookie@3.0.8: resolution: {integrity: sha512-yeJd4aNAdYZQjaon2bpD/Gb0B/omw7HQOsynXXcOiWVCacbBcPlgn8S/d1X6blFSaHao7ozqtW7NZW19xpCtIw==} @@ -26774,10 +26743,6 @@ packages: resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} hasBin: true - js-yaml@5.4.1: - resolution: {integrity: sha512-28R/k+NAjeuf7+CKlTxWZVExJGwVVLwY06DgEnOMz2gEpfNkDcD7QvyiVPT0xy0XXhU8vHsd4Ot42OOPdJG7dQ==} - hasBin: true - js-yaml@5.5.0: resolution: {integrity: sha512-paNr4LFIFPjeeSmwNYdrb8FafLLG/Cr2Af3GjbsHJ5CxIjH4r0c2emlmRdAtpPAieP1gRVzk6buBbVP5gBMGAg==} hasBin: true @@ -31211,10 +31176,6 @@ packages: tar-stream@3.2.2: resolution: {integrity: sha512-+8NeqHRjQWH9nYlwo2gamAMImZCVzI4UoEgDpWorBt9OEfppiZn+uSkskzQKPWIZyji/C8fpWO7u69G0DX0tbg==} - tar@7.5.21: - resolution: {integrity: sha512-XdhtCvlMywwxpCW8YEq3lOXBJpUPTR2OHHcwLPO3HwsJqOHa2Ok/oJ7ruGzp+JrKoRPVCzJwAdEjqLW/vNRPHA==} - engines: {node: '>=18'} - tar@7.5.22: resolution: {integrity: sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA==} engines: {node: '>=18'} @@ -32751,21 +32712,21 @@ snapshots: section-matter: 1.0.0 strip-bom-string: 1.0.0 - '@a2a-js/sdk@0.3.14(@bufbuild/protobuf@2.13.0)(@grpc/grpc-js@1.14.5)(express@5.3.0(supports-color@10.2.2))': + '@a2a-js/sdk@0.3.14(@bufbuild/protobuf@2.16.0)(@grpc/grpc-js@1.14.7)(express@5.3.0(supports-color@10.2.2))': dependencies: uuid: 11.1.1 optionalDependencies: - '@bufbuild/protobuf': 2.13.0 - '@grpc/grpc-js': 1.14.5 + '@bufbuild/protobuf': 2.16.0 + '@grpc/grpc-js': 1.14.7 express: 5.3.0(supports-color@10.2.2) - '@a2a-js/sdk@1.0.1(@bufbuild/protobuf@2.13.0)(@grpc/grpc-js@1.14.5)(express@5.3.0(supports-color@10.2.2))': + '@a2a-js/sdk@1.0.1(@bufbuild/protobuf@2.16.0)(@grpc/grpc-js@1.14.7)(express@5.3.0(supports-color@10.2.2))': dependencies: jose: 6.2.12 uuid: 11.1.1 optionalDependencies: - '@bufbuild/protobuf': 2.13.0 - '@grpc/grpc-js': 1.14.5 + '@bufbuild/protobuf': 2.16.0 + '@grpc/grpc-js': 1.14.7 express: 5.3.0(supports-color@10.2.2) '@adobe/css-tools@4.5.0': {} @@ -34272,7 +34233,7 @@ snapshots: dependencies: '@babel/compat-data': 8.0.5 '@babel/helper-validator-option': 8.0.0 - browserslist: 4.28.7 + browserslist: 4.29.5 flru: 1.0.2 verkit: 0.5.0 @@ -35371,7 +35332,7 @@ snapshots: '@blaxel/core@0.3.34(@cfworker/json-schema@4.1.4)(@hey-api/openapi-ts@0.97.3(magicast@0.5.5)(typescript@7.0.2))(bufferutil@4.1.0)(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2)': dependencies: '@hey-api/client-fetch': 0.10.2(@hey-api/openapi-ts@0.97.3(magicast@0.5.5)(typescript@7.0.2)) - '@modelcontextprotocol/sdk': 1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) + '@modelcontextprotocol/sdk': 1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) archiver: 7.0.1 axios: 1.20.0(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2) dockerfile-ast: 0.7.1 @@ -35440,8 +35401,8 @@ snapshots: '@ai-sdk/provider': 2.0.5 '@anthropic-ai/sdk': 0.39.0(encoding@0.1.14) '@browserbasehq/sdk': 2.24.0(encoding@0.1.14) - '@google/genai': 1.52.0(@modelcontextprotocol/sdk@1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7))(bufferutil@4.1.0)(supports-color@10.2.2) - '@modelcontextprotocol/sdk': 1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) + '@google/genai': 1.52.0(@modelcontextprotocol/sdk@1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7))(bufferutil@4.1.0)(supports-color@10.2.2) + '@modelcontextprotocol/sdk': 1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) ai: 5.0.285(zod@4.6.7) devtools-protocol: 0.0.1642743 fetch-cookie: 3.2.0 @@ -35480,8 +35441,6 @@ snapshots: '@bufbuild/protobuf@1.10.1': {} - '@bufbuild/protobuf@2.13.0': {} - '@bufbuild/protobuf@2.16.0': {} '@cacheable/memory@2.2.0': @@ -36469,7 +36428,7 @@ snapshots: '@daytona/toolbox-api-client': 0.226.1(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2) '@iarna/toml': 2.2.5 '@opentelemetry/api': 1.10.0 - '@opentelemetry/exporter-trace-otlp-http': 0.223.0(@opentelemetry/api@1.10.0) + '@opentelemetry/exporter-trace-otlp-http': 0.223.2(@opentelemetry/api@1.10.0) '@opentelemetry/instrumentation-http': 0.223.0(@opentelemetry/api@1.10.0)(supports-color@10.2.2) '@opentelemetry/otlp-exporter-base': 0.223.0(@opentelemetry/api@1.10.0) '@opentelemetry/resources': 2.12.1(@opentelemetry/api@1.10.0) @@ -36580,7 +36539,7 @@ snapshots: '@docker/sandboxes@0.53.0(bufferutil@4.1.0)': dependencies: - '@bufbuild/protobuf': 2.13.0 + '@bufbuild/protobuf': 2.16.0 '@types/formidable': 3.4.6 '@types/ws': 8.18.2 formidable: 3.5.4 @@ -36790,7 +36749,7 @@ snapshots: '@rspack/core': 1.7.12(@swc/helpers@0.5.23) '@swc/core': 1.16.21(@swc/helpers@0.5.23) '@swc/html': 1.16.21 - browserslist: 4.28.7 + browserslist: 4.29.5 lightningcss: 1.33.0 semver: 7.8.6 swc-loader: 0.2.7(@swc/core@1.16.21(@swc/helpers@0.5.23))(webpack@5.112.2(@swc/core@1.16.21(@swc/helpers@0.5.23))(@swc/html@1.16.21)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.23))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(postcss@8.5.23)(uglify-js@3.19.3)) @@ -38522,14 +38481,14 @@ snapshots: '@google-cloud/precise-date': 6.2.1 '@google-cloud/promisify': 6.2.1 '@google-cloud/spanner-api': 0.4.0(supports-color@10.2.2) - '@grpc/grpc-js': 1.14.5 + '@grpc/grpc-js': 1.14.7 '@grpc/proto-loader': 0.8.1 '@opentelemetry/api': 1.10.0 - '@opentelemetry/context-async-hooks': 2.12.0(@opentelemetry/api@1.10.0) + '@opentelemetry/context-async-hooks': 2.12.1(@opentelemetry/api@1.10.0) '@opentelemetry/core': 2.12.0(@opentelemetry/api@1.10.0) '@opentelemetry/resource-detector-gcp': 0.57.0(@opentelemetry/api@1.10.0)(supports-color@10.2.2) '@opentelemetry/resources': 2.12.1(@opentelemetry/api@1.10.0) - '@opentelemetry/sdk-metrics': 2.12.0(@opentelemetry/api@1.10.0) + '@opentelemetry/sdk-metrics': 2.12.1(@opentelemetry/api@1.10.0) '@opentelemetry/semantic-conventions': 1.44.0 '@types/big.js': 6.2.2 big.js: 7.0.1 @@ -38582,19 +38541,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@google/genai@1.52.0(@modelcontextprotocol/sdk@1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7))(bufferutil@4.1.0)(supports-color@10.2.2)': - dependencies: - google-auth-library: 10.9.1(supports-color@10.2.2) - p-retry: 4.6.2 - protobufjs: 8.8.0 - ws: 8.22.0(bufferutil@4.1.0) - optionalDependencies: - '@modelcontextprotocol/sdk': 1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - '@google/genai@1.52.0(@modelcontextprotocol/sdk@1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7))(bufferutil@4.1.0)(supports-color@10.2.2)': dependencies: google-auth-library: 10.9.1(supports-color@10.2.2) @@ -38612,11 +38558,6 @@ snapshots: dependencies: graphql: 16.14.2 - '@grpc/grpc-js@1.14.5': - dependencies: - '@grpc/proto-loader': 0.8.1 - '@js-sdsl/ordered-map': 4.4.2 - '@grpc/grpc-js@1.14.7': dependencies: '@grpc/proto-loader': 0.8.1 @@ -39397,7 +39338,7 @@ snapshots: '@fingerprintjs/fingerprintjs-pro-react': 2.7.1 '@fingerprintjs/fingerprintjs-pro-spa': 1.3.3 '@hcaptcha/react-hcaptcha': 1.17.4(react-dom@19.3.1(react@19.3.1))(react@19.3.1) - js-cookie: 3.0.7 + js-cookie: 3.0.8 react: 19.3.1 react-dom: 19.3.1(react@19.3.1) tldts: 7.4.19 @@ -39465,14 +39406,14 @@ snapshots: dependencies: '@opentelemetry/api': 1.10.0 - '@langfuse/otel@5.14.0(@opentelemetry/api@1.10.0)(@opentelemetry/core@2.12.0(@opentelemetry/api@1.10.0))(@opentelemetry/exporter-trace-otlp-http@0.300.0(@opentelemetry/api@1.10.0))(@opentelemetry/otlp-exporter-base@0.300.0(@opentelemetry/api@1.10.0))(@opentelemetry/sdk-trace-base@2.12.0(@opentelemetry/api@1.10.0))': + '@langfuse/otel@5.14.0(@opentelemetry/api@1.10.0)(@opentelemetry/core@2.12.0(@opentelemetry/api@1.10.0))(@opentelemetry/exporter-trace-otlp-http@0.300.0(@opentelemetry/api@1.10.0))(@opentelemetry/otlp-exporter-base@0.300.0(@opentelemetry/api@1.10.0))(@opentelemetry/sdk-trace-base@2.12.1(@opentelemetry/api@1.10.0))': dependencies: '@langfuse/core': 5.14.0(@opentelemetry/api@1.10.0) '@opentelemetry/api': 1.10.0 '@opentelemetry/core': 2.12.0(@opentelemetry/api@1.10.0) '@opentelemetry/exporter-trace-otlp-http': 0.300.0(@opentelemetry/api@1.10.0) '@opentelemetry/otlp-exporter-base': 0.300.0(@opentelemetry/api@1.10.0) - '@opentelemetry/sdk-trace-base': 2.12.0(@opentelemetry/api@1.10.0) + '@opentelemetry/sdk-trace-base': 2.12.1(@opentelemetry/api@1.10.0) '@langfuse/tracing@5.14.0(@opentelemetry/api@1.10.0)': dependencies: @@ -39666,7 +39607,7 @@ snapshots: '@livekit/typed-emitter': 3.0.0 '@opentelemetry/api': 1.10.0 '@opentelemetry/api-logs': 0.220.0 - '@opentelemetry/core': 2.12.0(@opentelemetry/api@1.10.0) + '@opentelemetry/core': 2.12.1(@opentelemetry/api@1.10.0) '@opentelemetry/exporter-logs-otlp-proto': 0.220.0(@opentelemetry/api@1.10.0) '@opentelemetry/exporter-metrics-otlp-proto': 0.220.0(@opentelemetry/api@1.10.0) '@opentelemetry/exporter-trace-otlp-proto': 0.220.0(@opentelemetry/api@1.10.0) @@ -39674,9 +39615,9 @@ snapshots: '@opentelemetry/otlp-exporter-base': 0.220.0(@opentelemetry/api@1.10.0) '@opentelemetry/resources': 2.12.1(@opentelemetry/api@1.10.0) '@opentelemetry/sdk-logs': 0.220.0(@opentelemetry/api@1.10.0) - '@opentelemetry/sdk-metrics': 2.12.0(@opentelemetry/api@1.10.0) - '@opentelemetry/sdk-trace-base': 2.12.0(@opentelemetry/api@1.10.0) - '@opentelemetry/sdk-trace-node': 2.12.0(@opentelemetry/api@1.10.0) + '@opentelemetry/sdk-metrics': 2.12.1(@opentelemetry/api@1.10.0) + '@opentelemetry/sdk-trace-base': 2.12.1(@opentelemetry/api@1.10.0) + '@opentelemetry/sdk-trace-node': 2.12.1(@opentelemetry/api@1.10.0) '@opentelemetry/semantic-conventions': 1.44.0 '@types/pidusage': 2.0.5 commander: 12.1.0 @@ -39945,9 +39886,9 @@ snapshots: '@mastra/core': link:packages/core '@modelcontextprotocol/client': 2.3.1 '@modelcontextprotocol/core': 2.3.1 - '@modelcontextprotocol/ext-apps': 1.7.5(@modelcontextprotocol/sdk@1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(zod@4.6.7) + '@modelcontextprotocol/ext-apps': 1.7.5(@modelcontextprotocol/sdk@1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(zod@4.6.7) '@modelcontextprotocol/node': 2.1.1(@modelcontextprotocol/server@2.3.1) - '@modelcontextprotocol/sdk': 1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) + '@modelcontextprotocol/sdk': 1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) '@modelcontextprotocol/server': 2.3.1 '@modelcontextprotocol/server-legacy': 2.3.1(express@5.3.0(supports-color@10.2.2))(supports-color@10.2.2) exit-hook: 5.1.0 @@ -39968,8 +39909,8 @@ snapshots: '@mcp-ui/client@7.1.1(@cfworker/json-schema@4.1.4)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(supports-color@10.2.2)': dependencies: - '@modelcontextprotocol/ext-apps': 1.7.5(@modelcontextprotocol/sdk@1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@3.25.76))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(zod@3.25.76) - '@modelcontextprotocol/sdk': 1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@3.25.76) + '@modelcontextprotocol/ext-apps': 1.7.5(@modelcontextprotocol/sdk@1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(zod@3.25.76) + '@modelcontextprotocol/sdk': 1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@3.25.76) react: 19.3.1 react-dom: 19.3.1(react@19.3.1) zod: 3.25.76 @@ -40203,7 +40144,7 @@ snapshots: '@modelcontextprotocol/conformance@0.2.0-alpha.12(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)': dependencies: - '@modelcontextprotocol/sdk': 1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) + '@modelcontextprotocol/sdk': 1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) '@octokit/rest': 22.0.1 ajv: 8.20.0 ajv-formats: 3.0.1(ajv@8.20.0) @@ -40226,18 +40167,18 @@ snapshots: dependencies: zod: 4.6.7 - '@modelcontextprotocol/ext-apps@1.7.5(@modelcontextprotocol/sdk@1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@3.25.76))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(zod@3.25.76)': + '@modelcontextprotocol/ext-apps@1.7.5(@modelcontextprotocol/sdk@1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(zod@3.25.76)': dependencies: - '@modelcontextprotocol/sdk': 1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@3.25.76) + '@modelcontextprotocol/sdk': 1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) '@standard-schema/spec': 1.1.0 zod: 3.25.76 optionalDependencies: react: 19.3.1 react-dom: 19.3.1(react@19.3.1) - '@modelcontextprotocol/ext-apps@1.7.5(@modelcontextprotocol/sdk@1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(zod@4.6.7)': + '@modelcontextprotocol/ext-apps@1.7.5(@modelcontextprotocol/sdk@1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7))(react-dom@19.3.1(react@19.3.1))(react@19.3.1)(zod@4.6.7)': dependencies: - '@modelcontextprotocol/sdk': 1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) + '@modelcontextprotocol/sdk': 1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) '@standard-schema/spec': 1.1.0 zod: 4.6.7 optionalDependencies: @@ -40278,7 +40219,7 @@ snapshots: '@modelcontextprotocol/server': 2.4.0 hono: 4.13.17 - '@modelcontextprotocol/sdk@1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@3.25.76)': + '@modelcontextprotocol/sdk@1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@3.25.76)': dependencies: '@hono/node-server': 2.1.6(hono@4.13.17) ajv: 8.20.0 @@ -40302,30 +40243,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@modelcontextprotocol/sdk@1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7)': - dependencies: - '@hono/node-server': 2.1.6(hono@4.13.17) - ajv: 8.20.0 - ajv-formats: 3.0.1(ajv@8.20.0) - content-type: 1.0.5 - cors: 2.8.6 - cross-spawn: 7.0.6 - eventsource: 3.0.7 - eventsource-parser: 3.1.1 - express: 5.3.0(supports-color@10.2.2) - express-rate-limit: 8.7.3(express@5.3.0(supports-color@10.2.2))(supports-color@10.2.2) - hono: 4.13.17 - jose: 6.2.12 - json-schema-typed: 8.0.2 - pkce-challenge: 5.0.1 - raw-body: 4.0.0 - zod: 4.6.7 - zod-to-json-schema: 3.25.2(zod@4.6.7) - optionalDependencies: - '@cfworker/json-schema': 4.1.4 - transitivePeerDependencies: - - supports-color - '@modelcontextprotocol/sdk@1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7)': dependencies: '@hono/node-server': 2.1.6(hono@4.13.17) @@ -40875,7 +40792,7 @@ snapshots: debug: 4.4.3(supports-color@10.2.2) openai: 6.49.0(@aws-sdk/credential-provider-node@3.972.92)(@smithy/signature-v4@5.7.5)(ws@8.22.0(bufferutil@4.1.0))(zod@4.6.7) optionalDependencies: - '@modelcontextprotocol/sdk': 1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) + '@modelcontextprotocol/sdk': 1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) zod: 4.6.7 transitivePeerDependencies: - '@aws-sdk/credential-provider-node' @@ -41280,7 +41197,7 @@ snapshots: '@opentelemetry/exporter-trace-otlp-grpc@0.207.0(@opentelemetry/api@1.10.0)': dependencies: - '@grpc/grpc-js': 1.14.5 + '@grpc/grpc-js': 1.14.7 '@opentelemetry/api': 1.10.0 '@opentelemetry/core': 2.12.0(@opentelemetry/api@1.10.0) '@opentelemetry/otlp-exporter-base': 0.207.0(@opentelemetry/api@1.10.0) @@ -41327,7 +41244,6 @@ snapshots: '@opentelemetry/otlp-exporter-base': 0.223.2(@opentelemetry/api@1.10.0) '@opentelemetry/otlp-transformer': 0.223.2(@opentelemetry/api@1.10.0) '@opentelemetry/sdk-trace': 2.12.1(@opentelemetry/api@1.10.0) - optional: true '@opentelemetry/exporter-trace-otlp-http@0.300.0(@opentelemetry/api@1.10.0)': dependencies: @@ -41846,7 +41762,7 @@ snapshots: '@opentelemetry/otlp-grpc-exporter-base@0.207.0(@opentelemetry/api@1.10.0)': dependencies: - '@grpc/grpc-js': 1.14.5 + '@grpc/grpc-js': 1.14.7 '@opentelemetry/api': 1.10.0 '@opentelemetry/core': 2.12.0(@opentelemetry/api@1.10.0) '@opentelemetry/otlp-exporter-base': 0.207.0(@opentelemetry/api@1.10.0) @@ -41854,7 +41770,7 @@ snapshots: '@opentelemetry/otlp-grpc-exporter-base@0.223.0(@opentelemetry/api@1.10.0)': dependencies: - '@grpc/grpc-js': 1.14.5 + '@grpc/grpc-js': 1.14.7 '@opentelemetry/api': 1.10.0 '@opentelemetry/core': 2.12.0(@opentelemetry/api@1.10.0) '@opentelemetry/otlp-exporter-base': 0.223.0(@opentelemetry/api@1.10.0) @@ -44176,18 +44092,6 @@ snapshots: '@stablelib/base64@1.0.1': {} - '@standard-community/standard-json@0.3.7(@standard-schema/spec@1.1.0)(@types/json-schema@7.0.15)(@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@6.0.3)))(arktype@2.2.9)(valibot@1.5.0(typescript@6.0.3))(zod-to-json-schema@3.25.2(zod@4.6.7))(zod@4.6.7)': - dependencies: - '@standard-schema/spec': 1.1.0 - '@types/json-schema': 7.0.15 - quansync: 0.2.11 - optionalDependencies: - '@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@6.0.3)) - arktype: 2.2.9 - valibot: 1.5.0(typescript@6.0.3) - zod: 4.6.7 - zod-to-json-schema: 3.25.2(zod@4.6.7) - '@standard-community/standard-json@0.3.7(@standard-schema/spec@1.1.0)(@types/json-schema@7.0.15)(@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@7.0.2)))(arktype@2.2.9)(valibot@1.5.0(typescript@7.0.2))(zod-to-json-schema@3.25.2(zod@4.6.7))(zod@4.6.7)': dependencies: '@standard-schema/spec': 1.1.0 @@ -44200,16 +44104,6 @@ snapshots: zod: 4.6.7 zod-to-json-schema: 3.25.2(zod@4.6.7) - '@standard-community/standard-openapi@0.2.11(@standard-community/standard-json@0.3.7(@standard-schema/spec@1.1.0)(@types/json-schema@7.0.15)(@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@6.0.3)))(arktype@2.2.9)(valibot@1.5.0(typescript@6.0.3))(zod-to-json-schema@3.25.2(zod@4.6.7))(zod@4.6.7))(@standard-schema/spec@1.1.0)(arktype@2.2.9)(openapi-types@12.1.3)(valibot@1.5.0(typescript@6.0.3))(zod@4.6.7)': - dependencies: - '@standard-community/standard-json': 0.3.7(@standard-schema/spec@1.1.0)(@types/json-schema@7.0.15)(@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@6.0.3)))(arktype@2.2.9)(valibot@1.5.0(typescript@6.0.3))(zod-to-json-schema@3.25.2(zod@4.6.7))(zod@4.6.7) - '@standard-schema/spec': 1.1.0 - openapi-types: 12.1.3 - optionalDependencies: - arktype: 2.2.9 - valibot: 1.5.0(typescript@6.0.3) - zod: 4.6.7 - '@standard-community/standard-openapi@0.2.11(@standard-community/standard-json@0.3.7(@standard-schema/spec@1.1.0)(@types/json-schema@7.0.15)(@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@7.0.2)))(arktype@2.2.9)(valibot@1.5.0(typescript@7.0.2))(zod-to-json-schema@3.25.2(zod@4.6.7))(zod@4.6.7))(@standard-schema/spec@1.1.0)(arktype@2.2.9)(openapi-types@12.1.3)(valibot@1.5.0(typescript@7.0.2))(zod@4.6.7)': dependencies: '@standard-community/standard-json': 0.3.7(@standard-schema/spec@1.1.0)(@types/json-schema@7.0.15)(@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@7.0.2)))(arktype@2.2.9)(valibot@1.5.0(typescript@7.0.2))(zod-to-json-schema@3.25.2(zod@4.6.7))(zod@4.6.7) @@ -44253,11 +44147,11 @@ snapshots: '@storybook/addon-mcp@10.6.5(storybook@10.6.5(@types/react@19.3.0)(bufferutil@4.1.0)(prettier@3.9.10)(react@19.3.1))(typescript@7.0.2)': dependencies: - '@tmcp/adapter-valibot': 0.1.7(tmcp@1.20.1(typescript@7.0.2))(valibot@1.4.2(typescript@7.0.2)) + '@tmcp/adapter-valibot': 0.1.7(tmcp@1.20.1(typescript@7.0.2))(valibot@1.5.0(typescript@7.0.2)) '@tmcp/transport-http': 0.8.6(tmcp@1.20.1(typescript@7.0.2)) storybook: 10.6.5(@types/react@19.3.0)(bufferutil@4.1.0)(prettier@3.9.10)(react@19.3.1) tmcp: 1.20.1(typescript@7.0.2) - valibot: 1.4.2(typescript@7.0.2) + valibot: 1.5.0(typescript@7.0.2) transitivePeerDependencies: - '@tmcp/auth' - typescript @@ -44440,7 +44334,7 @@ snapshots: '@stryker-mutator/util': 10.0.0 semver: 7.8.6 tslib: 2.8.1 - vitest: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) + vitest: 5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) '@supabase/auth-js@2.118.0': dependencies: @@ -44894,7 +44788,7 @@ snapshots: '@temporalio/client@1.25.0(long@5.3.2)(protobufjs@8.8.0)': dependencies: - '@grpc/grpc-js': 1.14.5 + '@grpc/grpc-js': 1.14.7 '@temporalio/common': 1.25.0(long@5.3.2)(protobufjs@8.8.0) '@temporalio/proto': 1.25.0 long: 5.3.2 @@ -44912,7 +44806,7 @@ snapshots: '@temporalio/core-bridge@1.25.0(long@5.3.2)(protobufjs@8.8.0)': dependencies: - '@grpc/grpc-js': 1.14.5 + '@grpc/grpc-js': 1.14.7 '@temporalio/common': 1.25.0(long@5.3.2)(protobufjs@8.8.0) long: 5.3.2 protobufjs: 8.8.0 @@ -44935,7 +44829,7 @@ snapshots: '@temporalio/worker@1.25.0(@swc/helpers@0.5.23)(@swc/html@1.16.21)(clean-css@5.3.3)(cssnano@6.1.2(postcss@8.5.32))(csso@5.0.5)(esbuild@0.28.2)(html-minifier-terser@7.2.0)(lightningcss@1.33.0)(long@5.3.2)(postcss@8.5.32)(protobufjs@8.8.0)(sharp@0.35.5(@types/node@22.19.15))(svgo@3.3.5)(uglify-js@3.19.3)': dependencies: - '@grpc/grpc-js': 1.14.5 + '@grpc/grpc-js': 1.14.7 '@swc/core': 1.16.21(@swc/helpers@0.5.23) '@temporalio/activity': 1.25.0(long@5.3.2)(protobufjs@8.8.0) '@temporalio/client': 1.25.0(long@5.3.2)(protobufjs@8.8.0) @@ -45027,12 +44921,12 @@ snapshots: dependencies: '@testing-library/dom': 10.4.2 - '@tmcp/adapter-valibot@0.1.7(tmcp@1.20.1(typescript@7.0.2))(valibot@1.4.2(typescript@7.0.2))': + '@tmcp/adapter-valibot@0.1.7(tmcp@1.20.1(typescript@7.0.2))(valibot@1.5.0(typescript@7.0.2))': dependencies: '@standard-schema/spec': 1.1.0 - '@valibot/to-json-schema': 1.8.0(valibot@1.4.2(typescript@7.0.2)) + '@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@7.0.2)) tmcp: 1.20.1(typescript@7.0.2) - valibot: 1.4.2(typescript@7.0.2) + valibot: 1.5.0(typescript@7.0.2) '@tmcp/session-manager@0.2.2(tmcp@1.20.1(typescript@7.0.2))': dependencies: @@ -45953,19 +45847,9 @@ snapshots: '@upstash/vector@1.2.3': {} - '@valibot/to-json-schema@1.8.0(valibot@1.4.2(typescript@7.0.2))': - dependencies: - valibot: 1.4.2(typescript@7.0.2) - - '@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@6.0.3))': - dependencies: - valibot: 1.5.0(typescript@6.0.3) - optional: true - '@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@7.0.2))': dependencies: valibot: 1.5.0(typescript@7.0.2) - optional: true '@valkey/valkey-glide-darwin-arm64@2.5.2': optional: true @@ -46249,16 +46133,6 @@ snapshots: msw: 2.15.0(@types/node@22.19.15)(typescript@5.9.3) vite: 8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - '@vitest/mocker@5.1.0(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))': - dependencies: - '@jridgewell/trace-mapping': 0.3.31 - '@vitest/spy': 5.1.0 - estree-walker: 3.0.3 - magic-string: 1.4.5 - optionalDependencies: - msw: 2.15.0(@types/node@22.19.15)(typescript@6.0.3) - vite: 8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - '@vitest/mocker@5.1.0(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.25.12)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1))': dependencies: '@jridgewell/trace-mapping': 0.3.31 @@ -46487,7 +46361,7 @@ snapshots: '@wong2/mcp-cli@2.0.0(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7)': dependencies: '@json-schema-tools/traverse': 1.15.1 - '@modelcontextprotocol/sdk': 1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) + '@modelcontextprotocol/sdk': 1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) conf: 15.1.0 eventsource: 4.1.1 express: 5.3.0(supports-color@10.2.2) @@ -46518,7 +46392,7 @@ snapshots: '@workos-inc/node': 8.13.0 iron-webcrypto: 2.0.0 jose: 6.2.12 - valibot: 1.4.2(typescript@7.0.2) + valibot: 1.5.0(typescript@7.0.2) transitivePeerDependencies: - typescript @@ -47186,8 +47060,6 @@ snapshots: base64-js@1.5.1: {} - baseline-browser-mapping@2.11.0: {} - baseline-browser-mapping@2.11.35: {} basic-ftp@6.2.4: {} @@ -47413,14 +47285,6 @@ snapshots: dependencies: pako: 0.2.9 - browserslist@4.28.7: - dependencies: - baseline-browser-mapping: 2.11.0 - caniuse-lite: 1.0.30001820 - electron-to-chromium: 1.5.473 - node-releases: 2.0.63 - update-browserslist-db: 1.3.4(browserslist@4.28.7) - browserslist@4.29.5: dependencies: baseline-browser-mapping: 2.11.35 @@ -47822,7 +47686,7 @@ snapshots: node-api-headers: 1.9.0 rc: 1.2.8 semver: 7.8.6 - tar: 7.5.21 + tar: 7.5.22 url-join: 4.0.1 which: 6.0.1 yargs: 18.2.0 @@ -48286,7 +48150,7 @@ snapshots: cssnano-preset-advanced@6.1.2(postcss@8.5.23): dependencies: autoprefixer: 10.6.2(postcss@8.5.23) - browserslist: 4.28.7 + browserslist: 4.29.5 cssnano-preset-default: 6.1.2(postcss@8.5.23) postcss: 8.5.23 postcss-discard-unused: 6.0.5(postcss@8.5.23) @@ -48675,7 +48539,7 @@ snapshots: '@opentelemetry/exporter-trace-otlp-proto': 0.211.0(@opentelemetry/api@1.10.0) '@opentelemetry/resources': 2.12.1(@opentelemetry/api@1.10.0) '@opentelemetry/sdk-trace-base': 2.12.1(@opentelemetry/api@1.10.0) - '@opentelemetry/sdk-trace-node': 2.12.0(@opentelemetry/api@1.10.0) + '@opentelemetry/sdk-trace-node': 2.12.1(@opentelemetry/api@1.10.0) '@opentelemetry/semantic-conventions': 1.44.0 '@sentry/node': 10.78.0(@opentelemetry/core@2.12.0(@opentelemetry/api@1.10.0))(@opentelemetry/exporter-trace-otlp-http@0.223.2(@opentelemetry/api@1.10.0))(supports-color@10.2.2) axios: 1.20.0(debug@4.4.3(supports-color@10.2.2))(supports-color@10.2.2) @@ -48928,7 +48792,7 @@ snapshots: dockerode@4.0.12(supports-color@10.2.2): dependencies: '@balena/dockerignore': 1.0.2 - '@grpc/grpc-js': 1.14.5 + '@grpc/grpc-js': 1.14.7 '@grpc/proto-loader': 0.7.15 docker-modem: 5.0.7(supports-color@10.2.2) protobufjs: 8.8.0 @@ -49882,7 +49746,7 @@ snapshots: '@azure/core-auth': 1.11.0(supports-color@10.2.2) '@azure/identity': 4.14.1(supports-color@10.2.2) '@azure/storage-blob': 12.34.0(supports-color@10.2.2) - '@modelcontextprotocol/sdk': 1.32.1(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) + '@modelcontextprotocol/sdk': 1.32.2(@cfworker/json-schema@4.1.4)(supports-color@10.2.2)(zod@4.6.7) '@openai/agents': 0.11.8(@aws-sdk/credential-provider-node@3.972.92)(@cfworker/json-schema@4.1.4)(@smithy/signature-v4@5.7.5)(bufferutil@4.1.0)(supports-color@10.2.2)(ws@8.22.0(bufferutil@4.1.0))(zod@4.6.7) '@opentelemetry/api': 1.10.0 '@supabase/storage-js': 2.118.0 @@ -50358,7 +50222,7 @@ snapshots: google-gax@5.0.8(supports-color@10.2.2): dependencies: - '@grpc/grpc-js': 1.14.5 + '@grpc/grpc-js': 1.14.7 '@grpc/proto-loader': 0.8.1 duplexify: 4.1.3 google-auth-library: 10.5.0(supports-color@10.2.2) @@ -50374,7 +50238,7 @@ snapshots: google-gax@6.14.0(supports-color@10.2.2): dependencies: - '@grpc/grpc-js': 1.14.5 + '@grpc/grpc-js': 1.14.7 '@grpc/proto-loader': 0.8.1 '@opentelemetry/api': 1.10.0 duplexify: 4.1.3 @@ -50438,7 +50302,7 @@ snapshots: grpc-gcp@1.1.1: dependencies: - '@grpc/grpc-js': 1.14.5 + '@grpc/grpc-js': 1.14.7 protobufjs: 8.8.0 gtoken@8.0.0(supports-color@10.2.2): @@ -50750,26 +50614,6 @@ snapshots: dependencies: parse-passwd: 1.0.0 - hono-openapi@1.5.0(@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@6.0.3)))(arktype@2.2.9)(hono@4.13.17)(valibot@1.5.0(typescript@6.0.3))(zod-to-json-schema@3.25.2(zod@4.6.7))(zod@4.6.7): - dependencies: - '@hono/standard-validator': 0.4.1(@standard-schema/spec@1.1.0)(hono@4.13.17) - '@standard-community/standard-json': 0.3.7(@standard-schema/spec@1.1.0)(@types/json-schema@7.0.15)(@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@6.0.3)))(arktype@2.2.9)(valibot@1.5.0(typescript@6.0.3))(zod-to-json-schema@3.25.2(zod@4.6.7))(zod@4.6.7) - '@standard-community/standard-openapi': 0.2.11(@standard-community/standard-json@0.3.7(@standard-schema/spec@1.1.0)(@types/json-schema@7.0.15)(@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@6.0.3)))(arktype@2.2.9)(valibot@1.5.0(typescript@6.0.3))(zod-to-json-schema@3.25.2(zod@4.6.7))(zod@4.6.7))(@standard-schema/spec@1.1.0)(arktype@2.2.9)(openapi-types@12.1.3)(valibot@1.5.0(typescript@6.0.3))(zod@4.6.7) - '@standard-schema/spec': 1.1.0 - '@types/json-schema': 7.0.15 - hono: 4.13.17 - openapi-types: 12.1.3 - transitivePeerDependencies: - - '@valibot/to-json-schema' - - arktype - - effect - - sury - - typebox - - valibot - - zod - - zod-openapi - - zod-to-json-schema - hono-openapi@1.5.0(@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@7.0.2)))(arktype@2.2.9)(hono@4.13.17)(valibot@1.5.0(typescript@7.0.2))(zod-to-json-schema@3.25.2(zod@4.6.7))(zod@4.6.7): dependencies: '@hono/standard-validator': 0.4.1(@standard-schema/spec@1.1.0)(hono@4.13.17) @@ -51069,20 +50913,20 @@ snapshots: adm-zip: 0.6.1 debug: 4.4.3(supports-color@10.2.2) node-fetch: 2.7.0(encoding@0.1.14) - tar: 7.5.21 + tar: 7.5.22 transitivePeerDependencies: - encoding - supports-color inngest@4.26.2(@opentelemetry/core@3.1.1(@opentelemetry/api@1.10.0))(encoding@0.1.14)(express@5.3.0(supports-color@10.2.2))(fastify@5.12.8)(hono@4.13.17)(koa@3.3.0)(react@19.3.1)(supports-color@10.2.2)(typescript@7.0.2)(zod@4.6.7): dependencies: - '@bufbuild/protobuf': 2.13.0 + '@bufbuild/protobuf': 2.16.0 '@inngest/ai': 0.1.8 '@jpwilliams/waitgroup': 2.1.1 '@opentelemetry/api': 1.10.0 '@opentelemetry/auto-instrumentations-node': 0.82.0(@opentelemetry/api@1.10.0)(@opentelemetry/core@3.1.1(@opentelemetry/api@1.10.0))(supports-color@10.2.2) - '@opentelemetry/context-async-hooks': 2.12.0(@opentelemetry/api@1.10.0) - '@opentelemetry/exporter-trace-otlp-http': 0.223.0(@opentelemetry/api@1.10.0) + '@opentelemetry/context-async-hooks': 2.12.1(@opentelemetry/api@1.10.0) + '@opentelemetry/exporter-trace-otlp-http': 0.223.2(@opentelemetry/api@1.10.0) '@opentelemetry/instrumentation': 0.223.0(@opentelemetry/api@1.10.0)(supports-color@10.2.2) '@opentelemetry/resources': 2.12.1(@opentelemetry/api@1.10.0) '@opentelemetry/sdk-trace-base': 2.12.1(@opentelemetry/api@1.10.0) @@ -51345,8 +51189,6 @@ snapshots: js-base64@3.9.6: {} - js-cookie@3.0.7: {} - js-cookie@3.0.8: {} js-md4@0.3.2: {} @@ -51368,10 +51210,6 @@ snapshots: dependencies: argparse: 2.0.1 - js-yaml@5.4.1: - dependencies: - argparse: 2.0.1 - js-yaml@5.5.0: dependencies: argparse: 3.0.4 @@ -51468,7 +51306,7 @@ snapshots: '@apidevtools/json-schema-ref-parser': 11.9.3 '@types/json-schema': 7.0.15 '@types/lodash': 4.17.27 - js-yaml: 5.4.1 + js-yaml: 5.5.0 lodash: 4.18.1 minimist: 1.2.8 prettier: 3.9.10 @@ -52977,31 +52815,6 @@ snapshots: - '@types/node' optional: true - msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3): - dependencies: - '@inquirer/confirm': 6.3.5(@types/node@22.19.15) - '@mswjs/interceptors': 0.41.9 - '@open-draft/deferred-promise': 3.0.0 - '@types/statuses': 2.0.6 - cookie: 1.1.1 - graphql: 16.14.2 - headers-polyfill: 5.0.1 - is-node-process: 1.2.0 - outvariant: 1.4.3 - path-to-regexp: 6.3.0 - picocolors: 1.1.1 - rettime: 0.11.12 - statuses: 2.0.2 - strict-event-emitter: 0.5.1 - tough-cookie: 6.0.2 - type-fest: 5.10.0 - until-async: 3.0.2 - yargs: 18.2.0 - optionalDependencies: - typescript: 6.0.3 - transitivePeerDependencies: - - '@types/node' - msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2): dependencies: '@inquirer/confirm': 6.3.5(@types/node@22.19.15) @@ -53120,7 +52933,7 @@ snapshots: nice-grpc@2.1.18: dependencies: - '@grpc/grpc-js': 1.14.5 + '@grpc/grpc-js': 1.14.7 abort-controller-x: 0.5.0 nice-grpc-common: 2.0.4 @@ -54630,7 +54443,7 @@ snapshots: '@csstools/postcss-trigonometric-functions': 4.0.9(postcss@8.5.23) '@csstools/postcss-unset-value': 4.0.0(postcss@8.5.23) autoprefixer: 10.6.2(postcss@8.5.23) - browserslist: 4.28.7 + browserslist: 4.29.5 css-blank-pseudo: 7.0.1(postcss@8.5.23) css-has-pseudo: 7.0.3(postcss@8.5.23) css-prefers-color-scheme: 10.0.0(postcss@8.5.23) @@ -56084,20 +55897,6 @@ snapshots: transitivePeerDependencies: - oxc-resolver - rolldown-plugin-dts@0.28.8(oxc-resolver@11.21.2)(rolldown@1.2.16)(typescript@6.0.3): - dependencies: - dts-resolver: 3.0.0(oxc-resolver@11.21.2) - get-tsconfig: 5.0.0-beta.6 - obug: 3.0.0 - rolldown: 1.2.16 - yuku-ast: 0.19.0 - yuku-codegen: 0.19.0 - yuku-parser: 0.19.0 - optionalDependencies: - typescript: 6.0.3 - transitivePeerDependencies: - - oxc-resolver - rolldown-plugin-dts@0.28.8(oxc-resolver@11.21.2)(rolldown@1.2.16)(typescript@7.0.2): dependencies: dts-resolver: 3.0.0(oxc-resolver@11.21.2) @@ -57143,14 +56942,6 @@ snapshots: - bare-buffer - react-native-b4a - tar@7.5.21: - dependencies: - '@isaacs/fs-minipass': 4.0.1 - chownr: 3.0.0 - minipass: 7.1.3 - minizlib: 3.1.0 - yallist: 5.0.0 - tar@7.5.22: dependencies: '@isaacs/fs-minipass': 4.0.1 @@ -57324,7 +57115,7 @@ snapshots: json-rpc-2.0: 1.8.1 sqids: 0.3.0 uri-template-matcher: 1.1.2 - valibot: 1.4.2(typescript@7.0.2) + valibot: 1.5.0(typescript@7.0.2) transitivePeerDependencies: - typescript @@ -57461,32 +57252,6 @@ snapshots: - oxc-resolver - vue-tsc - tsdown@0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@6.0.3): - dependencies: - cac: 7.1.0 - defu: 6.1.7 - empathic: 2.1.0 - hookable: 6.1.2 - import-without-cache: 0.4.1 - obug: 3.0.0 - picomatch: 4.0.7 - rolldown: 1.2.16 - rolldown-plugin-dts: 0.28.8(oxc-resolver@11.21.2)(rolldown@1.2.16)(typescript@6.0.3) - tinyexec: 1.3.1 - tinyglobby: 0.2.17 - tree-kill: 1.2.2 - unconfig-core: 7.5.0 - verkit: 0.5.0 - optionalDependencies: - tsx: 4.23.15 - typescript: 6.0.3 - transitivePeerDependencies: - - '@typescript/native-preview' - - '@volar/typescript' - - '@vue/language-core' - - oxc-resolver - - vue-tsc - tsdown@0.23.1(oxc-resolver@11.21.2)(tsx@4.23.15)(typescript@7.0.2): dependencies: cac: 7.1.0 @@ -57844,12 +57609,6 @@ snapshots: untildify@4.0.0: {} - update-browserslist-db@1.3.4(browserslist@4.28.7): - dependencies: - browserslist: 4.28.7 - escalade: 3.2.0 - picocolors: 1.1.1 - update-browserslist-db@1.3.4(browserslist@4.29.5): dependencies: browserslist: 4.29.5 @@ -57950,15 +57709,6 @@ snapshots: optionalDependencies: typescript: 5.9.3 - valibot@1.4.2(typescript@7.0.2): - optionalDependencies: - typescript: 7.0.2 - - valibot@1.5.0(typescript@6.0.3): - optionalDependencies: - typescript: 6.0.3 - optional: true - valibot@1.5.0(typescript@7.0.2): optionalDependencies: typescript: 7.0.2 @@ -58182,31 +57932,6 @@ snapshots: transitivePeerDependencies: - msw - vitest@5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): - dependencies: - '@types/chai': 5.2.3 - '@vitest/mocker': 5.1.0(msw@2.15.0(@types/node@22.19.15)(typescript@6.0.3))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)) - chai: 6.3.0 - es-module-lexer: 2.3.2 - expect-type: 1.4.0 - magic-string: 1.4.5 - obug: 3.0.0 - picomatch: 4.0.7 - std-env: 4.3.0 - tinybench: 6.2.3 - tinyexec: 1.3.1 - tinyglobby: 0.2.17 - vite: 8.3.5(@types/node@22.19.15)(esbuild@0.28.2)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1) - why-is-node-running: 3.2.1 - optionalDependencies: - '@opentelemetry/api': 1.10.0 - '@types/node': 22.19.15 - '@vitest/coverage-v8': 5.1.0(vitest@5.1.0) - '@vitest/ui': 5.1.0(vitest@5.1.0) - jsdom: 30.1.3(@noble/hashes@2.4.0) - transitivePeerDependencies: - - msw - vitest@5.1.0(@opentelemetry/api@1.10.0)(@types/node@22.19.15)(@vitest/coverage-v8@5.1.0)(@vitest/ui@5.1.0)(jsdom@30.1.3(@noble/hashes@2.4.0))(msw@2.15.0(@types/node@22.19.15)(typescript@7.0.2))(vite@8.3.5(@types/node@22.19.15)(esbuild@0.25.12)(jiti@2.7.0)(terser@5.51.2)(tsx@4.23.15)(yaml@2.9.1)): dependencies: '@types/chai': 5.2.3 @@ -58282,11 +58007,11 @@ snapshots: transitivePeerDependencies: - msw - voyageai@0.3.1(encoding@0.1.14)(onnxruntime-node@1.24.3): + voyageai@0.3.1(encoding@0.1.14)(onnxruntime-node@1.30.0): dependencies: node-fetch: 2.7.0(encoding@0.1.14) optionalDependencies: - onnxruntime-node: 1.24.3 + onnxruntime-node: 1.30.0 transitivePeerDependencies: - encoding diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 49828db58ea..1bbbf93228a 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -60,7 +60,7 @@ catalog: catalogs: ts6: - typescript: ^6.0.3 + typescript: ^7.0.2 peerDependencyRules: allowedVersions: diff --git a/server-adapters/elysia/CHANGELOG.md b/server-adapters/elysia/CHANGELOG.md index 51b1981b5ab..1d22e5fe35f 100644 --- a/server-adapters/elysia/CHANGELOG.md +++ b/server-adapters/elysia/CHANGELOG.md @@ -1,13 +1,5 @@ # @mastra/elysia -## 0.1.24-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/server@1.84.0-alpha.6 - ## 0.1.24-alpha.5 ### Patch Changes diff --git a/server-adapters/elysia/package.json b/server-adapters/elysia/package.json index 8b516d8edcd..129a70a6b27 100644 --- a/server-adapters/elysia/package.json +++ b/server-adapters/elysia/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/elysia", - "version": "0.1.24-alpha.6", + "version": "0.1.24-alpha.5", "description": "Mastra Elysia adapter for the server", "type": "module", "main": "dist/index.js", diff --git a/server-adapters/express/CHANGELOG.md b/server-adapters/express/CHANGELOG.md index fa765b58d08..b3cd096e058 100644 --- a/server-adapters/express/CHANGELOG.md +++ b/server-adapters/express/CHANGELOG.md @@ -1,13 +1,5 @@ # @mastra/express -## 1.5.28-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/server@1.84.0-alpha.6 - ## 1.5.28-alpha.5 ### Patch Changes diff --git a/server-adapters/express/package.json b/server-adapters/express/package.json index f10d040ae80..3d089af4fe4 100644 --- a/server-adapters/express/package.json +++ b/server-adapters/express/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/express", - "version": "1.5.28-alpha.6", + "version": "1.5.28-alpha.5", "description": "Mastra Express adapter for the server", "type": "module", "main": "dist/index.js", diff --git a/server-adapters/fastify/CHANGELOG.md b/server-adapters/fastify/CHANGELOG.md index 67023f326b9..d3199e8727c 100644 --- a/server-adapters/fastify/CHANGELOG.md +++ b/server-adapters/fastify/CHANGELOG.md @@ -1,13 +1,5 @@ # @mastra/fastify -## 1.5.28-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/server@1.84.0-alpha.6 - ## 1.5.28-alpha.5 ### Patch Changes diff --git a/server-adapters/fastify/package.json b/server-adapters/fastify/package.json index a766a9424f2..08700f77bcd 100644 --- a/server-adapters/fastify/package.json +++ b/server-adapters/fastify/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/fastify", - "version": "1.5.28-alpha.6", + "version": "1.5.28-alpha.5", "description": "Mastra Fastify adapter for the server", "type": "module", "main": "dist/index.js", diff --git a/server-adapters/hono/CHANGELOG.md b/server-adapters/hono/CHANGELOG.md index 6f9ec96a3cf..b9e6c00a541 100644 --- a/server-adapters/hono/CHANGELOG.md +++ b/server-adapters/hono/CHANGELOG.md @@ -1,13 +1,5 @@ # @mastra/hono -## 1.7.26-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/server@1.84.0-alpha.6 - ## 1.7.26-alpha.5 ### Patch Changes diff --git a/server-adapters/hono/package.json b/server-adapters/hono/package.json index 9830388d641..1f4fad27e3d 100644 --- a/server-adapters/hono/package.json +++ b/server-adapters/hono/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/hono", - "version": "1.7.26-alpha.6", + "version": "1.7.26-alpha.5", "description": "Mastra Hono adapter for the server", "type": "module", "main": "dist/index.js", diff --git a/server-adapters/koa/CHANGELOG.md b/server-adapters/koa/CHANGELOG.md index 7c60fdb352a..a5dfc0b1970 100644 --- a/server-adapters/koa/CHANGELOG.md +++ b/server-adapters/koa/CHANGELOG.md @@ -1,13 +1,5 @@ # @mastra/koa -## 1.7.28-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/server@1.84.0-alpha.6 - ## 1.7.28-alpha.5 ### Patch Changes diff --git a/server-adapters/koa/package.json b/server-adapters/koa/package.json index 58a55e6a787..2e23ba78c98 100644 --- a/server-adapters/koa/package.json +++ b/server-adapters/koa/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/koa", - "version": "1.7.28-alpha.6", + "version": "1.7.28-alpha.5", "description": "Mastra Koa adapter for the server", "type": "module", "main": "dist/index.js", diff --git a/server-adapters/nestjs/CHANGELOG.md b/server-adapters/nestjs/CHANGELOG.md index 27c3b1a5387..3f008bfa1ea 100644 --- a/server-adapters/nestjs/CHANGELOG.md +++ b/server-adapters/nestjs/CHANGELOG.md @@ -1,13 +1,5 @@ # @mastra/nestjs -## 0.3.1-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/server@1.84.0-alpha.6 - ## 0.3.1-alpha.5 ### Patch Changes diff --git a/server-adapters/nestjs/package.json b/server-adapters/nestjs/package.json index 81cbb1a62f7..482760e635d 100644 --- a/server-adapters/nestjs/package.json +++ b/server-adapters/nestjs/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/nestjs", - "version": "0.3.1-alpha.6", + "version": "0.3.1-alpha.5", "description": "Mastra NestJS adapter for the server", "type": "module", "main": "dist/index.js", diff --git a/server-adapters/next/CHANGELOG.md b/server-adapters/next/CHANGELOG.md index 06eb07c5be4..ca9f7cc1471 100644 --- a/server-adapters/next/CHANGELOG.md +++ b/server-adapters/next/CHANGELOG.md @@ -1,14 +1,5 @@ # @mastra/next -## 0.2.42-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/hono@1.7.26-alpha.6 - - @mastra/server@1.84.0-alpha.6 - ## 0.2.42-alpha.5 ### Patch Changes diff --git a/server-adapters/next/package.json b/server-adapters/next/package.json index ba541839c08..c6931f00cc2 100644 --- a/server-adapters/next/package.json +++ b/server-adapters/next/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/next", - "version": "0.2.42-alpha.6", + "version": "0.2.42-alpha.5", "description": "Mastra Next.js server adapter — drop your Mastra instance into a Next.js app", "type": "module", "main": "dist/index.js", diff --git a/server-adapters/tanstack-start/CHANGELOG.md b/server-adapters/tanstack-start/CHANGELOG.md index 02000e37004..17f8b56dba7 100644 --- a/server-adapters/tanstack-start/CHANGELOG.md +++ b/server-adapters/tanstack-start/CHANGELOG.md @@ -1,14 +1,5 @@ # @mastra/tanstack-start -## 0.2.42-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/hono@1.7.26-alpha.6 - - @mastra/server@1.84.0-alpha.6 - ## 0.2.42-alpha.5 ### Patch Changes diff --git a/server-adapters/tanstack-start/package.json b/server-adapters/tanstack-start/package.json index f32450fe05b..864d38283b4 100644 --- a/server-adapters/tanstack-start/package.json +++ b/server-adapters/tanstack-start/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/tanstack-start", - "version": "0.2.42-alpha.6", + "version": "0.2.42-alpha.5", "description": "Mastra TanStack Start server adapter — drop your Mastra instance into a TanStack Start app", "type": "module", "main": "dist/index.js", diff --git a/workflows/temporal/CHANGELOG.md b/workflows/temporal/CHANGELOG.md index be709b24670..31b5735bdd4 100644 --- a/workflows/temporal/CHANGELOG.md +++ b/workflows/temporal/CHANGELOG.md @@ -1,13 +1,5 @@ # @mastra/temporal -## 0.6.1-alpha.6 - -### Patch Changes - -- Updated dependencies [[`0eb407e`](https://github.com/mastra-ai/mastra/commit/0eb407ebcce9d87e96cb399df5a3afb265fc2806)]: - - @mastra/core@1.84.0-alpha.6 - - @mastra/deployer@1.84.0-alpha.6 - ## 0.6.1-alpha.5 ### Patch Changes diff --git a/workflows/temporal/package.json b/workflows/temporal/package.json index 0b9cd72857a..87eb906d3f1 100644 --- a/workflows/temporal/package.json +++ b/workflows/temporal/package.json @@ -1,6 +1,6 @@ { "name": "@mastra/temporal", - "version": "0.6.1-alpha.6", + "version": "0.6.1-alpha.5", "description": "Mastra Temporal workflows integration - run Mastra workflows on the Temporal durable execution platform", "type": "module", "main": "dist/index.js",