@mettlelabs/mettle 0.0.0-beta.2-linux-arm64 → 0.0.0-beta.2

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.
Files changed (62) hide show
  1. package/bin/mettle.js +53 -0
  2. package/bin/postinstall.js +28 -0
  3. package/package.json +19 -13
  4. package/THIRD_PARTY_NOTICES.md +0 -11974
  5. package/bin/mettle +0 -4
  6. package/harness/audit-investigation.mjs +0 -203
  7. package/harness/chunk-1sygmp11.mjs +0 -18142
  8. package/harness/chunk-1ykxpmaz.mjs +0 -7887
  9. package/harness/chunk-2pm2sayw.mjs +0 -248
  10. package/harness/chunk-3m7jn5ac.mjs +0 -16242
  11. package/harness/chunk-3wt8a8fq.mjs +0 -1716
  12. package/harness/chunk-3wvjs93w.mjs +0 -538
  13. package/harness/chunk-49ytr8d5.mjs +0 -33761
  14. package/harness/chunk-4bepyxmq.mjs +0 -113
  15. package/harness/chunk-4vx34w5h.mjs +0 -2357
  16. package/harness/chunk-50sbrf09.mjs +0 -18972
  17. package/harness/chunk-56csr8sw.mjs +0 -322
  18. package/harness/chunk-5wgmv4np.mjs +0 -585
  19. package/harness/chunk-65eyq32y.mjs +0 -225
  20. package/harness/chunk-6fnh6qhk.mjs +0 -195
  21. package/harness/chunk-6kgqw9ny.mjs +0 -32303
  22. package/harness/chunk-7b242j0n.mjs +0 -14
  23. package/harness/chunk-9dg1btk1.mjs +0 -2818
  24. package/harness/chunk-ageqxj9v.mjs +0 -63008
  25. package/harness/chunk-b0qbt5jd.mjs +0 -14
  26. package/harness/chunk-b5g1r3fz.mjs +0 -4785
  27. package/harness/chunk-b71gpkxg.mjs +0 -1514
  28. package/harness/chunk-bdv1rx4a.mjs +0 -20364
  29. package/harness/chunk-c1631s2x.mjs +0 -12241
  30. package/harness/chunk-c7dx5mdd.mjs +0 -10807
  31. package/harness/chunk-d5xgxsnp.mjs +0 -74
  32. package/harness/chunk-erg1fbh0.mjs +0 -0
  33. package/harness/chunk-fh78v9vn.mjs +0 -19366
  34. package/harness/chunk-fjx29qvp.mjs +0 -50
  35. package/harness/chunk-gryka6kg.mjs +0 -39
  36. package/harness/chunk-h1td5kq9.mjs +0 -422
  37. package/harness/chunk-jb0r19et.mjs +0 -180
  38. package/harness/chunk-jp69h6sj.mjs +0 -95
  39. package/harness/chunk-mfn574ss.mjs +0 -179
  40. package/harness/chunk-nz5sv9as.mjs +0 -1642
  41. package/harness/chunk-p9d3cgvq.mjs +0 -452
  42. package/harness/chunk-pq6wvwxr.mjs +0 -12
  43. package/harness/chunk-qcm9arf8.mjs +0 -7736
  44. package/harness/chunk-qr8zfqjd.mjs +0 -24
  45. package/harness/chunk-rd80vvc5.mjs +0 -22047
  46. package/harness/chunk-rz2tz6jp.mjs +0 -26
  47. package/harness/chunk-sbkgc3kn.mjs +0 -8
  48. package/harness/chunk-v66qvpnb.mjs +0 -169
  49. package/harness/chunk-vjaxzab3.mjs +0 -136
  50. package/harness/chunk-vr1n5nza.mjs +0 -1045
  51. package/harness/chunk-vsf2zajv.mjs +0 -3867
  52. package/harness/chunk-w0qwc5z2.mjs +0 -41
  53. package/harness/chunk-wq253fj4.mjs +0 -19041
  54. package/harness/chunk-wyv7ceq4.mjs +0 -0
  55. package/harness/chunk-xnqknk2r.mjs +0 -198
  56. package/harness/chunk-z6n9thea.mjs +0 -45146
  57. package/harness/chunk-zty0d3bw.mjs +0 -0
  58. package/harness/chunk-zvkxtj82.mjs +0 -42
  59. package/harness/issue-api-token.mjs +0 -35
  60. package/harness/launcher.mjs +0 -459
  61. package/harness/sandbox.mjs +0 -133
  62. package/harness/server.mjs +0 -87314
