@openai/agents-core 0.8.5 → 0.9.0
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/agentToolRunConfig.js +3 -0
- package/dist/agentToolRunConfig.js.map +1 -1
- package/dist/agentToolRunConfig.mjs +3 -0
- package/dist/agentToolRunConfig.mjs.map +1 -1
- package/dist/errors.d.ts +10 -0
- package/dist/errors.js +15 -1
- package/dist/errors.js.map +1 -1
- package/dist/errors.mjs +13 -0
- package/dist/errors.mjs.map +1 -1
- package/dist/handoff.js +1 -1
- package/dist/handoff.js.map +1 -1
- package/dist/handoff.mjs +1 -1
- package/dist/handoff.mjs.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/dist/items.d.ts +13 -0
- package/dist/items.js +15 -0
- package/dist/items.js.map +1 -1
- package/dist/items.mjs +15 -0
- package/dist/items.mjs.map +1 -1
- package/dist/memory/historyMutations.d.ts +6 -0
- package/dist/memory/historyMutations.js +32 -0
- package/dist/memory/historyMutations.js.map +1 -0
- package/dist/memory/historyMutations.mjs +29 -0
- package/dist/memory/historyMutations.mjs.map +1 -0
- package/dist/memory/memorySession.d.ts +3 -2
- package/dist/memory/memorySession.js +7 -0
- package/dist/memory/memorySession.js.map +1 -1
- package/dist/memory/memorySession.mjs +7 -0
- package/dist/memory/memorySession.mjs.map +1 -1
- package/dist/memory/session.d.ts +15 -0
- package/dist/memory/session.js +6 -0
- package/dist/memory/session.js.map +1 -1
- package/dist/memory/session.mjs +5 -0
- package/dist/memory/session.mjs.map +1 -1
- package/dist/metadata.js +2 -2
- package/dist/metadata.mjs +2 -2
- package/dist/model.d.ts +21 -0
- package/dist/run.d.ts +7 -1
- package/dist/run.js +116 -57
- package/dist/run.js.map +1 -1
- package/dist/run.mjs +117 -58
- package/dist/run.mjs.map +1 -1
- package/dist/runState.d.ts +83 -1
- package/dist/runState.js +96 -11
- package/dist/runState.js.map +1 -1
- package/dist/runState.mjs +95 -11
- package/dist/runState.mjs.map +1 -1
- package/dist/runner/errorHandlers.d.ts +13 -4
- package/dist/runner/errorHandlers.js +22 -4
- package/dist/runner/errorHandlers.js.map +1 -1
- package/dist/runner/errorHandlers.mjs +21 -4
- package/dist/runner/errorHandlers.mjs.map +1 -1
- package/dist/runner/items.js +11 -1
- package/dist/runner/items.js.map +1 -1
- package/dist/runner/items.mjs +11 -1
- package/dist/runner/items.mjs.map +1 -1
- package/dist/runner/modelPreparation.d.ts +1 -1
- package/dist/runner/modelPreparation.js +7 -7
- package/dist/runner/modelPreparation.js.map +1 -1
- package/dist/runner/modelPreparation.mjs +7 -7
- package/dist/runner/modelPreparation.mjs.map +1 -1
- package/dist/runner/runLoop.d.ts +2 -1
- package/dist/runner/runLoop.js +2 -2
- package/dist/runner/runLoop.js.map +1 -1
- package/dist/runner/runLoop.mjs +2 -2
- package/dist/runner/runLoop.mjs.map +1 -1
- package/dist/runner/sandbox.d.ts +33 -0
- package/dist/runner/sandbox.js +92 -0
- package/dist/runner/sandbox.js.map +1 -0
- package/dist/runner/sandbox.mjs +83 -0
- package/dist/runner/sandbox.mjs.map +1 -0
- package/dist/runner/toolExecution.js +25 -13
- package/dist/runner/toolExecution.js.map +1 -1
- package/dist/runner/toolExecution.mjs +25 -13
- package/dist/runner/toolExecution.mjs.map +1 -1
- package/dist/runner/tracing.js +1 -0
- package/dist/runner/tracing.js.map +1 -1
- package/dist/runner/tracing.mjs +1 -0
- package/dist/runner/tracing.mjs.map +1 -1
- package/dist/runner/turnPreparation.d.ts +2 -4
- package/dist/runner/turnPreparation.js +7 -3
- package/dist/runner/turnPreparation.js.map +1 -1
- package/dist/runner/turnPreparation.mjs +7 -3
- package/dist/runner/turnPreparation.mjs.map +1 -1
- package/dist/runner/turnResolution.js +158 -31
- package/dist/runner/turnResolution.js.map +1 -1
- package/dist/runner/turnResolution.mjs +160 -33
- package/dist/runner/turnResolution.mjs.map +1 -1
- package/dist/runner/types.d.ts +8 -8
- package/dist/sandbox/agent.d.ts +24 -0
- package/dist/sandbox/agent.js +68 -0
- package/dist/sandbox/agent.js.map +1 -0
- package/dist/sandbox/agent.mjs +64 -0
- package/dist/sandbox/agent.mjs.map +1 -0
- package/dist/sandbox/brand.d.ts +1 -0
- package/dist/sandbox/brand.js +5 -0
- package/dist/sandbox/brand.js.map +1 -0
- package/dist/sandbox/brand.mjs +2 -0
- package/dist/sandbox/brand.mjs.map +1 -0
- package/dist/sandbox/capabilities/base.d.ts +25 -0
- package/dist/sandbox/capabilities/base.js +89 -0
- package/dist/sandbox/capabilities/base.js.map +1 -0
- package/dist/sandbox/capabilities/base.mjs +84 -0
- package/dist/sandbox/capabilities/base.mjs.map +1 -0
- package/dist/sandbox/capabilities/compaction.d.ts +33 -0
- package/dist/sandbox/capabilities/compaction.js +172 -0
- package/dist/sandbox/capabilities/compaction.js.map +1 -0
- package/dist/sandbox/capabilities/compaction.mjs +164 -0
- package/dist/sandbox/capabilities/compaction.mjs.map +1 -0
- package/dist/sandbox/capabilities/filesystem.d.ts +14 -0
- package/dist/sandbox/capabilities/filesystem.js +447 -0
- package/dist/sandbox/capabilities/filesystem.js.map +1 -0
- package/dist/sandbox/capabilities/filesystem.mjs +444 -0
- package/dist/sandbox/capabilities/filesystem.mjs.map +1 -0
- package/dist/sandbox/capabilities/index.d.ts +19 -0
- package/dist/sandbox/capabilities/index.js +31 -0
- package/dist/sandbox/capabilities/index.js.map +1 -0
- package/dist/sandbox/capabilities/index.mjs +17 -0
- package/dist/sandbox/capabilities/index.mjs.map +1 -0
- package/dist/sandbox/capabilities/memory.d.ts +52 -0
- package/dist/sandbox/capabilities/memory.js +290 -0
- package/dist/sandbox/capabilities/memory.js.map +1 -0
- package/dist/sandbox/capabilities/memory.mjs +286 -0
- package/dist/sandbox/capabilities/memory.mjs.map +1 -0
- package/dist/sandbox/capabilities/shell.d.ts +15 -0
- package/dist/sandbox/capabilities/shell.js +130 -0
- package/dist/sandbox/capabilities/shell.js.map +1 -0
- package/dist/sandbox/capabilities/shell.mjs +127 -0
- package/dist/sandbox/capabilities/shell.mjs.map +1 -0
- package/dist/sandbox/capabilities/skills.d.ts +47 -0
- package/dist/sandbox/capabilities/skills.js +453 -0
- package/dist/sandbox/capabilities/skills.js.map +1 -0
- package/dist/sandbox/capabilities/skills.mjs +449 -0
- package/dist/sandbox/capabilities/skills.mjs.map +1 -0
- package/dist/sandbox/capabilities/transport.d.ts +3 -0
- package/dist/sandbox/capabilities/transport.js +33 -0
- package/dist/sandbox/capabilities/transport.js.map +1 -0
- package/dist/sandbox/capabilities/transport.mjs +28 -0
- package/dist/sandbox/capabilities/transport.mjs.map +1 -0
- package/dist/sandbox/client.d.ts +53 -0
- package/dist/sandbox/client.js +34 -0
- package/dist/sandbox/client.js.map +1 -0
- package/dist/sandbox/client.mjs +31 -0
- package/dist/sandbox/client.mjs.map +1 -0
- package/dist/sandbox/entries/factories.d.ts +17 -0
- package/dist/sandbox/entries/factories.js +112 -0
- package/dist/sandbox/entries/factories.js.map +1 -0
- package/dist/sandbox/entries/factories.mjs +94 -0
- package/dist/sandbox/entries/factories.mjs.map +1 -0
- package/dist/sandbox/entries/guards.d.ts +5 -0
- package/dist/sandbox/entries/guards.js +19 -0
- package/dist/sandbox/entries/guards.js.map +1 -0
- package/dist/sandbox/entries/guards.mjs +13 -0
- package/dist/sandbox/entries/guards.mjs.map +1 -0
- package/dist/sandbox/entries/index.d.ts +3 -0
- package/dist/sandbox/entries/index.js +26 -0
- package/dist/sandbox/entries/index.js.map +1 -0
- package/dist/sandbox/entries/index.mjs +3 -0
- package/dist/sandbox/entries/index.mjs.map +1 -0
- package/dist/sandbox/entries/types.d.ts +177 -0
- package/dist/sandbox/entries/types.js +3 -0
- package/dist/sandbox/entries/types.js.map +1 -0
- package/dist/sandbox/entries/types.mjs +2 -0
- package/dist/sandbox/entries/types.mjs.map +1 -0
- package/dist/sandbox/errors.d.ts +151 -0
- package/dist/sandbox/errors.js +303 -0
- package/dist/sandbox/errors.js.map +1 -0
- package/dist/sandbox/errors.mjs +251 -0
- package/dist/sandbox/errors.mjs.map +1 -0
- package/dist/sandbox/events.d.ts +51 -0
- package/dist/sandbox/events.js +104 -0
- package/dist/sandbox/events.js.map +1 -0
- package/dist/sandbox/events.mjs +95 -0
- package/dist/sandbox/events.mjs.map +1 -0
- package/dist/sandbox/index.d.ts +14 -0
- package/dist/sandbox/index.js +31 -0
- package/dist/sandbox/index.js.map +1 -0
- package/dist/sandbox/index.mjs +15 -0
- package/dist/sandbox/index.mjs.map +1 -0
- package/dist/sandbox/internal.d.ts +7 -0
- package/dist/sandbox/internal.js +46 -0
- package/dist/sandbox/internal.js.map +1 -0
- package/dist/sandbox/internal.mjs +8 -0
- package/dist/sandbox/internal.mjs.map +1 -0
- package/dist/sandbox/local.d.ts +3 -0
- package/dist/sandbox/local.js +20 -0
- package/dist/sandbox/local.js.map +1 -0
- package/dist/sandbox/local.mjs +4 -0
- package/dist/sandbox/local.mjs.map +1 -0
- package/dist/sandbox/localSkills.d.ts +13 -0
- package/dist/sandbox/localSkills.js +62 -0
- package/dist/sandbox/localSkills.js.map +1 -0
- package/dist/sandbox/localSkills.mjs +59 -0
- package/dist/sandbox/localSkills.mjs.map +1 -0
- package/dist/sandbox/manifest.d.ts +86 -0
- package/dist/sandbox/manifest.js +553 -0
- package/dist/sandbox/manifest.js.map +1 -0
- package/dist/sandbox/manifest.mjs +545 -0
- package/dist/sandbox/manifest.mjs.map +1 -0
- package/dist/sandbox/memory/generation.d.ts +56 -0
- package/dist/sandbox/memory/generation.js +426 -0
- package/dist/sandbox/memory/generation.js.map +1 -0
- package/dist/sandbox/memory/generation.mjs +385 -0
- package/dist/sandbox/memory/generation.mjs.map +1 -0
- package/dist/sandbox/memory/prompts.d.ts +16 -0
- package/dist/sandbox/memory/prompts.js +1685 -0
- package/dist/sandbox/memory/prompts.js.map +1 -0
- package/dist/sandbox/memory/prompts.mjs +1679 -0
- package/dist/sandbox/memory/prompts.mjs.map +1 -0
- package/dist/sandbox/memory/rollouts.d.ts +33 -0
- package/dist/sandbox/memory/rollouts.js +228 -0
- package/dist/sandbox/memory/rollouts.js.map +1 -0
- package/dist/sandbox/memory/rollouts.mjs +221 -0
- package/dist/sandbox/memory/rollouts.mjs.map +1 -0
- package/dist/sandbox/memory/storage.d.ts +70 -0
- package/dist/sandbox/memory/storage.js +543 -0
- package/dist/sandbox/memory/storage.js.map +1 -0
- package/dist/sandbox/memory/storage.mjs +537 -0
- package/dist/sandbox/memory/storage.mjs.map +1 -0
- package/dist/sandbox/pathGrants.d.ts +11 -0
- package/dist/sandbox/pathGrants.js +28 -0
- package/dist/sandbox/pathGrants.js.map +1 -0
- package/dist/sandbox/pathGrants.mjs +25 -0
- package/dist/sandbox/pathGrants.mjs.map +1 -0
- package/dist/sandbox/permissions.d.ts +29 -0
- package/dist/sandbox/permissions.js +140 -0
- package/dist/sandbox/permissions.js.map +1 -0
- package/dist/sandbox/permissions.mjs +134 -0
- package/dist/sandbox/permissions.mjs.map +1 -0
- package/dist/sandbox/runtime/agentKeys.d.ts +7 -0
- package/dist/sandbox/runtime/agentKeys.js +76 -0
- package/dist/sandbox/runtime/agentKeys.js.map +1 -0
- package/dist/sandbox/runtime/agentKeys.mjs +69 -0
- package/dist/sandbox/runtime/agentKeys.mjs.map +1 -0
- package/dist/sandbox/runtime/agentPreparation.d.ts +20 -0
- package/dist/sandbox/runtime/agentPreparation.js +178 -0
- package/dist/sandbox/runtime/agentPreparation.js.map +1 -0
- package/dist/sandbox/runtime/agentPreparation.mjs +172 -0
- package/dist/sandbox/runtime/agentPreparation.mjs.map +1 -0
- package/dist/sandbox/runtime/index.d.ts +5 -0
- package/dist/sandbox/runtime/index.js +22 -0
- package/dist/sandbox/runtime/index.js.map +1 -0
- package/dist/sandbox/runtime/index.mjs +6 -0
- package/dist/sandbox/runtime/index.mjs.map +1 -0
- package/dist/sandbox/runtime/livePreservedSessions.d.ts +25 -0
- package/dist/sandbox/runtime/livePreservedSessions.js +58 -0
- package/dist/sandbox/runtime/livePreservedSessions.js.map +1 -0
- package/dist/sandbox/runtime/livePreservedSessions.mjs +51 -0
- package/dist/sandbox/runtime/livePreservedSessions.mjs.map +1 -0
- package/dist/sandbox/runtime/manager.d.ts +68 -0
- package/dist/sandbox/runtime/manager.js +704 -0
- package/dist/sandbox/runtime/manager.js.map +1 -0
- package/dist/sandbox/runtime/manager.mjs +697 -0
- package/dist/sandbox/runtime/manager.mjs.map +1 -0
- package/dist/sandbox/runtime/prompts.d.ts +6 -0
- package/dist/sandbox/runtime/prompts.js +108 -0
- package/dist/sandbox/runtime/prompts.js.map +1 -0
- package/dist/sandbox/runtime/prompts.mjs +101 -0
- package/dist/sandbox/runtime/prompts.mjs.map +1 -0
- package/dist/sandbox/runtime/providedSessionManifest.d.ts +3 -0
- package/dist/sandbox/runtime/providedSessionManifest.js +175 -0
- package/dist/sandbox/runtime/providedSessionManifest.js.map +1 -0
- package/dist/sandbox/runtime/providedSessionManifest.mjs +172 -0
- package/dist/sandbox/runtime/providedSessionManifest.mjs.map +1 -0
- package/dist/sandbox/runtime/runAsManifest.d.ts +4 -0
- package/dist/sandbox/runtime/runAsManifest.js +40 -0
- package/dist/sandbox/runtime/runAsManifest.js.map +1 -0
- package/dist/sandbox/runtime/runAsManifest.mjs +36 -0
- package/dist/sandbox/runtime/runAsManifest.mjs.map +1 -0
- package/dist/sandbox/runtime/sessionLifecycle.d.ts +6 -0
- package/dist/sandbox/runtime/sessionLifecycle.js +222 -0
- package/dist/sandbox/runtime/sessionLifecycle.js.map +1 -0
- package/dist/sandbox/runtime/sessionLifecycle.mjs +215 -0
- package/dist/sandbox/runtime/sessionLifecycle.mjs.map +1 -0
- package/dist/sandbox/runtime/sessionSerialization.d.ts +12 -0
- package/dist/sandbox/runtime/sessionSerialization.js +74 -0
- package/dist/sandbox/runtime/sessionSerialization.js.map +1 -0
- package/dist/sandbox/runtime/sessionSerialization.mjs +71 -0
- package/dist/sandbox/runtime/sessionSerialization.mjs.map +1 -0
- package/dist/sandbox/runtime/sessionState.d.ts +26 -0
- package/dist/sandbox/runtime/sessionState.js +113 -0
- package/dist/sandbox/runtime/sessionState.js.map +1 -0
- package/dist/sandbox/runtime/sessionState.mjs +104 -0
- package/dist/sandbox/runtime/sessionState.mjs.map +1 -0
- package/dist/sandbox/runtime/spans.d.ts +1 -0
- package/dist/sandbox/runtime/spans.js +51 -0
- package/dist/sandbox/runtime/spans.js.map +1 -0
- package/dist/sandbox/runtime/spans.mjs +48 -0
- package/dist/sandbox/runtime/spans.mjs.map +1 -0
- package/dist/sandbox/runtime/toolRehydration.d.ts +34 -0
- package/dist/sandbox/runtime/toolRehydration.js +207 -0
- package/dist/sandbox/runtime/toolRehydration.js.map +1 -0
- package/dist/sandbox/runtime/toolRehydration.mjs +200 -0
- package/dist/sandbox/runtime/toolRehydration.mjs.map +1 -0
- package/dist/sandbox/sandboxes/docker.d.ts +75 -0
- package/dist/sandbox/sandboxes/docker.js +2015 -0
- package/dist/sandbox/sandboxes/docker.js.map +1 -0
- package/dist/sandbox/sandboxes/docker.mjs +2010 -0
- package/dist/sandbox/sandboxes/docker.mjs.map +1 -0
- package/dist/sandbox/sandboxes/index.d.ts +3 -0
- package/dist/sandbox/sandboxes/index.js +20 -0
- package/dist/sandbox/sandboxes/index.js.map +1 -0
- package/dist/sandbox/sandboxes/index.mjs +4 -0
- package/dist/sandbox/sandboxes/index.mjs.map +1 -0
- package/dist/sandbox/sandboxes/shared/localSnapshotPaths.d.ts +1 -0
- package/dist/sandbox/sandboxes/shared/localSnapshotPaths.js +22 -0
- package/dist/sandbox/sandboxes/shared/localSnapshotPaths.js.map +1 -0
- package/dist/sandbox/sandboxes/shared/localSnapshotPaths.mjs +19 -0
- package/dist/sandbox/sandboxes/shared/localSnapshotPaths.mjs.map +1 -0
- package/dist/sandbox/sandboxes/shared/localSnapshots.d.ts +34 -0
- package/dist/sandbox/sandboxes/shared/localSnapshots.js +525 -0
- package/dist/sandbox/sandboxes/shared/localSnapshots.js.map +1 -0
- package/dist/sandbox/sandboxes/shared/localSnapshots.mjs +508 -0
- package/dist/sandbox/sandboxes/shared/localSnapshots.mjs.map +1 -0
- package/dist/sandbox/sandboxes/shared/localWorkspace.d.ts +27 -0
- package/dist/sandbox/sandboxes/shared/localWorkspace.js +693 -0
- package/dist/sandbox/sandboxes/shared/localWorkspace.js.map +1 -0
- package/dist/sandbox/sandboxes/shared/localWorkspace.mjs +684 -0
- package/dist/sandbox/sandboxes/shared/localWorkspace.mjs.map +1 -0
- package/dist/sandbox/sandboxes/shared/manifestPersistence.d.ts +15 -0
- package/dist/sandbox/sandboxes/shared/manifestPersistence.js +191 -0
- package/dist/sandbox/sandboxes/shared/manifestPersistence.js.map +1 -0
- package/dist/sandbox/sandboxes/shared/manifestPersistence.mjs +182 -0
- package/dist/sandbox/sandboxes/shared/manifestPersistence.mjs.map +1 -0
- package/dist/sandbox/sandboxes/shared/pty.d.ts +9 -0
- package/dist/sandbox/sandboxes/shared/pty.js +151 -0
- package/dist/sandbox/sandboxes/shared/pty.js.map +1 -0
- package/dist/sandbox/sandboxes/shared/pty.mjs +148 -0
- package/dist/sandbox/sandboxes/shared/pty.mjs.map +1 -0
- package/dist/sandbox/sandboxes/shared/runProcess.d.ts +16 -0
- package/dist/sandbox/sandboxes/shared/runProcess.js +90 -0
- package/dist/sandbox/sandboxes/shared/runProcess.js.map +1 -0
- package/dist/sandbox/sandboxes/shared/runProcess.mjs +86 -0
- package/dist/sandbox/sandboxes/shared/runProcess.mjs.map +1 -0
- package/dist/sandbox/sandboxes/shared/sessionStateValues.d.ts +18 -0
- package/dist/sandbox/sandboxes/shared/sessionStateValues.js +40 -0
- package/dist/sandbox/sandboxes/shared/sessionStateValues.js.map +1 -0
- package/dist/sandbox/sandboxes/shared/sessionStateValues.mjs +35 -0
- package/dist/sandbox/sandboxes/shared/sessionStateValues.mjs.map +1 -0
- package/dist/sandbox/sandboxes/shared/shellCommand.d.ts +17 -0
- package/dist/sandbox/sandboxes/shared/shellCommand.js +38 -0
- package/dist/sandbox/sandboxes/shared/shellCommand.js.map +1 -0
- package/dist/sandbox/sandboxes/shared/shellCommand.mjs +34 -0
- package/dist/sandbox/sandboxes/shared/shellCommand.mjs.map +1 -0
- package/dist/sandbox/sandboxes/types.d.ts +11 -0
- package/dist/sandbox/sandboxes/types.js +3 -0
- package/dist/sandbox/sandboxes/types.js.map +1 -0
- package/dist/sandbox/sandboxes/types.mjs +2 -0
- package/dist/sandbox/sandboxes/types.mjs.map +1 -0
- package/dist/sandbox/sandboxes/unixLocal.d.ts +95 -0
- package/dist/sandbox/sandboxes/unixLocal.js +863 -0
- package/dist/sandbox/sandboxes/unixLocal.js.map +1 -0
- package/dist/sandbox/sandboxes/unixLocal.mjs +858 -0
- package/dist/sandbox/sandboxes/unixLocal.mjs.map +1 -0
- package/dist/sandbox/session.d.ts +123 -0
- package/dist/sandbox/session.js +58 -0
- package/dist/sandbox/session.js.map +1 -0
- package/dist/sandbox/session.mjs +50 -0
- package/dist/sandbox/session.mjs.map +1 -0
- package/dist/sandbox/shared/compare.d.ts +2 -0
- package/dist/sandbox/shared/compare.js +13 -0
- package/dist/sandbox/shared/compare.js.map +1 -0
- package/dist/sandbox/shared/compare.mjs +9 -0
- package/dist/sandbox/shared/compare.mjs.map +1 -0
- package/dist/sandbox/shared/environment.d.ts +14 -0
- package/dist/sandbox/shared/environment.js +69 -0
- package/dist/sandbox/shared/environment.js.map +1 -0
- package/dist/sandbox/shared/environment.mjs +59 -0
- package/dist/sandbox/shared/environment.mjs.map +1 -0
- package/dist/sandbox/shared/hostPath.d.ts +4 -0
- package/dist/sandbox/shared/hostPath.js +22 -0
- package/dist/sandbox/shared/hostPath.js.map +1 -0
- package/dist/sandbox/shared/hostPath.mjs +16 -0
- package/dist/sandbox/shared/hostPath.mjs.map +1 -0
- package/dist/sandbox/shared/manifestCollections.d.ts +12 -0
- package/dist/sandbox/shared/manifestCollections.js +40 -0
- package/dist/sandbox/shared/manifestCollections.js.map +1 -0
- package/dist/sandbox/shared/manifestCollections.mjs +34 -0
- package/dist/sandbox/shared/manifestCollections.mjs.map +1 -0
- package/dist/sandbox/shared/media.d.ts +6 -0
- package/dist/sandbox/shared/media.js +126 -0
- package/dist/sandbox/shared/media.js.map +1 -0
- package/dist/sandbox/shared/media.mjs +119 -0
- package/dist/sandbox/shared/media.mjs.map +1 -0
- package/dist/sandbox/shared/output.d.ts +12 -0
- package/dist/sandbox/shared/output.js +108 -0
- package/dist/sandbox/shared/output.js.map +1 -0
- package/dist/sandbox/shared/output.mjs +103 -0
- package/dist/sandbox/shared/output.mjs.map +1 -0
- package/dist/sandbox/shared/posixPath.d.ts +7 -0
- package/dist/sandbox/shared/posixPath.js +90 -0
- package/dist/sandbox/shared/posixPath.js.map +1 -0
- package/dist/sandbox/shared/posixPath.mjs +81 -0
- package/dist/sandbox/shared/posixPath.mjs.map +1 -0
- package/dist/sandbox/shared/remoteMountCommandAllowlist.d.ts +3 -0
- package/dist/sandbox/shared/remoteMountCommandAllowlist.js +33 -0
- package/dist/sandbox/shared/remoteMountCommandAllowlist.js.map +1 -0
- package/dist/sandbox/shared/remoteMountCommandAllowlist.mjs +28 -0
- package/dist/sandbox/shared/remoteMountCommandAllowlist.mjs.map +1 -0
- package/dist/sandbox/shared/shell.d.ts +1 -0
- package/dist/sandbox/shared/shell.js +7 -0
- package/dist/sandbox/shared/shell.js.map +1 -0
- package/dist/sandbox/shared/shell.mjs +4 -0
- package/dist/sandbox/shared/shell.mjs.map +1 -0
- package/dist/sandbox/shared/stableJson.d.ts +12 -0
- package/dist/sandbox/shared/stableJson.js +40 -0
- package/dist/sandbox/shared/stableJson.js.map +1 -0
- package/dist/sandbox/shared/stableJson.mjs +35 -0
- package/dist/sandbox/shared/stableJson.mjs.map +1 -0
- package/dist/sandbox/shared/typeGuards.d.ts +6 -0
- package/dist/sandbox/shared/typeGuards.js +34 -0
- package/dist/sandbox/shared/typeGuards.js.map +1 -0
- package/dist/sandbox/shared/typeGuards.mjs +26 -0
- package/dist/sandbox/shared/typeGuards.mjs.map +1 -0
- package/dist/sandbox/snapshot.d.ts +60 -0
- package/dist/sandbox/snapshot.js +45 -0
- package/dist/sandbox/snapshot.js.map +1 -0
- package/dist/sandbox/snapshot.mjs +39 -0
- package/dist/sandbox/snapshot.mjs.map +1 -0
- package/dist/sandbox/users.d.ts +11 -0
- package/dist/sandbox/users.js +31 -0
- package/dist/sandbox/users.js.map +1 -0
- package/dist/sandbox/users.mjs +26 -0
- package/dist/sandbox/users.mjs.map +1 -0
- package/dist/sandbox/workspacePaths.d.ts +20 -0
- package/dist/sandbox/workspacePaths.js +73 -0
- package/dist/sandbox/workspacePaths.js.map +1 -0
- package/dist/sandbox/workspacePaths.mjs +69 -0
- package/dist/sandbox/workspacePaths.mjs.map +1 -0
- package/dist/tool.js +1 -1
- package/dist/tool.js.map +1 -1
- package/dist/tool.mjs +1 -1
- package/dist/tool.mjs.map +1 -1
- package/dist/types/protocol.d.ts +8 -0
- package/dist/types/protocol.js +1 -0
- package/dist/types/protocol.js.map +1 -1
- package/dist/types/protocol.mjs +1 -0
- package/dist/types/protocol.mjs.map +1 -1
- package/dist/utils/messages.d.ts +6 -0
- package/dist/utils/messages.js +21 -0
- package/dist/utils/messages.js.map +1 -1
- package/dist/utils/messages.mjs +20 -0
- package/dist/utils/messages.mjs.map +1 -1
- package/dist/utils/strictToolSchema.d.ts +4 -0
- package/dist/utils/strictToolSchema.js +358 -0
- package/dist/utils/strictToolSchema.js.map +1 -0
- package/dist/utils/strictToolSchema.mjs +353 -0
- package/dist/utils/strictToolSchema.mjs.map +1 -0
- package/dist/utils/tools.d.ts +3 -1
- package/dist/utils/tools.js +18 -7
- package/dist/utils/tools.js.map +1 -1
- package/dist/utils/tools.mjs +18 -7
- package/dist/utils/tools.mjs.map +1 -1
- package/dist/utils/zodJsonSchemaCompat.js +18 -16
- package/dist/utils/zodJsonSchemaCompat.js.map +1 -1
- package/dist/utils/zodJsonSchemaCompat.mjs +18 -16
- package/dist/utils/zodJsonSchemaCompat.mjs.map +1 -1
- package/package.json +25 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Manifest } from "./manifest.mjs";
|
|
2
|
+
import { isRecord } from "./shared/typeGuards.mjs";
|
|
3
|
+
export function normalizeSandboxClientCreateArgs(args, manifestOptions) {
|
|
4
|
+
if (args instanceof Manifest) {
|
|
5
|
+
return {
|
|
6
|
+
manifest: args,
|
|
7
|
+
options: manifestOptions,
|
|
8
|
+
snapshot: readSnapshotOption(manifestOptions),
|
|
9
|
+
concurrencyLimits: readConcurrencyLimitsOption(manifestOptions),
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
manifest: args?.manifest ?? new Manifest(),
|
|
14
|
+
options: args?.options,
|
|
15
|
+
snapshot: args?.snapshot,
|
|
16
|
+
concurrencyLimits: args?.concurrencyLimits,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function readSnapshotOption(options) {
|
|
20
|
+
if (!isRecord(options)) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
return options.snapshot;
|
|
24
|
+
}
|
|
25
|
+
function readConcurrencyLimitsOption(options) {
|
|
26
|
+
if (!isRecord(options)) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
return options.concurrencyLimits;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.mjs","sourceRoot":"","sources":["../../src/sandbox/client.ts"],"names":[],"mappings":"OAAO,EAAE,QAAQ,EAAE;OAEZ,EAAE,QAAQ,EAAE;AAuFnB,MAAM,UAAU,gCAAgC,CAG9C,IAAmD,EACnD,eAA0B;IAE1B,IAAI,IAAI,YAAY,QAAQ,EAAE,CAAC;QAC7B,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,kBAAkB,CAAC,eAAe,CAAC;YAC7C,iBAAiB,EAAE,2BAA2B,CAAC,eAAe,CAAC;SAChE,CAAC;IACJ,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,IAAI,EAAE,QAAQ,IAAI,IAAI,QAAQ,EAAE;QAC1C,OAAO,EAAE,IAAI,EAAE,OAAO;QACtB,QAAQ,EAAE,IAAI,EAAE,QAAQ;QACxB,iBAAiB,EAAE,IAAI,EAAE,iBAAiB;KAC3C,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAgB;IAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,QAAoC,CAAC;AACtD,CAAC;AAED,SAAS,2BAA2B,CAClC,OAAgB;IAEhB,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,iBAAyD,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AzureBlobMount, BoxMount, Dir, DockerVolumeMountStrategy, File, GCSMount, GitRepo, InContainerMountStrategy, LocalBindMountStrategy, LocalDir, LocalFile, Mount, MountPattern, R2Mount, S3FilesMount, S3Mount } from './types';
|
|
2
|
+
export declare function dir(args?: Omit<Dir, 'type'>): Dir;
|
|
3
|
+
export declare function file(args: Omit<File, 'type'>): File;
|
|
4
|
+
export declare function localFile(args: Omit<LocalFile, 'type'>): LocalFile;
|
|
5
|
+
export declare function localDir(args: Omit<LocalDir, 'type'>): LocalDir;
|
|
6
|
+
export declare function gitRepo(args: Omit<GitRepo, 'type'>): GitRepo;
|
|
7
|
+
export declare function mount(args?: Omit<Mount, 'type'>): Mount;
|
|
8
|
+
export declare function s3Mount(args: Omit<S3Mount, 'type'>): S3Mount;
|
|
9
|
+
export declare function gcsMount(args: Omit<GCSMount, 'type'>): GCSMount;
|
|
10
|
+
export declare function r2Mount(args: Omit<R2Mount, 'type'>): R2Mount;
|
|
11
|
+
export declare function azureBlobMount(args: Omit<AzureBlobMount, 'type'>): AzureBlobMount;
|
|
12
|
+
export declare function boxMount(args?: Omit<BoxMount, 'type'>): BoxMount;
|
|
13
|
+
export declare function s3FilesMount(args: Omit<S3FilesMount, 'type'>): S3FilesMount;
|
|
14
|
+
export declare function inContainerMountStrategy(args?: Omit<InContainerMountStrategy, 'type'>): InContainerMountStrategy;
|
|
15
|
+
export declare function dockerVolumeMountStrategy(args?: Omit<DockerVolumeMountStrategy, 'type'>): DockerVolumeMountStrategy;
|
|
16
|
+
export declare function localBindMountStrategy(args?: Omit<LocalBindMountStrategy, 'type'>): LocalBindMountStrategy;
|
|
17
|
+
export declare function mountPattern<T extends MountPattern>(args: T): T;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dir = dir;
|
|
4
|
+
exports.file = file;
|
|
5
|
+
exports.localFile = localFile;
|
|
6
|
+
exports.localDir = localDir;
|
|
7
|
+
exports.gitRepo = gitRepo;
|
|
8
|
+
exports.mount = mount;
|
|
9
|
+
exports.s3Mount = s3Mount;
|
|
10
|
+
exports.gcsMount = gcsMount;
|
|
11
|
+
exports.r2Mount = r2Mount;
|
|
12
|
+
exports.azureBlobMount = azureBlobMount;
|
|
13
|
+
exports.boxMount = boxMount;
|
|
14
|
+
exports.s3FilesMount = s3FilesMount;
|
|
15
|
+
exports.inContainerMountStrategy = inContainerMountStrategy;
|
|
16
|
+
exports.dockerVolumeMountStrategy = dockerVolumeMountStrategy;
|
|
17
|
+
exports.localBindMountStrategy = localBindMountStrategy;
|
|
18
|
+
exports.mountPattern = mountPattern;
|
|
19
|
+
function dir(args = {}) {
|
|
20
|
+
return {
|
|
21
|
+
type: 'dir',
|
|
22
|
+
...args,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function file(args) {
|
|
26
|
+
return {
|
|
27
|
+
type: 'file',
|
|
28
|
+
...args,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function localFile(args) {
|
|
32
|
+
return {
|
|
33
|
+
type: 'local_file',
|
|
34
|
+
...args,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function localDir(args) {
|
|
38
|
+
return {
|
|
39
|
+
type: 'local_dir',
|
|
40
|
+
...args,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function gitRepo(args) {
|
|
44
|
+
return {
|
|
45
|
+
type: 'git_repo',
|
|
46
|
+
...args,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function mount(args = {}) {
|
|
50
|
+
return {
|
|
51
|
+
type: 'mount',
|
|
52
|
+
...args,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function s3Mount(args) {
|
|
56
|
+
return {
|
|
57
|
+
type: 's3_mount',
|
|
58
|
+
...args,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function gcsMount(args) {
|
|
62
|
+
return {
|
|
63
|
+
type: 'gcs_mount',
|
|
64
|
+
...args,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function r2Mount(args) {
|
|
68
|
+
return {
|
|
69
|
+
type: 'r2_mount',
|
|
70
|
+
...args,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function azureBlobMount(args) {
|
|
74
|
+
return {
|
|
75
|
+
type: 'azure_blob_mount',
|
|
76
|
+
...args,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
function boxMount(args = {}) {
|
|
80
|
+
return {
|
|
81
|
+
type: 'box_mount',
|
|
82
|
+
...args,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function s3FilesMount(args) {
|
|
86
|
+
return {
|
|
87
|
+
type: 's3_files_mount',
|
|
88
|
+
...args,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function inContainerMountStrategy(args = {}) {
|
|
92
|
+
return {
|
|
93
|
+
type: 'in_container',
|
|
94
|
+
...args,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function dockerVolumeMountStrategy(args = {}) {
|
|
98
|
+
return {
|
|
99
|
+
type: 'docker_volume',
|
|
100
|
+
...args,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function localBindMountStrategy(args = {}) {
|
|
104
|
+
return {
|
|
105
|
+
type: 'local_bind',
|
|
106
|
+
...args,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function mountPattern(args) {
|
|
110
|
+
return args;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=factories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factories.js","sourceRoot":"","sources":["../../../src/sandbox/entries/factories.ts"],"names":[],"mappings":";;AAmBA,kBAKC;AAED,oBAKC;AAED,8BAKC;AAED,4BAKC;AAED,0BAKC;AAED,sBAKC;AAED,0BAKC;AAED,4BAKC;AAED,0BAKC;AAED,wCAOC;AAED,4BAKC;AAED,oCAKC;AAED,4DAOC;AAED,8DAOC;AAED,wDAOC;AAED,oCAEC;AAnHD,SAAgB,GAAG,CAAC,OAA0B,EAAE;IAC9C,OAAO;QACL,IAAI,EAAE,KAAK;QACX,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,IAAI,CAAC,IAAwB;IAC3C,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,SAAS,CAAC,IAA6B;IACrD,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,QAAQ,CAAC,IAA4B;IACnD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO,CAAC,IAA2B;IACjD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,KAAK,CAAC,OAA4B,EAAE;IAClD,OAAO;QACL,IAAI,EAAE,OAAO;QACb,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,OAAO,CAAC,IAA2B;IACjD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI;KACG,CAAC;AACf,CAAC;AAED,SAAgB,QAAQ,CAAC,IAA4B;IACnD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,GAAG,IAAI;KACI,CAAC;AAChB,CAAC;AAED,SAAgB,OAAO,CAAC,IAA2B;IACjD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI;KACG,CAAC;AACf,CAAC;AAED,SAAgB,cAAc,CAC5B,IAAkC;IAElC,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,GAAG,IAAI;KACU,CAAC;AACtB,CAAC;AAED,SAAgB,QAAQ,CAAC,OAA+B,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,GAAG,IAAI;KACI,CAAC;AAChB,CAAC;AAED,SAAgB,YAAY,CAAC,IAAgC;IAC3D,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,GAAG,IAAI;KACQ,CAAC;AACpB,CAAC;AAED,SAAgB,wBAAwB,CACtC,OAA+C,EAAE;IAEjD,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,yBAAyB,CACvC,OAAgD,EAAE;IAElD,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,sBAAsB,CACpC,OAA6C,EAAE;IAE/C,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,SAAgB,YAAY,CAAyB,IAAO;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
export function dir(args = {}) {
|
|
2
|
+
return {
|
|
3
|
+
type: 'dir',
|
|
4
|
+
...args,
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export function file(args) {
|
|
8
|
+
return {
|
|
9
|
+
type: 'file',
|
|
10
|
+
...args,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export function localFile(args) {
|
|
14
|
+
return {
|
|
15
|
+
type: 'local_file',
|
|
16
|
+
...args,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function localDir(args) {
|
|
20
|
+
return {
|
|
21
|
+
type: 'local_dir',
|
|
22
|
+
...args,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export function gitRepo(args) {
|
|
26
|
+
return {
|
|
27
|
+
type: 'git_repo',
|
|
28
|
+
...args,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export function mount(args = {}) {
|
|
32
|
+
return {
|
|
33
|
+
type: 'mount',
|
|
34
|
+
...args,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function s3Mount(args) {
|
|
38
|
+
return {
|
|
39
|
+
type: 's3_mount',
|
|
40
|
+
...args,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function gcsMount(args) {
|
|
44
|
+
return {
|
|
45
|
+
type: 'gcs_mount',
|
|
46
|
+
...args,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export function r2Mount(args) {
|
|
50
|
+
return {
|
|
51
|
+
type: 'r2_mount',
|
|
52
|
+
...args,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export function azureBlobMount(args) {
|
|
56
|
+
return {
|
|
57
|
+
type: 'azure_blob_mount',
|
|
58
|
+
...args,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export function boxMount(args = {}) {
|
|
62
|
+
return {
|
|
63
|
+
type: 'box_mount',
|
|
64
|
+
...args,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export function s3FilesMount(args) {
|
|
68
|
+
return {
|
|
69
|
+
type: 's3_files_mount',
|
|
70
|
+
...args,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export function inContainerMountStrategy(args = {}) {
|
|
74
|
+
return {
|
|
75
|
+
type: 'in_container',
|
|
76
|
+
...args,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export function dockerVolumeMountStrategy(args = {}) {
|
|
80
|
+
return {
|
|
81
|
+
type: 'docker_volume',
|
|
82
|
+
...args,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export function localBindMountStrategy(args = {}) {
|
|
86
|
+
return {
|
|
87
|
+
type: 'local_bind',
|
|
88
|
+
...args,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export function mountPattern(args) {
|
|
92
|
+
return args;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=factories.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"factories.mjs","sourceRoot":"","sources":["../../../src/sandbox/entries/factories.ts"],"names":[],"mappings":"AAmBA,MAAM,UAAU,GAAG,CAAC,OAA0B,EAAE;IAC9C,OAAO;QACL,IAAI,EAAE,KAAK;QACX,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,IAAwB;IAC3C,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAA6B;IACrD,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAA4B;IACnD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAA2B;IACjD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,OAA4B,EAAE;IAClD,OAAO;QACL,IAAI,EAAE,OAAO;QACb,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAA2B;IACjD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI;KACG,CAAC;AACf,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAA4B;IACnD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,GAAG,IAAI;KACI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAA2B;IACjD,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,GAAG,IAAI;KACG,CAAC;AACf,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,IAAkC;IAElC,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,GAAG,IAAI;KACU,CAAC;AACtB,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,OAA+B,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,GAAG,IAAI;KACI,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAgC;IAC3D,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,GAAG,IAAI;KACQ,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAA+C,EAAE;IAEjD,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,OAAgD,EAAE;IAElD,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,OAA6C,EAAE;IAE/C,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAAyB,IAAO;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Dir, Entry, GitRepo, Mount, TypedMount } from './types';
|
|
2
|
+
export declare function isDir(entry: Entry): entry is Dir;
|
|
3
|
+
export declare function isGitRepo(entry: Entry): entry is GitRepo;
|
|
4
|
+
export declare function isMount(entry: Entry): entry is Mount | TypedMount;
|
|
5
|
+
export declare function isDirectoryLikeEntry(entry: Entry): entry is Dir | GitRepo | Mount | TypedMount;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDir = isDir;
|
|
4
|
+
exports.isGitRepo = isGitRepo;
|
|
5
|
+
exports.isMount = isMount;
|
|
6
|
+
exports.isDirectoryLikeEntry = isDirectoryLikeEntry;
|
|
7
|
+
function isDir(entry) {
|
|
8
|
+
return entry.type === 'dir';
|
|
9
|
+
}
|
|
10
|
+
function isGitRepo(entry) {
|
|
11
|
+
return entry.type === 'git_repo';
|
|
12
|
+
}
|
|
13
|
+
function isMount(entry) {
|
|
14
|
+
return entry.type === 'mount' || entry.type.endsWith('_mount');
|
|
15
|
+
}
|
|
16
|
+
function isDirectoryLikeEntry(entry) {
|
|
17
|
+
return entry.type === 'dir' || entry.type === 'git_repo' || isMount(entry);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=guards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../../src/sandbox/entries/guards.ts"],"names":[],"mappings":";;AAEA,sBAEC;AAED,8BAEC;AAED,0BAEC;AAED,oDAIC;AAhBD,SAAgB,KAAK,CAAC,KAAY;IAChC,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC;AAC9B,CAAC;AAED,SAAgB,SAAS,CAAC,KAAY;IACpC,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AACnC,CAAC;AAED,SAAgB,OAAO,CAAC,KAAY;IAClC,OAAO,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACjE,CAAC;AAED,SAAgB,oBAAoB,CAClC,KAAY;IAEZ,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export function isDir(entry) {
|
|
2
|
+
return entry.type === 'dir';
|
|
3
|
+
}
|
|
4
|
+
export function isGitRepo(entry) {
|
|
5
|
+
return entry.type === 'git_repo';
|
|
6
|
+
}
|
|
7
|
+
export function isMount(entry) {
|
|
8
|
+
return entry.type === 'mount' || entry.type.endsWith('_mount');
|
|
9
|
+
}
|
|
10
|
+
export function isDirectoryLikeEntry(entry) {
|
|
11
|
+
return entry.type === 'dir' || entry.type === 'git_repo' || isMount(entry);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=guards.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"guards.mjs","sourceRoot":"","sources":["../../../src/sandbox/entries/guards.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,KAAK,CAAC,KAAY;IAChC,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAY;IACpC,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAAY;IAClC,OAAO,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,KAAY;IAEZ,OAAO,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { BoxMount, Dir, DockerVolumeMountStrategy, Entry, EntryBase, File, FuseMountPattern, GCSMount, GitRepo, InContainerMountStrategy, LocalBindMountStrategy, LocalDir, LocalFile, Mount, MountPattern, MountProvider, MountpointMountPattern, R2Mount, RcloneMountPattern, S3FilesMount, S3FilesMountPattern, S3Mount, MountStrategy, TypedMount, AzureBlobMount, } from './types';
|
|
2
|
+
export { azureBlobMount, boxMount, dir, dockerVolumeMountStrategy, file, gcsMount, gitRepo, inContainerMountStrategy, localDir, localBindMountStrategy, localFile, mount, mountPattern, r2Mount, s3FilesMount, s3Mount, } from './factories';
|
|
3
|
+
export { isDir, isDirectoryLikeEntry, isGitRepo, isMount } from './guards';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isMount = exports.isGitRepo = exports.isDirectoryLikeEntry = exports.isDir = exports.s3Mount = exports.s3FilesMount = exports.r2Mount = exports.mountPattern = exports.mount = exports.localFile = exports.localBindMountStrategy = exports.localDir = exports.inContainerMountStrategy = exports.gitRepo = exports.gcsMount = exports.file = exports.dockerVolumeMountStrategy = exports.dir = exports.boxMount = exports.azureBlobMount = void 0;
|
|
4
|
+
var factories_1 = require("./factories.js");
|
|
5
|
+
Object.defineProperty(exports, "azureBlobMount", { enumerable: true, get: function () { return factories_1.azureBlobMount; } });
|
|
6
|
+
Object.defineProperty(exports, "boxMount", { enumerable: true, get: function () { return factories_1.boxMount; } });
|
|
7
|
+
Object.defineProperty(exports, "dir", { enumerable: true, get: function () { return factories_1.dir; } });
|
|
8
|
+
Object.defineProperty(exports, "dockerVolumeMountStrategy", { enumerable: true, get: function () { return factories_1.dockerVolumeMountStrategy; } });
|
|
9
|
+
Object.defineProperty(exports, "file", { enumerable: true, get: function () { return factories_1.file; } });
|
|
10
|
+
Object.defineProperty(exports, "gcsMount", { enumerable: true, get: function () { return factories_1.gcsMount; } });
|
|
11
|
+
Object.defineProperty(exports, "gitRepo", { enumerable: true, get: function () { return factories_1.gitRepo; } });
|
|
12
|
+
Object.defineProperty(exports, "inContainerMountStrategy", { enumerable: true, get: function () { return factories_1.inContainerMountStrategy; } });
|
|
13
|
+
Object.defineProperty(exports, "localDir", { enumerable: true, get: function () { return factories_1.localDir; } });
|
|
14
|
+
Object.defineProperty(exports, "localBindMountStrategy", { enumerable: true, get: function () { return factories_1.localBindMountStrategy; } });
|
|
15
|
+
Object.defineProperty(exports, "localFile", { enumerable: true, get: function () { return factories_1.localFile; } });
|
|
16
|
+
Object.defineProperty(exports, "mount", { enumerable: true, get: function () { return factories_1.mount; } });
|
|
17
|
+
Object.defineProperty(exports, "mountPattern", { enumerable: true, get: function () { return factories_1.mountPattern; } });
|
|
18
|
+
Object.defineProperty(exports, "r2Mount", { enumerable: true, get: function () { return factories_1.r2Mount; } });
|
|
19
|
+
Object.defineProperty(exports, "s3FilesMount", { enumerable: true, get: function () { return factories_1.s3FilesMount; } });
|
|
20
|
+
Object.defineProperty(exports, "s3Mount", { enumerable: true, get: function () { return factories_1.s3Mount; } });
|
|
21
|
+
var guards_1 = require("./guards.js");
|
|
22
|
+
Object.defineProperty(exports, "isDir", { enumerable: true, get: function () { return guards_1.isDir; } });
|
|
23
|
+
Object.defineProperty(exports, "isDirectoryLikeEntry", { enumerable: true, get: function () { return guards_1.isDirectoryLikeEntry; } });
|
|
24
|
+
Object.defineProperty(exports, "isGitRepo", { enumerable: true, get: function () { return guards_1.isGitRepo; } });
|
|
25
|
+
Object.defineProperty(exports, "isMount", { enumerable: true, get: function () { return guards_1.isMount; } });
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/sandbox/entries/index.ts"],"names":[],"mappings":";;;AA2BA,4CAiBqB;AAhBnB,2GAAA,cAAc,OAAA;AACd,qGAAA,QAAQ,OAAA;AACR,gGAAA,GAAG,OAAA;AACH,sHAAA,yBAAyB,OAAA;AACzB,iGAAA,IAAI,OAAA;AACJ,qGAAA,QAAQ,OAAA;AACR,oGAAA,OAAO,OAAA;AACP,qHAAA,wBAAwB,OAAA;AACxB,qGAAA,QAAQ,OAAA;AACR,mHAAA,sBAAsB,OAAA;AACtB,sGAAA,SAAS,OAAA;AACT,kGAAA,KAAK,OAAA;AACL,yGAAA,YAAY,OAAA;AACZ,oGAAA,OAAO,OAAA;AACP,yGAAA,YAAY,OAAA;AACZ,oGAAA,OAAO,OAAA;AAET,sCAA2E;AAAlE,+FAAA,KAAK,OAAA;AAAE,8GAAA,oBAAoB,OAAA;AAAE,mGAAA,SAAS,OAAA;AAAE,iGAAA,OAAO,OAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { azureBlobMount, boxMount, dir, dockerVolumeMountStrategy, file, gcsMount, gitRepo, inContainerMountStrategy, localDir, localBindMountStrategy, localFile, mount, mountPattern, r2Mount, s3FilesMount, s3Mount, } from "./factories.mjs";
|
|
2
|
+
export { isDir, isDirectoryLikeEntry, isGitRepo, isMount } from "./guards.mjs";
|
|
3
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/sandbox/entries/index.ts"],"names":[],"mappings":"OA2BO,EACL,cAAc,EACd,QAAQ,EACR,GAAG,EACH,yBAAyB,EACzB,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,wBAAwB,EACxB,QAAQ,EACR,sBAAsB,EACtB,SAAS,EACT,KAAK,EACL,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,OAAO,GACR;OACM,EAAE,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,OAAO,EAAE"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import type { PermissionsInit, PermissionsValue } from '../permissions';
|
|
2
|
+
import type { SandboxEntryGroup } from '../users';
|
|
3
|
+
export type EntryBase = {
|
|
4
|
+
description?: string;
|
|
5
|
+
ephemeral?: boolean;
|
|
6
|
+
group?: SandboxEntryGroup;
|
|
7
|
+
permissions?: PermissionsInit | PermissionsValue;
|
|
8
|
+
};
|
|
9
|
+
export type Dir = EntryBase & {
|
|
10
|
+
type: 'dir';
|
|
11
|
+
children?: Record<string, Entry>;
|
|
12
|
+
};
|
|
13
|
+
export type File = EntryBase & {
|
|
14
|
+
type: 'file';
|
|
15
|
+
content: string | Uint8Array;
|
|
16
|
+
};
|
|
17
|
+
export type LocalFile = EntryBase & {
|
|
18
|
+
type: 'local_file';
|
|
19
|
+
src: string;
|
|
20
|
+
};
|
|
21
|
+
export type LocalDir = EntryBase & {
|
|
22
|
+
type: 'local_dir';
|
|
23
|
+
src: string;
|
|
24
|
+
};
|
|
25
|
+
export type GitRepo = EntryBase & {
|
|
26
|
+
type: 'git_repo';
|
|
27
|
+
host?: string;
|
|
28
|
+
repo: string;
|
|
29
|
+
ref?: string;
|
|
30
|
+
subpath?: string;
|
|
31
|
+
};
|
|
32
|
+
export type MountPattern = {
|
|
33
|
+
type: string;
|
|
34
|
+
[key: string]: unknown;
|
|
35
|
+
};
|
|
36
|
+
export type RcloneMountPattern = MountPattern & {
|
|
37
|
+
type: 'rclone';
|
|
38
|
+
mode?: 'fuse' | 'nfs' | (string & {});
|
|
39
|
+
remoteName?: string;
|
|
40
|
+
extraArgs?: string[];
|
|
41
|
+
configFilePath?: string;
|
|
42
|
+
remote?: string;
|
|
43
|
+
args?: string[];
|
|
44
|
+
nfsAddr?: string;
|
|
45
|
+
nfsMountOptions?: string[];
|
|
46
|
+
};
|
|
47
|
+
export type FuseMountPattern = MountPattern & {
|
|
48
|
+
type: 'fuse';
|
|
49
|
+
command?: string | string[];
|
|
50
|
+
allowOther?: boolean;
|
|
51
|
+
logType?: string;
|
|
52
|
+
logLevel?: string;
|
|
53
|
+
cacheType?: 'block_cache' | 'file_cache' | (string & {});
|
|
54
|
+
cachePath?: string;
|
|
55
|
+
cacheSizeMb?: number;
|
|
56
|
+
blockCacheBlockSizeMb?: number;
|
|
57
|
+
blockCacheDiskTimeoutSec?: number;
|
|
58
|
+
fileCacheTimeoutSec?: number;
|
|
59
|
+
fileCacheMaxSizeMb?: number;
|
|
60
|
+
attrCacheTimeoutSec?: number;
|
|
61
|
+
entryCacheTimeoutSec?: number;
|
|
62
|
+
negativeEntryCacheTimeoutSec?: number;
|
|
63
|
+
};
|
|
64
|
+
export type MountpointMountPattern = MountPattern & {
|
|
65
|
+
type: 'mountpoint';
|
|
66
|
+
options?: {
|
|
67
|
+
prefix?: string;
|
|
68
|
+
region?: string;
|
|
69
|
+
endpointUrl?: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export type S3FilesMountPattern = MountPattern & {
|
|
73
|
+
type: 's3files';
|
|
74
|
+
options?: {
|
|
75
|
+
mountTargetIp?: string;
|
|
76
|
+
accessPoint?: string;
|
|
77
|
+
region?: string;
|
|
78
|
+
extraOptions?: Record<string, string | null>;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export type InContainerMountStrategy = {
|
|
82
|
+
type: 'in_container';
|
|
83
|
+
pattern?: MountPattern;
|
|
84
|
+
};
|
|
85
|
+
export type DockerVolumeMountStrategy = {
|
|
86
|
+
type: 'docker_volume';
|
|
87
|
+
driver?: string;
|
|
88
|
+
driverOptions?: Record<string, string>;
|
|
89
|
+
};
|
|
90
|
+
export type LocalBindMountStrategy = {
|
|
91
|
+
type: 'local_bind';
|
|
92
|
+
};
|
|
93
|
+
export type MountStrategy = InContainerMountStrategy | DockerVolumeMountStrategy | LocalBindMountStrategy | {
|
|
94
|
+
type: string;
|
|
95
|
+
[key: string]: unknown;
|
|
96
|
+
};
|
|
97
|
+
export type MountProvider = 's3' | 'gcs' | 'r2' | 'azure_blob' | 'box' | 's3_files' | (string & {});
|
|
98
|
+
export type MountBase = EntryBase & {
|
|
99
|
+
source?: string;
|
|
100
|
+
mountPath?: string;
|
|
101
|
+
readOnly?: boolean;
|
|
102
|
+
mountStrategy?: MountStrategy;
|
|
103
|
+
provider?: MountProvider;
|
|
104
|
+
config?: Record<string, unknown>;
|
|
105
|
+
[key: string]: unknown;
|
|
106
|
+
};
|
|
107
|
+
export type Mount = MountBase & {
|
|
108
|
+
type: 'mount';
|
|
109
|
+
};
|
|
110
|
+
export type S3Mount = MountBase & {
|
|
111
|
+
type: 's3_mount';
|
|
112
|
+
bucket: string;
|
|
113
|
+
prefix?: string;
|
|
114
|
+
region?: string;
|
|
115
|
+
endpointUrl?: string;
|
|
116
|
+
s3Provider?: string;
|
|
117
|
+
accessKeyId?: string;
|
|
118
|
+
secretAccessKey?: string;
|
|
119
|
+
sessionToken?: string;
|
|
120
|
+
};
|
|
121
|
+
export type GCSMount = MountBase & {
|
|
122
|
+
type: 'gcs_mount';
|
|
123
|
+
bucket: string;
|
|
124
|
+
prefix?: string;
|
|
125
|
+
region?: string;
|
|
126
|
+
endpointUrl?: string;
|
|
127
|
+
accessId?: string;
|
|
128
|
+
secretAccessKey?: string;
|
|
129
|
+
serviceAccountCredentials?: string;
|
|
130
|
+
serviceAccountFile?: string;
|
|
131
|
+
accessToken?: string;
|
|
132
|
+
};
|
|
133
|
+
export type R2Mount = MountBase & {
|
|
134
|
+
type: 'r2_mount';
|
|
135
|
+
bucket: string;
|
|
136
|
+
prefix?: string;
|
|
137
|
+
accountId: string;
|
|
138
|
+
customDomain?: string;
|
|
139
|
+
accessKeyId?: string;
|
|
140
|
+
secretAccessKey?: string;
|
|
141
|
+
};
|
|
142
|
+
export type AzureBlobMount = MountBase & {
|
|
143
|
+
type: 'azure_blob_mount';
|
|
144
|
+
container: string;
|
|
145
|
+
prefix?: string;
|
|
146
|
+
account?: string;
|
|
147
|
+
accountName?: string;
|
|
148
|
+
endpoint?: string;
|
|
149
|
+
endpointUrl?: string;
|
|
150
|
+
identityClientId?: string;
|
|
151
|
+
accountKey?: string;
|
|
152
|
+
};
|
|
153
|
+
export type BoxMount = MountBase & {
|
|
154
|
+
type: 'box_mount';
|
|
155
|
+
path?: string;
|
|
156
|
+
clientId?: string;
|
|
157
|
+
clientSecret?: string;
|
|
158
|
+
accessToken?: string;
|
|
159
|
+
token?: string;
|
|
160
|
+
boxConfigFile?: string;
|
|
161
|
+
configCredentials?: string;
|
|
162
|
+
boxSubType?: 'user' | 'enterprise';
|
|
163
|
+
rootFolderId?: string;
|
|
164
|
+
impersonate?: string;
|
|
165
|
+
ownedBy?: string;
|
|
166
|
+
};
|
|
167
|
+
export type S3FilesMount = MountBase & {
|
|
168
|
+
type: 's3_files_mount';
|
|
169
|
+
fileSystemId: string;
|
|
170
|
+
subpath?: string;
|
|
171
|
+
mountTargetIp?: string;
|
|
172
|
+
accessPoint?: string;
|
|
173
|
+
region?: string;
|
|
174
|
+
extraOptions?: Record<string, string | null>;
|
|
175
|
+
};
|
|
176
|
+
export type TypedMount = S3Mount | GCSMount | R2Mount | AzureBlobMount | BoxMount | S3FilesMount;
|
|
177
|
+
export type Entry = Dir | File | LocalFile | LocalDir | GitRepo | Mount | TypedMount;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/sandbox/entries/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../../../src/sandbox/entries/types.ts"],"names":[],"mappings":""}
|