@mastra/server 1.18.0-alpha.0 → 1.18.0-alpha.1
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/CHANGELOG.md +11 -0
- package/dist/{chunk-MROITNSM.js → chunk-4Q2QV27C.js} +13 -3
- package/dist/chunk-4Q2QV27C.js.map +1 -0
- package/dist/{chunk-4OM2A5ZZ.cjs → chunk-6H7FQ4CY.cjs} +14 -2
- package/dist/chunk-6H7FQ4CY.cjs.map +1 -0
- package/dist/{chunk-OXE6JN54.js → chunk-6MYRF6QR.js} +68 -4
- package/dist/chunk-6MYRF6QR.js.map +1 -0
- package/dist/{chunk-R5EM57UR.cjs → chunk-DJQT32SV.cjs} +214 -81
- package/dist/chunk-DJQT32SV.cjs.map +1 -0
- package/dist/{chunk-PZE5ZBAX.js → chunk-OSQ4FZT2.js} +5 -5
- package/dist/{chunk-PZE5ZBAX.js.map → chunk-OSQ4FZT2.js.map} +1 -1
- package/dist/{chunk-WICIG6YL.js → chunk-PVUR75AM.js} +214 -81
- package/dist/chunk-PVUR75AM.js.map +1 -0
- package/dist/{chunk-XBMICDYC.cjs → chunk-Z36FXNDQ.cjs} +126 -60
- package/dist/chunk-Z36FXNDQ.cjs.map +1 -0
- package/dist/{chunk-SZBVW2WD.cjs → chunk-ZBOL3JND.cjs} +18 -18
- package/dist/{chunk-SZBVW2WD.cjs.map → chunk-ZBOL3JND.cjs.map} +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/{observational-memory-WMCWT577-MXWR6ZYS.cjs → observational-memory-UGDENJPE-DM3C7ZXI.cjs} +26 -26
- package/dist/{observational-memory-WMCWT577-MXWR6ZYS.cjs.map → observational-memory-UGDENJPE-DM3C7ZXI.cjs.map} +1 -1
- package/dist/{observational-memory-WMCWT577-EDKAVK3W.js → observational-memory-UGDENJPE-NVMIXNI4.js} +3 -3
- package/dist/{observational-memory-WMCWT577-EDKAVK3W.js.map → observational-memory-UGDENJPE-NVMIXNI4.js.map} +1 -1
- package/dist/server/handlers/agent-builder.cjs +16 -16
- package/dist/server/handlers/agent-builder.js +1 -1
- package/dist/server/handlers/datasets.cjs +32 -24
- package/dist/server/handlers/datasets.d.ts +88 -0
- package/dist/server/handlers/datasets.d.ts.map +1 -1
- package/dist/server/handlers/datasets.js +1 -1
- package/dist/server/handlers.cjs +2 -2
- package/dist/server/handlers.js +1 -1
- package/dist/server/schemas/datasets.d.ts +16 -0
- package/dist/server/schemas/datasets.d.ts.map +1 -1
- package/dist/server/schemas/index.cjs +48 -40
- package/dist/server/schemas/index.js +1 -1
- package/dist/server/server-adapter/index.cjs +45 -41
- package/dist/server/server-adapter/index.cjs.map +1 -1
- package/dist/server/server-adapter/index.js +7 -3
- package/dist/server/server-adapter/index.js.map +1 -1
- package/dist/server/server-adapter/routes/datasets.d.ts +87 -1
- package/dist/server/server-adapter/routes/datasets.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-4OM2A5ZZ.cjs.map +0 -1
- package/dist/chunk-MROITNSM.js.map +0 -1
- package/dist/chunk-OXE6JN54.js.map +0 -1
- package/dist/chunk-R5EM57UR.cjs.map +0 -1
- package/dist/chunk-WICIG6YL.js.map +0 -1
- package/dist/chunk-XBMICDYC.cjs.map +0 -1
|
@@ -10,6 +10,7 @@ var path = require('path');
|
|
|
10
10
|
var crypto$1 = require('crypto');
|
|
11
11
|
var agent = require('@mastra/core/agent');
|
|
12
12
|
var async_hooks = require('async_hooks');
|
|
13
|
+
var util = require('util');
|
|
13
14
|
|
|
14
15
|
// ../../node_modules/.pnpm/xxhash-wasm@1.1.0/node_modules/xxhash-wasm/esm/xxhash-wasm.js
|
|
15
16
|
var t = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 48, 8, 96, 3, 127, 127, 127, 1, 127, 96, 3, 127, 127, 127, 0, 96, 2, 127, 127, 0, 96, 1, 127, 1, 127, 96, 3, 127, 127, 126, 1, 126, 96, 3, 126, 127, 127, 1, 126, 96, 2, 127, 126, 0, 96, 1, 127, 1, 126, 3, 11, 10, 0, 0, 2, 1, 3, 4, 5, 6, 1, 7, 5, 3, 1, 0, 1, 7, 85, 9, 3, 109, 101, 109, 2, 0, 5, 120, 120, 104, 51, 50, 0, 0, 6, 105, 110, 105, 116, 51, 50, 0, 2, 8, 117, 112, 100, 97, 116, 101, 51, 50, 0, 3, 8, 100, 105, 103, 101, 115, 116, 51, 50, 0, 4, 5, 120, 120, 104, 54, 52, 0, 5, 6, 105, 110, 105, 116, 54, 52, 0, 7, 8, 117, 112, 100, 97, 116, 101, 54, 52, 0, 8, 8, 100, 105, 103, 101, 115, 116, 54, 52, 0, 9, 10, 251, 22, 10, 242, 1, 1, 4, 127, 32, 0, 32, 1, 106, 33, 3, 32, 1, 65, 16, 79, 4, 127, 32, 3, 65, 16, 107, 33, 6, 32, 2, 65, 168, 136, 141, 161, 2, 106, 33, 3, 32, 2, 65, 137, 235, 208, 208, 7, 107, 33, 4, 32, 2, 65, 207, 140, 162, 142, 6, 106, 33, 5, 3, 64, 32, 3, 32, 0, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 3, 32, 4, 32, 0, 65, 4, 106, 34, 0, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 4, 32, 2, 32, 0, 65, 4, 106, 34, 0, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 2, 32, 5, 32, 0, 65, 4, 106, 34, 0, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 5, 32, 6, 32, 0, 65, 4, 106, 34, 0, 79, 13, 0, 11, 32, 2, 65, 12, 119, 32, 5, 65, 18, 119, 106, 32, 4, 65, 7, 119, 106, 32, 3, 65, 1, 119, 106, 5, 32, 2, 65, 177, 207, 217, 178, 1, 106, 11, 32, 1, 106, 32, 0, 32, 1, 65, 15, 113, 16, 1, 11, 146, 1, 0, 32, 1, 32, 2, 106, 33, 2, 3, 64, 32, 1, 65, 4, 106, 32, 2, 75, 69, 4, 64, 32, 0, 32, 1, 40, 2, 0, 65, 189, 220, 202, 149, 124, 108, 106, 65, 17, 119, 65, 175, 214, 211, 190, 2, 108, 33, 0, 32, 1, 65, 4, 106, 33, 1, 12, 1, 11, 11, 3, 64, 32, 1, 32, 2, 79, 69, 4, 64, 32, 0, 32, 1, 45, 0, 0, 65, 177, 207, 217, 178, 1, 108, 106, 65, 11, 119, 65, 177, 243, 221, 241, 121, 108, 33, 0, 32, 1, 65, 1, 106, 33, 1, 12, 1, 11, 11, 32, 0, 32, 0, 65, 15, 118, 115, 65, 247, 148, 175, 175, 120, 108, 34, 0, 65, 13, 118, 32, 0, 115, 65, 189, 220, 202, 149, 124, 108, 34, 0, 65, 16, 118, 32, 0, 115, 11, 63, 0, 32, 0, 65, 8, 106, 32, 1, 65, 168, 136, 141, 161, 2, 106, 54, 2, 0, 32, 0, 65, 12, 106, 32, 1, 65, 137, 235, 208, 208, 7, 107, 54, 2, 0, 32, 0, 65, 16, 106, 32, 1, 54, 2, 0, 32, 0, 65, 20, 106, 32, 1, 65, 207, 140, 162, 142, 6, 106, 54, 2, 0, 11, 195, 4, 1, 6, 127, 32, 1, 32, 2, 106, 33, 6, 32, 0, 65, 24, 106, 33, 4, 32, 0, 65, 40, 106, 40, 2, 0, 33, 3, 32, 0, 32, 0, 40, 2, 0, 32, 2, 106, 54, 2, 0, 32, 0, 65, 4, 106, 34, 5, 32, 5, 40, 2, 0, 32, 2, 65, 16, 79, 32, 0, 40, 2, 0, 65, 16, 79, 114, 114, 54, 2, 0, 32, 2, 32, 3, 106, 65, 16, 73, 4, 64, 32, 3, 32, 4, 106, 32, 1, 32, 2, 252, 10, 0, 0, 32, 0, 65, 40, 106, 32, 2, 32, 3, 106, 54, 2, 0, 15, 11, 32, 3, 4, 64, 32, 3, 32, 4, 106, 32, 1, 65, 16, 32, 3, 107, 34, 2, 252, 10, 0, 0, 32, 0, 65, 8, 106, 34, 3, 32, 3, 40, 2, 0, 32, 4, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 54, 2, 0, 32, 0, 65, 12, 106, 34, 3, 32, 3, 40, 2, 0, 32, 4, 65, 4, 106, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 54, 2, 0, 32, 0, 65, 16, 106, 34, 3, 32, 3, 40, 2, 0, 32, 4, 65, 8, 106, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 54, 2, 0, 32, 0, 65, 20, 106, 34, 3, 32, 3, 40, 2, 0, 32, 4, 65, 12, 106, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 54, 2, 0, 32, 0, 65, 40, 106, 65, 0, 54, 2, 0, 32, 1, 32, 2, 106, 33, 1, 11, 32, 1, 32, 6, 65, 16, 107, 77, 4, 64, 32, 6, 65, 16, 107, 33, 8, 32, 0, 65, 8, 106, 40, 2, 0, 33, 2, 32, 0, 65, 12, 106, 40, 2, 0, 33, 3, 32, 0, 65, 16, 106, 40, 2, 0, 33, 5, 32, 0, 65, 20, 106, 40, 2, 0, 33, 7, 3, 64, 32, 2, 32, 1, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 2, 32, 3, 32, 1, 65, 4, 106, 34, 1, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 3, 32, 5, 32, 1, 65, 4, 106, 34, 1, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 5, 32, 7, 32, 1, 65, 4, 106, 34, 1, 40, 2, 0, 65, 247, 148, 175, 175, 120, 108, 106, 65, 13, 119, 65, 177, 243, 221, 241, 121, 108, 33, 7, 32, 8, 32, 1, 65, 4, 106, 34, 1, 79, 13, 0, 11, 32, 0, 65, 8, 106, 32, 2, 54, 2, 0, 32, 0, 65, 12, 106, 32, 3, 54, 2, 0, 32, 0, 65, 16, 106, 32, 5, 54, 2, 0, 32, 0, 65, 20, 106, 32, 7, 54, 2, 0, 11, 32, 1, 32, 6, 73, 4, 64, 32, 4, 32, 1, 32, 6, 32, 1, 107, 34, 1, 252, 10, 0, 0, 32, 0, 65, 40, 106, 32, 1, 54, 2, 0, 11, 11, 97, 1, 1, 127, 32, 0, 65, 16, 106, 40, 2, 0, 33, 1, 32, 0, 65, 4, 106, 40, 2, 0, 4, 127, 32, 1, 65, 12, 119, 32, 0, 65, 20, 106, 40, 2, 0, 65, 18, 119, 106, 32, 0, 65, 12, 106, 40, 2, 0, 65, 7, 119, 106, 32, 0, 65, 8, 106, 40, 2, 0, 65, 1, 119, 106, 5, 32, 1, 65, 177, 207, 217, 178, 1, 106, 11, 32, 0, 40, 2, 0, 106, 32, 0, 65, 24, 106, 32, 0, 65, 40, 106, 40, 2, 0, 16, 1, 11, 255, 3, 2, 3, 126, 1, 127, 32, 0, 32, 1, 106, 33, 6, 32, 1, 65, 32, 79, 4, 126, 32, 6, 65, 32, 107, 33, 6, 32, 2, 66, 214, 235, 130, 238, 234, 253, 137, 245, 224, 0, 124, 33, 3, 32, 2, 66, 177, 169, 172, 193, 173, 184, 212, 166, 61, 125, 33, 4, 32, 2, 66, 249, 234, 208, 208, 231, 201, 161, 228, 225, 0, 124, 33, 5, 3, 64, 32, 3, 32, 0, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 3, 32, 4, 32, 0, 65, 8, 106, 34, 0, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 4, 32, 2, 32, 0, 65, 8, 106, 34, 0, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 2, 32, 5, 32, 0, 65, 8, 106, 34, 0, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 5, 32, 6, 32, 0, 65, 8, 106, 34, 0, 79, 13, 0, 11, 32, 2, 66, 12, 137, 32, 5, 66, 18, 137, 124, 32, 4, 66, 7, 137, 124, 32, 3, 66, 1, 137, 124, 32, 3, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 4, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 2, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 5, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 5, 32, 2, 66, 197, 207, 217, 178, 241, 229, 186, 234, 39, 124, 11, 32, 1, 173, 124, 32, 0, 32, 1, 65, 31, 113, 16, 6, 11, 134, 2, 0, 32, 1, 32, 2, 106, 33, 2, 3, 64, 32, 2, 32, 1, 65, 8, 106, 79, 4, 64, 32, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 32, 0, 133, 66, 27, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 33, 0, 32, 1, 65, 8, 106, 33, 1, 12, 1, 11, 11, 32, 1, 65, 4, 106, 32, 2, 77, 4, 64, 32, 0, 32, 1, 53, 2, 0, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 23, 137, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 249, 243, 221, 241, 153, 246, 153, 171, 22, 124, 33, 0, 32, 1, 65, 4, 106, 33, 1, 11, 3, 64, 32, 1, 32, 2, 73, 4, 64, 32, 0, 32, 1, 49, 0, 0, 66, 197, 207, 217, 178, 241, 229, 186, 234, 39, 126, 133, 66, 11, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 0, 32, 1, 65, 1, 106, 33, 1, 12, 1, 11, 11, 32, 0, 32, 0, 66, 33, 136, 133, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 34, 0, 32, 0, 66, 29, 136, 133, 66, 249, 243, 221, 241, 153, 246, 153, 171, 22, 126, 34, 0, 32, 0, 66, 32, 136, 133, 11, 77, 0, 32, 0, 65, 8, 106, 32, 1, 66, 214, 235, 130, 238, 234, 253, 137, 245, 224, 0, 124, 55, 3, 0, 32, 0, 65, 16, 106, 32, 1, 66, 177, 169, 172, 193, 173, 184, 212, 166, 61, 125, 55, 3, 0, 32, 0, 65, 24, 106, 32, 1, 55, 3, 0, 32, 0, 65, 32, 106, 32, 1, 66, 249, 234, 208, 208, 231, 201, 161, 228, 225, 0, 124, 55, 3, 0, 11, 244, 4, 2, 3, 127, 4, 126, 32, 1, 32, 2, 106, 33, 5, 32, 0, 65, 40, 106, 33, 4, 32, 0, 65, 200, 0, 106, 40, 2, 0, 33, 3, 32, 0, 32, 0, 41, 3, 0, 32, 2, 173, 124, 55, 3, 0, 32, 2, 32, 3, 106, 65, 32, 73, 4, 64, 32, 3, 32, 4, 106, 32, 1, 32, 2, 252, 10, 0, 0, 32, 0, 65, 200, 0, 106, 32, 2, 32, 3, 106, 54, 2, 0, 15, 11, 32, 3, 4, 64, 32, 3, 32, 4, 106, 32, 1, 65, 32, 32, 3, 107, 34, 2, 252, 10, 0, 0, 32, 0, 65, 8, 106, 34, 3, 32, 3, 41, 3, 0, 32, 4, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 55, 3, 0, 32, 0, 65, 16, 106, 34, 3, 32, 3, 41, 3, 0, 32, 4, 65, 8, 106, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 55, 3, 0, 32, 0, 65, 24, 106, 34, 3, 32, 3, 41, 3, 0, 32, 4, 65, 16, 106, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 55, 3, 0, 32, 0, 65, 32, 106, 34, 3, 32, 3, 41, 3, 0, 32, 4, 65, 24, 106, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 55, 3, 0, 32, 0, 65, 200, 0, 106, 65, 0, 54, 2, 0, 32, 1, 32, 2, 106, 33, 1, 11, 32, 1, 65, 32, 106, 32, 5, 77, 4, 64, 32, 5, 65, 32, 107, 33, 2, 32, 0, 65, 8, 106, 41, 3, 0, 33, 6, 32, 0, 65, 16, 106, 41, 3, 0, 33, 7, 32, 0, 65, 24, 106, 41, 3, 0, 33, 8, 32, 0, 65, 32, 106, 41, 3, 0, 33, 9, 3, 64, 32, 6, 32, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 6, 32, 7, 32, 1, 65, 8, 106, 34, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 7, 32, 8, 32, 1, 65, 8, 106, 34, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 8, 32, 9, 32, 1, 65, 8, 106, 34, 1, 41, 3, 0, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 124, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 33, 9, 32, 2, 32, 1, 65, 8, 106, 34, 1, 79, 13, 0, 11, 32, 0, 65, 8, 106, 32, 6, 55, 3, 0, 32, 0, 65, 16, 106, 32, 7, 55, 3, 0, 32, 0, 65, 24, 106, 32, 8, 55, 3, 0, 32, 0, 65, 32, 106, 32, 9, 55, 3, 0, 11, 32, 1, 32, 5, 73, 4, 64, 32, 4, 32, 1, 32, 5, 32, 1, 107, 34, 1, 252, 10, 0, 0, 32, 0, 65, 200, 0, 106, 32, 1, 54, 2, 0, 11, 11, 188, 2, 1, 5, 126, 32, 0, 65, 24, 106, 41, 3, 0, 33, 1, 32, 0, 41, 3, 0, 34, 2, 66, 32, 90, 4, 126, 32, 0, 65, 8, 106, 41, 3, 0, 34, 3, 66, 1, 137, 32, 0, 65, 16, 106, 41, 3, 0, 34, 4, 66, 7, 137, 124, 32, 1, 66, 12, 137, 32, 0, 65, 32, 106, 41, 3, 0, 34, 5, 66, 18, 137, 124, 124, 32, 3, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 4, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 1, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 32, 5, 66, 207, 214, 211, 190, 210, 199, 171, 217, 66, 126, 66, 31, 137, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 133, 66, 135, 149, 175, 175, 152, 182, 222, 155, 158, 127, 126, 66, 157, 163, 181, 234, 131, 177, 141, 138, 250, 0, 125, 5, 32, 1, 66, 197, 207, 217, 178, 241, 229, 186, 234, 39, 124, 11, 32, 2, 124, 32, 0, 65, 40, 106, 32, 2, 66, 31, 131, 167, 16, 6, 11]);
|
|
@@ -1039,8 +1040,6 @@ function imageSize(input) {
|
|
|
1039
1040
|
}
|
|
1040
1041
|
throw new TypeError(`unsupported file type: ${type}`);
|
|
1041
1042
|
}
|
|
1042
|
-
|
|
1043
|
-
// ../memory/dist/chunk-2QSOQQPM.js
|
|
1044
1043
|
var OM_DEBUG_LOG = process.env.OM_DEBUG ? path.join(process.cwd(), "om-debug.log") : null;
|
|
1045
1044
|
function omDebug(msg) {
|
|
1046
1045
|
if (!OM_DEBUG_LOG) return;
|
|
@@ -2948,7 +2947,17 @@ var ObservationStep = class {
|
|
|
2948
2947
|
writer: this.turn.writer,
|
|
2949
2948
|
requestContext: this.turn.requestContext,
|
|
2950
2949
|
beforeBuffer: async (candidates) => {
|
|
2950
|
+
if (candidates.length === 0) {
|
|
2951
|
+
return;
|
|
2952
|
+
}
|
|
2951
2953
|
om.sealMessagesForBuffering(candidates);
|
|
2954
|
+
try {
|
|
2955
|
+
await this.turn.hooks?.onBufferChunkSealed?.();
|
|
2956
|
+
} catch (error) {
|
|
2957
|
+
omDebug(
|
|
2958
|
+
`[OM:buffer] onBufferChunkSealed hook failed: ${error instanceof Error ? error.message : String(error)}`
|
|
2959
|
+
);
|
|
2960
|
+
}
|
|
2952
2961
|
if (this.turn.memory) {
|
|
2953
2962
|
await this.turn.memory.persistMessages(candidates);
|
|
2954
2963
|
}
|
|
@@ -3093,12 +3102,6 @@ var ObservationStep = class {
|
|
|
3093
3102
|
}
|
|
3094
3103
|
};
|
|
3095
3104
|
var ObservationTurn = class {
|
|
3096
|
-
constructor(om, threadId, resourceId, messageList) {
|
|
3097
|
-
this.om = om;
|
|
3098
|
-
this.threadId = threadId;
|
|
3099
|
-
this.resourceId = resourceId;
|
|
3100
|
-
this.messageList = messageList;
|
|
3101
|
-
}
|
|
3102
3105
|
_record;
|
|
3103
3106
|
_context;
|
|
3104
3107
|
_currentStep;
|
|
@@ -3112,6 +3115,19 @@ var ObservationTurn = class {
|
|
|
3112
3115
|
writer;
|
|
3113
3116
|
/** Optional request context for observation calls. */
|
|
3114
3117
|
requestContext;
|
|
3118
|
+
/** Optional processor-provided hooks for turn/step lifecycle integration. */
|
|
3119
|
+
hooks;
|
|
3120
|
+
constructor(opts) {
|
|
3121
|
+
this.om = opts.om;
|
|
3122
|
+
this.threadId = opts.threadId;
|
|
3123
|
+
this.resourceId = opts.resourceId;
|
|
3124
|
+
this.messageList = opts.messageList;
|
|
3125
|
+
this.hooks = opts.hooks;
|
|
3126
|
+
}
|
|
3127
|
+
om;
|
|
3128
|
+
threadId;
|
|
3129
|
+
resourceId;
|
|
3130
|
+
messageList;
|
|
3115
3131
|
/** The current cached record. Refreshed after mutations (activate/observe/reflect). */
|
|
3116
3132
|
get record() {
|
|
3117
3133
|
if (!this._record) throw new Error("Turn not started \u2014 call start() first");
|
|
@@ -3174,7 +3190,7 @@ var ObservationTurn = class {
|
|
|
3174
3190
|
return this._currentStep;
|
|
3175
3191
|
}
|
|
3176
3192
|
/**
|
|
3177
|
-
* Finalize the turn: save any remaining messages
|
|
3193
|
+
* Finalize the turn: save any remaining messages and return the latest record state.
|
|
3178
3194
|
*/
|
|
3179
3195
|
async end() {
|
|
3180
3196
|
if (this._ended) throw new Error("Turn already ended");
|
|
@@ -3185,22 +3201,6 @@ var ObservationTurn = class {
|
|
|
3185
3201
|
if (unsavedMessages.length > 0) {
|
|
3186
3202
|
await this.om.persistMessages(unsavedMessages, this.threadId, this.resourceId);
|
|
3187
3203
|
}
|
|
3188
|
-
await this.om.waitForBuffering(this.threadId, this.resourceId);
|
|
3189
|
-
const status = await this.om.getStatus({
|
|
3190
|
-
threadId: this.threadId,
|
|
3191
|
-
resourceId: this.resourceId,
|
|
3192
|
-
messages: this.messageList.get.all.db()
|
|
3193
|
-
});
|
|
3194
|
-
if (status.shouldObserve) {
|
|
3195
|
-
await this.om.observe({
|
|
3196
|
-
threadId: this.threadId,
|
|
3197
|
-
resourceId: this.resourceId,
|
|
3198
|
-
messages: this.messageList.get.all.db(),
|
|
3199
|
-
requestContext: this.requestContext,
|
|
3200
|
-
writer: this.writer
|
|
3201
|
-
});
|
|
3202
|
-
}
|
|
3203
|
-
await this.refreshRecord();
|
|
3204
3204
|
return { record: this._record };
|
|
3205
3205
|
}
|
|
3206
3206
|
/**
|
|
@@ -8713,7 +8713,13 @@ ${grouped}` : grouped;
|
|
|
8713
8713
|
* ```
|
|
8714
8714
|
*/
|
|
8715
8715
|
beginTurn(opts) {
|
|
8716
|
-
return new ObservationTurn(
|
|
8716
|
+
return new ObservationTurn({
|
|
8717
|
+
om: this,
|
|
8718
|
+
threadId: opts.threadId,
|
|
8719
|
+
resourceId: opts.resourceId,
|
|
8720
|
+
messageList: opts.messageList,
|
|
8721
|
+
hooks: opts.hooks
|
|
8722
|
+
});
|
|
8717
8723
|
}
|
|
8718
8724
|
};
|
|
8719
8725
|
var OM_REPRO_CAPTURE_DIR = process.env.OM_REPRO_CAPTURE_DIR ?? ".mastra-om-repro";
|
|
@@ -8729,6 +8735,7 @@ function safeCaptureJson(value) {
|
|
|
8729
8735
|
JSON.stringify(value, (_key, current) => {
|
|
8730
8736
|
if (typeof current === "bigint") return current.toString();
|
|
8731
8737
|
if (typeof current === "function") return "[function]";
|
|
8738
|
+
if (typeof current === "symbol") return current.toString();
|
|
8732
8739
|
if (current instanceof Error) return { name: current.name, message: current.message, stack: current.stack };
|
|
8733
8740
|
if (current instanceof Set) return { __type: "Set", values: Array.from(current.values()) };
|
|
8734
8741
|
if (current instanceof Map) return { __type: "Map", entries: Array.from(current.entries()) };
|
|
@@ -8736,6 +8743,87 @@ function safeCaptureJson(value) {
|
|
|
8736
8743
|
})
|
|
8737
8744
|
);
|
|
8738
8745
|
}
|
|
8746
|
+
function safeCaptureJsonOrError(value) {
|
|
8747
|
+
try {
|
|
8748
|
+
return { ok: true, value: safeCaptureJson(value) };
|
|
8749
|
+
} catch (error) {
|
|
8750
|
+
return {
|
|
8751
|
+
ok: false,
|
|
8752
|
+
error: safeCaptureJson({
|
|
8753
|
+
message: error instanceof Error ? error.message : String(error),
|
|
8754
|
+
stack: error instanceof Error ? error.stack : void 0,
|
|
8755
|
+
inspected: util.inspect(value, { depth: 3, maxArrayLength: 20, breakLength: 120 })
|
|
8756
|
+
})
|
|
8757
|
+
};
|
|
8758
|
+
}
|
|
8759
|
+
}
|
|
8760
|
+
function formatCaptureDate(value) {
|
|
8761
|
+
if (!value) return void 0;
|
|
8762
|
+
if (value instanceof Date) return value.toISOString();
|
|
8763
|
+
try {
|
|
8764
|
+
return new Date(value).toISOString();
|
|
8765
|
+
} catch {
|
|
8766
|
+
return void 0;
|
|
8767
|
+
}
|
|
8768
|
+
}
|
|
8769
|
+
function summarizeOmTurn(value) {
|
|
8770
|
+
if (!value || typeof value !== "object") {
|
|
8771
|
+
return value;
|
|
8772
|
+
}
|
|
8773
|
+
const turn = value;
|
|
8774
|
+
return {
|
|
8775
|
+
__type: "ObservationTurn",
|
|
8776
|
+
threadId: turn.threadId,
|
|
8777
|
+
resourceId: turn.resourceId,
|
|
8778
|
+
started: turn._started,
|
|
8779
|
+
ended: turn._ended,
|
|
8780
|
+
generationCountAtStart: turn._generationCountAtStart,
|
|
8781
|
+
record: turn._record ? {
|
|
8782
|
+
id: turn._record.id,
|
|
8783
|
+
scope: turn._record.scope,
|
|
8784
|
+
threadId: turn._record.threadId,
|
|
8785
|
+
resourceId: turn._record.resourceId,
|
|
8786
|
+
createdAt: formatCaptureDate(turn._record.createdAt),
|
|
8787
|
+
updatedAt: formatCaptureDate(turn._record.updatedAt),
|
|
8788
|
+
lastObservedAt: formatCaptureDate(turn._record.lastObservedAt),
|
|
8789
|
+
generationCount: turn._record.generationCount,
|
|
8790
|
+
observationTokenCount: turn._record.observationTokenCount,
|
|
8791
|
+
pendingMessageTokens: turn._record.pendingMessageTokens,
|
|
8792
|
+
isBufferingObservation: turn._record.isBufferingObservation,
|
|
8793
|
+
isBufferingReflection: turn._record.isBufferingReflection
|
|
8794
|
+
} : void 0,
|
|
8795
|
+
context: turn._context ? {
|
|
8796
|
+
messageCount: Array.isArray(turn._context.messages) ? turn._context.messages.length : void 0,
|
|
8797
|
+
hasSystemMessage: Array.isArray(turn._context.systemMessage) ? turn._context.systemMessage.length > 0 : Boolean(turn._context.systemMessage),
|
|
8798
|
+
continuationId: turn._context.continuation?.id,
|
|
8799
|
+
hasOtherThreadsContext: Boolean(turn._context.otherThreadsContext),
|
|
8800
|
+
recordId: turn._context.record?.id
|
|
8801
|
+
} : void 0,
|
|
8802
|
+
currentStep: turn._currentStep ? {
|
|
8803
|
+
stepNumber: turn._currentStep.stepNumber,
|
|
8804
|
+
prepared: turn._currentStep._prepared,
|
|
8805
|
+
context: turn._currentStep._context ? {
|
|
8806
|
+
activated: turn._currentStep._context.activated,
|
|
8807
|
+
observed: turn._currentStep._context.observed,
|
|
8808
|
+
buffered: turn._currentStep._context.buffered,
|
|
8809
|
+
reflected: turn._currentStep._context.reflected,
|
|
8810
|
+
didThresholdCleanup: turn._currentStep._context.didThresholdCleanup,
|
|
8811
|
+
messageCount: Array.isArray(turn._currentStep._context.messages) ? turn._currentStep._context.messages.length : void 0,
|
|
8812
|
+
systemMessageCount: Array.isArray(turn._currentStep._context.systemMessage) ? turn._currentStep._context.systemMessage.length : void 0
|
|
8813
|
+
} : void 0
|
|
8814
|
+
} : void 0
|
|
8815
|
+
};
|
|
8816
|
+
}
|
|
8817
|
+
function sanitizeCaptureState(rawState) {
|
|
8818
|
+
return Object.fromEntries(
|
|
8819
|
+
Object.entries(rawState).map(([key, value]) => {
|
|
8820
|
+
if (key === "__omTurn") {
|
|
8821
|
+
return [key, summarizeOmTurn(value)];
|
|
8822
|
+
}
|
|
8823
|
+
return [key, value];
|
|
8824
|
+
})
|
|
8825
|
+
);
|
|
8826
|
+
}
|
|
8739
8827
|
function buildReproMessageFingerprint(message) {
|
|
8740
8828
|
const createdAt = message.createdAt instanceof Date ? message.createdAt.toISOString() : message.createdAt ? new Date(message.createdAt).toISOString() : "";
|
|
8741
8829
|
return JSON.stringify({
|
|
@@ -8791,60 +8879,88 @@ function writeProcessInputStepReproCapture(params) {
|
|
|
8791
8879
|
const addedMessageIds = contextMessages.map((message) => message.id).filter((id) => Boolean(id) && !preMessageIds.has(id));
|
|
8792
8880
|
const idRemap = inferReproIdRemap(params.preMessages, contextMessages);
|
|
8793
8881
|
const rawState = params.args.state ?? {};
|
|
8794
|
-
const
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8812
|
-
|
|
8813
|
-
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
|
|
8827
|
-
|
|
8828
|
-
|
|
8882
|
+
const sanitizedState = sanitizeCaptureState(rawState);
|
|
8883
|
+
const payloads = [
|
|
8884
|
+
{
|
|
8885
|
+
fileName: "input.json",
|
|
8886
|
+
data: {
|
|
8887
|
+
stepNumber: params.stepNumber,
|
|
8888
|
+
threadId: params.threadId,
|
|
8889
|
+
resourceId: params.resourceId,
|
|
8890
|
+
readOnly: memoryContext?.memoryConfig?.readOnly,
|
|
8891
|
+
messageCount: contextMessages.length,
|
|
8892
|
+
messageIds: contextMessages.map((message) => message.id),
|
|
8893
|
+
stateKeys: Object.keys(rawState),
|
|
8894
|
+
state: sanitizedState,
|
|
8895
|
+
args: {
|
|
8896
|
+
messages: params.args.messages,
|
|
8897
|
+
steps: params.args.steps,
|
|
8898
|
+
systemMessages: params.args.systemMessages,
|
|
8899
|
+
retryCount: params.args.retryCount,
|
|
8900
|
+
toolChoice: params.args.toolChoice,
|
|
8901
|
+
activeTools: params.args.activeTools,
|
|
8902
|
+
modelSettings: params.args.modelSettings,
|
|
8903
|
+
structuredOutput: params.args.structuredOutput
|
|
8904
|
+
}
|
|
8905
|
+
}
|
|
8906
|
+
},
|
|
8907
|
+
{
|
|
8908
|
+
fileName: "pre-state.json",
|
|
8909
|
+
data: {
|
|
8910
|
+
record: params.preRecord,
|
|
8911
|
+
bufferedChunks: params.preBufferedChunks,
|
|
8912
|
+
contextTokenCount: params.preContextTokenCount,
|
|
8913
|
+
messages: params.preMessages,
|
|
8914
|
+
messageList: params.preSerializedMessageList
|
|
8915
|
+
}
|
|
8916
|
+
},
|
|
8917
|
+
{
|
|
8918
|
+
fileName: "output.json",
|
|
8919
|
+
data: {
|
|
8920
|
+
details: params.details,
|
|
8921
|
+
messageDiff: {
|
|
8922
|
+
removedMessageIds,
|
|
8923
|
+
addedMessageIds,
|
|
8924
|
+
idRemap
|
|
8925
|
+
}
|
|
8926
|
+
}
|
|
8927
|
+
},
|
|
8928
|
+
{
|
|
8929
|
+
fileName: "post-state.json",
|
|
8930
|
+
data: {
|
|
8931
|
+
record: params.postRecord,
|
|
8932
|
+
bufferedChunks: params.postBufferedChunks,
|
|
8933
|
+
contextTokenCount: params.postContextTokenCount,
|
|
8934
|
+
messageCount: contextMessages.length,
|
|
8935
|
+
messageIds: contextMessages.map((message) => message.id),
|
|
8936
|
+
messages: contextMessages,
|
|
8937
|
+
messageList: params.messageList.serialize()
|
|
8938
|
+
}
|
|
8829
8939
|
}
|
|
8830
|
-
|
|
8831
|
-
const
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
8836
|
-
messageIds: contextMessages.map((message) => message.id),
|
|
8837
|
-
messages: contextMessages,
|
|
8838
|
-
messageList: params.messageList.serialize()
|
|
8839
|
-
});
|
|
8840
|
-
fs.writeFileSync(path.join(captureDir, "input.json"), `${JSON.stringify(inputPayload, null, 2)}
|
|
8841
|
-
`);
|
|
8842
|
-
fs.writeFileSync(path.join(captureDir, "pre-state.json"), `${JSON.stringify(preStatePayload, null, 2)}
|
|
8843
|
-
`);
|
|
8844
|
-
fs.writeFileSync(path.join(captureDir, "output.json"), `${JSON.stringify(outputPayload, null, 2)}
|
|
8940
|
+
];
|
|
8941
|
+
const captureErrors = [];
|
|
8942
|
+
for (const payload of payloads) {
|
|
8943
|
+
const serialized = safeCaptureJsonOrError(payload.data);
|
|
8944
|
+
if (serialized.ok) {
|
|
8945
|
+
fs.writeFileSync(path.join(captureDir, payload.fileName), `${JSON.stringify(serialized.value, null, 2)}
|
|
8845
8946
|
`);
|
|
8846
|
-
|
|
8947
|
+
continue;
|
|
8948
|
+
}
|
|
8949
|
+
captureErrors.push({ fileName: payload.fileName, error: serialized.error });
|
|
8950
|
+
fs.writeFileSync(
|
|
8951
|
+
path.join(captureDir, payload.fileName),
|
|
8952
|
+
`${JSON.stringify({ __captureError: serialized.error }, null, 2)}
|
|
8953
|
+
`
|
|
8954
|
+
);
|
|
8955
|
+
}
|
|
8956
|
+
if (captureErrors.length > 0) {
|
|
8957
|
+
fs.writeFileSync(path.join(captureDir, "capture-error.json"), `${JSON.stringify(captureErrors, null, 2)}
|
|
8847
8958
|
`);
|
|
8959
|
+
params.debug?.(
|
|
8960
|
+
`[OM:repro-capture] wrote processInputStep capture with ${captureErrors.length} serialization error(s) to ${captureDir}`
|
|
8961
|
+
);
|
|
8962
|
+
return;
|
|
8963
|
+
}
|
|
8848
8964
|
params.debug?.(`[OM:repro-capture] wrote processInputStep capture to ${captureDir}`);
|
|
8849
8965
|
} catch (error) {
|
|
8850
8966
|
params.debug?.(`[OM:repro-capture] failed to write processInputStep capture: ${String(error)}`);
|
|
@@ -8865,7 +8981,17 @@ var ObservationalMemoryProcessor = class {
|
|
|
8865
8981
|
}
|
|
8866
8982
|
// ─── Processor lifecycle hooks ──────────────────────────────────────────
|
|
8867
8983
|
async processInputStep(args) {
|
|
8868
|
-
const {
|
|
8984
|
+
const {
|
|
8985
|
+
messageList,
|
|
8986
|
+
requestContext,
|
|
8987
|
+
stepNumber,
|
|
8988
|
+
state: _state,
|
|
8989
|
+
writer,
|
|
8990
|
+
model,
|
|
8991
|
+
abortSignal,
|
|
8992
|
+
abort,
|
|
8993
|
+
rotateResponseMessageId
|
|
8994
|
+
} = args;
|
|
8869
8995
|
const state = _state ?? {};
|
|
8870
8996
|
omDebug(
|
|
8871
8997
|
`[OM:processInputStep:ENTER] step=${stepNumber}, hasMastraMemory=${!!requestContext?.get("MastraMemory")}, hasMemoryInfo=${!!messageList?.serialize()?.memoryInfo?.threadId}`
|
|
@@ -8893,7 +9019,14 @@ var ObservationalMemoryProcessor = class {
|
|
|
8893
9019
|
await this.turn.end().catch(() => {
|
|
8894
9020
|
});
|
|
8895
9021
|
}
|
|
8896
|
-
this.turn = this.engine.beginTurn({
|
|
9022
|
+
this.turn = this.engine.beginTurn({
|
|
9023
|
+
threadId,
|
|
9024
|
+
resourceId,
|
|
9025
|
+
messageList,
|
|
9026
|
+
hooks: {
|
|
9027
|
+
onBufferChunkSealed: rotateResponseMessageId
|
|
9028
|
+
}
|
|
9029
|
+
});
|
|
8897
9030
|
this.turn.writer = writer;
|
|
8898
9031
|
this.turn.requestContext = requestContext;
|
|
8899
9032
|
await this.turn.start(this.memory);
|
|
@@ -9053,5 +9186,5 @@ exports.stripEphemeralAnchorIds = stripEphemeralAnchorIds;
|
|
|
9053
9186
|
exports.stripObservationGroups = stripObservationGroups;
|
|
9054
9187
|
exports.truncateStringByTokens = truncateStringByTokens;
|
|
9055
9188
|
exports.wrapInObservationGroup = wrapInObservationGroup;
|
|
9056
|
-
//# sourceMappingURL=chunk-
|
|
9057
|
-
//# sourceMappingURL=chunk-
|
|
9189
|
+
//# sourceMappingURL=chunk-DJQT32SV.cjs.map
|
|
9190
|
+
//# sourceMappingURL=chunk-DJQT32SV.cjs.map
|