@@ -1,248 +0,0 @@
1
- // node_modules/.bun/@mastra+core@1.71.0+95d98e20cbc6e6e1/node_modules/@mastra/core/dist/logger-DGUE8DHx.js
2
- function isAdaptableLogger(logger) {
3
- return typeof logger.__attachObservability === "function";
4
- }
5
- function exportTrackedException(ctx, error, metadata) {
6
- if (!ctx?.options.export)
7
- return;
8
- try {
9
- const mastraError = error;
10
- ctx.getLogSink()?.error(error.message, {
11
- ...mastraError.id !== undefined ? { errorId: mastraError.id } : {},
12
- ...mastraError.domain !== undefined ? { domain: mastraError.domain } : {},
13
- ...mastraError.category !== undefined ? { category: mastraError.category } : {},
14
- ...mastraError.details !== undefined ? { details: mastraError.details } : {},
15
- ...error.cause instanceof Error ? { cause: error.cause.message } : {},
16
- ...metadata
17
- });
18
- } catch {}
19
- }
20
- function buildLogRecordData(args) {
21
- const objectData = args.find((arg) => arg !== null && typeof arg === "object" && !Array.isArray(arg) && !(arg instanceof Error));
22
- const errorArg = args.find((arg) => arg instanceof Error);
23
- const extraArgs = args.filter((arg) => arg !== objectData && arg !== errorArg);
24
- if (!objectData && !errorArg && extraArgs.length === 0)
25
- return;
26
- return {
27
- ...objectData ?? {},
28
- ...errorArg ? { error: {
29
- name: errorArg.name,
30
- message: errorArg.message,
31
- stack: errorArg.stack
32
- } } : {},
33
- ...extraArgs.length > 0 ? { args: extraArgs } : {}
34
- };
35
- }
36
- var RegisteredLogger = {
37
- AGENT: "AGENT",
38
- OBSERVABILITY: "OBSERVABILITY",
39
- AUTH: "AUTH",
40
- BROWSER: "BROWSER",
41
- NETWORK: "NETWORK",
42
- WORKFLOW: "WORKFLOW",
43
- LLM: "LLM",
44
- TTS: "TTS",
45
- VOICE: "VOICE",
46
- VECTOR: "VECTOR",
47
- BUNDLER: "BUNDLER",
48
- DEPLOYER: "DEPLOYER",
49
- MEMORY: "MEMORY",
50
- STORAGE: "STORAGE",
51
- EMBEDDINGS: "EMBEDDINGS",
52
- MCP_SERVER: "MCP_SERVER",
53
- SERVER_CACHE: "SERVER_CACHE",
54
- SERVER: "SERVER",
55
- WORKSPACE: "WORKSPACE",
56
- CHANNEL: "CHANNEL"
57
- };
58
- var LogLevel = {
59
- DEBUG: "debug",
60
- INFO: "info",
61
- WARN: "warn",
62
- ERROR: "error",
63
- NONE: "silent"
64
- };
65
- var MastraLogger = class {
66
- name;
67
- level;
68
- transports;
69
- constructor(options = {}) {
70
- this.name = options.name || "Mastra";
71
- this.level = options.level || LogLevel.ERROR;
72
- this.transports = new Map(Object.entries(options.transports || {}));
73
- }
74
- getTransports() {
75
- return this.transports;
76
- }
77
- trackException(_error, _metadata) {}
78
- async listLogs(transportId, params) {
79
- if (!transportId || !this.transports.has(transportId))
80
- return {
81
- logs: [],
82
- total: 0,
83
- page: params?.page ?? 1,
84
- perPage: params?.perPage ?? 100,
85
- hasMore: false
86
- };
87
- return this.transports.get(transportId).listLogs?.(params) ?? {
88
- logs: [],
89
- total: 0,
90
- page: params?.page ?? 1,
91
- perPage: params?.perPage ?? 100,
92
- hasMore: false
93
- };
94
- }
95
- async listLogsByRunId({ transportId, runId, fromDate, toDate, logLevel, filters, page, perPage }) {
96
- if (!transportId || !this.transports.has(transportId) || !runId)
97
- return {
98
- logs: [],
99
- total: 0,
100
- page: page ?? 1,
101
- perPage: perPage ?? 100,
102
- hasMore: false
103
- };
104
- return this.transports.get(transportId).listLogsByRunId?.({
105
- runId,
106
- fromDate,
107
- toDate,
108
- logLevel,
109
- filters,
110
- page,
111
- perPage
112
- }) ?? {
113
- logs: [],
114
- total: 0,
115
- page: page ?? 1,
116
- perPage: perPage ?? 100,
117
- hasMore: false
118
- };
119
- }
120
- };
121
- var ConsoleLogger2 = class ConsoleLogger extends MastraLogger {
122
- component;
123
- filter;
124
- #adapterContext;
125
- constructor(options = {}) {
126
- super(options);
127
- this.component = options.component;
128
- this.filter = options.filter;
129
- }
130
- __attachObservability(ctx) {
131
- this.#adapterContext = ctx;
132
- }
133
- child(componentOrBindings) {
134
- const component = typeof componentOrBindings === "string" ? componentOrBindings : componentOrBindings?.component ?? this.component;
135
- const child = new ConsoleLogger({
136
- name: this.name,
137
- level: this.level,
138
- component,
139
- filter: this.filter
140
- });
141
- if (this.#adapterContext)
142
- child.__attachObservability(this.#adapterContext);
143
- return child;
144
- }
145
- #correlate(args) {
146
- const ctx = this.#adapterContext;
147
- if (!ctx?.options.correlation)
148
- return args;
149
- try {
150
- const fields = ctx.resolveTraceFields();
151
- return fields ? [...args, fields] : args;
152
- } catch {
153
- return args;
154
- }
155
- }
156
- #export(level, message, args) {
157
- const ctx = this.#adapterContext;
158
- if (!ctx?.options.export)
159
- return;
160
- try {
161
- ctx.getLogSink()?.[level](message, buildLogRecordData(args));
162
- } catch {}
163
- }
164
- shouldLog(level, message, args) {
165
- if (!this.filter)
166
- return true;
167
- try {
168
- return this.filter({
169
- component: this.component,
170
- level,
171
- message,
172
- args
173
- });
174
- } catch (e) {
175
- console.error(`[Logger] Filter error for component=${this.component} level=${level}:`, e);
176
- return true;
177
- }
178
- }
179
- prefix() {
180
- return this.component ? `[${this.component}] ` : "";
181
- }
182
- debug(message, ...args) {
183
- if (this.level === LogLevel.DEBUG && this.shouldLog(LogLevel.DEBUG, message, args))
184
- console.info(`${this.prefix()}${message}`, ...this.#correlate(args));
185
- this.#export("debug", message, args);
186
- }
187
- info(message, ...args) {
188
- if ((this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.INFO, message, args))
189
- console.info(`${this.prefix()}${message}`, ...this.#correlate(args));
190
- this.#export("info", message, args);
191
- }
192
- warn(message, ...args) {
193
- if ((this.level === LogLevel.WARN || this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.WARN, message, args))
194
- console.warn(`${this.prefix()}${message}`, ...this.#correlate(args));
195
- this.#export("warn", message, args);
196
- }
197
- error(message, ...args) {
198
- if ((this.level === LogLevel.ERROR || this.level === LogLevel.WARN || this.level === LogLevel.INFO || this.level === LogLevel.DEBUG) && this.shouldLog(LogLevel.ERROR, message, args))
199
- console.error(`${this.prefix()}${message}`, ...this.#correlate(args));
200
- this.#export("error", message, args);
201
- }
202
- trackException(error, metadata) {
203
- exportTrackedException(this.#adapterContext, error, metadata);
204
- }
205
- async listLogs(_transportId, _params) {
206
- return {
207
- logs: [],
208
- total: 0,
209
- page: _params?.page ?? 1,
210
- perPage: _params?.perPage ?? 100,
211
- hasMore: false
212
- };
213
- }
214
- async listLogsByRunId(_args) {
215
- return {
216
- logs: [],
217
- total: 0,
218
- page: _args.page ?? 1,
219
- perPage: _args.perPage ?? 100,
220
- hasMore: false
221
- };
222
- }
223
- };
224
-
225
- // node_modules/.bun/@mastra+core@1.71.0+95d98e20cbc6e6e1/node_modules/@mastra/core/dist/base-B-BWYmtx.js
226
- var MastraBase = class {
227
- component = RegisteredLogger.LLM;
228
- logger;
229
- name;
230
- #rawConfig;
231
- constructor({ component, name, rawConfig }) {
232
- this.component = component || RegisteredLogger.LLM;
233
- this.name = name;
234
- this.#rawConfig = rawConfig;
235
- this.logger = new ConsoleLogger2({ name: `${this.component} - ${this.name}` });
236
- }
237
- toRawConfig() {
238
- return this.#rawConfig;
239
- }
240
- __setRawConfig(rawConfig) {
241
- this.#rawConfig = rawConfig;
242
- }
243
- __setLogger(logger) {
244
- this.logger = "child" in logger && typeof logger.child === "function" ? logger.child({ component: this.component }) : logger;
245
- }
246
- };
247
-
248
- export { isAdaptableLogger, buildLogRecordData, RegisteredLogger, LogLevel, ConsoleLogger2, MastraBase };