Add workspace service lifecycle with typed readiness
Make persistent workspaces capable of running long-lived background processes instead of forcing everything through one-shot exec calls. Add workspace service start/list/status/logs/stop across the CLI, Python SDK, and MCP server, with multiple named services per workspace, typed readiness probes (file, tcp, http, and command), and aggregate service counts on workspace status. Keep service state and logs outside /workspace so diff and export semantics stay workspace-scoped, and extend the guest agent plus backends to persist service records and logs across separate calls. Update the 2.7.0 docs, examples, changelog, and roadmap milestone to reflect the shipped surface. Validation: uv lock; UV_CACHE_DIR=.uv-cache make check; UV_CACHE_DIR=.uv-cache make dist-check; real guest-backed Firecracker smoke for workspace create, two service starts, list/status/logs, diff unaffected, stop, and delete.
This commit is contained in:
parent
84a7e18d4d
commit
f504f0a331
28 changed files with 4098 additions and 124 deletions
|
|
@ -20,6 +20,12 @@ from pyro_mcp.contract import (
|
|||
PUBLIC_CLI_WORKSPACE_CREATE_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_DIFF_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_EXPORT_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SERVICE_LIST_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SERVICE_LOGS_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SERVICE_START_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SERVICE_STATUS_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SERVICE_STOP_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SERVICE_SUBCOMMANDS,
|
||||
PUBLIC_CLI_WORKSPACE_SHELL_CLOSE_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SHELL_OPEN_FLAGS,
|
||||
PUBLIC_CLI_WORKSPACE_SHELL_READ_FLAGS,
|
||||
|
|
@ -135,6 +141,37 @@ def test_public_cli_help_lists_commands_and_run_flags() -> None:
|
|||
).format_help()
|
||||
for flag in PUBLIC_CLI_WORKSPACE_SHELL_CLOSE_FLAGS:
|
||||
assert flag in workspace_shell_close_help_text
|
||||
workspace_service_help_text = _subparser_choice(
|
||||
_subparser_choice(parser, "workspace"),
|
||||
"service",
|
||||
).format_help()
|
||||
for subcommand_name in PUBLIC_CLI_WORKSPACE_SERVICE_SUBCOMMANDS:
|
||||
assert subcommand_name in workspace_service_help_text
|
||||
workspace_service_start_help_text = _subparser_choice(
|
||||
_subparser_choice(_subparser_choice(parser, "workspace"), "service"), "start"
|
||||
).format_help()
|
||||
for flag in PUBLIC_CLI_WORKSPACE_SERVICE_START_FLAGS:
|
||||
assert flag in workspace_service_start_help_text
|
||||
workspace_service_list_help_text = _subparser_choice(
|
||||
_subparser_choice(_subparser_choice(parser, "workspace"), "service"), "list"
|
||||
).format_help()
|
||||
for flag in PUBLIC_CLI_WORKSPACE_SERVICE_LIST_FLAGS:
|
||||
assert flag in workspace_service_list_help_text
|
||||
workspace_service_status_help_text = _subparser_choice(
|
||||
_subparser_choice(_subparser_choice(parser, "workspace"), "service"), "status"
|
||||
).format_help()
|
||||
for flag in PUBLIC_CLI_WORKSPACE_SERVICE_STATUS_FLAGS:
|
||||
assert flag in workspace_service_status_help_text
|
||||
workspace_service_logs_help_text = _subparser_choice(
|
||||
_subparser_choice(_subparser_choice(parser, "workspace"), "service"), "logs"
|
||||
).format_help()
|
||||
for flag in PUBLIC_CLI_WORKSPACE_SERVICE_LOGS_FLAGS:
|
||||
assert flag in workspace_service_logs_help_text
|
||||
workspace_service_stop_help_text = _subparser_choice(
|
||||
_subparser_choice(_subparser_choice(parser, "workspace"), "service"), "stop"
|
||||
).format_help()
|
||||
for flag in PUBLIC_CLI_WORKSPACE_SERVICE_STOP_FLAGS:
|
||||
assert flag in workspace_service_stop_help_text
|
||||
|
||||
demo_help_text = _subparser_choice(parser, "demo").format_help()
|
||||
for subcommand_name in PUBLIC_CLI_DEMO_SUBCOMMANDS:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue