scitex_hub.project

SciTeX Hub project management.

Project CRUD (Python API):

from scitex_hub.project import project_list, project_create

projects = project_list() new = project_create(“my-project”, description=”My research”)

# Create as an app project (the agent-programmatic publish flow). app = project_create(“my-tool”, category=”app”) # -> name becomes “my-tool_app” (auto-suffix), is_app=True.

Sandboxed file-operation handlers (async, used by MCP tools) live in scitex_hub.project._mcp.handlers.

Module Attributes

PROJECT_CATEGORIES

Top-level project categories.

APP_NAME_SUFFIX

Suffix appended to app-project names when category="app" and the name doesn't already end with it.

Functions

project_create(name[, description, ...])

Create a new SciTeX Hub project.

project_delete(slug)

Delete a project by slug.

project_list()

List all projects owned by the authenticated user.

project_rename(slug, new_name)

Rename a project.

scitex_hub.project.PROJECT_CATEGORIES: tuple[str, ...] = ('project', 'app')

Top-level project categories. Currently only "app" adds non-default semantics (sets is_app=True server-side + auto-suffixes the name with _app if missing). "project" is the default research-project shape and adds no extra fields — listed here so the API surface is closed and --category can be exhaustively validated CLI-side.

scitex_hub.project.APP_NAME_SUFFIX = '_app'

Suffix appended to app-project names when category="app" and the name doesn’t already end with it. Mirrors the operator-12845 directive (“the project NAME likely needs an ‘app’ SUFFIX”).

scitex_hub.project._apply_app_suffix(name: str) str[source]

Return name with _app appended unless already present.

The check is suffix-only (not substring) so e.g. my_app_repo stays untouched and only my_app round-trips through unchanged.

scitex_hub.project.project_list() list[dict][source]

List all projects owned by the authenticated user.

Returns:

List of project dicts with id, name, description, created_at, updated_at.

scitex_hub.project.project_create(name: str, description: str = '', template: str = 'scitex_minimal', *, category: str = 'project', app_category: str | None = None, request_fn=None) dict[source]

Create a new SciTeX Hub project.

Parameters:
  • name – Project name. When category="app" and the name does not already end with _app, the suffix is appended automatically (operator-12845 convention) before the server call.

  • description – Optional description.

  • template – Template ID (default: scitex_minimal).

  • category – Top-level project category. One of PROJECT_CATEGORIES. "app" marks the new project as an app plugin (sets is_app=True server-side) — does NOT submit it to the registry; that’s a separate scitex_hub.appmaker publish call.

  • app_category – Optional app sub-category (writing, visualization, data, analysis, reference, utility, other). Only used when category="app"; ignored otherwise. The sub-category can also be left blank at create time and filled in at app submit time.

  • request_fn – Optional dependency-injection seam for the HTTP transport. Defaults to the module-level _make_request(). Tests inject a hand-rolled fake to avoid talking to a live server; production callers leave this argument unset.

Returns:

Dict with success, project_id, slug, url, is_app, app_category.

Raises:
scitex_hub.project.project_delete(slug: str) bool[source]

Delete a project by slug.

Parameters:

slug – Project slug (URL-safe name).

Returns:

True if deleted successfully.

scitex_hub.project.project_rename(slug: str, new_name: str) dict[source]

Rename a project.

Parameters:
  • slug – Current project slug.

  • new_name – New project name.

Returns:

Dict with updated project info.