@mastra/core 1.87.0-alpha.10 → 1.87.0-alpha.11
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/dist/_types/@internal_core@0.1.4/dist/knowledge-compat/index.d.ts +49 -0
- package/dist/agent/durable/index.cjs +1 -1
- package/dist/agent/durable/index.js +1 -1
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.js +2 -2
- package/dist/agent-builder/ee/index.cjs +1 -1
- package/dist/agent-builder/ee/index.js +1 -1
- package/dist/agent-controller/index.cjs +1 -1
- package/dist/agent-controller/index.js +1 -1
- package/dist/agent-controller/session.d.ts +11 -1
- package/dist/{agent-controller--gKWI81G.js → agent-controller-BrRzZy4-.js} +21 -12
- package/dist/{agent-controller-BolLBwDm.cjs → agent-controller-DKI-d-np.cjs} +21 -12
- package/dist/background-tasks/index.cjs +1 -1
- package/dist/background-tasks/index.js +1 -1
- package/dist/{background-tasks-CgzXjBfE.js → background-tasks-CDP3Pgeu.js} +1 -1
- package/dist/{background-tasks-DYtlijQ1.cjs → background-tasks-CDgdfRmB.cjs} +1 -1
- package/dist/browser/index.cjs +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/{builder-Dz-g-9CZ.cjs → builder-Bs4CtyqT.cjs} +2 -2
- package/dist/{builder-emNPaIaC.js → builder-DuT0Iqb5.js} +2 -2
- package/dist/capabilities/302ai.json +201 -201
- package/dist/capabilities/abliteratedllm.json +38 -38
- package/dist/capabilities/abliteration-ai.json +4 -4
- package/dist/capabilities/above.json +19 -19
- package/dist/capabilities/adaption.json +13 -13
- package/dist/capabilities/adzuki.json +30 -30
- package/dist/capabilities/agentrouter.json +12 -12
- package/dist/capabilities/agnes.json +2 -2
- package/dist/capabilities/ai-router.json +4 -4
- package/dist/capabilities/aiand.json +23 -23
- package/dist/capabilities/aigrow.json +9 -9
- package/dist/capabilities/aimlapi.json +153 -153
- package/dist/capabilities/aipg.json +2 -2
- package/dist/capabilities/aixy.json +22 -22
- package/dist/capabilities/aki-io.json +10 -10
- package/dist/capabilities/alibaba-cn.json +99 -99
- package/dist/capabilities/alibaba-coding-plan-cn.json +6 -6
- package/dist/capabilities/alibaba-coding-plan.json +6 -6
- package/dist/capabilities/alibaba-token-plan-cn.json +51 -51
- package/dist/capabilities/alibaba-token-plan.json +52 -52
- package/dist/capabilities/alibaba.json +73 -73
- package/dist/capabilities/ambient.json +17 -17
- package/dist/capabilities/amd.json +10 -10
- package/dist/capabilities/anthropic.json +41 -41
- package/dist/capabilities/anyapi.json +47 -47
- package/dist/capabilities/apiko.json +4 -4
- package/dist/capabilities/arcee.json +11 -11
- package/dist/capabilities/augure.json +6 -6
- package/dist/capabilities/auriko.json +18 -18
- package/dist/capabilities/bailing.json +4 -4
- package/dist/capabilities/baseten.json +33 -33
- package/dist/capabilities/bee.json +5 -5
- package/dist/capabilities/berget.json +6 -6
- package/dist/capabilities/bothub.json +10 -10
- package/dist/capabilities/boundless.json +34 -34
- package/dist/capabilities/bumo.json +43 -43
- package/dist/capabilities/byteplus.json +31 -31
- package/dist/capabilities/cheapaimodel.json +5 -5
- package/dist/capabilities/cheapest-token.json +27 -27
- package/dist/capabilities/chutes.json +10 -10
- package/dist/capabilities/clarifai.json +2 -2
- package/dist/capabilities/cline-pass.json +37 -37
- package/dist/capabilities/cloudcode.json +8 -8
- package/dist/capabilities/cloudferro-sherlock.json +4 -4
- package/dist/capabilities/cloudflare-workers-ai.json +17 -17
- package/dist/capabilities/commandcode.json +151 -151
- package/dist/capabilities/concentrate.json +277 -269
- package/dist/capabilities/cortecs.json +108 -108
- package/dist/capabilities/crossmodel.json +172 -172
- package/dist/capabilities/crusoe.json +16 -16
- package/dist/capabilities/daoxe.json +8 -8
- package/dist/capabilities/databricks.json +128 -128
- package/dist/capabilities/deepinfra.json +97 -91
- package/dist/capabilities/deepseek.json +3 -3
- package/dist/capabilities/digitalocean.json +113 -113
- package/dist/capabilities/dothoosh.json +23 -23
- package/dist/capabilities/doubleword.json +27 -27
- package/dist/capabilities/edenai.json +279 -279
- package/dist/capabilities/empiriolabs.json +160 -160
- package/dist/capabilities/engy.json +20 -20
- package/dist/capabilities/entrim.json +8 -8
- package/dist/capabilities/evroc.json +18 -18
- package/dist/capabilities/ezkielyna.json +11 -11
- package/dist/capabilities/fastrouter.json +87 -87
- package/dist/capabilities/fireworks-ai.json +83 -83
- package/dist/capabilities/freemodel.json +19 -19
- package/dist/capabilities/friendli.json +7 -7
- package/dist/capabilities/frogbot.json +88 -88
- package/dist/capabilities/gisoo.json +18 -18
- package/dist/capabilities/gmicloud.json +20 -20
- package/dist/capabilities/google.json +55 -55
- package/dist/capabilities/graphn.json +6 -6
- package/dist/capabilities/greenpt.json +34 -34
- package/dist/capabilities/helicone.json +81 -81
- package/dist/capabilities/hetzner.json +5 -5
- package/dist/capabilities/hopper.json +2 -2
- package/dist/capabilities/hostinger-router.json +10 -10
- package/dist/capabilities/hpc-ai.json +11 -11
- package/dist/capabilities/huawei-maas.json +15 -15
- package/dist/capabilities/hubris.json +31 -31
- package/dist/capabilities/huggingface.json +93 -85
- package/dist/capabilities/humain.json +2 -2
- package/dist/capabilities/hyper.json +27 -27
- package/dist/capabilities/impossibl.json +165 -165
- package/dist/capabilities/inception.json +3 -3
- package/dist/capabilities/inceptron.json +8 -8
- package/dist/capabilities/inco.json +5 -5
- package/dist/capabilities/infer.json +13 -13
- package/dist/capabilities/inferall.json +6 -6
- package/dist/capabilities/inference-coop.json +15 -15
- package/dist/capabilities/inferenceapis.json +20 -20
- package/dist/capabilities/inferris.json +3 -3
- package/dist/capabilities/infersia.json +8 -8
- package/dist/capabilities/infomaniak.json +4 -4
- package/dist/capabilities/io-net.json +5 -5
- package/dist/capabilities/iteracompute.json +29 -29
- package/dist/capabilities/jad-ai.json +3 -3
- package/dist/capabilities/jalapeno.json +11 -11
- package/dist/capabilities/jiekou.json +61 -61
- package/dist/capabilities/joingonka.json +4 -4
- package/dist/capabilities/jzstoken.json +57 -57
- package/dist/capabilities/keln.json +23 -23
- package/dist/capabilities/kenari.json +121 -121
- package/dist/capabilities/kilo.json +615 -615
- package/dist/capabilities/kimi-code-plan-cn.json +6 -6
- package/dist/capabilities/kimi-code-plan-global.json +6 -6
- package/dist/capabilities/kitani.json +4 -4
- package/dist/capabilities/klavo.json +13 -13
- package/dist/capabilities/korouter.json +29 -29
- package/dist/capabilities/kunavo.json +2 -2
- package/dist/capabilities/liquid.json +10 -10
- package/dist/capabilities/lithosai.json +3 -3
- package/dist/capabilities/llmgateway-providers.json +926 -926
- package/dist/capabilities/llmgateway.json +330 -330
- package/dist/capabilities/llmtr.json +26 -26
- package/dist/capabilities/logits.json +2 -2
- package/dist/capabilities/longcat.json +2 -2
- package/dist/capabilities/lowrouter.json +65 -65
- package/dist/capabilities/lyceum.json +8 -8
- package/dist/capabilities/melious.json +9 -9
- package/dist/capabilities/merge-gateway.json +269 -269
- package/dist/capabilities/meta.json +8 -8
- package/dist/capabilities/mistral.json +19 -19
- package/dist/capabilities/mixlayer.json +4 -4
- package/dist/capabilities/modal.json +11 -11
- package/dist/capabilities/model-oracle-ai.json +24 -24
- package/dist/capabilities/modelis.json +23 -23
- package/dist/capabilities/modelscope.json +2 -2
- package/dist/capabilities/modular.json +13 -13
- package/dist/capabilities/moneo.json +8 -8
- package/dist/capabilities/moonshotai-cn.json +6 -6
- package/dist/capabilities/moonshotai.json +6 -6
- package/dist/capabilities/morph.json +15 -15
- package/dist/capabilities/munito-eu.json +8 -8
- package/dist/capabilities/munito.json +10 -10
- package/dist/capabilities/nan.json +28 -28
- package/dist/capabilities/nano-gpt.json +578 -578
- package/dist/capabilities/nearai.json +106 -106
- package/dist/capabilities/nebius.json +32 -32
- package/dist/capabilities/neon.json +121 -121
- package/dist/capabilities/neuralwatt.json +40 -40
- package/dist/capabilities/nokeep.json +4 -4
- package/dist/capabilities/novita-ai.json +148 -148
- package/dist/capabilities/nvidia.json +44 -44
- package/dist/capabilities/oathbreaker.json +5 -5
- package/dist/capabilities/obscurify.json +24 -24
- package/dist/capabilities/oci.json +6 -6
- package/dist/capabilities/ofox.json +349 -349
- package/dist/capabilities/ollama-cloud.json +54 -54
- package/dist/capabilities/openai.json +59 -59
- package/dist/capabilities/opencode-go.json +84 -84
- package/dist/capabilities/openrouter.json +538 -539
- package/dist/capabilities/opper.json +25 -25
- package/dist/capabilities/orcarouter.json +206 -206
- package/dist/capabilities/outerlabs.json +28 -28
- package/dist/capabilities/ovhcloud.json +19 -19
- package/dist/capabilities/pareto.json +5 -5
- package/dist/capabilities/pendra.json +4 -4
- package/dist/capabilities/perplexity-agent.json +62 -62
- package/dist/capabilities/phala.json +20 -20
- package/dist/capabilities/pioneer.json +32 -32
- package/dist/capabilities/poe.json +131 -131
- package/dist/capabilities/poolside.json +2 -2
- package/dist/capabilities/powerspring.json +11 -11
- package/dist/capabilities/primalabs.json +7 -7
- package/dist/capabilities/prime.json +112 -112
- package/dist/capabilities/privatemode-ai.json +11 -11
- package/dist/capabilities/proxystacks.json +6 -6
- package/dist/capabilities/qiniu-ai.json +14 -14
- package/dist/capabilities/refuseless.json +10 -10
- package/dist/capabilities/regolo-ai.json +5 -5
- package/dist/capabilities/requesty.json +259 -200
- package/dist/capabilities/ruapi.json +16 -16
- package/dist/capabilities/runcrate.json +15 -15
- package/dist/capabilities/runinfra.json +19 -19
- package/dist/capabilities/sakana.json +7 -7
- package/dist/capabilities/sandbase.json +21 -21
- package/dist/capabilities/sarvam.json +11 -11
- package/dist/capabilities/scaleway.json +16 -16
- package/dist/capabilities/scnet-token-plan.json +10 -10
- package/dist/capabilities/scx-ai.json +21 -21
- package/dist/capabilities/sensenova.json +15 -15
- package/dist/capabilities/siliconflow-cn.json +58 -58
- package/dist/capabilities/siliconflow.json +61 -61
- package/dist/capabilities/snowflake-cortex.json +18 -18
- package/dist/capabilities/sokkan.json +5 -5
- package/dist/capabilities/sparrowcodes.json +20 -20
- package/dist/capabilities/standardcompute.json +95 -95
- package/dist/capabilities/steadyrouter.json +33 -33
- package/dist/capabilities/stepfun-ai-step-plan.json +4 -4
- package/dist/capabilities/stepfun-ai.json +4 -4
- package/dist/capabilities/stepfun-step-plan.json +4 -4
- package/dist/capabilities/stepfun.json +4 -4
- package/dist/capabilities/stepping-stone.json +17 -17
- package/dist/capabilities/superbot-gg.json +4 -4
- package/dist/capabilities/synthetic.json +11 -11
- package/dist/capabilities/synthorai.json +23 -23
- package/dist/capabilities/teamorouter.json +22 -22
- package/dist/capabilities/teapot-router.json +15 -15
- package/dist/capabilities/tencent-token-plan-intl.json +22 -22
- package/dist/capabilities/tencent-token-plan.json +43 -43
- package/dist/capabilities/tencent-tokenhub.json +47 -47
- package/dist/capabilities/tensorx.json +37 -37
- package/dist/capabilities/tenstorrent.json +8 -8
- package/dist/capabilities/the-grid-ai.json +30 -30
- package/dist/capabilities/thinkingmachines.json +78 -78
- package/dist/capabilities/tinfoil.json +9 -9
- package/dist/capabilities/togetherai.json +55 -55
- package/dist/capabilities/tokengo.json +19 -19
- package/dist/capabilities/tokenify.json +2 -2
- package/dist/capabilities/trustedrouter.json +6 -6
- package/dist/capabilities/trustedtokens.json +17 -17
- package/dist/capabilities/umans-ai-coding-plan.json +14 -14
- package/dist/capabilities/umans-ai.json +10 -10
- package/dist/capabilities/uncensuredai.json +4 -4
- package/dist/capabilities/unrestricted.json +6 -6
- package/dist/capabilities/uplinkswitch.json +21 -21
- package/dist/capabilities/upstage.json +6 -6
- package/dist/capabilities/vancine.json +16 -16
- package/dist/capabilities/vercel.json +578 -578
- package/dist/capabilities/vivgrid.json +86 -86
- package/dist/capabilities/volcengine-coding-plan.json +26 -26
- package/dist/capabilities/volcengine.json +23 -23
- package/dist/capabilities/vultr.json +34 -34
- package/dist/capabilities/wafer.ai.json +17 -17
- package/dist/capabilities/wallaby.json +2 -2
- package/dist/capabilities/wally.json +13 -13
- package/dist/capabilities/wandb.json +21 -21
- package/dist/capabilities/watt.json +26 -26
- package/dist/capabilities/xai.json +6 -6
- package/dist/capabilities/xiaomi-token-plan-ams.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-cn.json +2 -2
- package/dist/capabilities/xiaomi-token-plan-sgp.json +2 -2
- package/dist/capabilities/xiaomi.json +3 -3
- package/dist/capabilities/xpersona.json +12 -12
- package/dist/capabilities/xxapi.json +28 -28
- package/dist/capabilities/zai-coding-plan.json +18 -18
- package/dist/capabilities/zai.json +30 -30
- package/dist/capabilities/zenifra.json +31 -31
- package/dist/capabilities/zenmux.json +202 -202
- package/dist/capabilities/zerogpu.json +8 -8
- package/dist/capabilities/zhipuai-coding-plan.json +6 -6
- package/dist/capabilities/zhipuai.json +28 -28
- package/dist/capabilities/zro.json +4 -4
- package/dist/channels/index.cjs +2 -2
- package/dist/channels/index.js +2 -2
- package/dist/{channels-BVnDIsZS.cjs → channels-Bkd_v8M1.cjs} +1 -1
- package/dist/{channels-CndspFXP.js → channels-CkRMEIQ6.js} +1 -1
- package/dist/coding-agent/index.cjs +1 -1
- package/dist/coding-agent/index.js +1 -1
- package/dist/datasets/index.cjs +2 -2
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +570 -570
- package/dist/docs/references/reference-agent-controller-session.md +29 -1
- package/dist/evals/index.cjs +1 -1
- package/dist/evals/index.js +1 -1
- package/dist/evals/scoreTraces/index.cjs +1 -1
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/harness/index.cjs +1 -1
- package/dist/harness/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/knowledge/importers/overlay.d.ts +138 -0
- package/dist/knowledge/importers/sink.d.ts +6 -0
- package/dist/knowledge/importers/types.d.ts +5 -0
- package/dist/knowledge/index.cjs +1412 -139
- package/dist/knowledge/index.js +1412 -139
- package/dist/knowledge/links.d.ts +27 -0
- package/dist/llm/index.cjs +3 -3
- package/dist/llm/index.js +3 -3
- package/dist/llm/model/provider-types.generated.d.ts +7619 -7605
- package/dist/{llm-B1semiTO.cjs → llm-DAw2eouV.cjs} +2 -2
- package/dist/{llm-CytL7cpw.js → llm-DFT5EKp4.js} +2 -2
- package/dist/loop/index.cjs +2 -2
- package/dist/loop/index.js +2 -2
- package/dist/{manager-DnTzA9GL.js → manager-DiDnvKLM.js} +2 -2
- package/dist/{manager-BwyfS4ha.cjs → manager-hxzEe4U5.cjs} +2 -2
- package/dist/mastra/index.cjs +1 -1
- package/dist/mastra/index.js +1 -1
- package/dist/{mastra-Dj35Lj_J.cjs → mastra-1diaq68N.cjs} +16 -16
- package/dist/{mastra-DTkZPpch.js → mastra-BPaPxG5t.js} +16 -16
- package/dist/memory/index.cjs +2 -2
- package/dist/memory/index.js +2 -2
- package/dist/{model-DyQ07rPH.js → model-CUBZjm0T.js} +1 -1
- package/dist/{model-eDfetuno.cjs → model-DSMHJM3c.cjs} +1 -1
- package/dist/{netlify-BC4v7Ufv.cjs → netlify-C21T9ozJ.cjs} +1 -1
- package/dist/{netlify-BUvdxfHe.js → netlify-D1BKjns0.js} +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/processor-provider/index.cjs +1 -1
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +2 -2
- package/dist/processors/index.js +2 -2
- package/dist/{provider-registry-CP_5SNiw.js → provider-registry-BAlFFX5o.js} +22725 -22697
- package/dist/{provider-registry-Bn01gq9y.cjs → provider-registry-ChojUVJa.cjs} +22725 -22697
- package/dist/provider-registry.json +22472 -22444
- package/dist/{registry-generator-CDPyxbzt.js → registry-generator-BbWSH6W4.js} +1 -1
- package/dist/{registry-generator-CNFKGRFQ.cjs → registry-generator-CAUL9Hek.cjs} +1 -1
- package/dist/{rehydrate-DExpzlNS.cjs → rehydrate-0xSq47n9.cjs} +2 -2
- package/dist/{rehydrate-CnGNY2zq.js → rehydrate-CzUnNFU6.js} +2 -2
- package/dist/relevance/index.cjs +2 -2
- package/dist/relevance/index.js +2 -2
- package/dist/{run-registry-CibQoN6K.cjs → run-registry-CrTsH9iL.cjs} +403 -11
- package/dist/{run-registry-BL_kKvFE.js → run-registry-DJT02z_9.js} +380 -12
- package/dist/storage/domains/knowledge/base.d.ts +86 -1
- package/dist/storage/domains/knowledge/importers-inmemory.d.ts +9 -0
- package/dist/storage/domains/knowledge/importers.d.ts +31 -0
- package/dist/storage/domains/knowledge/inmemory.d.ts +7 -0
- package/dist/storage/domains/knowledge/pages-inmemory.d.ts +31 -1
- package/dist/storage/domains/knowledge/pages.d.ts +74 -0
- package/dist/storage/index.cjs +2 -2
- package/dist/storage/index.js +2 -2
- package/dist/storage/types.d.ts +6 -0
- package/dist/stream/index.cjs +2 -2
- package/dist/stream/index.js +2 -2
- package/dist/{stream-1DGoEkG2.js → stream-CG9OooRx.js} +1 -1
- package/dist/{stream-D_7tMaJe.cjs → stream-CMKRczs4.cjs} +1 -1
- package/dist/test-utils/llm-mock.cjs +1 -1
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +1 -1
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/{tool-loop-agent-CLB1r3X3.cjs → tool-loop-agent-14o3Z1qo.cjs} +3 -3
- package/dist/{tool-loop-agent-BXya_RYj.js → tool-loop-agent-Bi6z_q7o.js} +3 -3
- package/dist/{utils-B-KOMA_Q.cjs → utils-DkvbP8EA.cjs} +1 -1
- package/dist/{utils-C55ZdVaj.js → utils-Fag7YDBU.js} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +1 -1
- package/dist/{validate-CmZhnsmX.cjs → validate-Bhrlve2E.cjs} +1 -1
- package/dist/{validate-BDfYr72F.js → validate-DLER0nlQ.js} +1 -1
- package/dist/vector/index.cjs +1 -1
- package/dist/vector/index.js +1 -1
- package/dist/worker/index.cjs +1 -1
- package/dist/worker/index.js +1 -1
- package/dist/{worker-D2B-x7Le.cjs → worker-0gczpztM.cjs} +2 -2
- package/dist/{worker-BoybIUTI.cjs → worker-BwJyrFQN.cjs} +2 -2
- package/dist/{worker-BG1rw_dg.js → worker-D-em3hyS.js} +2 -2
- package/dist/{worker-CuK2RaC0.js → worker-leYV1Y91.js} +2 -2
- package/dist/{workflow-CTKqeRXU.cjs → workflow-DWdcEcxw.cjs} +3 -3
- package/dist/{workflow-Bt09PcH1.js → workflow-FikHVwog.js} +3 -3
- package/dist/workflows/builder/index.cjs +1 -1
- package/dist/workflows/builder/index.js +1 -1
- package/dist/workflows/evented/index.cjs +1 -1
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +4 -4
- package/dist/workflows/index.js +4 -4
- package/package.json +8 -8
- package/src/llm/model/provider-types.generated.d.ts +7619 -7605
|
@@ -361,7 +361,7 @@ Rename the active stored thread.
|
|
|
361
361
|
await session.thread.rename({ title: 'Fix login failure' })
|
|
362
362
|
```
|
|
363
363
|
|
|
364
|
-
### `session.thread.clone({ sourceThreadId?, title?, resourceId?, requestContext? })`
|
|
364
|
+
### `session.thread.clone({ sourceThreadId?, title?, resourceId?, metadata?, options?, requestContext? })`
|
|
365
365
|
|
|
366
366
|
Clone an owned thread and its messages, then bind the session to the clone. Pass `requestContext` when memory is a function that reads the signed-in user.
|
|
367
367
|
|
|
@@ -372,6 +372,34 @@ const clone = await session.thread.clone({
|
|
|
372
372
|
})
|
|
373
373
|
```
|
|
374
374
|
|
|
375
|
+
Pass `metadata` to set the clone's metadata. Pass `options` to choose which messages to copy: it takes the same `messageFilter`, `messageLimit` and `contextWindowOnly` as `memory.cloneThread()`. The clone keeps the source thread's observational and working memory. Without `options`, the clone copies every message. Pass `options: { contextWindowOnly: true }` to copy only the messages after `lastObservedAt`, the ones still in the context window. A filter that keeps no messages clones the memory without the conversation.
|
|
376
|
+
|
|
377
|
+
```typescript
|
|
378
|
+
const clone = await session.thread.clone({
|
|
379
|
+
sourceThreadId: 'thread-7',
|
|
380
|
+
metadata: { clonedFrom: 'thread-7' },
|
|
381
|
+
options: { messageFilter: { startDate: new Date() } },
|
|
382
|
+
})
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
Returns: `Promise<AgentControllerThread>`
|
|
386
|
+
|
|
387
|
+
### `session.thread.cloneToCurrentResource({ threadId, expectedResourceId, expectedProjectPath, metadata?, options?, requestContext? })`
|
|
388
|
+
|
|
389
|
+
Clone a thread from another resource into the session's resource, then bind the session to the clone. The clone keeps the source thread's title. The call throws `Thread not found` when the source thread is missing, doesn't belong to `expectedResourceId`, has a `projectPath` metadata value other than `expectedProjectPath`, or already belongs to the session's resource.
|
|
390
|
+
|
|
391
|
+
Pass `metadata` to use it for the clone in place of the source thread's metadata. Pass `options` to choose which messages to copy, with the same `messageFilter`, `messageLimit` and `contextWindowOnly` as `session.thread.clone()`.
|
|
392
|
+
|
|
393
|
+
```typescript
|
|
394
|
+
const clone = await session.thread.cloneToCurrentResource({
|
|
395
|
+
threadId: 'thread-7',
|
|
396
|
+
expectedResourceId: 'old-resource',
|
|
397
|
+
expectedProjectPath: '/projects/app',
|
|
398
|
+
metadata: { projectPath: '/projects/app-copy' },
|
|
399
|
+
options: { contextWindowOnly: true },
|
|
400
|
+
})
|
|
401
|
+
```
|
|
402
|
+
|
|
375
403
|
Returns: `Promise<AgentControllerThread>`
|
|
376
404
|
|
|
377
405
|
### `session.thread.switch({ threadId, emitEvent?, requestContext? })`
|
package/dist/evals/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_run_registry = require("../run-registry-
|
|
2
|
+
const require_run_registry = require("../run-registry-CrTsH9iL.cjs");
|
|
3
3
|
const require_constants = require("../constants-Bou0hEgY.cjs");
|
|
4
4
|
const require_collect_tool_mocks = require("../collect-tool-mocks-k9fM6oDl.cjs");
|
|
5
5
|
exports.MastraScorer = require_run_registry.MastraScorer;
|
package/dist/evals/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as MastraScorer, D as isNotScorable, E as filterRun, Hc as SCORING_PREDICATE_ROOTS, O as notScorable, S as createClassifierScorer, T as createScorer, Uc as evaluateScoringPredicate, Wc as validateScoringPredicate, v as runEvals, w as ScorerRunError } from "../run-registry-DJT02z_9.js";
|
|
2
2
|
import { Ar as scoringEntityTypeSchema, Cr as extractTrajectory, Dr as saveScorePayloadSchema, Er as listScoresResponseSchema, Fr as scoringInputWithExtractStepResultAndScoreAndReasonSchema, Ir as scoringInputWithExtractStepResultSchema, Lr as scoringPromptsSchema, Mr as scoringHookInputSchema, Nr as scoringInputSchema, Or as scoreResultSchema, Pr as scoringInputWithExtractStepResultAndAnalyzeStepResultSchema, Rr as scoringSourceSchema, Tr as extractWorkflowTrajectory, jr as scoringExtractStepResultSchema, kr as scoreRowDataSchema, wr as extractTrajectoryFromTrace, zr as scoringValueSchema } from "../constants-CFWgIaqA.js";
|
|
3
3
|
import { t as collectToolMocks } from "../collect-tool-mocks-3s2BN8o7.js";
|
|
4
4
|
export { MastraScorer, SCORING_PREDICATE_ROOTS, ScorerRunError, collectToolMocks, createClassifierScorer, createScorer, evaluateScoringPredicate, extractTrajectory, extractTrajectoryFromTrace, extractWorkflowTrajectory, filterRun, isNotScorable, listScoresResponseSchema, notScorable, runEvals, saveScorePayloadSchema, scoreResultSchema, scoreRowDataSchema, scoringEntityTypeSchema, scoringExtractStepResultSchema, scoringHookInputSchema, scoringInputSchema, scoringInputWithExtractStepResultAndAnalyzeStepResultSchema, scoringInputWithExtractStepResultAndScoreAndReasonSchema, scoringInputWithExtractStepResultSchema, scoringPromptsSchema, scoringSourceSchema, scoringValueSchema, validateScoringPredicate };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_error = require("../../error-D90lJ6M7.cjs");
|
|
3
3
|
const require_utils = require("../../utils-D-eNsgDM.cjs");
|
|
4
|
-
const require_run_registry = require("../../run-registry-
|
|
4
|
+
const require_run_registry = require("../../run-registry-CrTsH9iL.cjs");
|
|
5
5
|
const require_constants = require("../../constants-Bou0hEgY.cjs");
|
|
6
6
|
let zod_v4 = require("zod/v4");
|
|
7
7
|
// src/evals/scoreTraces/scoreTraces.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as MastraError, n as ErrorDomain, t as ErrorCategory } from "../../error-oh2DLsP2.js";
|
|
2
2
|
import { i as getEntityTypeForSpan } from "../../utils-DU_pU5SK.js";
|
|
3
|
-
import {
|
|
3
|
+
import { Qs as createWorkflow, Zs as createStep } from "../../run-registry-DJT02z_9.js";
|
|
4
4
|
import { Dr as saveScorePayloadSchema } from "../../constants-CFWgIaqA.js";
|
|
5
5
|
import { z } from "zod/v4";
|
|
6
6
|
// src/evals/scoreTraces/scoreTraces.ts
|
package/dist/harness/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_state_processor = require("../state-processor-kRNZ38Nf.cjs");
|
|
3
3
|
const require_tools = require("../tools-BEYxowf0.cjs");
|
|
4
|
-
const require_agent_controller = require("../agent-controller-
|
|
4
|
+
const require_agent_controller = require("../agent-controller-DKI-d-np.cjs");
|
|
5
5
|
// src/harness/index.ts
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated Backwards-compatibility entrypoint.
|
package/dist/harness/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as taskCheckTool, h as taskWriteTool, m as taskUpdateTool, o as assignTaskIds, p as taskCompleteTool } from "../state-processor-B9kxpM53.js";
|
|
2
2
|
import { s as askUserTool, t as submitPlanTool } from "../tools-tPy2FwMI.js";
|
|
3
|
-
import { a as Session, c as defaultDisplayState, l as defaultOMProgressState, n as parseSubagentMeta, t as AgentController } from "../agent-controller
|
|
3
|
+
import { a as Session, c as defaultDisplayState, l as defaultOMProgressState, n as parseSubagentMeta, t as AgentController } from "../agent-controller-BrRzZy4-.js";
|
|
4
4
|
// src/harness/index.ts
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated Backwards-compatibility entrypoint.
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Mastra } from "./mastra-
|
|
1
|
+
export { t as Mastra } from "./mastra-BPaPxG5t.js";
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { KnowledgeStorage } from '../../storage/domains/knowledge/base.js';
|
|
2
|
+
import type { KnowledgeImporterBindingRecord, KnowledgeImporterNodeRecord, KnowledgeImportersStorage } from '../../storage/domains/knowledge/importers.js';
|
|
3
|
+
import type { KnowledgeNote, KnowledgePage, KnowledgePageWrite } from '../../storage/domains/knowledge/pages.js';
|
|
4
|
+
/**
|
|
5
|
+
* The working copy a batched importer flush decides over (batched-flush plan v3.1 §1). The sink's
|
|
6
|
+
* rule code runs unchanged against {@link ImportOverlay.storage} and {@link ImportOverlay.importers}:
|
|
7
|
+
* reads come from rows gathered in a few set-based queries and locked, writes are applied to the
|
|
8
|
+
* working copy and kept, in call order, for one batched write after every op is decided.
|
|
9
|
+
*
|
|
10
|
+
* A read of something not gathered throws {@link KnowledgeImportNotGatheredError} and names it, so
|
|
11
|
+
* the caller gathers it and decides again. A call the working copy can't model throws
|
|
12
|
+
* {@link KnowledgeImportBatchUnsupportedError}, and the flush takes the per-op path instead.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
/** The overlay was asked for a row it wasn't given. The caller gathers it and decides again. */
|
|
17
|
+
export declare class KnowledgeImportNotGatheredError extends Error {
|
|
18
|
+
constructor(what: string);
|
|
19
|
+
}
|
|
20
|
+
/** The flush needs a call the overlay doesn't model: it falls back to the per-op path. */
|
|
21
|
+
export declare class KnowledgeImportBatchUnsupportedError extends Error {
|
|
22
|
+
readonly call: string;
|
|
23
|
+
constructor(call: string);
|
|
24
|
+
}
|
|
25
|
+
/** What a decide pass asked for and wasn't given. */
|
|
26
|
+
export interface ImportOverlayMissing {
|
|
27
|
+
pages: Set<string>;
|
|
28
|
+
nodes: Set<string>;
|
|
29
|
+
nodesByPage: Set<string>;
|
|
30
|
+
paths: Map<string, {
|
|
31
|
+
scopeId: string;
|
|
32
|
+
path: string[];
|
|
33
|
+
}>;
|
|
34
|
+
notes: Set<string>;
|
|
35
|
+
positions: Set<string>;
|
|
36
|
+
locks: Set<string>;
|
|
37
|
+
/** Pages whose live children were asked for. */
|
|
38
|
+
subtrees: Set<string>;
|
|
39
|
+
/** Node keys (binding, target source ID) whose linking nodes were asked for. */
|
|
40
|
+
linkTargets: Set<string>;
|
|
41
|
+
/** Holds `bindings` once the binding list was asked for. */
|
|
42
|
+
bindings: Set<string>;
|
|
43
|
+
}
|
|
44
|
+
export declare const emptyImportOverlayMissing: () => ImportOverlayMissing;
|
|
45
|
+
/** Gathered rows. `null` means read and absent; a key not present was never read. */
|
|
46
|
+
export interface ImportOverlayRows {
|
|
47
|
+
pages: Map<string, KnowledgePage | null>;
|
|
48
|
+
nodes: Map<string, KnowledgeImporterNodeRecord | null>;
|
|
49
|
+
/** Page id to node key, or null: read and no node maps the page. */
|
|
50
|
+
nodesByPage: Map<string, string | null>;
|
|
51
|
+
paths: Map<string, string | null>;
|
|
52
|
+
notes: Map<string, KnowledgeNote[]>;
|
|
53
|
+
positions: Map<string, string | null>;
|
|
54
|
+
locked: Set<string>;
|
|
55
|
+
/** Pages whose live ordinary children are all among `pages`. */
|
|
56
|
+
complete: Set<string>;
|
|
57
|
+
/** Pages with more live descendants than a move may carry. */
|
|
58
|
+
tooLarge: Set<string>;
|
|
59
|
+
/** Node keys (binding, target source ID) whose linking nodes are all among `nodes`. */
|
|
60
|
+
linkTargets: Set<string>;
|
|
61
|
+
/** Node keys with more linking nodes than a gather reads. */
|
|
62
|
+
tooManyLinkers: Set<string>;
|
|
63
|
+
/** The binding list, once read. */
|
|
64
|
+
bindings?: KnowledgeImporterBindingRecord[];
|
|
65
|
+
}
|
|
66
|
+
export declare const emptyImportOverlayRows: () => ImportOverlayRows;
|
|
67
|
+
/** Store work run after the batched write, in call order, on the real transaction. */
|
|
68
|
+
export type ImportDeferredWork = (storage: KnowledgeStorage, importers: KnowledgeImportersStorage) => Promise<void>;
|
|
69
|
+
/** A link-index call the sink would make now: a page's body links, or the links to a page. */
|
|
70
|
+
export type ImportLinkWork = {
|
|
71
|
+
sync: KnowledgePage;
|
|
72
|
+
} | {
|
|
73
|
+
refresh: KnowledgePage;
|
|
74
|
+
withDescendants: boolean;
|
|
75
|
+
};
|
|
76
|
+
export declare class ImportOverlay {
|
|
77
|
+
#private;
|
|
78
|
+
readonly missing: ImportOverlayMissing;
|
|
79
|
+
readonly storage: KnowledgeStorage;
|
|
80
|
+
readonly importers: KnowledgeImportersStorage;
|
|
81
|
+
constructor(base: ImportOverlayRows, now?: () => Date);
|
|
82
|
+
get writes(): KnowledgePageWrite[];
|
|
83
|
+
get marks(): ImportDeferredWork[];
|
|
84
|
+
get links(): ImportLinkWork[];
|
|
85
|
+
/** Link-index work the sink would run now; it runs, in one batch, after the batched write instead. */
|
|
86
|
+
deferLinks(...work: ImportLinkWork[]): void;
|
|
87
|
+
/** The node writes decided: each touched node's last record, or a delete when it ends up gone. */
|
|
88
|
+
nodeWrites(base: ImportOverlayRows): {
|
|
89
|
+
deletes: {
|
|
90
|
+
bindingId: string;
|
|
91
|
+
sourceId: string;
|
|
92
|
+
}[];
|
|
93
|
+
saves: Omit<KnowledgeImporterNodeRecord, 'updatedAt'>[];
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
/** What a gather reads beyond the nodes and pages it is seeded with. */
|
|
97
|
+
export interface ImportGatherPlan {
|
|
98
|
+
paths: {
|
|
99
|
+
scopeId: string;
|
|
100
|
+
path: string[];
|
|
101
|
+
}[];
|
|
102
|
+
/** Pages a new child may be created under. */
|
|
103
|
+
positions: string[];
|
|
104
|
+
/** Pages whose kept-body notes may be read. */
|
|
105
|
+
notes: string[];
|
|
106
|
+
/** Pages that may move or be removed: their subtrees are read. */
|
|
107
|
+
subtrees: string[];
|
|
108
|
+
/** This binding's source IDs whose linking nodes may be listed. */
|
|
109
|
+
linkTargets: string[];
|
|
110
|
+
/** The binding list may be read. */
|
|
111
|
+
bindings: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface ImportGatherInput {
|
|
114
|
+
storage: KnowledgeStorage;
|
|
115
|
+
importers: KnowledgeImportersStorage;
|
|
116
|
+
bindingId: string;
|
|
117
|
+
/** This binding's items to read nodes for. */
|
|
118
|
+
sourceIds: Iterable<string>;
|
|
119
|
+
/** Pages to read with their ancestors. */
|
|
120
|
+
pageIds: Iterable<string>;
|
|
121
|
+
/** Called once nodes and page chains are read: the paths, parents and notes the ops will need. */
|
|
122
|
+
plan: (rows: ImportOverlayRows) => ImportGatherPlan;
|
|
123
|
+
/** Asked for and not given in an earlier decide pass. */
|
|
124
|
+
missing?: ImportOverlayMissing;
|
|
125
|
+
}
|
|
126
|
+
/** True when the stores implement every set-based method the batched flush needs. */
|
|
127
|
+
export declare function canBatchImportFlush(storage: KnowledgeStorage, importers: KnowledgeImportersStorage): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Reads every row a decide pass needs in a few set-based queries, locks the live pages among them
|
|
130
|
+
* in one sorted call, and reads again under the lock: what the second read returns can't change
|
|
131
|
+
* until commit (a new page at an empty path is refused by the unique key when written). Pages the
|
|
132
|
+
* second read finds that the first didn't are locked too, and read again, up to `rounds` times.
|
|
133
|
+
*/
|
|
134
|
+
export declare function gatherImportRows(input: ImportGatherInput & {
|
|
135
|
+
locked?: Set<string>;
|
|
136
|
+
rounds?: number;
|
|
137
|
+
}): Promise<ImportOverlayRows | null>;
|
|
138
|
+
//# sourceMappingURL=overlay.d.ts.map
|
|
@@ -40,6 +40,12 @@ export interface KnowledgeImportSinkResult {
|
|
|
40
40
|
applied: boolean;
|
|
41
41
|
/** Present when the flush ran a settle slice. */
|
|
42
42
|
settle?: KnowledgeImportSettleResult;
|
|
43
|
+
/**
|
|
44
|
+
* Why a store that supports batched flushes applied this one op by one instead: a call the
|
|
45
|
+
* working copy doesn't model, lock churn, or a batched write refused. Absent when it batched, or
|
|
46
|
+
* when the store can't.
|
|
47
|
+
*/
|
|
48
|
+
fallback?: string;
|
|
43
49
|
}
|
|
44
50
|
/** Bounds for one settle slice (O3 §C, §C′): a slice never drains everything. */
|
|
45
51
|
export interface KnowledgeImportSettleBudget {
|
|
@@ -78,6 +78,11 @@ export interface KnowledgeImporterFlushReceipt extends Omit<KnowledgeImportCount
|
|
|
78
78
|
* allows; each does one bounded slice. Stored with the receipt, so a replay returns the same value.
|
|
79
79
|
*/
|
|
80
80
|
pending?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Why the host saved this flush op by op instead of in one batch, when it did. Diagnostics only:
|
|
83
|
+
* the end state is the same either way. The run's counts add `fallbacks: 1` for each such flush.
|
|
84
|
+
*/
|
|
85
|
+
fallback?: string;
|
|
81
86
|
}
|
|
82
87
|
/** One numbered batch from the runner. All or nothing. */
|
|
83
88
|
export interface KnowledgeImporterFlush {
|