@dbx-tools/shared-mastra 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.ts CHANGED
@@ -10,4 +10,4 @@ export * as thread from "./src/thread";
10
10
  export * as wire from "./src/wire";
11
11
  export type { MastraFeedbackValue, MastraFeedbackRequest, MastraFeedbackResponse } from "./src/feedback";
12
12
  export type { MarkerType, ParsedMarker } from "./src/marker";
13
- export type { MastraClientConfig, ServingEndpointsResponse, MastraHistoryUIMessage, MastraHistoryResponse, MastraClearHistoryResponse, MastraThread, MastraThreadsResponse, MastraDeleteThreadResponse, MastraUpdateThreadRequest, MastraUpdateThreadResponse, MastraSuggestionsResponse, ChartType, ChartResult, Chart, StatementData, MastraWriter, StartedEvent, AskGenieDoneEvent, MastraGenieErrorEvent, SummaryEvent, GenieAgentEvent, GenieWriterEvent, GenieWriterEventType, GenieDatasetData, GenieDatasetChart, GenieDataset, GenieSummaryItem, GenieSummaryItemType, GenieAgentResult } from "./src/wire";
13
+ export type { MastraClientConfig, DefaultModelResponse, ServingEndpointsResponse, MastraHistoryUIMessage, MastraHistoryResponse, MastraClearHistoryResponse, MastraThread, MastraThreadsResponse, MastraDeleteThreadResponse, MastraUpdateThreadRequest, MastraUpdateThreadResponse, MastraSuggestionsResponse, ChartType, ChartResult, Chart, StatementData, MastraWriter, StartedEvent, AskGenieDoneEvent, MastraGenieErrorEvent, SummaryEvent, GenieAgentEvent, GenieWriterEvent, GenieWriterEventType, GenieDatasetData, GenieDatasetChart, GenieDataset, GenieSummaryItem, GenieSummaryItemType, GenieAgentResult } from "./src/wire";
package/package.json CHANGED
@@ -12,16 +12,16 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "zod": "^4.3.6",
15
- "@dbx-tools/shared-core": "0.3.1",
16
- "@dbx-tools/shared-model": "0.3.1",
17
- "@dbx-tools/shared-genie": "0.3.1"
15
+ "@dbx-tools/shared-core": "0.3.3",
16
+ "@dbx-tools/shared-model": "0.3.3",
17
+ "@dbx-tools/shared-genie": "0.3.3"
18
18
  },
19
19
  "main": "index.ts",
20
20
  "license": "UNLICENSED",
21
21
  "publishConfig": {
22
22
  "access": "public"
23
23
  },
24
- "version": "0.3.1",
24
+ "version": "0.3.3",
25
25
  "types": "index.ts",
26
26
  "type": "module",
27
27
  "exports": {
package/src/routes.ts CHANGED
@@ -22,5 +22,11 @@ export const MASTRA_ROUTES = {
22
22
  feedback: "/route/feedback",
23
23
  suggestions: "/suggestions",
24
24
  models: "/models",
25
+ // The serving-endpoint id an agent falls back to when the client pins no
26
+ // model. Agent-scoped via an optional `?agentId=`; the default agent is
27
+ // used when omitted. Returns `{ agentId, model }` where `model` is null
28
+ // when the agent resolves its model dynamically at call time (nothing
29
+ // static to advertise). Lets the picker label its "Server default" option.
30
+ defaultModel: "/default-model",
25
31
  embed: "/embed",
26
32
  } as const;
package/src/wire.ts CHANGED
@@ -68,6 +68,20 @@ export const MastraClientConfigSchema = z.object({
68
68
  });
69
69
  export type MastraClientConfig = z.infer<typeof MastraClientConfigSchema>;
70
70
 
71
+ /**
72
+ * JSON payload returned by `GET ${basePath}/default-model[?agentId=]`. The
73
+ * static default serving-endpoint id the agent resolves to when the client
74
+ * pins no model, or `null` when the agent decides its model dynamically at
75
+ * call time (nothing static to advertise). Lets the picker name its "Server
76
+ * default" option. Kept off the static bootstrap `clientConfig` on purpose:
77
+ * it is per-agent and can be dynamic, so it is fetched like `/models`.
78
+ */
79
+ export const DefaultModelResponseSchema = z.object({
80
+ agentId: z.string(),
81
+ model: z.string().nullable(),
82
+ });
83
+ export type DefaultModelResponse = z.infer<typeof DefaultModelResponseSchema>;
84
+
71
85
  /* ---------------------------- model catalogue ---------------------------- */
72
86
 
73
87
  /**