Install
@struktoai/mirage-cloudflare.
Usage through a relay
@struktoai/mirage-core and import @struktoai/mirage-core/machine/cloudflare_container/handle
once to register the provider, and use mountType: 'own' or leave it
unset.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Run captured programs in a Cloudflare Container, from its Durable Object or from anywhere through a relay.
npm install @struktoai/mirage-node ssh2
@struktoai/mirage-cloudflare.
import { MountMode, RAMVFS, Workspace } from '@struktoai/mirage-node'
const ws = new Workspace(
{ '/data': new RAMVFS() },
{
mode: MountMode.EXEC,
machines: {
box: {
provider: 'cloudflare_container',
url: 'https://mirage-relay.example.workers.dev/box',
token: 'relay-token',
mountType: 'ssh',
captures: ['@python', '@external'],
},
},
},
)
await ws.shell("python3 -c 'print(1 + 1)'")
@struktoai/mirage-core and import @struktoai/mirage-core/machine/cloudflare_container/handle
once to register the provider, and use mountType: 'own' or leave it
unset.