MODULE REFERENCE

workspaces

anomx.integrations.workspaces

Check out and save a shared job workspace through the authenticated API.

python -m anomx.integrations.workspaces mount <component> creates a local working copy and a revision manifest. Edit with ordinary file and shell tools, then python -m anomx.integrations.workspaces save. Saving uses optimistic concurrency: HTTP 409 requires a reload and merge. No credentials are written to the checkout; PlatformClient reads explicit ANOMX_URL/ANOMX_TOKEN configuration. Mounting does not start the job.

component_id

component_id(reference: str) -> str

Normalize a UUID or a canonical/legacy component object reference.

Signature parameters
ParameterTypeDefault
referencestrrequired

Returns str

main

main() -> None

CLI entry point usable by the Anomx agent's ordinary terminal tool.

Returns None

mount

mount(reference: str, directory: str | Path, *, client: PlatformClient | None = None) -> dict[str, Any]

Materialize a fresh working copy without replacing existing local files.

Signature parameters
ParameterTypeDefault
referencestrrequired
directorystr | Pathrequired
clientkeyword onlyPlatformClient | NoneNone

Returns dict[str, Any]

save

save(directory: str | Path, *, client: PlatformClient | None = None) -> dict[str, Any]

Save the complete working copy if the remote revision still matches.

Signature parameters
ParameterTypeDefault
directorystr | Pathrequired
clientkeyword onlyPlatformClient | NoneNone

Returns dict[str, Any]

validate_files

validate_files(files: dict[str, str]) -> None

Reject unsafe paths, binary content and oversized workspaces locally.

Signature parameters
ParameterTypeDefault
filesdict[str, str]required

Returns None

workspace_path

workspace_path(client: PlatformClient, identifier: str, *, job: bool = False) -> str

Resolve the workspace route for legacy or versioned API roots.

Signature parameters
ParameterTypeDefault
clientPlatformClientrequired
identifierstrrequired
jobkeyword onlyboolFalse

Returns str

MANIFEST

MANIFEST = '.anomx-workspace.json'