@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
|
@@ -19,35 +19,58 @@
|
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
21
|
import type { ProviderStatus } from '../lifecycle.js';
|
|
22
|
-
import type { WorkspaceFilesystem, FileContent, FileEntry, FileStat, ReadOptions, WriteOptions, ListOptions, CopyOptions, RemoveOptions } from './filesystem.js';
|
|
22
|
+
import type { WorkspaceFilesystem, FileContent, FileEntry, FileStat, FilesystemInfo, ReadOptions, WriteOptions, ListOptions, CopyOptions, RemoveOptions } from './filesystem.js';
|
|
23
23
|
/**
|
|
24
24
|
* Configuration for CompositeFilesystem.
|
|
25
25
|
*/
|
|
26
|
-
export interface CompositeFilesystemConfig {
|
|
26
|
+
export interface CompositeFilesystemConfig<TMounts extends Record<string, WorkspaceFilesystem> = Record<string, WorkspaceFilesystem>> {
|
|
27
27
|
/** Map of mount paths to filesystem instances */
|
|
28
|
-
mounts:
|
|
28
|
+
mounts: TMounts;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* CompositeFilesystem implementation.
|
|
32
32
|
*
|
|
33
33
|
* Routes file operations to the appropriate underlying filesystem based on path.
|
|
34
34
|
* Supports cross-mount operations (copy/move between different filesystems).
|
|
35
|
+
*
|
|
36
|
+
* The generic parameter preserves the concrete types of mounted filesystems,
|
|
37
|
+
* enabling typed access via `mounts.get()`.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* const cfs = new CompositeFilesystem({
|
|
42
|
+
* mounts: {
|
|
43
|
+
* '/local': new LocalFilesystem({ basePath: './data' }),
|
|
44
|
+
* '/s3': new S3Filesystem({ bucket: 'my-bucket' }),
|
|
45
|
+
* },
|
|
46
|
+
* });
|
|
47
|
+
*
|
|
48
|
+
* cfs.mounts.get('/local') // LocalFilesystem
|
|
49
|
+
* cfs.mounts.get('/s3') // S3Filesystem
|
|
50
|
+
* ```
|
|
35
51
|
*/
|
|
36
|
-
export declare class CompositeFilesystem implements WorkspaceFilesystem {
|
|
52
|
+
export declare class CompositeFilesystem<TMounts extends Record<string, WorkspaceFilesystem> = Record<string, WorkspaceFilesystem>> implements WorkspaceFilesystem {
|
|
37
53
|
readonly id: string;
|
|
38
54
|
readonly name = "CompositeFilesystem";
|
|
39
55
|
readonly provider = "composite";
|
|
56
|
+
readonly readOnly?: boolean;
|
|
40
57
|
status: ProviderStatus;
|
|
41
58
|
private readonly _mounts;
|
|
42
|
-
constructor(config: CompositeFilesystemConfig);
|
|
59
|
+
constructor(config: CompositeFilesystemConfig<TMounts>);
|
|
43
60
|
/**
|
|
44
61
|
* Get all mount paths.
|
|
45
62
|
*/
|
|
46
63
|
get mountPaths(): string[];
|
|
47
64
|
/**
|
|
48
65
|
* Get the mounts map.
|
|
66
|
+
* Returns a typed map where `get()` preserves the concrete filesystem type per mount path.
|
|
49
67
|
*/
|
|
50
|
-
get mounts():
|
|
68
|
+
get mounts(): ReadonlyMountMap<TMounts>;
|
|
69
|
+
/**
|
|
70
|
+
* Get status and metadata for this composite filesystem.
|
|
71
|
+
* Includes info from each mounted filesystem in `metadata.mounts`.
|
|
72
|
+
*/
|
|
73
|
+
getInfo(): Promise<FilesystemInfo>;
|
|
51
74
|
/**
|
|
52
75
|
* Get the underlying filesystem for a given path.
|
|
53
76
|
* Returns undefined if the path doesn't resolve to any mount.
|
|
@@ -90,4 +113,50 @@ export declare class CompositeFilesystem implements WorkspaceFilesystem {
|
|
|
90
113
|
*/
|
|
91
114
|
getInstructions(): string;
|
|
92
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Distributive mapped type that produces a union of correlated `[key, value]` tuples.
|
|
118
|
+
*
|
|
119
|
+
* For `{ '/local': LocalFilesystem, '/s3': S3Filesystem }` this yields:
|
|
120
|
+
* `['/local', LocalFilesystem] | ['/s3', S3Filesystem]`
|
|
121
|
+
*
|
|
122
|
+
* This enables discriminated-union narrowing when iterating entries without destructuring:
|
|
123
|
+
* ```typescript
|
|
124
|
+
* for (const entry of mounts.entries()) {
|
|
125
|
+
* if (entry[0] === '/local') {
|
|
126
|
+
* entry[1] // LocalFilesystem
|
|
127
|
+
* }
|
|
128
|
+
* }
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
export type MountMapEntry<TMounts extends Record<string, WorkspaceFilesystem>> = {
|
|
132
|
+
[K in string & keyof TMounts]: [K, TMounts[K]];
|
|
133
|
+
}[string & keyof TMounts];
|
|
134
|
+
/**
|
|
135
|
+
* A read-only view of mounted filesystems with typed per-key access.
|
|
136
|
+
*
|
|
137
|
+
* Unlike `ReadonlyMap<string, WorkspaceFilesystem>`, this preserves the
|
|
138
|
+
* concrete filesystem type for each mount path via an overloaded `get()`.
|
|
139
|
+
*
|
|
140
|
+
* Iteration methods return correlated `[key, value]` tuples ({@link MountMapEntry})
|
|
141
|
+
* so that checking `entry[0]` narrows `entry[1]` to the concrete filesystem type.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```typescript
|
|
145
|
+
* const mounts = cfs.mounts;
|
|
146
|
+
* mounts.get('/local') // LocalFilesystem
|
|
147
|
+
* mounts.get('/s3') // S3Filesystem
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
export interface ReadonlyMountMap<TMounts extends Record<string, WorkspaceFilesystem>> {
|
|
151
|
+
/** Get a mounted filesystem by path. Returns the concrete type for known mount paths. */
|
|
152
|
+
get<K extends string & keyof TMounts>(key: K): TMounts[K];
|
|
153
|
+
get(key: string): WorkspaceFilesystem | undefined;
|
|
154
|
+
has(key: string): boolean;
|
|
155
|
+
readonly size: number;
|
|
156
|
+
keys(): IterableIterator<string & keyof TMounts>;
|
|
157
|
+
values(): IterableIterator<TMounts[keyof TMounts & string]>;
|
|
158
|
+
entries(): IterableIterator<MountMapEntry<TMounts>>;
|
|
159
|
+
forEach(callbackfn: (value: TMounts[keyof TMounts & string], key: string & keyof TMounts, map: ReadonlyMountMap<TMounts>) => void): void;
|
|
160
|
+
[Symbol.iterator](): IterableIterator<MountMapEntry<TMounts>>;
|
|
161
|
+
}
|
|
93
162
|
//# sourceMappingURL=composite-filesystem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composite-filesystem.d.ts","sourceRoot":"","sources":["../../../src/workspace/filesystem/composite-filesystem.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"composite-filesystem.d.ts","sourceRoot":"","sources":["../../../src/workspace/filesystem/composite-filesystem.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,c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EACtC,GAAG,EAAE,MAAM,GAAG,MAAM,OAAO,EAC3B,GAAG,EAAE,gBAAgB,CAAC,OAAO,CAAC,KAC3B,IAAI,GACR,IAAI,CAAC;IACR,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;CAC/D"}
|
|
@@ -40,6 +40,23 @@ export interface LocalFilesystemOptions extends MastraFilesystemOptions {
|
|
|
40
40
|
* @default false
|
|
41
41
|
*/
|
|
42
42
|
readOnly?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Additional paths (absolute) that are allowed beyond basePath.
|
|
45
|
+
* Useful with `contained: true` to grant access to specific directories
|
|
46
|
+
* outside the basePath without disabling containment entirely.
|
|
47
|
+
*
|
|
48
|
+
* Paths are resolved to absolute paths using `path.resolve()`.
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* new LocalFilesystem({
|
|
53
|
+
* basePath: '/project',
|
|
54
|
+
* contained: true,
|
|
55
|
+
* allowedPaths: ['/home/user/.config'],
|
|
56
|
+
* })
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
allowedPaths?: string[];
|
|
43
60
|
}
|
|
44
61
|
/**
|
|
45
62
|
* Local filesystem implementation.
|
|
@@ -67,13 +84,37 @@ export declare class LocalFilesystem extends MastraFilesystem {
|
|
|
67
84
|
status: ProviderStatus;
|
|
68
85
|
private readonly _basePath;
|
|
69
86
|
private readonly _contained;
|
|
87
|
+
private _allowedPaths;
|
|
70
88
|
/**
|
|
71
89
|
* The absolute base path on disk where files are stored.
|
|
72
90
|
* Useful for understanding how workspace paths map to disk paths.
|
|
73
91
|
*/
|
|
74
92
|
get basePath(): string;
|
|
93
|
+
/**
|
|
94
|
+
* Current set of additional allowed paths (absolute, resolved).
|
|
95
|
+
* These paths are permitted beyond basePath when containment is enabled.
|
|
96
|
+
*/
|
|
97
|
+
get allowedPaths(): readonly string[];
|
|
98
|
+
/**
|
|
99
|
+
* Update allowed paths. Accepts a direct array or an updater callback
|
|
100
|
+
* receiving the current paths (React setState pattern).
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```typescript
|
|
104
|
+
* // Set directly
|
|
105
|
+
* fs.setAllowedPaths(['/home/user/.config']);
|
|
106
|
+
*
|
|
107
|
+
* // Update with callback
|
|
108
|
+
* fs.setAllowedPaths(prev => [...prev, '/home/user/.ssh']);
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
setAllowedPaths(pathsOrUpdater: string[] | ((current: readonly string[]) => string[])): void;
|
|
75
112
|
constructor(options: LocalFilesystemOptions);
|
|
76
113
|
private generateId;
|
|
114
|
+
/**
|
|
115
|
+
* Check if an absolute path falls within basePath or any allowed path.
|
|
116
|
+
*/
|
|
117
|
+
private _isWithinAnyRoot;
|
|
77
118
|
private toBuffer;
|
|
78
119
|
private resolvePath;
|
|
79
120
|
private toRelativePath;
|
|
@@ -111,6 +152,7 @@ export declare class LocalFilesystem extends MastraFilesystem {
|
|
|
111
152
|
getInfo(): FilesystemInfo<{
|
|
112
153
|
basePath: string;
|
|
113
154
|
contained: boolean;
|
|
155
|
+
allowedPaths?: string[];
|
|
114
156
|
}>;
|
|
115
157
|
getInstructions(): string;
|
|
116
158
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-filesystem.d.ts","sourceRoot":"","sources":["../../../src/workspace/filesystem/local-filesystem.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,aAAa,EACb,WAAW,EACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,qDAAqD;IACrD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;OAgBG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"local-filesystem.d.ts","sourceRoot":"","sources":["../../../src/workspace/filesystem/local-filesystem.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,QAAQ,EACR,SAAS,EACT,WAAW,EACX,YAAY,EACZ,WAAW,EACX,aAAa,EACb,WAAW,EACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,uBAAuB;IACrE,qDAAqD;IACrD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;;;;;;OAgBG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,eAAgB,SAAQ,gBAAgB;IACnD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,qBAAqB;IAClC,QAAQ,CAAC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,CAAC,IAAI,CAAC;YAsCjE,aAAa;IA+BrB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAwCzE,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAyB1E,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAoChE,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IA4FvE,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAO3C,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAWhD;;;OAGG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAM3B;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI9B,OAAO,IAAI,cAAc,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IAgB5F,eAAe,IAAI,MAAM;CAU1B"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Glob Pattern Utilities
|
|
3
|
+
*
|
|
4
|
+
* Shared glob pattern matching for workspace operations.
|
|
5
|
+
* Uses picomatch for battle-tested glob support including
|
|
6
|
+
* brace expansion, character classes, negation, and `**`.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Check if a string contains glob metacharacters.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* isGlobPattern('/docs') // false
|
|
13
|
+
* isGlobPattern('/docs/**\/*.md') // true
|
|
14
|
+
* isGlobPattern('*.ts') // true
|
|
15
|
+
* isGlobPattern('/src/{a,b}') // true
|
|
16
|
+
*/
|
|
17
|
+
export declare function isGlobPattern(input: string): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Extract the static directory prefix before the first glob metacharacter.
|
|
20
|
+
* Returns the deepest non-glob ancestor directory.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* extractGlobBase('/docs/**\/*.md') // '/docs'
|
|
24
|
+
* extractGlobBase('**\/*.md') // '/'
|
|
25
|
+
* extractGlobBase('/src/*.ts') // '/src'
|
|
26
|
+
* extractGlobBase('/exact/path') // '/exact/path'
|
|
27
|
+
*/
|
|
28
|
+
export declare function extractGlobBase(pattern: string): string;
|
|
29
|
+
/** A compiled matcher function: returns true if a path matches */
|
|
30
|
+
export type GlobMatcher = (path: string) => boolean;
|
|
31
|
+
export interface GlobMatcherOptions {
|
|
32
|
+
/** Match dotfiles (default: false) */
|
|
33
|
+
dot?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Compile glob pattern(s) into a reusable matcher function.
|
|
37
|
+
* The matcher tests paths using workspace-style forward slashes.
|
|
38
|
+
*
|
|
39
|
+
* Automatically normalizes leading './' and '/' from both patterns
|
|
40
|
+
* and test paths, since picomatch does not match these prefixes.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* const match = createGlobMatcher('**\/*.ts');
|
|
44
|
+
* match('src/index.ts') // true
|
|
45
|
+
* match('src/style.css') // false
|
|
46
|
+
*
|
|
47
|
+
* const multi = createGlobMatcher(['**\/*.ts', '**\/*.tsx']);
|
|
48
|
+
* multi('App.tsx') // true
|
|
49
|
+
*/
|
|
50
|
+
export declare function createGlobMatcher(patterns: string | string[], options?: GlobMatcherOptions): GlobMatcher;
|
|
51
|
+
/**
|
|
52
|
+
* One-off convenience: test if a path matches a glob pattern.
|
|
53
|
+
*
|
|
54
|
+
* For repeated matching against the same pattern, prefer createGlobMatcher()
|
|
55
|
+
* to compile once and reuse.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* matchGlob('src/index.ts', '**\/*.ts') // true
|
|
59
|
+
*/
|
|
60
|
+
export declare function matchGlob(path: string, pattern: string | string[], options?: GlobMatcherOptions): boolean;
|
|
61
|
+
//# sourceMappingURL=glob.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/workspace/glob.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAWH;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEpD;AAMD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAqBvD;AAMD,kEAAkE;AAClE,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,sCAAsC;IACtC,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAgBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,WAAW,CAOxG;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAEzG"}
|
package/dist/workspace/index.cjs
CHANGED
|
@@ -1,168 +1,260 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkS4VVZI4E_cjs = require('../chunk-S4VVZI4E.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "CompositeFilesystem", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkS4VVZI4E_cjs.CompositeFilesystem; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "CompositeVersionedSkillSource", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkS4VVZI4E_cjs.CompositeVersionedSkillSource; }
|
|
10
14
|
});
|
|
11
15
|
Object.defineProperty(exports, "DirectoryNotEmptyError", {
|
|
12
16
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkS4VVZI4E_cjs.DirectoryNotEmptyError; }
|
|
14
18
|
});
|
|
15
19
|
Object.defineProperty(exports, "DirectoryNotFoundError", {
|
|
16
20
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkS4VVZI4E_cjs.DirectoryNotFoundError; }
|
|
18
22
|
});
|
|
19
23
|
Object.defineProperty(exports, "FileExistsError", {
|
|
20
24
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkS4VVZI4E_cjs.FileExistsError; }
|
|
22
26
|
});
|
|
23
27
|
Object.defineProperty(exports, "FileNotFoundError", {
|
|
24
28
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkS4VVZI4E_cjs.FileNotFoundError; }
|
|
26
30
|
});
|
|
27
31
|
Object.defineProperty(exports, "FileReadRequiredError", {
|
|
28
32
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkS4VVZI4E_cjs.FileReadRequiredError; }
|
|
30
34
|
});
|
|
31
35
|
Object.defineProperty(exports, "FilesystemError", {
|
|
32
36
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkS4VVZI4E_cjs.FilesystemError; }
|
|
34
38
|
});
|
|
35
39
|
Object.defineProperty(exports, "FilesystemNotAvailableError", {
|
|
36
40
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkS4VVZI4E_cjs.FilesystemNotAvailableError; }
|
|
38
42
|
});
|
|
39
43
|
Object.defineProperty(exports, "FilesystemNotMountableError", {
|
|
40
44
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkS4VVZI4E_cjs.FilesystemNotMountableError; }
|
|
42
46
|
});
|
|
43
47
|
Object.defineProperty(exports, "FilesystemNotReadyError", {
|
|
44
48
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkS4VVZI4E_cjs.FilesystemNotReadyError; }
|
|
46
50
|
});
|
|
47
51
|
Object.defineProperty(exports, "IsDirectoryError", {
|
|
48
52
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkS4VVZI4E_cjs.IsDirectoryError; }
|
|
50
54
|
});
|
|
51
55
|
Object.defineProperty(exports, "IsolationUnavailableError", {
|
|
52
56
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkS4VVZI4E_cjs.IsolationUnavailableError; }
|
|
54
58
|
});
|
|
55
59
|
Object.defineProperty(exports, "LocalFilesystem", {
|
|
56
60
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkS4VVZI4E_cjs.LocalFilesystem; }
|
|
58
62
|
});
|
|
59
63
|
Object.defineProperty(exports, "LocalSandbox", {
|
|
60
64
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkS4VVZI4E_cjs.LocalSandbox; }
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(exports, "LocalSkillSource", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function () { return chunkS4VVZI4E_cjs.LocalSkillSource; }
|
|
62
70
|
});
|
|
63
71
|
Object.defineProperty(exports, "MastraFilesystem", {
|
|
64
72
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkS4VVZI4E_cjs.MastraFilesystem; }
|
|
66
74
|
});
|
|
67
75
|
Object.defineProperty(exports, "MastraSandbox", {
|
|
68
76
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkS4VVZI4E_cjs.MastraSandbox; }
|
|
70
78
|
});
|
|
71
79
|
Object.defineProperty(exports, "MountError", {
|
|
72
80
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkS4VVZI4E_cjs.MountError; }
|
|
74
82
|
});
|
|
75
83
|
Object.defineProperty(exports, "MountManager", {
|
|
76
84
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkS4VVZI4E_cjs.MountManager; }
|
|
78
86
|
});
|
|
79
87
|
Object.defineProperty(exports, "MountNotSupportedError", {
|
|
80
88
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkS4VVZI4E_cjs.MountNotSupportedError; }
|
|
82
90
|
});
|
|
83
91
|
Object.defineProperty(exports, "NotDirectoryError", {
|
|
84
92
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkS4VVZI4E_cjs.NotDirectoryError; }
|
|
86
94
|
});
|
|
87
95
|
Object.defineProperty(exports, "PermissionError", {
|
|
88
96
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkS4VVZI4E_cjs.PermissionError; }
|
|
90
98
|
});
|
|
91
99
|
Object.defineProperty(exports, "SandboxError", {
|
|
92
100
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkS4VVZI4E_cjs.SandboxError; }
|
|
94
102
|
});
|
|
95
103
|
Object.defineProperty(exports, "SandboxExecutionError", {
|
|
96
104
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkS4VVZI4E_cjs.SandboxExecutionError; }
|
|
98
106
|
});
|
|
99
107
|
Object.defineProperty(exports, "SandboxFeatureNotSupportedError", {
|
|
100
108
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkS4VVZI4E_cjs.SandboxFeatureNotSupportedError; }
|
|
102
110
|
});
|
|
103
111
|
Object.defineProperty(exports, "SandboxNotAvailableError", {
|
|
104
112
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunkS4VVZI4E_cjs.SandboxNotAvailableError; }
|
|
106
114
|
});
|
|
107
115
|
Object.defineProperty(exports, "SandboxNotReadyError", {
|
|
108
116
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunkS4VVZI4E_cjs.SandboxNotReadyError; }
|
|
110
118
|
});
|
|
111
119
|
Object.defineProperty(exports, "SandboxTimeoutError", {
|
|
112
120
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunkS4VVZI4E_cjs.SandboxTimeoutError; }
|
|
114
122
|
});
|
|
115
123
|
Object.defineProperty(exports, "SearchNotAvailableError", {
|
|
116
124
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunkS4VVZI4E_cjs.SearchNotAvailableError; }
|
|
126
|
+
});
|
|
127
|
+
Object.defineProperty(exports, "VersionedSkillSource", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function () { return chunkS4VVZI4E_cjs.VersionedSkillSource; }
|
|
118
130
|
});
|
|
119
131
|
Object.defineProperty(exports, "WORKSPACE_TOOLS", {
|
|
120
132
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunkS4VVZI4E_cjs.WORKSPACE_TOOLS; }
|
|
122
134
|
});
|
|
123
135
|
Object.defineProperty(exports, "WORKSPACE_TOOLS_PREFIX", {
|
|
124
136
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunkS4VVZI4E_cjs.WORKSPACE_TOOLS_PREFIX; }
|
|
126
138
|
});
|
|
127
139
|
Object.defineProperty(exports, "Workspace", {
|
|
128
140
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunkS4VVZI4E_cjs.Workspace; }
|
|
130
142
|
});
|
|
131
143
|
Object.defineProperty(exports, "WorkspaceError", {
|
|
132
144
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunkS4VVZI4E_cjs.WorkspaceError; }
|
|
146
|
+
});
|
|
147
|
+
Object.defineProperty(exports, "WorkspaceNotAvailableError", {
|
|
148
|
+
enumerable: true,
|
|
149
|
+
get: function () { return chunkS4VVZI4E_cjs.WorkspaceNotAvailableError; }
|
|
134
150
|
});
|
|
135
151
|
Object.defineProperty(exports, "WorkspaceNotReadyError", {
|
|
136
152
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunkS4VVZI4E_cjs.WorkspaceNotReadyError; }
|
|
138
154
|
});
|
|
139
155
|
Object.defineProperty(exports, "WorkspaceReadOnlyError", {
|
|
140
156
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkS4VVZI4E_cjs.WorkspaceReadOnlyError; }
|
|
142
158
|
});
|
|
143
159
|
Object.defineProperty(exports, "callLifecycle", {
|
|
144
160
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunkS4VVZI4E_cjs.callLifecycle; }
|
|
162
|
+
});
|
|
163
|
+
Object.defineProperty(exports, "collectSkillForPublish", {
|
|
164
|
+
enumerable: true,
|
|
165
|
+
get: function () { return chunkS4VVZI4E_cjs.collectSkillForPublish; }
|
|
166
|
+
});
|
|
167
|
+
Object.defineProperty(exports, "createGlobMatcher", {
|
|
168
|
+
enumerable: true,
|
|
169
|
+
get: function () { return chunkS4VVZI4E_cjs.createGlobMatcher; }
|
|
146
170
|
});
|
|
147
171
|
Object.defineProperty(exports, "createWorkspaceTools", {
|
|
148
172
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
173
|
+
get: function () { return chunkS4VVZI4E_cjs.createWorkspaceTools; }
|
|
174
|
+
});
|
|
175
|
+
Object.defineProperty(exports, "deleteFileTool", {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
get: function () { return chunkS4VVZI4E_cjs.deleteFileTool; }
|
|
150
178
|
});
|
|
151
179
|
Object.defineProperty(exports, "detectIsolation", {
|
|
152
180
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
181
|
+
get: function () { return chunkS4VVZI4E_cjs.detectIsolation; }
|
|
182
|
+
});
|
|
183
|
+
Object.defineProperty(exports, "editFileTool", {
|
|
184
|
+
enumerable: true,
|
|
185
|
+
get: function () { return chunkS4VVZI4E_cjs.editFileTool; }
|
|
186
|
+
});
|
|
187
|
+
Object.defineProperty(exports, "executeCommandTool", {
|
|
188
|
+
enumerable: true,
|
|
189
|
+
get: function () { return chunkS4VVZI4E_cjs.executeCommandTool; }
|
|
190
|
+
});
|
|
191
|
+
Object.defineProperty(exports, "extractGlobBase", {
|
|
192
|
+
enumerable: true,
|
|
193
|
+
get: function () { return chunkS4VVZI4E_cjs.extractGlobBase; }
|
|
194
|
+
});
|
|
195
|
+
Object.defineProperty(exports, "fileStatTool", {
|
|
196
|
+
enumerable: true,
|
|
197
|
+
get: function () { return chunkS4VVZI4E_cjs.fileStatTool; }
|
|
154
198
|
});
|
|
155
199
|
Object.defineProperty(exports, "getRecommendedIsolation", {
|
|
156
200
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
201
|
+
get: function () { return chunkS4VVZI4E_cjs.getRecommendedIsolation; }
|
|
202
|
+
});
|
|
203
|
+
Object.defineProperty(exports, "indexContentTool", {
|
|
204
|
+
enumerable: true,
|
|
205
|
+
get: function () { return chunkS4VVZI4E_cjs.indexContentTool; }
|
|
206
|
+
});
|
|
207
|
+
Object.defineProperty(exports, "isGlobPattern", {
|
|
208
|
+
enumerable: true,
|
|
209
|
+
get: function () { return chunkS4VVZI4E_cjs.isGlobPattern; }
|
|
158
210
|
});
|
|
159
211
|
Object.defineProperty(exports, "isIsolationAvailable", {
|
|
160
212
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
213
|
+
get: function () { return chunkS4VVZI4E_cjs.isIsolationAvailable; }
|
|
214
|
+
});
|
|
215
|
+
Object.defineProperty(exports, "listFilesTool", {
|
|
216
|
+
enumerable: true,
|
|
217
|
+
get: function () { return chunkS4VVZI4E_cjs.listFilesTool; }
|
|
218
|
+
});
|
|
219
|
+
Object.defineProperty(exports, "matchGlob", {
|
|
220
|
+
enumerable: true,
|
|
221
|
+
get: function () { return chunkS4VVZI4E_cjs.matchGlob; }
|
|
222
|
+
});
|
|
223
|
+
Object.defineProperty(exports, "mkdirTool", {
|
|
224
|
+
enumerable: true,
|
|
225
|
+
get: function () { return chunkS4VVZI4E_cjs.mkdirTool; }
|
|
226
|
+
});
|
|
227
|
+
Object.defineProperty(exports, "publishSkillFromSource", {
|
|
228
|
+
enumerable: true,
|
|
229
|
+
get: function () { return chunkS4VVZI4E_cjs.publishSkillFromSource; }
|
|
230
|
+
});
|
|
231
|
+
Object.defineProperty(exports, "readFileTool", {
|
|
232
|
+
enumerable: true,
|
|
233
|
+
get: function () { return chunkS4VVZI4E_cjs.readFileTool; }
|
|
234
|
+
});
|
|
235
|
+
Object.defineProperty(exports, "requireFilesystem", {
|
|
236
|
+
enumerable: true,
|
|
237
|
+
get: function () { return chunkS4VVZI4E_cjs.requireFilesystem; }
|
|
238
|
+
});
|
|
239
|
+
Object.defineProperty(exports, "requireSandbox", {
|
|
240
|
+
enumerable: true,
|
|
241
|
+
get: function () { return chunkS4VVZI4E_cjs.requireSandbox; }
|
|
242
|
+
});
|
|
243
|
+
Object.defineProperty(exports, "requireWorkspace", {
|
|
244
|
+
enumerable: true,
|
|
245
|
+
get: function () { return chunkS4VVZI4E_cjs.requireWorkspace; }
|
|
162
246
|
});
|
|
163
247
|
Object.defineProperty(exports, "resolveToolConfig", {
|
|
164
248
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
249
|
+
get: function () { return chunkS4VVZI4E_cjs.resolveToolConfig; }
|
|
250
|
+
});
|
|
251
|
+
Object.defineProperty(exports, "searchTool", {
|
|
252
|
+
enumerable: true,
|
|
253
|
+
get: function () { return chunkS4VVZI4E_cjs.searchTool; }
|
|
254
|
+
});
|
|
255
|
+
Object.defineProperty(exports, "writeFileTool", {
|
|
256
|
+
enumerable: true,
|
|
257
|
+
get: function () { return chunkS4VVZI4E_cjs.writeFileTool; }
|
|
166
258
|
});
|
|
167
259
|
//# sourceMappingURL=index.cjs.map
|
|
168
260
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -6,7 +6,7 @@ export { MastraFilesystem, type FilesystemLifecycleHook, type MastraFilesystemOp
|
|
|
6
6
|
export { MastraSandbox } from './sandbox/index.js';
|
|
7
7
|
export * from './errors.js';
|
|
8
8
|
export { SandboxError, SandboxExecutionError, SandboxTimeoutError, SandboxNotReadyError, IsolationUnavailableError, MountError, MountNotSupportedError, FilesystemNotMountableError, type SandboxOperation, } from './sandbox/index.js';
|
|
9
|
-
export { createWorkspaceTools, resolveToolConfig, type WorkspaceToolConfig, type WorkspaceToolsConfig } from './tools/index.js';
|
|
9
|
+
export { createWorkspaceTools, resolveToolConfig, type WorkspaceToolConfig, type WorkspaceToolsConfig, readFileTool, writeFileTool, editFileTool, listFilesTool, deleteFileTool, fileStatTool, mkdirTool, searchTool, indexContentTool, executeCommandTool, requireWorkspace, requireFilesystem, requireSandbox, } from './tools/index.js';
|
|
10
10
|
export * from './lifecycle.js';
|
|
11
11
|
export type { WorkspaceFilesystem, FileContent, FileStat, FileEntry, FilesystemInfo, ReadOptions, WriteOptions, ListOptions, RemoveOptions, CopyOptions, } from './filesystem/index.js';
|
|
12
12
|
export type { FilesystemMountConfig, MountResult, FilesystemIcon } from './filesystem/index.js';
|
|
@@ -16,5 +16,12 @@ export type { MountManagerConfig, MountFn, OnMountHook, OnMountArgs, OnMountResu
|
|
|
16
16
|
export type { IsolationBackend, NativeSandboxConfig, SandboxDetectionResult } from './sandbox/index.js';
|
|
17
17
|
export { detectIsolation, isIsolationAvailable, getRecommendedIsolation } from './sandbox/index.js';
|
|
18
18
|
export { WORKSPACE_TOOLS_PREFIX, WORKSPACE_TOOLS, type WorkspaceToolName } from './constants/index.js';
|
|
19
|
+
export { isGlobPattern, extractGlobBase, createGlobMatcher, matchGlob, type GlobMatcher, type GlobMatcherOptions, } from './glob.js';
|
|
19
20
|
export type { SkillFormat, SkillMetadata, Skill, SkillSearchResult, SkillSearchOptions, WorkspaceSkills, SkillsResolver, SkillsContext, } from './skills/index.js';
|
|
21
|
+
export type { SkillPublishResult } from './skills/index.js';
|
|
22
|
+
export { collectSkillForPublish, publishSkillFromSource } from './skills/index.js';
|
|
23
|
+
export type { SkillSource, SkillSourceEntry, SkillSourceStat } from './skills/index.js';
|
|
24
|
+
export { LocalSkillSource } from './skills/index.js';
|
|
25
|
+
export { VersionedSkillSource } from './skills/index.js';
|
|
26
|
+
export { CompositeVersionedSkillSource, type VersionedSkillEntry } from './skills/index.js';
|
|
20
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workspace/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGnE,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C,cAAc,UAAU,CAAC;AACzB,OAAO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AAC"}
|
package/dist/workspace/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CompositeFilesystem, DirectoryNotEmptyError, DirectoryNotFoundError, FileExistsError, FileNotFoundError, FileReadRequiredError, FilesystemError, FilesystemNotAvailableError, FilesystemNotMountableError, FilesystemNotReadyError, IsDirectoryError, IsolationUnavailableError, LocalFilesystem, LocalSandbox, MastraFilesystem, MastraSandbox, MountError, MountManager, MountNotSupportedError, NotDirectoryError, PermissionError, SandboxError, SandboxExecutionError, SandboxFeatureNotSupportedError, SandboxNotAvailableError, SandboxNotReadyError, SandboxTimeoutError, SearchNotAvailableError, WORKSPACE_TOOLS, WORKSPACE_TOOLS_PREFIX, Workspace, WorkspaceError, WorkspaceNotReadyError, WorkspaceReadOnlyError, callLifecycle, createWorkspaceTools, detectIsolation, getRecommendedIsolation, isIsolationAvailable, resolveToolConfig } from '../chunk-
|
|
1
|
+
export { CompositeFilesystem, CompositeVersionedSkillSource, DirectoryNotEmptyError, DirectoryNotFoundError, FileExistsError, FileNotFoundError, FileReadRequiredError, FilesystemError, FilesystemNotAvailableError, FilesystemNotMountableError, FilesystemNotReadyError, IsDirectoryError, IsolationUnavailableError, LocalFilesystem, LocalSandbox, LocalSkillSource, MastraFilesystem, MastraSandbox, MountError, MountManager, MountNotSupportedError, NotDirectoryError, PermissionError, SandboxError, SandboxExecutionError, SandboxFeatureNotSupportedError, SandboxNotAvailableError, SandboxNotReadyError, SandboxTimeoutError, SearchNotAvailableError, VersionedSkillSource, WORKSPACE_TOOLS, WORKSPACE_TOOLS_PREFIX, Workspace, WorkspaceError, WorkspaceNotAvailableError, WorkspaceNotReadyError, WorkspaceReadOnlyError, callLifecycle, collectSkillForPublish, createGlobMatcher, createWorkspaceTools, deleteFileTool, detectIsolation, editFileTool, executeCommandTool, extractGlobBase, fileStatTool, getRecommendedIsolation, indexContentTool, isGlobPattern, isIsolationAvailable, listFilesTool, matchGlob, mkdirTool, publishSkillFromSource, readFileTool, requireFilesystem, requireSandbox, requireWorkspace, resolveToolConfig, searchTool, writeFileTool } from '../chunk-FZ5DRHKE.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-sandbox.d.ts","sourceRoot":"","sources":["../../../src/workspace/sandbox/local-sandbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAwEjF;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,kDAAkD;IAClD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;;;;;;;OAgBG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B;;;OAGG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,YAAa,SAAQ,aAAa;IAC7C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,kBAAkB;IAC/B,QAAQ,CAAC,QAAQ,WAAW;IAE5B,MAAM,EAAE,cAAc,CAAa;IAEnC,OAAO,CAA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