@mastra/core 1.4.0 → 1.5.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 +368 -0
- package/dist/agent/agent.d.ts +3 -2
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/index.cjs +13 -13
- package/dist/agent/index.js +2 -2
- package/dist/agent/message-list/conversion/output-converter.d.ts.map +1 -1
- package/dist/agent/message-list/index.cjs +18 -18
- package/dist/agent/message-list/index.js +1 -1
- package/dist/agent/message-list/merge/MessageMerger.d.ts.map +1 -1
- package/dist/agent/message-list/message-list.d.ts.map +1 -1
- package/dist/agent/types.d.ts +2 -2
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/index.d.ts +1 -0
- package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts +1 -0
- package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts.map +1 -1
- package/dist/agent/workflows/prepare-stream/schema.d.ts +8 -0
- package/dist/agent/workflows/prepare-stream/schema.d.ts.map +1 -1
- package/dist/{chunk-Y3TQ52UE.js → chunk-33TGTTTS.js} +4 -3
- package/dist/chunk-33TGTTTS.js.map +1 -0
- package/dist/{chunk-3X3CZUXI.js → chunk-3KJW4EMO.js} +660 -206
- package/dist/chunk-3KJW4EMO.js.map +1 -0
- package/dist/{chunk-YNNJLLFN.cjs → chunk-3YMDR4OL.cjs} +661 -207
- package/dist/chunk-3YMDR4OL.cjs.map +1 -0
- package/dist/{chunk-NJ7TL3LQ.js → chunk-5EOLBHHS.js} +26 -15
- package/dist/chunk-5EOLBHHS.js.map +1 -0
- package/dist/{chunk-RZ4CIIZR.js → chunk-6DUTLERJ.js} +4 -4
- package/dist/{chunk-RZ4CIIZR.js.map → chunk-6DUTLERJ.js.map} +1 -1
- package/dist/{chunk-VTE2OBKS.cjs → chunk-A6EWCOGA.cjs} +417 -77
- package/dist/chunk-A6EWCOGA.cjs.map +1 -0
- package/dist/{chunk-4XSAZPPS.js → chunk-A7V2NSY3.js} +313 -137
- package/dist/chunk-A7V2NSY3.js.map +1 -0
- package/dist/{chunk-FLPEGTEK.js → chunk-AIRMLZ43.js} +5 -5
- package/dist/{chunk-FLPEGTEK.js.map → chunk-AIRMLZ43.js.map} +1 -1
- package/dist/{chunk-DBSVT6AR.cjs → chunk-BKQAP27M.cjs} +9 -9
- package/dist/{chunk-DBSVT6AR.cjs.map → chunk-BKQAP27M.cjs.map} +1 -1
- package/dist/{chunk-RS6CZXGA.js → chunk-BQHWJLXU.js} +15 -4
- package/dist/chunk-BQHWJLXU.js.map +1 -0
- package/dist/{chunk-V2MLGA7T.js → chunk-CXVMDV2B.js} +417 -78
- package/dist/chunk-CXVMDV2B.js.map +1 -0
- package/dist/{chunk-NKYWDNCI.cjs → chunk-E2FHTXAI.cjs} +7 -7
- package/dist/{chunk-NKYWDNCI.cjs.map → chunk-E2FHTXAI.cjs.map} +1 -1
- package/dist/{chunk-7UWHFWST.cjs → chunk-EAZ6YDCQ.cjs} +15 -3
- package/dist/chunk-EAZ6YDCQ.cjs.map +1 -0
- package/dist/{chunk-64WGYTQK.cjs → chunk-FTBLAVTF.cjs} +55 -55
- package/dist/{chunk-64WGYTQK.cjs.map → chunk-FTBLAVTF.cjs.map} +1 -1
- package/dist/{chunk-4EHGOATH.js → chunk-FZ5DRHKE.js} +1337 -547
- package/dist/chunk-FZ5DRHKE.js.map +1 -0
- package/dist/{chunk-4TQ4EBYX.js → chunk-GEDGDKQ6.js} +9 -9
- package/dist/chunk-GEDGDKQ6.js.map +1 -0
- package/dist/{chunk-QTTWRCB5.js → chunk-I3AWF54W.js} +5 -5
- package/dist/{chunk-QTTWRCB5.js.map → chunk-I3AWF54W.js.map} +1 -1
- package/dist/{chunk-U2HKJZCI.js → chunk-IBNCZTNQ.js} +6 -6
- package/dist/{chunk-U2HKJZCI.js.map → chunk-IBNCZTNQ.js.map} +1 -1
- package/dist/{chunk-3JVFFAJX.cjs → chunk-IJIE3ZID.cjs} +27 -16
- package/dist/chunk-IJIE3ZID.cjs.map +1 -0
- package/dist/{chunk-NZG2JAKS.cjs → chunk-JWG272ZZ.cjs} +19 -19
- package/dist/chunk-JWG272ZZ.cjs.map +1 -0
- package/dist/{chunk-BP7VYTOP.cjs → chunk-JZ6TH4HQ.cjs} +954 -401
- package/dist/chunk-JZ6TH4HQ.cjs.map +1 -0
- package/dist/{chunk-SU5APAM6.cjs → chunk-KNXZ7KYL.cjs} +94 -6
- package/dist/chunk-KNXZ7KYL.cjs.map +1 -0
- package/dist/{chunk-CYUP7QWT.cjs → chunk-KRAGJ433.cjs} +4 -3
- package/dist/chunk-KRAGJ433.cjs.map +1 -0
- package/dist/{chunk-XDD5V446.cjs → chunk-MDC6VYA6.cjs} +6 -2
- package/dist/{chunk-XDD5V446.cjs.map → chunk-MDC6VYA6.cjs.map} +1 -1
- package/dist/{chunk-AXHBJ4GX.js → chunk-NN26FSKL.js} +10 -8
- package/dist/chunk-NN26FSKL.js.map +1 -0
- package/dist/{chunk-AY6DBRS3.js → chunk-OHLVZVIK.js} +36 -2
- package/dist/chunk-OHLVZVIK.js.map +1 -0
- package/dist/{chunk-5Q5Y34SS.js → chunk-PECKKR4C.js} +4 -4
- package/dist/{chunk-5Q5Y34SS.js.map → chunk-PECKKR4C.js.map} +1 -1
- package/dist/{chunk-HYRYTTMT.cjs → chunk-PHHJLGZU.cjs} +9 -9
- package/dist/{chunk-HYRYTTMT.cjs.map → chunk-PHHJLGZU.cjs.map} +1 -1
- package/dist/{chunk-65PHUUMF.cjs → chunk-QDH6MVJ7.cjs} +24 -22
- package/dist/chunk-QDH6MVJ7.cjs.map +1 -0
- package/dist/{chunk-VD5YA6RH.cjs → chunk-QSN5KQXZ.cjs} +18 -18
- package/dist/{chunk-VD5YA6RH.cjs.map → chunk-QSN5KQXZ.cjs.map} +1 -1
- package/dist/{chunk-4IJ4UDZX.cjs → chunk-RH2K66O2.cjs} +399 -223
- package/dist/chunk-RH2K66O2.cjs.map +1 -0
- package/dist/{chunk-4KFEMXTV.cjs → chunk-S4VVZI4E.cjs} +1361 -546
- package/dist/chunk-S4VVZI4E.cjs.map +1 -0
- package/dist/{chunk-ZATLLPIH.js → chunk-TPDMP7OD.js} +6 -2
- package/dist/chunk-TPDMP7OD.js.map +1 -0
- package/dist/{chunk-PS5ONCXY.js → chunk-UZFGMMKU.js} +82 -4
- package/dist/chunk-UZFGMMKU.js.map +1 -0
- package/dist/{chunk-7NKUSQEV.js → chunk-YIN5F7VO.js} +936 -389
- package/dist/chunk-YIN5F7VO.js.map +1 -0
- package/dist/{chunk-CZ4NQANZ.cjs → chunk-YW54RH77.cjs} +36 -2
- package/dist/chunk-YW54RH77.cjs.map +1 -0
- package/dist/datasets/experiment/executor.d.ts.map +1 -1
- package/dist/datasets/index.cjs +17 -17
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +27 -1
- package/dist/docs/assets/SOURCE_MAP.json +463 -389
- package/dist/docs/references/docs-agents-processors.md +52 -0
- package/dist/docs/references/docs-observability-datasets-overview.md +188 -0
- package/dist/docs/references/docs-observability-datasets-running-experiments.md +266 -0
- package/dist/docs/references/docs-observability-tracing-exporters-cloud.md +7 -4
- package/dist/docs/references/reference-agents-generate.md +1 -1
- package/dist/docs/references/reference-configuration.md +3 -4
- package/dist/docs/references/reference-datasets-addItem.md +35 -0
- package/dist/docs/references/reference-datasets-addItems.md +33 -0
- package/dist/docs/references/reference-datasets-compareExperiments.md +48 -0
- package/dist/docs/references/reference-datasets-create.md +49 -0
- package/dist/docs/references/reference-datasets-dataset.md +78 -0
- package/dist/docs/references/reference-datasets-datasets-manager.md +84 -0
- package/dist/docs/references/reference-datasets-delete.md +23 -0
- package/dist/docs/references/reference-datasets-deleteExperiment.md +25 -0
- package/dist/docs/references/reference-datasets-deleteItem.md +25 -0
- package/dist/docs/references/reference-datasets-deleteItems.md +27 -0
- package/dist/docs/references/reference-datasets-get.md +29 -0
- package/dist/docs/references/reference-datasets-getDetails.md +45 -0
- package/dist/docs/references/reference-datasets-getExperiment.md +28 -0
- package/dist/docs/references/reference-datasets-getItem.md +31 -0
- package/dist/docs/references/reference-datasets-getItemHistory.md +29 -0
- package/dist/docs/references/reference-datasets-list.md +29 -0
- package/dist/docs/references/reference-datasets-listExperimentResults.md +37 -0
- package/dist/docs/references/reference-datasets-listExperiments.md +31 -0
- package/dist/docs/references/reference-datasets-listItems.md +44 -0
- package/dist/docs/references/reference-datasets-listVersions.md +31 -0
- package/dist/docs/references/reference-datasets-startExperiment.md +60 -0
- package/dist/docs/references/reference-datasets-startExperimentAsync.md +41 -0
- package/dist/docs/references/reference-datasets-update.md +46 -0
- package/dist/docs/references/reference-datasets-updateItem.md +36 -0
- package/dist/docs/references/reference-memory-observational-memory.md +36 -0
- package/dist/docs/references/reference-processors-processor-interface.md +4 -0
- package/dist/docs/references/reference-tools-create-tool.md +1 -1
- package/dist/docs/references/reference.md +24 -0
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/types.d.ts +108 -2
- package/dist/editor/types.d.ts.map +1 -1
- package/dist/evals/index.cjs +20 -20
- package/dist/evals/index.js +3 -3
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/harness/harness.d.ts +281 -0
- package/dist/harness/harness.d.ts.map +1 -0
- package/dist/harness/index.cjs +1728 -0
- package/dist/harness/index.cjs.map +1 -0
- package/dist/harness/index.d.ts +4 -0
- package/dist/harness/index.d.ts.map +1 -0
- package/dist/harness/index.js +1723 -0
- package/dist/harness/index.js.map +1 -0
- package/dist/harness/tools.d.ts +65 -0
- package/dist/harness/tools.d.ts.map +1 -0
- package/dist/harness/types.d.ts +561 -0
- package/dist/harness/types.d.ts.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/integration/index.cjs +2 -2
- package/dist/integration/index.js +1 -1
- package/dist/llm/index.cjs +20 -20
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/gateways/constants.d.ts.map +1 -1
- package/dist/llm/model/gateways/models-dev.d.ts +2 -3
- package/dist/llm/model/gateways/models-dev.d.ts.map +1 -1
- package/dist/llm/model/provider-types.generated.d.ts +312 -93
- package/dist/loop/index.cjs +12 -12
- package/dist/loop/index.js +1 -1
- package/dist/loop/network/index.d.ts.map +1 -1
- package/dist/loop/test-utils/options.d.ts.map +1 -1
- package/dist/loop/test-utils/tools.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts.map +1 -1
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
- package/dist/loop/workflows/stream.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.d.ts +3 -3
- package/dist/mastra/index.d.ts.map +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/memory/memory.d.ts +10 -0
- package/dist/memory/memory.d.ts.map +1 -1
- package/dist/memory/types.d.ts +24 -0
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/models-dev-BW2GAM3K.cjs +12 -0
- package/dist/{models-dev-PPIXUUCU.cjs.map → models-dev-BW2GAM3K.cjs.map} +1 -1
- package/dist/models-dev-MDI5E2YA.js +3 -0
- package/dist/{models-dev-FQVUTQ7L.js.map → models-dev-MDI5E2YA.js.map} +1 -1
- package/dist/observability/index.cjs +11 -11
- package/dist/observability/index.js +1 -1
- package/dist/observability/utils.d.ts.map +1 -1
- package/dist/processors/index.cjs +41 -41
- package/dist/processors/index.js +1 -1
- package/dist/processors/processors/skills.d.ts +5 -0
- package/dist/processors/processors/skills.d.ts.map +1 -1
- package/dist/processors/runner.d.ts +2 -2
- package/dist/processors/runner.d.ts.map +1 -1
- package/dist/processors/step-schema.d.ts +218 -49453
- package/dist/processors/step-schema.d.ts.map +1 -1
- package/dist/provider-registry-4PH2JPIA.cjs +40 -0
- package/dist/{provider-registry-6LZAGQET.cjs.map → provider-registry-4PH2JPIA.cjs.map} +1 -1
- package/dist/provider-registry-VEJ3PN4S.js +3 -0
- package/dist/{provider-registry-QUNT7S55.js.map → provider-registry-VEJ3PN4S.js.map} +1 -1
- package/dist/provider-registry.json +657 -203
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/server/composite-auth.d.ts.map +1 -1
- package/dist/server/index.cjs +6 -1
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +6 -1
- package/dist/server/index.js.map +1 -1
- package/dist/storage/base.d.ts +4 -1
- package/dist/storage/base.d.ts.map +1 -1
- package/dist/storage/constants.cjs +82 -42
- package/dist/storage/constants.d.ts +11 -1
- package/dist/storage/constants.d.ts.map +1 -1
- package/dist/storage/constants.js +1 -1
- package/dist/storage/domains/agents/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/blobs/base.d.ts +47 -0
- package/dist/storage/domains/blobs/base.d.ts.map +1 -0
- package/dist/storage/domains/blobs/index.d.ts +3 -0
- package/dist/storage/domains/blobs/index.d.ts.map +1 -0
- package/dist/storage/domains/blobs/inmemory.d.ts +17 -0
- package/dist/storage/domains/blobs/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/datasets/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/index.d.ts +3 -0
- package/dist/storage/domains/index.d.ts.map +1 -1
- package/dist/storage/domains/inmemory-db.d.ts +7 -1
- package/dist/storage/domains/inmemory-db.d.ts.map +1 -1
- package/dist/storage/domains/mcp-clients/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/operations/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/prompt-blocks/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/scorer-definitions/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/skills/base.d.ts +47 -0
- package/dist/storage/domains/skills/base.d.ts.map +1 -0
- package/dist/storage/domains/skills/index.d.ts +3 -0
- package/dist/storage/domains/skills/index.d.ts.map +1 -0
- package/dist/storage/domains/skills/inmemory.d.ts +31 -0
- package/dist/storage/domains/skills/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/versioned.d.ts +12 -3
- package/dist/storage/domains/versioned.d.ts.map +1 -1
- package/dist/storage/domains/workspaces/base.d.ts +47 -0
- package/dist/storage/domains/workspaces/base.d.ts.map +1 -0
- package/dist/storage/domains/workspaces/index.d.ts +3 -0
- package/dist/storage/domains/workspaces/index.d.ts.map +1 -0
- package/dist/storage/domains/workspaces/inmemory.d.ts +31 -0
- package/dist/storage/domains/workspaces/inmemory.d.ts.map +1 -0
- package/dist/storage/index.cjs +202 -138
- package/dist/storage/index.js +2 -2
- package/dist/storage/mock.d.ts.map +1 -1
- package/dist/storage/types.d.ts +422 -12
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/base/output.d.ts.map +1 -1
- package/dist/stream/index.cjs +11 -11
- package/dist/stream/index.js +2 -2
- package/dist/test-utils/llm-mock.cjs +4 -4
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/tools/index.cjs +8 -4
- package/dist/tools/index.js +1 -1
- package/dist/tools/is-vercel-tool.cjs +2 -2
- package/dist/tools/is-vercel-tool.js +1 -1
- package/dist/tools/tool-builder/builder.d.ts.map +1 -1
- package/dist/tools/tool.d.ts +13 -0
- package/dist/tools/tool.d.ts.map +1 -1
- package/dist/tools/toolchecks.d.ts.map +1 -1
- package/dist/tools/types.d.ts +24 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/types/zod-compat.d.ts +27 -6
- package/dist/types/zod-compat.d.ts.map +1 -1
- package/dist/utils.cjs +23 -23
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +12 -12
- package/dist/vector/index.js +2 -2
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/handlers/entry.d.ts.map +1 -1
- package/dist/workflows/index.cjs +25 -25
- package/dist/workflows/index.js +1 -1
- package/dist/workflows/workflow.d.ts +2 -2
- package/dist/workflows/workflow.d.ts.map +1 -1
- package/dist/workspace/constants/index.d.ts +1 -0
- package/dist/workspace/constants/index.d.ts.map +1 -1
- package/dist/workspace/errors.d.ts +3 -0
- package/dist/workspace/errors.d.ts.map +1 -1
- package/dist/workspace/filesystem/composite-filesystem.d.ts +75 -6
- package/dist/workspace/filesystem/composite-filesystem.d.ts.map +1 -1
- package/dist/workspace/filesystem/local-filesystem.d.ts +42 -0
- package/dist/workspace/filesystem/local-filesystem.d.ts.map +1 -1
- package/dist/workspace/glob.d.ts +61 -0
- package/dist/workspace/glob.d.ts.map +1 -0
- package/dist/workspace/index.cjs +133 -41
- package/dist/workspace/index.d.ts +8 -1
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/sandbox/local-sandbox.d.ts.map +1 -1
- package/dist/workspace/skills/composite-versioned-skill-source.d.ts +44 -0
- package/dist/workspace/skills/composite-versioned-skill-source.d.ts.map +1 -0
- package/dist/workspace/skills/index.d.ts +3 -0
- package/dist/workspace/skills/index.d.ts.map +1 -1
- package/dist/workspace/skills/local-skill-source.d.ts.map +1 -1
- package/dist/workspace/skills/publish.d.ts +34 -0
- package/dist/workspace/skills/publish.d.ts.map +1 -0
- package/dist/workspace/skills/skill-source.d.ts +2 -0
- package/dist/workspace/skills/skill-source.d.ts.map +1 -1
- package/dist/workspace/skills/types.d.ts +16 -0
- package/dist/workspace/skills/types.d.ts.map +1 -1
- package/dist/workspace/skills/versioned-skill-source.d.ts +20 -0
- package/dist/workspace/skills/versioned-skill-source.d.ts.map +1 -0
- package/dist/workspace/skills/workspace-skills.d.ts +5 -0
- package/dist/workspace/skills/workspace-skills.d.ts.map +1 -1
- package/dist/workspace/tools/delete-file.d.ts +5 -0
- package/dist/workspace/tools/delete-file.d.ts.map +1 -0
- package/dist/workspace/tools/edit-file.d.ts +7 -0
- package/dist/workspace/tools/edit-file.d.ts.map +1 -0
- package/dist/workspace/tools/execute-command.d.ts +7 -0
- package/dist/workspace/tools/execute-command.d.ts.map +1 -0
- package/dist/workspace/tools/file-stat.d.ts +4 -0
- package/dist/workspace/tools/file-stat.d.ts.map +1 -0
- package/dist/workspace/tools/grep.d.ts +9 -0
- package/dist/workspace/tools/grep.d.ts.map +1 -0
- package/dist/workspace/tools/helpers.d.ts +36 -0
- package/dist/workspace/tools/helpers.d.ts.map +1 -0
- package/dist/workspace/tools/index-content.d.ts +6 -0
- package/dist/workspace/tools/index-content.d.ts.map +1 -0
- package/dist/workspace/tools/index.d.ts +13 -1
- package/dist/workspace/tools/index.d.ts.map +1 -1
- package/dist/workspace/tools/list-files.d.ts +10 -0
- package/dist/workspace/tools/list-files.d.ts.map +1 -0
- package/dist/workspace/tools/mkdir.d.ts +5 -0
- package/dist/workspace/tools/mkdir.d.ts.map +1 -0
- package/dist/workspace/tools/read-file.d.ts +8 -0
- package/dist/workspace/tools/read-file.d.ts.map +1 -0
- package/dist/workspace/tools/search.d.ts +7 -0
- package/dist/workspace/tools/search.d.ts.map +1 -0
- package/dist/workspace/tools/tools.d.ts +5 -7
- package/dist/workspace/tools/tools.d.ts.map +1 -1
- package/dist/workspace/tools/tree-formatter.d.ts +2 -0
- package/dist/workspace/tools/tree-formatter.d.ts.map +1 -1
- package/dist/workspace/tools/write-file.d.ts +6 -0
- package/dist/workspace/tools/write-file.d.ts.map +1 -0
- package/dist/workspace/workspace.d.ts +56 -10
- package/dist/workspace/workspace.d.ts.map +1 -1
- package/harness.d.ts +1 -0
- package/package.json +8 -6
- package/src/llm/model/provider-types.generated.d.ts +312 -93
- package/dist/chunk-3JVFFAJX.cjs.map +0 -1
- package/dist/chunk-3X3CZUXI.js.map +0 -1
- package/dist/chunk-4EHGOATH.js.map +0 -1
- package/dist/chunk-4IJ4UDZX.cjs.map +0 -1
- package/dist/chunk-4KFEMXTV.cjs.map +0 -1
- package/dist/chunk-4TQ4EBYX.js.map +0 -1
- package/dist/chunk-4XSAZPPS.js.map +0 -1
- package/dist/chunk-65PHUUMF.cjs.map +0 -1
- package/dist/chunk-7NKUSQEV.js.map +0 -1
- package/dist/chunk-7UWHFWST.cjs.map +0 -1
- package/dist/chunk-AXHBJ4GX.js.map +0 -1
- package/dist/chunk-AY6DBRS3.js.map +0 -1
- package/dist/chunk-BP7VYTOP.cjs.map +0 -1
- package/dist/chunk-CYUP7QWT.cjs.map +0 -1
- package/dist/chunk-CZ4NQANZ.cjs.map +0 -1
- package/dist/chunk-NJ7TL3LQ.js.map +0 -1
- package/dist/chunk-NZG2JAKS.cjs.map +0 -1
- package/dist/chunk-PS5ONCXY.js.map +0 -1
- package/dist/chunk-RS6CZXGA.js.map +0 -1
- package/dist/chunk-SU5APAM6.cjs.map +0 -1
- package/dist/chunk-V2MLGA7T.js.map +0 -1
- package/dist/chunk-VTE2OBKS.cjs.map +0 -1
- package/dist/chunk-Y3TQ52UE.js.map +0 -1
- package/dist/chunk-YNNJLLFN.cjs.map +0 -1
- package/dist/chunk-ZATLLPIH.js.map +0 -1
- package/dist/models-dev-FQVUTQ7L.js +0 -3
- package/dist/models-dev-PPIXUUCU.cjs +0 -12
- package/dist/provider-registry-6LZAGQET.cjs +0 -40
- package/dist/provider-registry-QUNT7S55.js +0 -3
package/dist/storage/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AgentsStorage, DatasetsInMemory, DatasetsStorage, ExperimentsInMemory, ExperimentsStorage, InMemoryAgentsStorage, InMemoryDB, InMemoryMCPClientsStorage, InMemoryMemory, InMemoryPromptBlocksStorage, InMemoryScorerDefinitionsStorage, InMemoryStore, MCPClientsStorage, MastraCompositeStore, MastraStorage, MemoryStorage, MockStore, ObservabilityInMemory, ObservabilityStorage, PromptBlocksStorage, ScorerDefinitionsStorage, ScoresInMemory, ScoresStorage, StorageDomain, StoreOperations, StoreOperationsInMemory, VersionedStorageDomain, WorkflowsInMemory, WorkflowsStorage, calculatePagination, createStorageErrorId, createStoreErrorId, createVectorErrorId, ensureDate, filterByDateRange, getDefaultValue, getSqlType, jsonValueEquals, normalizePerPage, safelyParseJSON, serializeDate, transformRow, transformScoreRow } from '../chunk-
|
|
2
|
-
export { AGENTS_SCHEMA, AGENT_VERSIONS_SCHEMA, DATASETS_SCHEMA, DATASET_ITEMS_SCHEMA, DATASET_VERSIONS_SCHEMA, EXPERIMENTS_SCHEMA, EXPERIMENT_RESULTS_SCHEMA, MCP_CLIENTS_SCHEMA, MCP_CLIENT_VERSIONS_SCHEMA, OBSERVATIONAL_MEMORY_SCHEMA, OBSERVATIONAL_MEMORY_TABLE_SCHEMA, OLD_SPAN_SCHEMA, PROMPT_BLOCKS_SCHEMA, PROMPT_BLOCK_VERSIONS_SCHEMA, SCORERS_SCHEMA, SCORER_DEFINITIONS_SCHEMA, SCORER_DEFINITION_VERSIONS_SCHEMA, SPAN_SCHEMA, TABLE_AGENTS, TABLE_AGENT_VERSIONS, TABLE_CONFIGS, TABLE_DATASETS, TABLE_DATASET_ITEMS, TABLE_DATASET_VERSIONS, TABLE_EXPERIMENTS, TABLE_EXPERIMENT_RESULTS, TABLE_MCP_CLIENTS, TABLE_MCP_CLIENT_VERSIONS, TABLE_MESSAGES, TABLE_OBSERVATIONAL_MEMORY, TABLE_PROMPT_BLOCKS, TABLE_PROMPT_BLOCK_VERSIONS, TABLE_RESOURCES, TABLE_SCHEMAS, TABLE_SCORERS, TABLE_SCORER_DEFINITIONS, TABLE_SCORER_DEFINITION_VERSIONS, TABLE_SPANS, TABLE_THREADS, TABLE_TRACES, TABLE_WORKFLOW_SNAPSHOT, TraceStatus, batchCreateSpansArgsSchema, batchDeleteTracesArgsSchema, batchUpdateSpansArgsSchema, buildStorageSchema, computeTraceStatus, createSpanArgsSchema, createSpanRecordSchema, createdAtField, dateRangeSchema, dbTimestamps, entityIdField, entityNameField, entityTypeField, environmentField, getRootSpanArgsSchema, getRootSpanResponseSchema, getSpanArgsSchema, getSpanResponseSchema, getTraceArgsSchema, getTraceResponseSchema, listScoresBySpanResponseSchema, listTracesArgsSchema, listTracesResponseSchema, organizationIdField, paginationArgsSchema, paginationInfoSchema, requestIdField, resourceIdField, runIdField, scoreTracesRequestSchema, scoreTracesResponseSchema, serviceNameField, sessionIdField, sortDirectionSchema, sourceField, spanIdField, spanIds, spanIdsSchema, spanRecordSchema, threadIdField, toTraceSpan, toTraceSpans, traceIdField, traceSpanSchema, tracesFilterSchema, tracesOrderByFieldSchema, tracesOrderBySchema, updateSpanArgsSchema, updateSpanRecordSchema, updatedAtField, userIdField } from '../chunk-
|
|
1
|
+
export { AgentsStorage, BlobStore, DatasetsInMemory, DatasetsStorage, ExperimentsInMemory, ExperimentsStorage, InMemoryAgentsStorage, InMemoryBlobStore, InMemoryDB, InMemoryMCPClientsStorage, InMemoryMemory, InMemoryPromptBlocksStorage, InMemoryScorerDefinitionsStorage, InMemorySkillsStorage, InMemoryStore, InMemoryWorkspacesStorage, MCPClientsStorage, MastraCompositeStore, MastraStorage, MemoryStorage, MockStore, ObservabilityInMemory, ObservabilityStorage, PromptBlocksStorage, ScorerDefinitionsStorage, ScoresInMemory, ScoresStorage, SkillsStorage, StorageDomain, StoreOperations, StoreOperationsInMemory, VersionedStorageDomain, WorkflowsInMemory, WorkflowsStorage, WorkspacesStorage, calculatePagination, createStorageErrorId, createStoreErrorId, createVectorErrorId, ensureDate, filterByDateRange, getDefaultValue, getSqlType, jsonValueEquals, normalizePerPage, safelyParseJSON, serializeDate, transformRow, transformScoreRow } from '../chunk-YIN5F7VO.js';
|
|
2
|
+
export { AGENTS_SCHEMA, AGENT_VERSIONS_SCHEMA, DATASETS_SCHEMA, DATASET_ITEMS_SCHEMA, DATASET_VERSIONS_SCHEMA, EXPERIMENTS_SCHEMA, EXPERIMENT_RESULTS_SCHEMA, MCP_CLIENTS_SCHEMA, MCP_CLIENT_VERSIONS_SCHEMA, OBSERVATIONAL_MEMORY_SCHEMA, OBSERVATIONAL_MEMORY_TABLE_SCHEMA, OLD_SPAN_SCHEMA, PROMPT_BLOCKS_SCHEMA, PROMPT_BLOCK_VERSIONS_SCHEMA, SCORERS_SCHEMA, SCORER_DEFINITIONS_SCHEMA, SCORER_DEFINITION_VERSIONS_SCHEMA, SKILLS_SCHEMA, SKILL_BLOBS_SCHEMA, SKILL_VERSIONS_SCHEMA, SPAN_SCHEMA, TABLE_AGENTS, TABLE_AGENT_VERSIONS, TABLE_CONFIGS, TABLE_DATASETS, TABLE_DATASET_ITEMS, TABLE_DATASET_VERSIONS, TABLE_EXPERIMENTS, TABLE_EXPERIMENT_RESULTS, TABLE_MCP_CLIENTS, TABLE_MCP_CLIENT_VERSIONS, TABLE_MESSAGES, TABLE_OBSERVATIONAL_MEMORY, TABLE_PROMPT_BLOCKS, TABLE_PROMPT_BLOCK_VERSIONS, TABLE_RESOURCES, TABLE_SCHEMAS, TABLE_SCORERS, TABLE_SCORER_DEFINITIONS, TABLE_SCORER_DEFINITION_VERSIONS, TABLE_SKILLS, TABLE_SKILL_BLOBS, TABLE_SKILL_VERSIONS, TABLE_SPANS, TABLE_THREADS, TABLE_TRACES, TABLE_WORKFLOW_SNAPSHOT, TABLE_WORKSPACES, TABLE_WORKSPACE_VERSIONS, TraceStatus, WORKSPACES_SCHEMA, WORKSPACE_VERSIONS_SCHEMA, batchCreateSpansArgsSchema, batchDeleteTracesArgsSchema, batchUpdateSpansArgsSchema, buildStorageSchema, computeTraceStatus, createSpanArgsSchema, createSpanRecordSchema, createdAtField, dateRangeSchema, dbTimestamps, entityIdField, entityNameField, entityTypeField, environmentField, getRootSpanArgsSchema, getRootSpanResponseSchema, getSpanArgsSchema, getSpanResponseSchema, getTraceArgsSchema, getTraceResponseSchema, listScoresBySpanResponseSchema, listTracesArgsSchema, listTracesResponseSchema, organizationIdField, paginationArgsSchema, paginationInfoSchema, requestIdField, resourceIdField, runIdField, scoreTracesRequestSchema, scoreTracesResponseSchema, serviceNameField, sessionIdField, sortDirectionSchema, sourceField, spanIdField, spanIds, spanIdsSchema, spanRecordSchema, threadIdField, toTraceSpan, toTraceSpans, traceIdField, traceSpanSchema, tracesFilterSchema, tracesOrderByFieldSchema, tracesOrderBySchema, updateSpanArgsSchema, updateSpanRecordSchema, updatedAtField, userIdField } from '../chunk-UZFGMMKU.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../src/storage/mock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../src/storage/mock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAY7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,aAAc,SAAQ,oBAAoB;;IACrD,MAAM,EAAE,cAAc,CAAC;gBASX,EAAE,EAAgB,EAAE,GAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAO;IAuBtD;;;;OAIG;IACH,KAAK,IAAI,IAAI;CAGd;AAED,eAAO,MAAM,SAAS,sBAAgB,CAAC"}
|
package/dist/storage/types.d.ts
CHANGED
|
@@ -251,6 +251,8 @@ export type ThreadSortDirection = 'ASC' | 'DESC';
|
|
|
251
251
|
export interface StorageToolConfig {
|
|
252
252
|
/** Custom description override for this tool in this agent context */
|
|
253
253
|
description?: string;
|
|
254
|
+
/** Conditional rules for when this tool should be available */
|
|
255
|
+
rules?: RuleGroup;
|
|
254
256
|
}
|
|
255
257
|
/**
|
|
256
258
|
* Per-MCP-client tool configuration stored in agent snapshots.
|
|
@@ -265,8 +267,12 @@ export interface StorageMCPClientToolsConfig {
|
|
|
265
267
|
* Scorer reference with optional sampling configuration
|
|
266
268
|
*/
|
|
267
269
|
export interface StorageScorerConfig {
|
|
270
|
+
/** Custom description override for this scorer in this agent context */
|
|
271
|
+
description?: string;
|
|
268
272
|
/** Sampling configuration for this scorer */
|
|
269
273
|
sampling?: ScoringSamplingConfig;
|
|
274
|
+
/** Conditional rules for when this scorer should be active */
|
|
275
|
+
rules?: RuleGroup;
|
|
270
276
|
}
|
|
271
277
|
/**
|
|
272
278
|
* Model configuration stored in agent snapshots.
|
|
@@ -334,10 +340,10 @@ export interface StorageAgentSnapshotType {
|
|
|
334
340
|
tools?: StorageConditionalField<Record<string, StorageToolConfig>>;
|
|
335
341
|
/** Default options for generate/stream calls — static or conditional on request context */
|
|
336
342
|
defaultOptions?: StorageConditionalField<StorageDefaultOptions>;
|
|
337
|
-
/**
|
|
338
|
-
workflows?: StorageConditionalField<string
|
|
339
|
-
/**
|
|
340
|
-
agents?: StorageConditionalField<string
|
|
343
|
+
/** Workflow keys with optional per-workflow config — static or conditional on request context */
|
|
344
|
+
workflows?: StorageConditionalField<Record<string, StorageToolConfig>>;
|
|
345
|
+
/** Agent keys with optional per-agent config — static or conditional on request context */
|
|
346
|
+
agents?: StorageConditionalField<Record<string, StorageToolConfig>>;
|
|
341
347
|
/**
|
|
342
348
|
* Map of tool provider IDs to their tool configurations.
|
|
343
349
|
* Keys are provider IDs (e.g., "composio"), values configure which tools from that provider to include.
|
|
@@ -354,6 +360,12 @@ export interface StorageAgentSnapshotType {
|
|
|
354
360
|
scorers?: StorageConditionalField<Record<string, StorageScorerConfig>>;
|
|
355
361
|
/** Map of stored MCP client IDs to their tool configurations — static or conditional on request context */
|
|
356
362
|
mcpClients?: StorageConditionalField<Record<string, StorageMCPClientToolsConfig>>;
|
|
363
|
+
/** Workspace reference — ID of a stored workspace or inline config — static or conditional on request context */
|
|
364
|
+
workspace?: StorageConditionalField<StorageWorkspaceRef>;
|
|
365
|
+
/** Skill entity IDs with optional per-skill overrides — static or conditional on request context */
|
|
366
|
+
skills?: StorageConditionalField<Record<string, StorageSkillConfig>>;
|
|
367
|
+
/** Skill format for system message injection (default: 'xml') */
|
|
368
|
+
skillsFormat?: 'xml' | 'json' | 'markdown';
|
|
357
369
|
/** JSON Schema for validating request context values. Stored as JSON Schema since Zod is not serializable. */
|
|
358
370
|
requestContextSchema?: Record<string, unknown>;
|
|
359
371
|
}
|
|
@@ -379,7 +391,10 @@ export interface StorageAgentType {
|
|
|
379
391
|
* Resolved agent type that combines the thin agent record with version snapshot config.
|
|
380
392
|
* Returned by getAgentByIdResolved and listAgentsResolved.
|
|
381
393
|
*/
|
|
382
|
-
export type StorageResolvedAgentType = StorageAgentType & StorageAgentSnapshotType
|
|
394
|
+
export type StorageResolvedAgentType = StorageAgentType & StorageAgentSnapshotType & {
|
|
395
|
+
/** The version ID that was resolved (populated by resolveEntity) */
|
|
396
|
+
resolvedVersionId?: string;
|
|
397
|
+
};
|
|
383
398
|
/**
|
|
384
399
|
* Input for creating a new agent. Flat union of thin record fields
|
|
385
400
|
* and initial configuration (used to create version 1).
|
|
@@ -434,6 +449,11 @@ export type StorageListAgentsInput = {
|
|
|
434
449
|
* All specified key-value pairs must match (AND logic).
|
|
435
450
|
*/
|
|
436
451
|
metadata?: Record<string, unknown>;
|
|
452
|
+
/**
|
|
453
|
+
* Filter agents by status.
|
|
454
|
+
* Defaults to 'published' if not specified.
|
|
455
|
+
*/
|
|
456
|
+
status?: 'draft' | 'published' | 'archived';
|
|
437
457
|
};
|
|
438
458
|
export type StorageListAgentsOutput = PaginationInfo & {
|
|
439
459
|
agents: StorageAgentType[];
|
|
@@ -515,7 +535,9 @@ export interface StoragePromptBlockSnapshotType {
|
|
|
515
535
|
rules?: RuleGroup;
|
|
516
536
|
}
|
|
517
537
|
/** Resolved prompt block: thin record merged with active version snapshot */
|
|
518
|
-
export type StorageResolvedPromptBlockType = StoragePromptBlockType & StoragePromptBlockSnapshotType
|
|
538
|
+
export type StorageResolvedPromptBlockType = StoragePromptBlockType & StoragePromptBlockSnapshotType & {
|
|
539
|
+
resolvedVersionId?: string;
|
|
540
|
+
};
|
|
519
541
|
/** Input for creating a new prompt block */
|
|
520
542
|
export type StorageCreatePromptBlockInput = {
|
|
521
543
|
/** Unique identifier for the prompt block */
|
|
@@ -558,6 +580,11 @@ export type StorageListPromptBlocksInput = {
|
|
|
558
580
|
* All specified key-value pairs must match (AND logic).
|
|
559
581
|
*/
|
|
560
582
|
metadata?: Record<string, unknown>;
|
|
583
|
+
/**
|
|
584
|
+
* Filter prompt blocks by status.
|
|
585
|
+
* Defaults to 'published' if not specified.
|
|
586
|
+
*/
|
|
587
|
+
status?: 'draft' | 'published' | 'archived';
|
|
561
588
|
};
|
|
562
589
|
/** Paginated list output for thin prompt block records */
|
|
563
590
|
export type StorageListPromptBlocksOutput = PaginationInfo & {
|
|
@@ -622,7 +649,10 @@ export interface StorageScorerDefinitionType {
|
|
|
622
649
|
* Resolved stored scorer type that combines the thin record with version snapshot config.
|
|
623
650
|
* Returned by getScorerDefinitionByIdResolved and listScorerDefinitionsResolved.
|
|
624
651
|
*/
|
|
625
|
-
export type StorageResolvedScorerDefinitionType = StorageScorerDefinitionType & StorageScorerDefinitionSnapshotType
|
|
652
|
+
export type StorageResolvedScorerDefinitionType = StorageScorerDefinitionType & StorageScorerDefinitionSnapshotType & {
|
|
653
|
+
/** The version ID that was resolved (populated by resolveEntity) */
|
|
654
|
+
resolvedVersionId?: string;
|
|
655
|
+
};
|
|
626
656
|
/**
|
|
627
657
|
* Input for creating a new stored scorer. Flat union of thin record fields
|
|
628
658
|
* and initial configuration (used to create version 1).
|
|
@@ -671,6 +701,11 @@ export type StorageListScorerDefinitionsInput = {
|
|
|
671
701
|
* All specified key-value pairs must match (AND logic).
|
|
672
702
|
*/
|
|
673
703
|
metadata?: Record<string, unknown>;
|
|
704
|
+
/**
|
|
705
|
+
* Filter scorers by status.
|
|
706
|
+
* Defaults to 'published' if not specified.
|
|
707
|
+
*/
|
|
708
|
+
status?: 'draft' | 'published' | 'archived';
|
|
674
709
|
};
|
|
675
710
|
/** Paginated list output for thin stored scorer records */
|
|
676
711
|
export type StorageListScorerDefinitionsOutput = PaginationInfo & {
|
|
@@ -1085,7 +1120,9 @@ export interface StorageMCPClientType {
|
|
|
1085
1120
|
* Resolved stored MCP client type that combines the thin record with version snapshot config.
|
|
1086
1121
|
* Returned by getMCPClientByIdResolved and listMCPClientsResolved.
|
|
1087
1122
|
*/
|
|
1088
|
-
export type StorageResolvedMCPClientType = StorageMCPClientType & StorageMCPClientSnapshotType
|
|
1123
|
+
export type StorageResolvedMCPClientType = StorageMCPClientType & StorageMCPClientSnapshotType & {
|
|
1124
|
+
resolvedVersionId?: string;
|
|
1125
|
+
};
|
|
1089
1126
|
/**
|
|
1090
1127
|
* Input for creating a new stored MCP client. Flat union of thin record fields
|
|
1091
1128
|
* and initial configuration (used to create version 1).
|
|
@@ -1134,6 +1171,11 @@ export type StorageListMCPClientsInput = {
|
|
|
1134
1171
|
* All specified key-value pairs must match (AND logic).
|
|
1135
1172
|
*/
|
|
1136
1173
|
metadata?: Record<string, unknown>;
|
|
1174
|
+
/**
|
|
1175
|
+
* Filter MCP clients by status.
|
|
1176
|
+
* Defaults to 'published' if not specified.
|
|
1177
|
+
*/
|
|
1178
|
+
status?: 'draft' | 'published' | 'archived';
|
|
1137
1179
|
};
|
|
1138
1180
|
/** Paginated list output for thin stored MCP client records */
|
|
1139
1181
|
export type StorageListMCPClientsOutput = PaginationInfo & {
|
|
@@ -1143,6 +1185,374 @@ export type StorageListMCPClientsOutput = PaginationInfo & {
|
|
|
1143
1185
|
export type StorageListMCPClientsResolvedOutput = PaginationInfo & {
|
|
1144
1186
|
mcpClients: StorageResolvedMCPClientType[];
|
|
1145
1187
|
};
|
|
1188
|
+
/**
|
|
1189
|
+
* Serializable filesystem configuration for storage.
|
|
1190
|
+
* References a provider type string that the editor resolves at hydration time.
|
|
1191
|
+
*/
|
|
1192
|
+
export interface StorageFilesystemConfig {
|
|
1193
|
+
/** Provider type identifier (e.g., 's3', 'gcs', 'local') — resolved by the editor's filesystem registry */
|
|
1194
|
+
provider: string;
|
|
1195
|
+
/** Provider-specific configuration (bucket, basePath, etc.) */
|
|
1196
|
+
config: Record<string, unknown>;
|
|
1197
|
+
/** Whether the filesystem is read-only */
|
|
1198
|
+
readOnly?: boolean;
|
|
1199
|
+
}
|
|
1200
|
+
/**
|
|
1201
|
+
* Serializable sandbox configuration for storage.
|
|
1202
|
+
* References a provider type string that the editor resolves at hydration time.
|
|
1203
|
+
*/
|
|
1204
|
+
export interface StorageSandboxConfig {
|
|
1205
|
+
/** Provider type identifier (e.g., 'e2b') — resolved by the editor's sandbox registry */
|
|
1206
|
+
provider: string;
|
|
1207
|
+
/** Provider-specific configuration */
|
|
1208
|
+
config: Record<string, unknown>;
|
|
1209
|
+
}
|
|
1210
|
+
/**
|
|
1211
|
+
* Serializable search configuration for storage.
|
|
1212
|
+
* References vector store and embedder by provider/name rather than runtime instances.
|
|
1213
|
+
*/
|
|
1214
|
+
export interface StorageSearchConfig {
|
|
1215
|
+
/** Vector store provider identifier (e.g., 'pg', 'pinecone') */
|
|
1216
|
+
vectorProvider?: string;
|
|
1217
|
+
/** Vector store provider-specific configuration */
|
|
1218
|
+
vectorConfig?: Record<string, unknown>;
|
|
1219
|
+
/** Embedder provider identifier (e.g., 'openai', 'fastembed') */
|
|
1220
|
+
embedderProvider?: string;
|
|
1221
|
+
/** Embedder model name */
|
|
1222
|
+
embedderModel?: string;
|
|
1223
|
+
/** Embedder provider-specific configuration */
|
|
1224
|
+
embedderConfig?: Record<string, unknown>;
|
|
1225
|
+
/** BM25 keyword search config — true for defaults, or object for custom params */
|
|
1226
|
+
bm25?: boolean | {
|
|
1227
|
+
k1?: number;
|
|
1228
|
+
b?: number;
|
|
1229
|
+
};
|
|
1230
|
+
/** Custom index name for the vector store */
|
|
1231
|
+
searchIndexName?: string;
|
|
1232
|
+
/** Paths to auto-index on init */
|
|
1233
|
+
autoIndexPaths?: string[];
|
|
1234
|
+
}
|
|
1235
|
+
/**
|
|
1236
|
+
* Serializable per-tool configuration for workspace tools.
|
|
1237
|
+
*/
|
|
1238
|
+
export interface StorageWorkspaceToolConfig {
|
|
1239
|
+
/** Whether the tool is enabled (default: true) */
|
|
1240
|
+
enabled?: boolean;
|
|
1241
|
+
/** Whether the tool requires user approval before execution (default: false) */
|
|
1242
|
+
requireApproval?: boolean;
|
|
1243
|
+
/** For write tools: require reading a file before writing to it */
|
|
1244
|
+
requireReadBeforeWrite?: boolean;
|
|
1245
|
+
}
|
|
1246
|
+
/**
|
|
1247
|
+
* Serializable workspace tools configuration for storage.
|
|
1248
|
+
*/
|
|
1249
|
+
export interface StorageWorkspaceToolsConfig {
|
|
1250
|
+
/** Default: whether all tools are enabled (default: true) */
|
|
1251
|
+
enabled?: boolean;
|
|
1252
|
+
/** Default: whether all tools require user approval (default: false) */
|
|
1253
|
+
requireApproval?: boolean;
|
|
1254
|
+
/** Per-tool overrides, keyed by workspace tool name */
|
|
1255
|
+
tools?: Record<string, StorageWorkspaceToolConfig>;
|
|
1256
|
+
}
|
|
1257
|
+
/**
|
|
1258
|
+
* Workspace version snapshot type containing ALL workspace configuration fields.
|
|
1259
|
+
* These fields live exclusively in version snapshot rows, not on the workspace record.
|
|
1260
|
+
*/
|
|
1261
|
+
export interface StorageWorkspaceSnapshotType {
|
|
1262
|
+
/** Display name of the workspace */
|
|
1263
|
+
name: string;
|
|
1264
|
+
/** Purpose description */
|
|
1265
|
+
description?: string;
|
|
1266
|
+
/** Primary filesystem configuration */
|
|
1267
|
+
filesystem?: StorageFilesystemConfig;
|
|
1268
|
+
/** Sandbox configuration */
|
|
1269
|
+
sandbox?: StorageSandboxConfig;
|
|
1270
|
+
/** Mounted filesystems keyed by mount path */
|
|
1271
|
+
mounts?: Record<string, StorageFilesystemConfig>;
|
|
1272
|
+
/** Search configuration (vector, embedder, BM25) */
|
|
1273
|
+
search?: StorageSearchConfig;
|
|
1274
|
+
/** Skill entity IDs assigned to this workspace */
|
|
1275
|
+
skills?: string[];
|
|
1276
|
+
/** Workspace tool configuration */
|
|
1277
|
+
tools?: StorageWorkspaceToolsConfig;
|
|
1278
|
+
/** Auto-sync between fs and sandbox (default: false) */
|
|
1279
|
+
autoSync?: boolean;
|
|
1280
|
+
/** Timeout for individual operations in milliseconds */
|
|
1281
|
+
operationTimeout?: number;
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* Thin workspace record type containing only metadata fields.
|
|
1285
|
+
* All configuration lives in version snapshots (StorageWorkspaceSnapshotType).
|
|
1286
|
+
*/
|
|
1287
|
+
export interface StorageWorkspaceType {
|
|
1288
|
+
/** Unique, immutable identifier */
|
|
1289
|
+
id: string;
|
|
1290
|
+
/** Workspace status: 'draft' on creation, 'published' when a version is activated */
|
|
1291
|
+
status: 'draft' | 'published' | 'archived';
|
|
1292
|
+
/** FK to workspace_versions.id - the currently active version */
|
|
1293
|
+
activeVersionId?: string;
|
|
1294
|
+
/** Author identifier for multi-tenant filtering */
|
|
1295
|
+
authorId?: string;
|
|
1296
|
+
/** Additional metadata for the workspace */
|
|
1297
|
+
metadata?: Record<string, unknown>;
|
|
1298
|
+
createdAt: Date;
|
|
1299
|
+
updatedAt: Date;
|
|
1300
|
+
}
|
|
1301
|
+
/**
|
|
1302
|
+
* Resolved workspace type that combines the thin record with version snapshot config.
|
|
1303
|
+
* Returned by getWorkspaceByIdResolved and listWorkspacesResolved.
|
|
1304
|
+
*/
|
|
1305
|
+
export type StorageResolvedWorkspaceType = StorageWorkspaceType & StorageWorkspaceSnapshotType & {
|
|
1306
|
+
resolvedVersionId?: string;
|
|
1307
|
+
};
|
|
1308
|
+
/**
|
|
1309
|
+
* Input for creating a new workspace. Flat union of thin record fields
|
|
1310
|
+
* and initial configuration (used to create version 1).
|
|
1311
|
+
*/
|
|
1312
|
+
export type StorageCreateWorkspaceInput = {
|
|
1313
|
+
/** Unique identifier for the workspace */
|
|
1314
|
+
id: string;
|
|
1315
|
+
/** Author identifier for multi-tenant filtering */
|
|
1316
|
+
authorId?: string;
|
|
1317
|
+
/** Additional metadata for the workspace */
|
|
1318
|
+
metadata?: Record<string, unknown>;
|
|
1319
|
+
} & StorageWorkspaceSnapshotType;
|
|
1320
|
+
/**
|
|
1321
|
+
* Input for updating a workspace. Includes metadata-level fields and optional config fields.
|
|
1322
|
+
* The handler layer separates these into record updates vs new-version creation.
|
|
1323
|
+
*/
|
|
1324
|
+
export type StorageUpdateWorkspaceInput = {
|
|
1325
|
+
id: string;
|
|
1326
|
+
/** Author identifier for multi-tenant filtering */
|
|
1327
|
+
authorId?: string;
|
|
1328
|
+
/** Additional metadata for the workspace */
|
|
1329
|
+
metadata?: Record<string, unknown>;
|
|
1330
|
+
/** FK to workspace_versions.id - the currently active version */
|
|
1331
|
+
activeVersionId?: string;
|
|
1332
|
+
/** Workspace status */
|
|
1333
|
+
status?: 'draft' | 'published' | 'archived';
|
|
1334
|
+
} & Partial<StorageWorkspaceSnapshotType>;
|
|
1335
|
+
export type StorageListWorkspacesInput = {
|
|
1336
|
+
/**
|
|
1337
|
+
* Number of items per page, or `false` to fetch all records without pagination limit.
|
|
1338
|
+
* Defaults to 100 if not specified.
|
|
1339
|
+
*/
|
|
1340
|
+
perPage?: number | false;
|
|
1341
|
+
/**
|
|
1342
|
+
* Zero-indexed page number for pagination.
|
|
1343
|
+
* Defaults to 0 if not specified.
|
|
1344
|
+
*/
|
|
1345
|
+
page?: number;
|
|
1346
|
+
orderBy?: StorageOrderBy;
|
|
1347
|
+
/**
|
|
1348
|
+
* Filter workspaces by author identifier.
|
|
1349
|
+
*/
|
|
1350
|
+
authorId?: string;
|
|
1351
|
+
/**
|
|
1352
|
+
* Filter workspaces by metadata key-value pairs.
|
|
1353
|
+
* All specified key-value pairs must match (AND logic).
|
|
1354
|
+
*/
|
|
1355
|
+
metadata?: Record<string, unknown>;
|
|
1356
|
+
};
|
|
1357
|
+
/** Paginated list output for thin workspace records */
|
|
1358
|
+
export type StorageListWorkspacesOutput = PaginationInfo & {
|
|
1359
|
+
workspaces: StorageWorkspaceType[];
|
|
1360
|
+
};
|
|
1361
|
+
/** Paginated list output for resolved workspaces */
|
|
1362
|
+
export type StorageListWorkspacesResolvedOutput = PaginationInfo & {
|
|
1363
|
+
workspaces: StorageResolvedWorkspaceType[];
|
|
1364
|
+
};
|
|
1365
|
+
/**
|
|
1366
|
+
* Serializable content source for skill storage.
|
|
1367
|
+
* Mirrors the runtime ContentSource but stored as plain JSON.
|
|
1368
|
+
*/
|
|
1369
|
+
export type StorageContentSource = {
|
|
1370
|
+
type: 'external';
|
|
1371
|
+
packagePath: string;
|
|
1372
|
+
} | {
|
|
1373
|
+
type: 'local';
|
|
1374
|
+
projectPath: string;
|
|
1375
|
+
} | {
|
|
1376
|
+
type: 'managed';
|
|
1377
|
+
mastraPath: string;
|
|
1378
|
+
};
|
|
1379
|
+
/**
|
|
1380
|
+
* Skill version snapshot type containing ALL skill definition fields.
|
|
1381
|
+
* These fields live exclusively in version snapshot rows, not on the skill record.
|
|
1382
|
+
*/
|
|
1383
|
+
export interface StorageSkillSnapshotType {
|
|
1384
|
+
/** Skill name (1-64 chars, lowercase, hyphens only) */
|
|
1385
|
+
name: string;
|
|
1386
|
+
/** Description of what the skill does and when to use it */
|
|
1387
|
+
description: string;
|
|
1388
|
+
/** Markdown instructions from SKILL.md body */
|
|
1389
|
+
instructions: string;
|
|
1390
|
+
/** Optional license identifier */
|
|
1391
|
+
license?: string;
|
|
1392
|
+
/** Optional compatibility requirements */
|
|
1393
|
+
compatibility?: unknown;
|
|
1394
|
+
/** Source of the skill */
|
|
1395
|
+
source?: StorageContentSource;
|
|
1396
|
+
/** List of reference file paths */
|
|
1397
|
+
references?: string[];
|
|
1398
|
+
/** List of script file paths */
|
|
1399
|
+
scripts?: string[];
|
|
1400
|
+
/** List of asset file paths */
|
|
1401
|
+
assets?: string[];
|
|
1402
|
+
/** Optional arbitrary metadata */
|
|
1403
|
+
metadata?: Record<string, unknown>;
|
|
1404
|
+
/** Content-addressable file tree manifest for this skill version */
|
|
1405
|
+
tree?: SkillVersionTree;
|
|
1406
|
+
}
|
|
1407
|
+
/**
|
|
1408
|
+
* Thin skill record type containing only metadata fields.
|
|
1409
|
+
* All definition content lives in version snapshots (StorageSkillSnapshotType).
|
|
1410
|
+
*/
|
|
1411
|
+
export interface StorageSkillType {
|
|
1412
|
+
/** Unique, immutable identifier */
|
|
1413
|
+
id: string;
|
|
1414
|
+
/** Skill status: 'draft' on creation, 'published' when a version is activated */
|
|
1415
|
+
status: 'draft' | 'published' | 'archived';
|
|
1416
|
+
/** FK to skill_versions.id - the currently active version */
|
|
1417
|
+
activeVersionId?: string;
|
|
1418
|
+
/** Author identifier for multi-tenant filtering */
|
|
1419
|
+
authorId?: string;
|
|
1420
|
+
createdAt: Date;
|
|
1421
|
+
updatedAt: Date;
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Resolved skill type that combines the thin record with version snapshot content.
|
|
1425
|
+
* Returned by getSkillByIdResolved and listSkillsResolved.
|
|
1426
|
+
*/
|
|
1427
|
+
export type StorageResolvedSkillType = StorageSkillType & StorageSkillSnapshotType & {
|
|
1428
|
+
resolvedVersionId?: string;
|
|
1429
|
+
};
|
|
1430
|
+
/**
|
|
1431
|
+
* Input for creating a new skill. Flat union of thin record fields
|
|
1432
|
+
* and initial content (used to create version 1).
|
|
1433
|
+
*/
|
|
1434
|
+
export type StorageCreateSkillInput = {
|
|
1435
|
+
/** Unique identifier for the skill */
|
|
1436
|
+
id: string;
|
|
1437
|
+
/** Author identifier for multi-tenant filtering */
|
|
1438
|
+
authorId?: string;
|
|
1439
|
+
} & StorageSkillSnapshotType;
|
|
1440
|
+
/**
|
|
1441
|
+
* Input for updating a skill. Includes metadata-level fields and optional content fields.
|
|
1442
|
+
* The handler layer separates these into record updates vs new-version creation.
|
|
1443
|
+
*/
|
|
1444
|
+
export type StorageUpdateSkillInput = {
|
|
1445
|
+
id: string;
|
|
1446
|
+
/** Author identifier for multi-tenant filtering */
|
|
1447
|
+
authorId?: string;
|
|
1448
|
+
/** FK to skill_versions.id - the currently active version */
|
|
1449
|
+
activeVersionId?: string;
|
|
1450
|
+
/** Skill status */
|
|
1451
|
+
status?: 'draft' | 'published' | 'archived';
|
|
1452
|
+
} & Partial<StorageSkillSnapshotType>;
|
|
1453
|
+
export type StorageListSkillsInput = {
|
|
1454
|
+
/**
|
|
1455
|
+
* Number of items per page, or `false` to fetch all records without pagination limit.
|
|
1456
|
+
* Defaults to 100 if not specified.
|
|
1457
|
+
*/
|
|
1458
|
+
perPage?: number | false;
|
|
1459
|
+
/**
|
|
1460
|
+
* Zero-indexed page number for pagination.
|
|
1461
|
+
* Defaults to 0 if not specified.
|
|
1462
|
+
*/
|
|
1463
|
+
page?: number;
|
|
1464
|
+
orderBy?: StorageOrderBy;
|
|
1465
|
+
/**
|
|
1466
|
+
* Filter skills by author identifier.
|
|
1467
|
+
*/
|
|
1468
|
+
authorId?: string;
|
|
1469
|
+
/**
|
|
1470
|
+
* Filter skills by metadata key-value pairs.
|
|
1471
|
+
* All specified key-value pairs must match (AND logic).
|
|
1472
|
+
*/
|
|
1473
|
+
metadata?: Record<string, unknown>;
|
|
1474
|
+
};
|
|
1475
|
+
/** Paginated list output for thin skill records */
|
|
1476
|
+
export type StorageListSkillsOutput = PaginationInfo & {
|
|
1477
|
+
skills: StorageSkillType[];
|
|
1478
|
+
};
|
|
1479
|
+
/** Paginated list output for resolved skills */
|
|
1480
|
+
export type StorageListSkillsResolvedOutput = PaginationInfo & {
|
|
1481
|
+
skills: StorageResolvedSkillType[];
|
|
1482
|
+
};
|
|
1483
|
+
/**
|
|
1484
|
+
* Per-skill configuration stored in agent snapshots.
|
|
1485
|
+
* Allows overriding skill description and instructions for a specific agent context.
|
|
1486
|
+
*/
|
|
1487
|
+
export interface StorageSkillConfig {
|
|
1488
|
+
/** Custom description override for this skill in this agent context */
|
|
1489
|
+
description?: string;
|
|
1490
|
+
/** Custom instructions override for this skill in this agent context */
|
|
1491
|
+
instructions?: string;
|
|
1492
|
+
/** Pin to a specific version ID. Takes precedence over strategy. */
|
|
1493
|
+
pin?: string;
|
|
1494
|
+
/** Resolution strategy: 'latest' = latest published version, 'live' = read from filesystem */
|
|
1495
|
+
strategy?: 'latest' | 'live';
|
|
1496
|
+
}
|
|
1497
|
+
/**
|
|
1498
|
+
* A single entry in a skill version's file tree manifest.
|
|
1499
|
+
* Maps a file path to its content-addressable blob hash.
|
|
1500
|
+
*/
|
|
1501
|
+
export interface SkillVersionTreeEntry {
|
|
1502
|
+
/** SHA-256 hash of the file content (content-addressable key) */
|
|
1503
|
+
blobHash: string;
|
|
1504
|
+
/** File size in bytes */
|
|
1505
|
+
size: number;
|
|
1506
|
+
/** Optional MIME type */
|
|
1507
|
+
mimeType?: string;
|
|
1508
|
+
/**
|
|
1509
|
+
* Content encoding used in the blob store.
|
|
1510
|
+
* - 'utf-8' (default): content stored as UTF-8 text
|
|
1511
|
+
* - 'base64': content stored as base64-encoded string (for binary files like images)
|
|
1512
|
+
*/
|
|
1513
|
+
encoding?: 'utf-8' | 'base64';
|
|
1514
|
+
}
|
|
1515
|
+
/**
|
|
1516
|
+
* Complete file tree manifest for a skill version.
|
|
1517
|
+
* Maps relative file paths to their blob entries.
|
|
1518
|
+
* This is stored as JSONB on the skill version row.
|
|
1519
|
+
*
|
|
1520
|
+
* Example:
|
|
1521
|
+
* {
|
|
1522
|
+
* "SKILL.md": { blobHash: "abc123...", size: 1024, mimeType: "text/markdown" },
|
|
1523
|
+
* "references/api.md": { blobHash: "def456...", size: 512, mimeType: "text/markdown" },
|
|
1524
|
+
* "scripts/setup.sh": { blobHash: "ghi789...", size: 256, mimeType: "text/x-shellscript" }
|
|
1525
|
+
* }
|
|
1526
|
+
*/
|
|
1527
|
+
export interface SkillVersionTree {
|
|
1528
|
+
entries: Record<string, SkillVersionTreeEntry>;
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
* A stored blob entry in the content-addressable blob store.
|
|
1532
|
+
*/
|
|
1533
|
+
export interface StorageBlobEntry {
|
|
1534
|
+
/** SHA-256 hash of the content (primary key) */
|
|
1535
|
+
hash: string;
|
|
1536
|
+
/** The file content (text) */
|
|
1537
|
+
content: string;
|
|
1538
|
+
/** File size in bytes */
|
|
1539
|
+
size: number;
|
|
1540
|
+
/** Optional MIME type */
|
|
1541
|
+
mimeType?: string;
|
|
1542
|
+
/** When the blob was first stored */
|
|
1543
|
+
createdAt: Date;
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* Workspace reference configuration stored in agent snapshots.
|
|
1547
|
+
* Can reference a stored workspace by ID or provide inline workspace config.
|
|
1548
|
+
*/
|
|
1549
|
+
export type StorageWorkspaceRef = {
|
|
1550
|
+
type: 'id';
|
|
1551
|
+
workspaceId: string;
|
|
1552
|
+
} | {
|
|
1553
|
+
type: 'inline';
|
|
1554
|
+
config: StorageWorkspaceSnapshotType;
|
|
1555
|
+
};
|
|
1146
1556
|
export interface UpdateWorkflowStateOptions {
|
|
1147
1557
|
status: WorkflowRunStatus;
|
|
1148
1558
|
result?: StepResult<any, any, any, any>;
|
|
@@ -1204,16 +1614,16 @@ export interface CreateDatasetInput {
|
|
|
1204
1614
|
name: string;
|
|
1205
1615
|
description?: string;
|
|
1206
1616
|
metadata?: Record<string, unknown>;
|
|
1207
|
-
inputSchema?: Record<string, unknown
|
|
1208
|
-
groundTruthSchema?: Record<string, unknown
|
|
1617
|
+
inputSchema?: Record<string, unknown> | null;
|
|
1618
|
+
groundTruthSchema?: Record<string, unknown> | null;
|
|
1209
1619
|
}
|
|
1210
1620
|
export interface UpdateDatasetInput {
|
|
1211
1621
|
id: string;
|
|
1212
1622
|
name?: string;
|
|
1213
1623
|
description?: string;
|
|
1214
1624
|
metadata?: Record<string, unknown>;
|
|
1215
|
-
inputSchema?: Record<string, unknown
|
|
1216
|
-
groundTruthSchema?: Record<string, unknown
|
|
1625
|
+
inputSchema?: Record<string, unknown> | null;
|
|
1626
|
+
groundTruthSchema?: Record<string, unknown> | null;
|
|
1217
1627
|
}
|
|
1218
1628
|
export interface AddDatasetItemInput {
|
|
1219
1629
|
datasetId: string;
|