johnandersen777.bsky.social/atlibs-socialweb-computer-requester
socialweb.computer market requester and policy modules for atlibs, with its web pages and lexicons
0
0
{
"name": "vm-mcp",
"description": "Linux VMs on the socialweb.computer market as tools for a model (vm_create, vm_list, vm_exec, vm_release, vm_forget), over the requester and the guest's process contract. The VMs kept are one computer.socialweb.vm.kept record of yours.",
"actions": [
{
"entry": "vm_create",
"label": "Create a VM",
"fields": [
{
"key": "cpus",
"type": "integer",
"label": "vCPUs",
"description": "vCPUs (default 2)."
},
{
"key": "mem",
"type": "integer",
"label": "Memory (GiB)",
"description": "Memory in GiB (default 4)."
},
{
"key": "disk",
"type": "integer",
"label": "Disk (GiB)",
"description": "Disk in GiB (default: the bidder's)."
},
{
"key": "bidders",
"type": "array",
"label": "Bidder DIDs",
"description": "Bidder DIDs to ask; leave out for the default bidders."
},
{
"key": "hold_minutes",
"type": "integer",
"label": "Hold (minutes)",
"description": "Minutes until the bidder ends it (default 60)."
}
],
"description": "Rent a Linux VM (root shell, apt) and keep it; takes a few minutes. Returns {vm, bidder, cpus, mem, disk, created, expires, shell}: pass vm to vm_exec and vm_release. The bidder ends it at expires; release it when done."
},
{
"entry": "vm_list",
"label": "List VMs",
"fields": [],
"readOnly": true,
"description": "The VMs you keep: [{vm, bidder, cpus, mem, disk, created, expires, expired, shell}]."
},
{
"entry": "vm_exec",
"label": "Run a command",
"fields": [
{
"key": "vm",
"type": "string",
"label": "VM",
"required": true,
"description": "The VM's id from vm_create or vm_list (vm-xxxxxxxx)."
},
{
"key": "command",
"type": "string",
"label": "Command",
"required": true,
"description": "The command line for sh -c."
},
{
"key": "stdin",
"type": "string",
"label": "stdin",
"description": "Text for the command's stdin (put secrets here, not in command)."
},
{
"key": "timeout_s",
"type": "integer",
"label": "Timeout (s)",
"description": "Seconds to wait (default 60, at most 600)."
}
],
"description": "Run a shell command (sh -c, as root) on a VM you keep and wait for it. Returns {exit, stdout, stderr} (truncated or timed_out when so). For a long job: `nohup ... > /tmp/log 2>&1 &`, then read the log."
},
{
"entry": "vm_release",
"label": "Release a VM",
"fields": [
{
"key": "vm",
"type": "string",
"label": "VM",
"required": true,
"description": "The VM's id (vm-xxxxxxxx)."
}
],
"description": "Give a VM back: the bidder stops it and the records renting it made are deleted. Returns {vm, released, terminated}."
},
{
"entry": "vm_forget",
"label": "Forget a VM",
"fields": [
{
"key": "vm",
"type": "string",
"label": "VM",
"required": true,
"description": "The VM's id (vm-xxxxxxxx)."
}
],
"description": "Drop a VM from your list when vm_release keeps failing (its bidder is gone): one short release attempt, then it is dropped either way. Returns {vm, forgotten, released, terminated, note?}."
}
],
"config": [
{
"key": "bidders",
"type": "array",
"label": "Bidder DIDs",
"description": "The bidders vm_create asks when a call names none."
},
{
"key": "via",
"label": "iroh or webrtc",
"description": "The transport to the VM's shell."
},
{
"key": "pool",
"label": "Pool",
"description": "The record key of the VM list (default self)."
},
{
"key": "max_vms",
"type": "integer",
"label": "VMs kept at most",
"description": "Default 2."
},
{
"key": "max_cpus",
"type": "integer",
"label": "vCPUs at most",
"description": "Default 8."
},
{
"key": "max_mem",
"type": "integer",
"label": "Memory at most (GiB)",
"description": "Default 16."
},
{
"key": "max_disk",
"type": "integer",
"label": "Disk at most (GiB)",
"description": "Default 100."
},
{
"key": "max_hold_minutes",
"type": "integer",
"label": "Hold at most (minutes)",
"description": "Default 240."
},
{
"key": "wait_minutes",
"type": "integer",
"label": "Wait (minutes)",
"description": "Per wait while renting, default 5."
}
],
"calls": [
"com.atproto.repo.getRecord",
"com.atproto.repo.putRecord"
],
"anyRecords": [
"computer.socialweb.vm.kept"
],
"session": "requester",
"hooks": [
{
"nsid": "computer.socialweb.vm.provision",
"reason": "rent the VM and keep it (the requester's contract, release: false)",
"default": "requester",
"entries": [
"vm_create"
]
},
{
"nsid": "computer.socialweb.vm.release",
"reason": "give the VM back (vm_create: one it could not record; vm_forget: one try)",
"default": "requester",
"entries": [
"vm_create",
"vm_release",
"vm_forget"
]
},
{
"nsid": "computer.socialweb.cicd.process.exec",
"reason": "run the command on the VM's guest agent",
"default": "process-mcp",
"entries": [
"vm_exec"
]
}
],
"uri": "at://did:plc:ocnuqjlzgohypj3zoznermms/com.fedfork.exec.wasm.module/vm-mcp"
}