diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5595bd6..fc3cbf0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: run: uv run ruff format --check - name: Unit tests - run: uv run pytest tests/test_http_client.py src/phx_channel/tests/test_unit.py + run: uv run pytest tests/test_http_client.py src/archastro/phx_channel/tests/test_unit.py - name: Harness-client integration tests run: uv run pytest tests/harness diff --git a/README.md b/README.md index c43a62c..79fc389 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,16 @@ teams = client.v1.teams.list() ## Packages -- **`archastro`** — typed REST + channel SDK generated from the canonical - OpenAPI spec at [`ArchAstro/archastro-openapi`](https://github.com/ArchAstro/archastro-openapi). +All public code lives under the single top-level `archastro` package: + +- **`archastro.platform`** — typed REST + channel SDK generated from + the canonical OpenAPI spec at + [`ArchAstro/archastro-openapi`](https://github.com/ArchAstro/archastro-openapi). Pydantic models, async channel classes, auth helpers. -- **`phx_channel`** — the hand-written Phoenix Channels client the - generated channel classes run on top of. WebSocket transport, join / - reply / push / leave, heartbeat, reconnect, and a `HarnessServiceClient` - for driving the +- **`archastro.phx_channel`** — the hand-written Phoenix Channels + client the generated channel classes run on top of. WebSocket + transport, join / reply / push / leave, heartbeat, reconnect, and a + `HarnessServiceClient` for driving the [`@archastro/channel-harness`](https://www.npmjs.com/package/@archastro/channel-harness) service from Python tests. @@ -29,7 +32,7 @@ teams = client.v1.teams.list() This repo contains: -- Python SDK (`src/archastro/`, `src/phx_channel/`) installed via `uv` +- Python SDK (`src/archastro/`) installed via `uv` - JS tooling (`package.json`) — the channel-harness subprocess that powers the channel contract tests, plus the Prism mock server that backs the REST contract tests. Installed via `npm ci`. @@ -45,7 +48,7 @@ uv sync # Python deps + dev deps (pytest, ruff) ```bash # Unit tests only (no external services needed) -uv run pytest tests/test_http_client.py tests/test_synthetic.py src/phx_channel/tests/unit.test.py +uv run pytest tests/test_http_client.py src/archastro/phx_channel/tests/test_unit.py # REST contract tests (spawns Prism mock server) uv run pytest tests/contract diff --git a/pyproject.toml b/pyproject.toml index 02f493a..492f3f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,18 +4,45 @@ version = "0.1.0" description = "Python SDK for the ArchAstro Platform API" readme = "README.md" requires-python = ">=3.11" +license = { file = "LICENSE" } +authors = [{ name = "ArchAstro", email = "support@archastro.ai" }] +keywords = ["archastro", "sdk", "api", "phoenix-channels"] +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Software Development :: Libraries :: Python Modules", + "Typing :: Typed", +] dependencies = [ "httpx>=0.27", "pydantic>=2.0", "websockets>=13.0", ] +[project.optional-dependencies] +dev = [ + "pytest>=8.0", + "pytest-asyncio>=0.24", + "ruff>=0.11", +] + +[project.urls] +Homepage = "https://github.com/ArchAstro/archastro-python" +Repository = "https://github.com/ArchAstro/archastro-python" +Issues = "https://github.com/ArchAstro/archastro-python/issues" + [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] -packages = ["src/archastro", "src/phx_channel"] +packages = ["src/archastro"] +exclude = ["**/tests/**"] [dependency-groups] dev = [ diff --git a/specs/platform-openapi.json b/specs/platform-openapi.json index b7d9f91..c336389 100644 --- a/specs/platform-openapi.json +++ b/specs/platform-openapi.json @@ -31,24 +31,6 @@ ], "type": "object" }, - "AIImageInput": { - "description": "Schema for an input image (base64-encoded) used in image editing.", - "properties": { - "image_data": { - "description": "Base64-encoded image data", - "type": "string" - }, - "image_type": { - "description": "MIME type (e.g. image/png, image/jpeg)", - "type": "string" - } - }, - "required": [ - "image_data", - "image_type" - ], - "type": "object" - }, "AIImageResult": { "description": "Schema for an AI image generation result.", "properties": { @@ -147,37 +129,6 @@ ], "type": "object" }, - "AIModel": { - "description": "Schema for AI model information.", - "properties": { - "id": { - "description": "Model identifier", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "AITool": { - "description": "OpenAI-style tool definition.", - "properties": { - "function": { - "$ref": "#/components/schemas/AIToolFunction", - "description": "Function tool definition" - }, - "type": { - "description": "Tool type (function)", - "type": "string" - } - }, - "required": [ - "type", - "function" - ], - "type": "object" - }, "AIToolCall": { "description": "Tool call from assistant message.", "properties": { @@ -205,28 +156,6 @@ ], "type": "object" }, - "AIToolFunction": { - "description": "OpenAI-style function tool definition.", - "properties": { - "description": { - "description": "Function description", - "type": "string" - }, - "name": { - "description": "Function name", - "type": "string" - }, - "parameters": { - "description": "JSON Schema for function parameters", - "type": "object" - } - }, - "required": [ - "name", - "parameters" - ], - "type": "object" - }, "AIToolResult": { "description": "Tool result from tool execution.", "properties": { @@ -252,52 +181,6 @@ ], "type": "object" }, - "Account": { - "description": "Schema for the current developer account.", - "properties": { - "alias": { - "description": "Developer alias", - "type": "string" - }, - "created_at": { - "description": "Account creation date", - "format": "date-time", - "type": "string" - }, - "email": { - "description": "Email address", - "type": "string" - }, - "email_verified": { - "description": "Whether email is verified", - "type": "boolean" - }, - "full_name": { - "description": "Full name", - "type": "string" - }, - "id": { - "description": "Account ID", - "type": "string" - }, - "system_role": { - "description": "System role", - "type": "string" - }, - "timezone": { - "description": "IANA timezone", - "type": "string" - } - }, - "required": [ - "id", - "email", - "system_role", - "email_verified", - "created_at" - ], - "type": "object" - }, "Acl": { "description": "Reusable API schema for access control lists.\n\nSupports two modes (mutually exclusive):\n\n**Replace mode** — send `grants` to replace all entries:\n\n {\"grants\": [{\"principal_type\": \"user\", \"principal\": \"...\", \"actions\": [\"read\"]}]}\n\nUse `{\"grants\": []}` to clear all entries.\n\n**Patch mode** — send `add` and/or `remove`:\n\n {\"add\": [...grants...], \"remove\": [{\"principal_type\": \"user\", \"principal\": \"...\"}]}\n\nCannot mix `grants` with `add`/`remove`.\n", "properties": { @@ -367,314 +250,19 @@ ], "type": "object" }, - "ActivityFeedEntry": { - "description": "API schema for an activity feed entry.", + "Actor": { + "description": "Schema for a message actor (user or agent).\n\nActors represent the entity that sent a message.\nMaps to the actor format from MessageActorHelper.build_actor/1.\n", "properties": { - "agent": { - "description": "Agent (public ID or expanded object when loaded)", - "oneOf": [ - { - "type": "string" - }, - { - "description": "API schema for an agent.", - "properties": { - "acl": { - "description": "Access control list. Contains grants array with principal_type, principal, and actions. Null when no ACL restrictions are applied.", - "properties": { - "add": { - "description": "Patch mode: grants to add or merge into existing", - "items": { - "description": "API schema for a single ACL grant entry.", - "properties": { - "actions": { - "description": "List of allowed actions (e.g. read, write)", - "items": { - "type": "string" - }, - "type": "array" - }, - "principal": { - "description": "Principal identifier (UUID for user/team/org/agent_user, role name for org_role, omit for everyone)", - "type": "string" - }, - "principal_type": { - "description": "Principal type: user, team, org, org_role, agent, or everyone", - "type": "string" - } - }, - "required": [ - "principal_type", - "actions" - ], - "type": "object" - }, - "type": "array" - }, - "grants": { - "description": "Replace mode: full list of grants (replaces all existing). Use [] to clear.", - "items": { - "description": "API schema for a single ACL grant entry.", - "properties": { - "actions": { - "description": "List of allowed actions (e.g. read, write)", - "items": { - "type": "string" - }, - "type": "array" - }, - "principal": { - "description": "Principal identifier (UUID for user/team/org/agent_user, role name for org_role, omit for everyone)", - "type": "string" - }, - "principal_type": { - "description": "Principal type: user, team, org, org_role, agent, or everyone", - "type": "string" - } - }, - "required": [ - "principal_type", - "actions" - ], - "type": "object" - }, - "type": "array" - }, - "remove": { - "description": "Patch mode: principals to remove from existing", - "items": { - "description": "API schema for identifying a principal to remove from an ACL.", - "properties": { - "principal": { - "description": "Principal identifier to remove (omit for everyone)", - "type": "string" - }, - "principal_type": { - "description": "Principal type to remove", - "type": "string" - } - }, - "required": [ - "principal_type" - ], - "type": "object" - }, - "type": "array" - } - }, - "type": "object" - }, - "app": { - "description": "Application", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "default_model": { - "description": "Default AI model", - "type": "string" - }, - "email": { - "description": "Agent email", - "type": "string" - }, - "id": { - "description": "Agent ID (agi_...)", - "type": "string" - }, - "identity": { - "description": "Identity prompt", - "type": "string" - }, - "lookup_key": { - "description": "Unique lookup key", - "type": "string" - }, - "metadata": { - "description": "Arbitrary metadata", - "type": "object" - }, - "name": { - "description": "Agent name", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "phone_number": { - "description": "Agent phone number", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - }, - "team": { - "description": "Owning team", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "user": { - "description": "Owning user", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - } - ] - }, - "app": { - "description": "Application", - "type": "string" - }, - "attachments": { - "description": "Entry attachments", - "items": { - "type": "object" - }, - "type": "array" - }, - "automation_run": { - "description": "Automation run", - "type": "string" - }, - "content": { - "description": "Longer explanation (markdown)", - "type": "string" - }, - "correlation_id": { - "description": "Correlation ID for grouped entries", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", + "alias": { + "description": "Actor alias/handle", "type": "string" }, "id": { - "description": "Entry ID (afe_...)", - "type": "string" - }, - "kind": { - "description": "Entry kind", + "description": "Actor ID (format: user-xxx or agent-xxx)", "type": "string" }, - "level": { - "description": "Severity level", - "type": "string" - }, - "metadata": { - "description": "Entry metadata", - "type": "object" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "routine_run": { - "description": "Routine run", - "type": "string" - }, - "sandbox": { - "description": "Sandbox identifier", - "type": "string" - }, - "session_record": { - "description": "Agent session", - "type": "string" - }, - "team": { - "description": "Team", - "type": "string" - }, - "thread": { - "description": "Thread", - "type": "string" - }, - "title": { - "description": "One-line summary", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "user": { - "description": "User (public ID or expanded object when loaded)", - "oneOf": [ - { - "type": "string" - }, - { - "description": "API schema for a user.", - "properties": { - "alias": { - "description": "User alias/handle", - "type": "string" - }, - "email": { - "description": "User email address", - "type": "string" - }, - "id": { - "description": "User ID", - "type": "string" - }, - "metadata": { - "description": "User metadata", - "type": "object" - }, - "name": { - "description": "User display name", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - } - ] - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "Actor": { - "description": "Schema for a message actor (user or agent).\n\nActors represent the entity that sent a message.\nMaps to the actor format from MessageActorHelper.build_actor/1.\n", - "properties": { - "alias": { - "description": "Actor alias/handle", - "type": "string" - }, - "id": { - "description": "Actor ID (format: user-xxx or agent-xxx)", - "type": "string" - }, - "name": { - "description": "Actor display name", + "name": { + "description": "Actor display name", "type": "string" }, "profile_picture": { @@ -843,38 +431,6 @@ ], "type": "object" }, - "AgentConversationHistory": { - "description": "API schema for an agent conversation history session.", - "properties": { - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "last_interaction_at": { - "description": "Last interaction timestamp", - "format": "date-time", - "type": "string" - }, - "name": { - "description": "Session name", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - }, - "session": { - "description": "Session ID (ach_...)", - "type": "string" - } - }, - "type": "object" - }, "AgentExport": { "description": "API schema for an agent export response.\n\nContains the reconstructed AgentTemplate and all dependent config files\nneeded for a fully self-contained re-deploy.\n", "properties": { @@ -896,174 +452,6 @@ ], "type": "object" }, - "AgentImpersonationManifest": { - "description": "API schema for a full agent impersonation manifest.", - "properties": { - "agent": { - "$ref": "#/components/schemas/Agent", - "description": "Agent identity and metadata" - }, - "skills": { - "description": "Linked skills", - "items": { - "$ref": "#/components/schemas/AgentImpersonationSkillSummary" - }, - "type": "array" - }, - "tools": { - "description": "Active tools", - "items": { - "$ref": "#/components/schemas/AgentTool" - }, - "type": "array" - } - }, - "required": [ - "agent", - "tools", - "skills" - ], - "type": "object" - }, - "AgentImpersonationSkillFile": { - "description": "API schema for an agent impersonation skill file entry.", - "properties": { - "content_type": { - "description": "Raw content type for the file", - "type": "string" - }, - "download_url": { - "description": "URL to fetch raw file contents", - "type": "string" - }, - "path": { - "description": "Relative path within the skill bundle", - "type": "string" - } - }, - "required": [ - "path", - "download_url" - ], - "type": "object" - }, - "AgentImpersonationSkillList": { - "description": "API schema for an agent impersonation skill list response.", - "properties": { - "data": { - "description": "Agent-linked skills", - "items": { - "$ref": "#/components/schemas/AgentImpersonationSkillSummary" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "AgentImpersonationSkillManifest": { - "description": "API schema for an agent impersonation skill manifest.", - "properties": { - "description": { - "description": "Skill description", - "type": "string" - }, - "entrypoint": { - "description": "Primary file path for the skill", - "type": "string" - }, - "files": { - "description": "Skill files", - "items": { - "$ref": "#/components/schemas/AgentImpersonationSkillFile" - }, - "type": "array" - }, - "id": { - "description": "Skill config ID", - "type": "string" - }, - "name": { - "description": "Skill display name", - "type": "string" - }, - "slug": { - "description": "Skill slug", - "type": "string" - } - }, - "required": [ - "id", - "slug", - "name", - "entrypoint", - "files" - ], - "type": "object" - }, - "AgentImpersonationSkillSummary": { - "description": "API schema for an agent impersonation skill summary.", - "properties": { - "description": { - "description": "Skill description", - "type": "string" - }, - "id": { - "description": "Skill config ID", - "type": "string" - }, - "name": { - "description": "Skill display name", - "type": "string" - }, - "slug": { - "description": "Skill slug", - "type": "string" - } - }, - "required": [ - "id", - "slug", - "name" - ], - "type": "object" - }, - "AgentImpersonationToolList": { - "description": "API schema for the resolved callable tools list response.", - "properties": { - "data": { - "description": "Resolved callable tools", - "items": { - "$ref": "#/components/schemas/ResolvedTool" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "AgentImpersonationToolRunResult": { - "description": "API schema for the result of running an agent tool via impersonation.", - "properties": { - "duration_ms": { - "description": "Execution duration in milliseconds", - "type": "integer" - }, - "result": { - "description": "Tool execution result", - "type": "object" - } - }, - "required": [ - "result", - "duration_ms" - ], - "type": "object" - }, "AgentListResponse": { "description": "Paginated list response for agents.", "properties": { @@ -1161,8 +549,8 @@ "type": "string" }, "preset_config": { - "description": "Preset configuration", - "type": "object" + "$ref": "#/components/schemas/PresetConfig", + "description": "Preset configuration" }, "preset_name": { "description": "Preset name", @@ -1180,6 +568,13 @@ "description": "Routine status", "type": "string" }, + "steps": { + "description": "Ordered list of chain steps (present when handler_type is \"chain\"). Each step is a plain map with handler_type, optional body fields (preset_name / preset_config / script / config), and step-local plumbing (name, inputs, output_key, on_error).", + "items": { + "type": "object" + }, + "type": "array" + }, "trigger_context": { "description": "Trigger context", "type": "string" @@ -1649,198 +1044,223 @@ ], "type": "object" }, - "ApiCall": { - "description": "Schema for an API call record.\n\nMaps to serialized API call output from developer portal API.\n", + "Artifact": { + "description": "API schema for an artifact.", "properties": { - "api_key_type": { - "description": "API key type (publishable or secret)", + "agent": { + "description": "Agent", + "type": "string" + }, + "content_type": { + "description": "MIME content type", "type": "string" }, "created_at": { - "description": "Created timestamp", + "description": "Creation timestamp", "format": "date-time", "type": "string" }, - "error_message": { - "description": "Error message if request failed", + "current_version": { + "description": "Current version ID", "type": "string" }, - "event_type": { - "description": "Webhook event type (e.g. push, pull_request)", + "description": { + "description": "Artifact description", "type": "string" }, - "full_url": { - "description": "Full request URL with query string", + "file": { + "description": "Storage file", "type": "string" }, - "handler_module": { - "description": "ApiDsl action module", + "file_name": { + "description": "Original filename", "type": "string" }, - "id": { - "description": "Public ID (aac_...)", - "type": "string" - }, - "ip_address": { - "description": "Client IP address", + "file_url": { + "description": "Signed file URL", "type": "string" }, - "latency_ms": { - "description": "Latency in milliseconds", - "type": "integer" - }, - "metadata": { - "description": "Additional metadata (e.g. integration_ids for webhooks)", - "type": "object" - }, - "method": { - "description": "HTTP method", + "id": { + "description": "Artifact ID", "type": "string" }, - "org": { - "description": "Org if org-scoped", - "type": "string" + "image_source": { + "$ref": "#/components/schemas/ImageSource", + "description": "Image source metadata" }, - "path": { - "description": "Sanitized path with param placeholders", + "name": { + "description": "Artifact name", "type": "string" }, - "query_string": { - "description": "Query string", + "org": { + "description": "Organization", "type": "string" }, - "request_body": { - "description": "Request body payload (webhooks only)", - "type": "object" - }, - "request_headers": { - "description": "Request headers (webhooks only)", - "type": "object" - }, - "request_id": { - "description": "Request ID from Plug.RequestId", + "sandbox": { + "description": "Sandbox identifier", "type": "string" }, - "status_code": { - "description": "HTTP status code", - "type": "integer" - }, "team": { - "description": "Team if team-scoped", + "description": "Team", "type": "string" }, "thread": { - "description": "Thread if thread-scoped", + "description": "Thread", + "type": "string" + }, + "updated_at": { + "description": "Last update timestamp", + "format": "date-time", "type": "string" }, "user": { - "description": "User if user-scoped", + "description": "User", "type": "string" + }, + "version": { + "description": "Current version number", + "type": "integer" } }, "required": [ - "id", - "method", - "path", - "full_url", - "status_code", - "latency_ms" + "id" ], "type": "object" }, - "ApiExplorerEndpoint": { - "description": "Schema for a documented API endpoint in the developer API explorer.", + "Attachment": { + "description": "Schema for a message attachment.\n\nAttachments can be of various types (file, scraped_link, artifact, task, media, action).\nFields present depend on the attachment type.\nMaps to format_attachments_for_client/1 output.\n", "properties": { - "deprecated": { - "description": "Whether the route is deprecated", - "type": "boolean" + "content_type": { + "description": "MIME content type (file, artifact, media types)", + "type": "string" }, "description": { - "description": "Endpoint description", + "description": "Description (scraped_link, artifact, task types)", "type": "string" }, - "errors": { - "description": "Documented error responses", - "items": { - "type": "object" - }, - "type": "array" + "filename": { + "description": "File name (file, artifact, media types)", + "type": "string" }, - "method": { - "description": "HTTP method", + "height": { + "description": "Media height (media type)", + "type": "integer" + }, + "id": { + "description": "Attachment ID", "type": "string" }, - "params": { - "description": "Documented params", - "items": { - "type": "object" - }, - "type": "array" + "image_height": { + "description": "Preview image height (scraped_link type)", + "type": "integer" + }, + "image_source": { + "$ref": "#/components/schemas/ImageSource", + "description": "Image metadata (file, scraped_link, artifact, media types)" }, - "path": { - "description": "Route path", + "image_url": { + "description": "Preview image URL (scraped_link type)", "type": "string" }, - "returns": { - "description": "Return schema description", + "image_width": { + "description": "Preview image width (scraped_link type)", + "type": "integer" + }, + "media_type": { + "description": "Media type (media type)", + "type": "string" + }, + "name": { + "description": "Media name (media type)", + "type": "string" + }, + "object": { + "description": "Embedded object (task, action types)", "type": "object" }, - "scope": { - "description": "Endpoint scope", + "title": { + "description": "Title (scraped_link, artifact, task types)", + "type": "string" + }, + "type": { + "description": "Attachment type: file, scraped_link, artifact, task, media, action", + "type": "string" + }, + "url": { + "description": "URL to the resource (file, scraped_link, artifact, media types)", "type": "string" }, - "tags": { - "description": "Route tags", + "variants": { + "description": "Media variants (media type)", "items": { - "type": "string" + "$ref": "#/components/schemas/MediaVariant" }, "type": "array" + }, + "version": { + "description": "Artifact version number (artifact type)", + "type": "integer" + }, + "width": { + "description": "Media width (media type)", + "type": "integer" } }, "required": [ - "method", - "path", - "scope", - "deprecated", - "tags", - "params", - "errors" + "id", + "type" ], "type": "object" }, - "ApiExplorerIndex": { - "description": "Schema for the API explorer response.", + "AuthTokens": { + "description": "API schema for authentication token responses.", "properties": { - "data": { - "description": "Documented API endpoints", - "items": { - "$ref": "#/components/schemas/ApiExplorerEndpoint" - }, - "type": "array" + "expires_in": { + "description": "Token TTL in seconds", + "type": "integer", + "x-sdk": "token_expiry" }, - "schemas": { - "description": "Collected schema definitions", + "metadata": { + "description": "Additional metadata (e.g., onboarding_job_id)", "type": "object" + }, + "refresh_token": { + "description": "Refresh token", + "type": "string", + "x-sdk": "refresh_token" + }, + "token": { + "description": "Access token (JWT)", + "type": "string", + "x-sdk": "access_token" + }, + "token_type": { + "description": "Token type (Bearer)", + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/User", + "description": "Authenticated user" } }, "required": [ - "data" + "token", + "refresh_token", + "user", + "token_type", + "expires_in" ], "type": "object" }, - "App": { - "description": "Schema for a developer app.\n\nMaps to serialized app output from developer portal API.\n", + "AutomationRun": { + "description": "Schema for an automation run.\n\nMaps to serialized automation run output from developer portal API.\n", "properties": { - "app_slug": { - "description": "Workspace slug (if set)", - "type": "string" - }, - "app_url": { - "description": "App URL", + "app": { + "description": "App (dap_...)", "type": "string" }, - "brand_name": { - "description": "Brand name for emails", + "automation": { + "description": "Automation (aut_...)", "type": "string" }, "created_at": { @@ -1848,288 +1268,176 @@ "format": "date-time", "type": "string" }, - "description": { - "description": "App description", - "type": "string" - }, - "from_name": { - "description": "From name for emails", + "event_id": { + "description": "Triggering event ID", "type": "string" }, "id": { - "description": "Public ID (dap_...)", - "type": "string" - }, - "marketing_url": { - "description": "Marketing URL", - "type": "string" - }, - "muted_color": { - "description": "Muted hex color", - "type": "string" - }, - "name": { - "description": "App name", + "description": "Public ID (atr_...)", "type": "string" }, - "primary_color": { - "description": "Primary hex color", - "type": "string" + "payload": { + "description": "Event payload", + "type": "object" }, - "sandboxes": { - "description": "App sandboxes with keys", - "items": { - "$ref": "#/components/schemas/Sandbox" - }, - "type": "array" + "result": { + "description": "Workflow execution result (payload and output)", + "type": "object" }, "status": { - "description": "Status (active, suspended)", + "description": "Status: pending, running, completed, failed, cancelled", "type": "string" }, - "support_email": { - "description": "Support email address", + "team": { + "description": "Team if team-owned", "type": "string" }, - "third_party_oauth_enabled": { - "description": "Third-party OAuth enabled", - "type": "boolean" - }, "updated_at": { "description": "Updated timestamp", "format": "date-time", "type": "string" + }, + "user": { + "description": "User if user-owned", + "type": "string" } }, "required": [ "id", - "name", + "app", + "automation", "status" ], "type": "object" }, - "AppEnvVarMasked": { - "description": "Schema for an app environment variable response with a masked value.", + "BuiltinTool": { + "description": "An individual tool within a builtin tool catalog entry.", "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, "description": { - "description": "Optional description", - "type": "string" - }, - "id": { - "description": "Environment variable ID", - "type": "string" - }, - "key": { - "description": "Environment variable key", - "type": "string" - }, - "masked_value": { - "description": "Masked environment variable value", + "description": "Tool description", "type": "string" }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", + "name": { + "description": "Tool name", "type": "string" } }, "required": [ - "id", - "key", - "masked_value" - ], - "type": "object" - }, - "AppEnvVarMaskedList": { - "description": "Schema for masked app environment variable list responses.", - "properties": { - "data": { - "description": "Environment variables", - "items": { - "$ref": "#/components/schemas/AppEnvVarMasked" - }, - "type": "array" - } - }, - "required": [ - "data" + "name" ], "type": "object" }, - "AppEnvVarPlaintext": { - "description": "Schema for an app environment variable response that includes the plaintext value.", + "BuiltinToolCatalogEntry": { + "description": "A builtin tool catalog entry describing an available tool category.", "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" + "config_schema": { + "description": "JSON schema for tool configuration", + "type": "object" }, "description": { - "description": "Optional description", + "description": "Tool description", "type": "string" }, - "id": { - "description": "Environment variable ID", + "instruction": { + "description": "Tool instruction", "type": "string" }, "key": { - "description": "Environment variable key", + "description": "Unique tool key", "type": "string" }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", + "label": { + "description": "Display label", "type": "string" }, - "value": { - "description": "Plaintext environment variable value", - "type": "string" - } - }, - "required": [ - "id", - "key", - "value" - ], - "type": "object" - }, - "AppKey": { - "description": "Schema for an API key.\n\nMaps to serialized app key output from developer portal API.\n", - "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "full_key": { - "description": "Full key shown only once at creation", - "type": "string" - }, - "id": { - "description": "Public ID (dak_...)", - "type": "string" - }, - "key_hint": { - "description": "Last 4 chars hint", - "type": "string" - }, - "key_value": { - "description": "Full key (publishable only)", - "type": "string" + "providers": { + "description": "Supported providers", + "items": { + "type": "string" + }, + "type": "array" }, - "last_used_at": { - "description": "Last used timestamp", - "format": "date-time", - "type": "string" + "requires_integration": { + "description": "Whether an integration is required", + "type": "boolean" }, - "status": { - "description": "Status (active, revoked)", + "server_tool_type": { + "description": "Server tool type identifier", "type": "string" }, - "type": { - "description": "Key type (publishable, secret)", - "type": "string" + "tools": { + "description": "List of individual tools", + "items": { + "$ref": "#/components/schemas/BuiltinTool" + }, + "type": "array" } }, "required": [ - "id", - "type", - "status" + "key" ], "type": "object" }, - "AppSlug": { - "description": "Schema for an app slug mapping.", + "ComputerExecResult": { + "description": "Result of executing a command on an agent computer.", "properties": { - "app": { - "description": "App identifier", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "creator": { - "description": "Creator identifier", - "type": "string" - }, - "id": { - "description": "Slug record ID", - "type": "string" - }, - "slug": { - "description": "Globally unique slug", - "type": "string" + "exit_code": { + "description": "Process exit code", + "type": "integer" }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", + "output": { + "description": "Command output", "type": "string" } }, - "required": [ - "id", - "slug", - "app" - ], "type": "object" }, - "Artifact": { - "description": "API schema for an artifact.", + "Config": { + "description": "API schema for a config resource.", "properties": { - "agent": { - "description": "Agent", - "type": "string" - }, - "content_type": { - "description": "MIME content type", - "type": "string" - }, "created_at": { "description": "Creation timestamp", "format": "date-time", "type": "string" }, "current_version": { - "description": "Current version ID", - "type": "string" + "$ref": "#/components/schemas/ConfigVersion", + "description": "Current version" }, - "description": { - "description": "Artifact description", + "id": { + "description": "Config ID (cfg_...)", "type": "string" }, - "file": { - "description": "Storage file", + "is_archived": { + "description": "Whether config is archived", + "type": "boolean" + }, + "kind": { + "description": "Config kind (e.g., Agent, APITool)", "type": "string" }, - "file_name": { - "description": "Original filename", + "lookup_key": { + "description": "Optional lookup key", "type": "string" }, - "file_url": { - "description": "Signed file URL", + "mime_type": { + "description": "Content mime type", "type": "string" }, - "id": { - "description": "Artifact ID", + "org": { + "description": "Organization", "type": "string" }, - "image_source": { - "$ref": "#/components/schemas/ImageSource", - "description": "Image source metadata" + "parent": { + "description": "Parent config ID (bundle children only)", + "type": "string" }, - "name": { - "description": "Artifact name", + "raw_content": { + "description": "Raw file content (system configs only)", "type": "string" }, - "org": { - "description": "Organization", + "relative_path": { + "description": "Path within parent bundle (bundle children only)", "type": "string" }, "sandbox": { @@ -2140,10 +1448,6 @@ "description": "Team", "type": "string" }, - "thread": { - "description": "Thread", - "type": "string" - }, "updated_at": { "description": "Last update timestamp", "format": "date-time", @@ -2153,59 +1457,64 @@ "description": "User", "type": "string" }, - "version": { - "description": "Current version number", - "type": "integer" + "virtual_path": { + "description": "Unique path within the team", + "type": "string" } }, "required": [ - "id" + "id", + "kind" ], "type": "object" }, - "ArtifactVersion": { - "description": "API schema for an artifact version.", + "ConfigKindSchema": { + "description": "Schema for a config kind's JSON schema and sample response.\n", "properties": { - "artifact": { - "description": "Parent artifact", + "json_schema": { + "description": "JSON Schema for this config kind (can be null if not available)", + "type": "object" + }, + "kind": { + "description": "The config kind name", "type": "string" }, + "sample_yaml": { + "description": "Sample YAML content for this config kind (can be null if not available)", + "type": "string" + } + }, + "required": [ + "kind" + ], + "type": "object" + }, + "ConfigVersion": { + "description": "API schema for a config version.", + "properties": { "change_description": { "description": "Description of changes", "type": "string" }, - "content_type": { - "description": "MIME content type", - "type": "string" - }, "created_at": { "description": "Creation timestamp", "format": "date-time", "type": "string" }, - "file": { - "description": "Storage file", - "type": "string" - }, - "file_name": { - "description": "Original filename", - "type": "string" - }, - "file_url": { - "description": "Signed file URL", - "type": "string" + "data": { + "description": "Additional structured data", + "type": "object" }, "id": { - "description": "Artifact version ID", + "description": "Config version ID (cfv_...)", "type": "string" }, - "image_source": { - "$ref": "#/components/schemas/ImageSource", - "description": "Image source metadata" + "org": { + "description": "Organization", + "type": "string" }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", + "sandbox": { + "description": "Sandbox", "type": "string" }, "version_number": { @@ -2214,537 +1523,381 @@ } }, "required": [ - "id" + "id", + "version_number" ], "type": "object" }, - "Attachment": { - "description": "Schema for a message attachment.\n\nAttachments can be of various types (file, scraped_link, artifact, task, media, action).\nFields present depend on the attachment type.\nMaps to format_attachments_for_client/1 output.\n", + "CustomObject": { + "description": "API schema for a custom object.", "properties": { - "content_type": { - "description": "MIME content type (file, artifact, media types)", - "type": "string" - }, - "description": { - "description": "Description (scraped_link, artifact, task types)", - "type": "string" - }, - "filename": { - "description": "File name (file, artifact, media types)", + "created_at": { + "description": "Created timestamp", + "format": "date-time", "type": "string" }, - "height": { - "description": "Media height (media type)", - "type": "integer" + "fields": { + "description": "Object field values", + "type": "object" }, "id": { - "description": "Attachment ID", + "description": "Public ID (cobj_...)", "type": "string" }, - "image_height": { - "description": "Preview image height (scraped_link type)", - "type": "integer" - }, - "image_source": { - "$ref": "#/components/schemas/ImageSource", - "description": "Image metadata (file, scraped_link, artifact, media types)" - }, - "image_url": { - "description": "Preview image URL (scraped_link type)", + "org": { + "description": "Organization", "type": "string" }, - "image_width": { - "description": "Preview image width (scraped_link type)", - "type": "integer" - }, - "media_type": { - "description": "Media type (media type)", + "row_key": { + "description": "Row key", "type": "string" }, - "name": { - "description": "Media name (media type)", + "sandbox": { + "description": "Sandbox identifier", "type": "string" }, - "object": { - "description": "Embedded object (task, action types)", - "type": "object" + "schema_type": { + "description": "Schema type (lookup_key)", + "type": "string" }, - "title": { - "description": "Title (scraped_link, artifact, task types)", + "team": { + "description": "Owning team", "type": "string" }, - "type": { - "description": "Attachment type: file, scraped_link, artifact, task, media, action", + "updated_at": { + "description": "Updated timestamp", + "format": "date-time", "type": "string" }, - "url": { - "description": "URL to the resource (file, scraped_link, artifact, media types)", + "user": { + "description": "Owning user", "type": "string" }, - "variants": { - "description": "Media variants (media type)", - "items": { - "$ref": "#/components/schemas/MediaVariant" - }, - "type": "array" - }, "version": { - "description": "Artifact version number (artifact type)", - "type": "integer" - }, - "width": { - "description": "Media width (media type)", + "description": "Aggregate version for OCC", "type": "integer" } }, "required": [ - "id", - "type" + "id" ], "type": "object" }, - "AuthTokens": { - "description": "API schema for authentication token responses.", + "DeviceAuthorizationResponse": { + "description": "API schema for OAuth device authorization responses.", "properties": { - "expires_in": { - "description": "Token TTL in seconds", - "type": "integer", - "x-sdk": "token_expiry" + "device_code": { + "description": "Device verification code", + "type": "string" }, - "metadata": { - "description": "Additional metadata (e.g., onboarding_job_id)", - "type": "object" + "expires_in": { + "description": "TTL in seconds", + "type": "integer" }, - "refresh_token": { - "description": "Refresh token", - "type": "string", - "x-sdk": "refresh_token" + "interval": { + "description": "Polling interval in seconds", + "type": "integer" }, - "token": { - "description": "Access token (JWT)", - "type": "string", - "x-sdk": "access_token" + "user_code": { + "description": "User-facing verification code", + "type": "string" }, - "token_type": { - "description": "Token type (Bearer)", + "verification_uri": { + "description": "Base verification URI", "type": "string" }, - "user": { - "$ref": "#/components/schemas/User", - "description": "Authenticated user" + "verification_uri_complete": { + "description": "Full verification URI with code", + "type": "string" } }, "required": [ - "token", - "refresh_token", - "user", - "token_type", - "expires_in" + "device_code", + "user_code", + "verification_uri", + "verification_uri_complete", + "expires_in", + "interval" ], "type": "object" }, - "Automation": { - "description": "Schema for a developer automation.\n\nMaps to serialized automation output from developer portal API.\n", + "DeviceAuthorizationStatusResponse": { + "description": "API schema for OAuth device authorization approval and denial responses.", "properties": { - "app": { - "description": "App (dap_...)", - "type": "string" - }, - "config": { - "description": "Associated config (cfg_...)", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", + "status": { + "description": "Authorization status (approved or denied)", "type": "string" - }, - "created_by_user": { - "description": "Creator user (usr_...)", + } + }, + "required": [ + "status" + ], + "type": "object" + }, + "ImageSource": { + "description": "API schema for image source metadata.", + "properties": { + "file": { + "description": "Storage file", "type": "string" }, - "creator": { - "description": "Creator account (dac_...)", - "type": "string" + "height": { + "description": "Image height in pixels", + "type": "integer" }, - "description": { - "description": "Optional description", + "media": { + "description": "Media", "type": "string" }, - "id": { - "description": "Public ID (aut_...)", + "mime_type": { + "description": "Image MIME type", "type": "string" }, - "input_schema_config": { - "description": "Input schema config (cfg_...)", + "refresh_url": { + "description": "URL to refresh signed URL", "type": "string" }, - "invoke_auth": { - "description": "Auth mode: secret_key or user", + "url": { + "description": "Image URL", "type": "string" }, - "lookup_key": { - "description": "Optional unique lookup key", + "width": { + "description": "Image width in pixels", + "type": "integer" + } + }, + "type": "object" + }, + "Installation": { + "description": "API schema for an installation.", + "properties": { + "agent": { + "description": "Owning agent", "type": "string" }, - "metadata": { - "description": "Arbitrary metadata", + "config": { + "description": "Configuration", "type": "object" }, - "name": { - "description": "Automation name", - "type": "string" - }, - "run_as_agent": { - "description": "Agent to run as (agt_...)", + "created_at": { + "description": "Creation timestamp", + "format": "date-time", "type": "string" }, - "run_as_user": { - "description": "User to run as (usr_...)", + "id": { + "description": "Installation ID (cin_...)", "type": "string" }, - "schedule": { - "description": "Cron expression for scheduled type", + "kind": { + "description": "Installation kind", "type": "string" }, - "status": { - "description": "Status: draft, running, or paused", + "shared_integration": { + "description": "Bound shared integration", "type": "string" }, - "trigger": { - "description": "Event name for trigger type", + "state": { + "description": "Installation state", "type": "string" }, - "type": { - "description": "Type: trigger, scheduled, or invoked", - "type": "string" + "status_payload": { + "description": "Status payload", + "type": "object" }, "updated_at": { - "description": "Updated timestamp", + "description": "Last update timestamp", "format": "date-time", "type": "string" } }, "required": [ - "id", - "app", - "name", - "type", - "status" + "id" ], "type": "object" }, - "AutomationRun": { - "description": "Schema for an automation run.\n\nMaps to serialized automation run output from developer portal API.\n", + "InstallationKind": { + "description": "API schema for an installation kind.", "properties": { - "app": { - "description": "App (dap_...)", - "type": "string" - }, - "automation": { - "description": "Automation (aut_...)", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "event_id": { - "description": "Triggering event ID", - "type": "string" + "accepts_sources": { + "description": "Whether this kind accepts sources", + "type": "boolean" }, - "id": { - "description": "Public ID (atr_...)", + "category": { + "description": "Category", "type": "string" }, - "payload": { - "description": "Event payload", - "type": "object" - }, - "result": { - "description": "Workflow execution result (payload and output)", + "config_schema": { + "description": "JSON schema for configuration", "type": "object" }, - "status": { - "description": "Status: pending, running, completed, failed, cancelled", + "description": { + "description": "Description", "type": "string" }, - "team": { - "description": "Team if team-owned", + "kind": { + "description": "Installation kind identifier", "type": "string" }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", + "label": { + "description": "Display label", "type": "string" }, - "user": { - "description": "User if user-owned", + "provider": { + "description": "Integration provider", "type": "string" + }, + "requires_integration": { + "description": "Whether this kind requires an integration", + "type": "boolean" } }, "required": [ - "id", - "app", - "automation", - "status" + "kind" ], "type": "object" }, - "BillingPlan": { - "description": "Schema for a billing plan.", + "InstallationKindListResponse": { + "description": "List response for installation kinds.", "properties": { - "description": { - "description": "Plan description", - "type": "string" - }, - "id": { - "description": "Plan identifier (e.g. paygo)", - "type": "string" - }, - "name": { - "description": "Human-readable plan name", - "type": "string" - }, - "target": { - "description": "Entity type this plan applies to (developer or org)", - "type": "string" + "data": { + "description": "List of installation kinds", + "items": { + "$ref": "#/components/schemas/InstallationKind" + }, + "type": "array" } }, + "required": [ + "data" + ], "type": "object" }, - "BillingSettingsApp": { - "description": "Schema for app billing settings.", + "InstallationListResponse": { + "description": "List response for installations.", "properties": { - "billing_account": { - "description": "Developer account that owns billing (public ID)", - "type": "string" - }, - "org_billing_enabled": { - "description": "Whether orgs get their own Stripe customers", - "type": "boolean" + "data": { + "description": "List of installations", + "items": { + "$ref": "#/components/schemas/Installation" + }, + "type": "array" } }, + "required": [ + "data" + ], "type": "object" }, - "BillingSettingsOrg": { - "description": "Schema for org billing settings.", + "InstallationSource": { + "description": "API schema for an installation source.", "properties": { - "auto_reup_amount_cents": { - "description": "Amount (cents) to charge when threshold is crossed", - "type": "integer" - }, - "auto_reup_enabled": { - "description": "Whether automatic credit reup is enabled", - "type": "boolean" - }, - "auto_reup_threshold_cents": { - "description": "Balance threshold (cents) to trigger auto-reup", - "type": "integer" - }, - "billing_provider_environment": { - "description": "Stripe environment (live or test)", - "type": "string" - }, - "billing_provider_id": { - "description": "Stripe customer ID", + "agent": { + "description": "Owning agent", "type": "string" }, - "pending_plan": { - "description": "Plan change awaiting Stripe confirmation, or __clear__ to remove plan", + "context_installation": { + "description": "Installation ID", "type": "string" }, - "plan": { - "description": "Active billing plan (e.g. enterprise-pilot)", + "created_at": { + "description": "Creation timestamp", + "format": "date-time", "type": "string" }, - "primary_user": { - "description": "Org admin user who is the billing contact (public ID)", - "type": "string" - } - }, - "type": "object" - }, - "BuiltinTool": { - "description": "An individual tool within a builtin tool catalog entry.", - "properties": { - "description": { - "description": "Tool description", + "id": { + "description": "Source ID (cso_...)", "type": "string" }, - "name": { - "description": "Tool name", - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "BuiltinToolCatalogEntry": { - "description": "A builtin tool catalog entry describing an available tool category.", - "properties": { - "config_schema": { - "description": "JSON schema for tool configuration", + "metadata": { + "description": "Arbitrary metadata", "type": "object" }, - "description": { - "description": "Tool description", + "parent_source": { + "description": "Parent source ID", "type": "string" }, - "instruction": { - "description": "Tool instruction", - "type": "string" + "payload": { + "description": "Source payload", + "type": "object" }, - "key": { - "description": "Unique tool key", + "state": { + "description": "Source state", "type": "string" }, - "label": { - "description": "Display label", + "team": { + "description": "Team ID", "type": "string" }, - "providers": { - "description": "Supported providers", - "items": { - "type": "string" - }, - "type": "array" - }, - "requires_integration": { - "description": "Whether an integration is required", - "type": "boolean" - }, - "server_tool_type": { - "description": "Server tool type identifier", + "thread": { + "description": "Thread ID", "type": "string" }, - "tools": { - "description": "List of individual tools", - "items": { - "$ref": "#/components/schemas/BuiltinTool" - }, - "type": "array" - } - }, - "required": [ - "key" - ], - "type": "object" - }, - "ChatMember": { - "description": "API schema for a chat member (user or agent).", - "properties": { - "agent": { - "$ref": "#/components/schemas/Agent", - "description": "Agent object (for agent members)" - }, - "membership_type": { - "description": "Membership type", + "type": { + "description": "Source type", "type": "string" }, - "type": { - "description": "Member type (user or agent)", + "updated_at": { + "description": "Last update timestamp", + "format": "date-time", "type": "string" }, "user": { - "$ref": "#/components/schemas/User", - "description": "User object (for user members)" - } - }, - "required": [ - "type" - ], - "type": "object" - }, - "CheckoutSessionResult": { - "description": "Schema for Stripe Checkout Session creation result.", - "properties": { - "checkout_url": { - "description": "Stripe Checkout URL to redirect the user to", + "description": "User ID", "type": "string" } }, "required": [ - "checkout_url" + "id" ], "type": "object" }, - "CommentCreateParams": { - "description": "Schema for comment creation parameters.\n\nUsed by both Users.Tasks.CreateComment and Teams.Tasks.CreateComment actions.\n", + "InstallationSourceListResponse": { + "description": "List response for installation sources.", "properties": { - "body": { - "description": "Comment body text", - "type": "string" + "data": { + "description": "List of installation sources", + "items": { + "$ref": "#/components/schemas/InstallationSource" + }, + "type": "array" } }, "required": [ - "body" + "data" ], "type": "object" }, - "ComputerExecResult": { - "description": "Result of executing a command on an agent computer.", + "InviteCreator": { + "description": "Minimal public-safe projection of the user who created an invite.\n\nInvites are fetched by unauthenticated recipients on the `/auth/invites/:id`\nroute, so this schema deliberately exposes only the fields needed to render a\njoin screen — id, display name, and profile picture. Email, org, sandbox, and\nother fields on the full `User` schema are omitted.\n", "properties": { - "exit_code": { - "description": "Process exit code", - "type": "integer" + "id": { + "description": "User ID", + "type": "string" }, - "output": { - "description": "Command output", + "name": { + "description": "Display name", "type": "string" + }, + "profile_picture": { + "$ref": "#/components/schemas/ImageSource", + "description": "Profile picture" } }, + "required": [ + "id" + ], "type": "object" }, - "Config": { - "description": "API schema for a config resource.", + "KeyValueStorageEntry": { + "description": "Schema for a key-value storage entry.\n\nMaps exactly to render_entry/1 output in ApiStorageController.\n", "properties": { "created_at": { "description": "Creation timestamp", "format": "date-time", "type": "string" }, - "current_version": { - "$ref": "#/components/schemas/ConfigVersion", - "description": "Current version" - }, - "id": { - "description": "Config ID (cfg_...)", - "type": "string" - }, - "is_archived": { - "description": "Whether config is archived", - "type": "boolean" - }, - "kind": { - "description": "Config kind (e.g., Agent, APITool)", - "type": "string" - }, - "lookup_key": { - "description": "Optional lookup key", - "type": "string" - }, - "mime_type": { - "description": "Content mime type", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "raw_content": { - "description": "Raw file content (system configs only)", - "type": "string" - }, - "sandbox": { - "description": "Sandbox identifier", - "type": "string" - }, - "team": { - "description": "Team", + "key": { + "description": "Storage key", "type": "string" }, "updated_at": { @@ -2756,129 +1909,116 @@ "description": "User", "type": "string" }, - "virtual_path": { - "description": "Unique path within the team", + "value": { + "description": "Stored value", "type": "string" } }, "required": [ - "id", - "kind" + "user", + "key", + "value" ], "type": "object" }, - "ConfigKind": { - "description": "Schema for a config kind in the list response.\n", + "KeyValueStorageEntryPage": { + "description": "Response envelope for the dual-mode key-value list endpoint.\n\nUser-JWT callers receive `%{data: [...]}` (no pagination fields).\nDeveloper / S2S callers receive `%{data: [...]}` plus pagination metadata.\n", "properties": { - "classification": { - "description": "Kind classification: root or supplemental", - "type": "string" - }, - "description": { - "description": "Markdown documentation describing what this config kind represents and how to use it", - "type": "string" - }, - "kind": { - "description": "The config kind name (e.g., Agent, APITool)", - "type": "string" + "data": { + "description": "Storage entries on this page", + "items": { + "$ref": "#/components/schemas/KeyValueStorageEntryWithUser" + }, + "type": "array" }, - "sample_available": { - "description": "Whether a YAML sample is available", + "has_next": { + "description": "Whether a next page exists (developer / S2S only)", "type": "boolean" }, - "schema_available": { - "description": "Whether a JSON schema is available", + "has_prev": { + "description": "Whether a previous page exists (developer / S2S only)", "type": "boolean" + }, + "page": { + "description": "Current page number (developer / S2S only)", + "type": "integer" + }, + "page_size": { + "description": "Results per page (developer / S2S only)", + "type": "integer" + }, + "total_entries": { + "description": "Total entries matching the filters (developer / S2S only)", + "type": "integer" + }, + "total_pages": { + "description": "Total number of pages (developer / S2S only)", + "type": "integer" } }, "required": [ - "kind", - "sample_available", - "schema_available", - "classification" + "data" ], "type": "object" }, - "ConfigKindSchema": { - "description": "Schema for a config kind's JSON schema and sample response.\n", + "KeyValueStorageEntryWithUser": { + "description": "Schema for a key-value storage entry, optionally enriched with a summary of\nthe owning user.\n\nUsed by the dual-mode list endpoint: user-JWT callers omit the user_email /\nuser_name fields (they know who they are); developer / S2S callers populate\nthem so the portal can render an owner column without a per-row lookup.\n", "properties": { - "json_schema": { - "description": "JSON Schema for this config kind (can be null if not available)", - "type": "object" + "created_at": { + "description": "Creation timestamp", + "format": "date-time", + "type": "string" }, - "kind": { - "description": "The config kind name", + "key": { + "description": "Storage key", "type": "string" }, - "sample_yaml": { - "description": "Sample YAML content for this config kind (can be null if not available)", + "updated_at": { + "description": "Last update timestamp", + "format": "date-time", + "type": "string" + }, + "user": { + "description": "User ID", + "type": "string" + }, + "user_email": { + "description": "User email (developer / S2S only)", + "type": "string" + }, + "user_name": { + "description": "User display name (developer / S2S only)", + "type": "string" + }, + "value": { + "description": "Stored value", "type": "string" } }, "required": [ - "kind" + "user", + "key", + "value", + "created_at", + "updated_at" ], "type": "object" }, - "ConfigLoadResult": { - "description": "Schema for batch-loaded config content and metadata.", + "LLMConfig": { + "description": "API schema for per-routine LLM invocation settings.\n\nMirrors `ArchAstro.Agents.Routines.LLMConfig`. When `model` is present,\nit overrides the agent's `default_model` for the routine (or step).\n", "properties": { - "content": { - "description": "Fully resolved content tree", - "type": "object" - }, - "metadata": { - "description": "Metadata map keyed by JSON path", - "type": "object" - } - }, - "required": [ - "content", - "metadata" - ], - "type": "object" - }, - "ConfigSample": { - "description": "Schema for a sample config payload.", - "properties": { - "kind": { - "description": "Config kind", - "type": "string" - }, - "mime_type": { - "description": "Content MIME type", - "type": "string" - }, - "sample_yaml": { - "description": "Sample YAML content", + "model": { + "description": "Model identifier. When set, overrides the agent's default_model.", "type": "string" } }, - "required": [ - "kind", - "sample_yaml", - "mime_type" - ], - "type": "object" - }, - "ConfigSaveResult": { - "description": "Schema for batch-save config metadata.", - "properties": { - "metadata": { - "description": "Updated metadata with version numbers", - "type": "object" - } - }, - "required": [ - "metadata" - ], "type": "object" }, - "ConfigVersion": { - "description": "API schema for a config version.", + "MediaVariant": { + "description": "API schema for a media variant.", "properties": { - "change_description": { - "description": "Description of changes", + "content_type": { + "description": "File content type", "type": "string" }, "created_at": { @@ -2886,134 +2026,141 @@ "format": "date-time", "type": "string" }, - "data": { - "description": "Additional structured data", - "type": "object" + "file": { + "description": "Storage file", + "type": "string" + }, + "filename": { + "description": "Original filename", + "type": "string" + }, + "height": { + "description": "Height in pixels", + "type": "integer" }, "id": { - "description": "Config version ID (cfv_...)", + "description": "Variant ID", "type": "string" }, - "org": { - "description": "Organization", + "image_source": { + "$ref": "#/components/schemas/ImageSource", + "description": "Image source metadata" + }, + "updated_at": { + "description": "Last update timestamp", + "format": "date-time", "type": "string" }, - "sandbox": { - "description": "Sandbox", + "url": { + "description": "Signed download URL", "type": "string" }, - "version_number": { - "description": "Version number", + "variant_key": { + "description": "Variant key (original, thumbnail, etc)", + "type": "string" + }, + "width": { + "description": "Width in pixels", "type": "integer" } }, "required": [ - "id", - "version_number" + "id" ], "type": "object" }, - "ContextCredential": { - "description": "Schema for a user credential.\n\nMaps to serialized credential output from developer portal API.\n", + "Message": { + "description": "API schema for a chat message.", "properties": { - "alt_domains": { - "description": "Alternative domains", + "actors": { + "description": "Message actors", "items": { - "type": "string" + "$ref": "#/components/schemas/Actor" }, "type": "array" }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", + "agent": { + "description": "Agent if sent by an agent user", "type": "string" }, - "description": { - "description": "Human-readable description", - "type": "string" + "attachments": { + "description": "Message attachments", + "items": { + "$ref": "#/components/schemas/Attachment" + }, + "type": "array" }, - "domain": { - "description": "Domain (e.g., app.schoology.com)", + "branched_thread": { + "description": "Branched thread (if message spawned a thread)", "type": "string" }, - "id": { - "description": "Public ID (ucr_...)", + "content": { + "description": "Message content", "type": "string" }, - "last_accessed_at": { - "description": "Last accessed timestamp", + "created_at": { + "description": "Creation timestamp", "format": "date-time", "type": "string" }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" + "has_replies": { + "description": "Whether message has replies", + "type": "boolean" }, - "user": { - "description": "Owning user", - "type": "string" - } - }, - "required": [ - "id", - "domain" - ], - "type": "object" - }, - "ContextEntry": { - "description": "API schema for a context entry.", - "properties": { - "after_cursor": { - "description": "Pagination cursor (after)", + "id": { + "description": "Message ID (msg_...)", "type": "string" }, - "agent_user": { - "description": "Agent user", + "idempotency_key": { + "description": "Client-provided idempotency key", "type": "string" }, - "before_cursor": { - "description": "Pagination cursor (before)", + "legacy_agent": { + "description": "Legacy agent if sent by legacy chat agent", "type": "string" }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", + "metadata": { + "description": "Message metadata", + "type": "object" + }, + "org": { + "description": "Organization", "type": "string" }, - "files": { - "description": "Loaded file objects", + "reactions": { + "description": "Message reactions", "items": { - "type": "object" + "$ref": "#/components/schemas/MessageReaction" }, "type": "array" }, - "id": { - "description": "Context entry ID", + "rendering_mode": { + "description": "Rendering mode hint", "type": "string" }, - "links": { - "description": "Loaded link objects", - "items": { - "type": "object" - }, - "type": "array" - }, - "media": { - "description": "Loaded media objects", + "replies": { + "description": "Inline replies (if loaded)", "items": { "type": "object" }, "type": "array" }, - "metadata": { - "description": "Entry metadata", - "type": "object" + "replies_after_cursor": { + "description": "Cursor for replies pagination", + "type": "string" }, - "org": { - "description": "Organization", + "replies_before_cursor": { + "description": "Cursor for replies pagination", "type": "string" }, + "reply_count": { + "description": "Number of replies", + "type": "integer" + }, + "reply_to": { + "description": "Parent message object (if loaded)", + "type": "object" + }, "sandbox": { "description": "Sandbox identifier", "type": "string" @@ -3022,17 +2169,12 @@ "description": "Team", "type": "string" }, - "text": { - "description": "Entry text", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", + "thread": { + "description": "Parent thread", "type": "string" }, "user": { - "description": "User", + "description": "Author user (public ID or expanded object when loaded)", "type": "string" } }, @@ -3041,293 +2183,185 @@ ], "type": "object" }, - "ContextIngestion": { - "description": "Schema for a context ingestion.\n\nMaps to serialized context ingestion output from developer portal API.\n", + "MessageReaction": { + "description": "Schema for inline message reactions.\n\nThis is the compact format used in Message.reactions[], which differs from\nthe full Reaction schema used in standalone reaction endpoints.\nMaps to format_reactions_for_client/1 output.\n", "properties": { - "agent": { - "description": "Agent", - "type": "string" - }, - "completed_at": { - "description": "Completed timestamp", - "format": "date-time", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "error": { - "description": "Error details (if failed)", + "payload": { + "description": "Reaction payload (e.g., {emoji: '👍'})", "type": "object" }, - "id": { - "description": "Public ID (cig_...)", + "type": { + "description": "Reaction type (e.g., emoji_reaction)", "type": "string" }, - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "source": { - "description": "Source ID", + "user": { + "description": "User who added the reaction", "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "OAuthTokenResponse": { + "description": "API schema for OAuth token endpoint responses.", + "properties": { + "access_token": { + "description": "OAuth access token", + "type": "string", + "x-sdk": "access_token" }, - "started_at": { - "description": "Started timestamp", - "format": "date-time", - "type": "string" + "expires_in": { + "description": "Token TTL in seconds", + "type": "integer", + "x-sdk": "token_expiry" }, - "status": { - "description": "Status (pending, running, awaiting_callback, succeeded, failed)", - "type": "string" + "refresh_token": { + "description": "OAuth refresh token", + "type": "string", + "x-sdk": "refresh_token" }, - "team": { - "description": "Owning team ID", + "scope": { + "description": "Granted scopes (space-separated)", "type": "string" }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", + "token_type": { + "description": "Token type (Bearer)", "type": "string" }, "user": { - "description": "Owning user ID", - "type": "string" + "$ref": "#/components/schemas/User", + "description": "Authenticated user" } }, "required": [ - "id", - "status" + "access_token", + "token_type", + "expires_in" ], "type": "object" }, - "ContextIntegration": { - "description": "Schema for a context integration.\n\nMaps to serialized integration output from developer portal API.\n", + "PaginatedReplies": { + "description": "Schema for paginated message replies response.\n\nUsed by message replies list endpoints.\nNote: This response is NOT wrapped in a \"data\" field.\n", "properties": { - "agent": { - "description": "Owning agent", + "after_cursor": { + "description": "Cursor for fetching items after this point", "type": "string" }, - "auth_type": { - "description": "Auth type: oauth or app_installation", + "before_cursor": { + "description": "Cursor for fetching items before this point", "type": "string" }, - "connected_at": { - "description": "Connection timestamp", - "format": "date-time", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "expires_at": { - "description": "Token expiration timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Public ID (int_...)", - "type": "string" - }, - "installation": { - "description": "External installation (e.g. GitHub App installation)", - "type": "string" - }, - "last_refreshed_at": { - "description": "Last token refresh timestamp", - "format": "date-time", - "type": "string" - }, - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "org": { - "description": "Owning org", - "type": "string" - }, - "provider": { - "description": "Provider name (e.g., google, github)", - "type": "string" + "has_more": { + "description": "Whether more replies exist beyond the current page", + "type": "boolean" }, - "scopes": { - "description": "OAuth scopes", + "replies": { + "description": "List of reply message objects", "items": { - "type": "string" + "$ref": "#/components/schemas/Message" }, "type": "array" }, - "status": { - "description": "Connection status: connected, disconnected, or token_expired", - "type": "string" - }, - "team": { - "description": "Owning team", - "type": "string" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - }, - "user": { - "description": "Owning user", - "type": "string" - }, - "workspace_key": { - "description": "Workspace key", - "type": "string" + "total_count": { + "description": "Total number of replies", + "type": "integer" } }, "required": [ - "id", - "provider", - "auth_type", - "status" + "replies" ], "type": "object" }, - "ContextItem": { - "description": "Schema for a context item.\n\nMaps to serialized context item output from developer portal API.\n", + "PresetConfig": { + "description": "API schema for preset handler configuration.\n\nMirrors `ArchAstro.Agents.Routines.PresetConfig`. Used wherever a request\nor response carries a preset config — routine-level and chain-step-level.\n\nServer-side validation (length/format rules on `instructions`, enum checks\non `session_mode`/`session_scope`, model lookup against\n`ChatCompletion.models/0`) is authoritative. This schema defines the\nrequest shape and typed response shape so OpenAPI consumers see real\ntypes instead of an opaque object.\n", "properties": { - "agent": { - "description": "Agent", - "type": "string" - }, - "content_type": { - "description": "Content type", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Public ID (cim_...)", - "type": "string" - }, - "item_group": { - "description": "Item group if part of a group", - "type": "string" - }, - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "normalized_content": { - "description": "Normalized content text", + "instructions": { + "description": "Custom task or behavior instructions for the preset (max 10,000 chars).", "type": "string" }, - "raw_content": { - "description": "Raw content data", - "type": "object" - }, - "source": { - "description": "Source", - "type": "string" + "llm": { + "$ref": "#/components/schemas/LLMConfig", + "description": "LLM invocation settings (e.g. a `model` override for this routine/step)." }, - "team": { - "description": "Owning team", + "session_mode": { + "description": "Session mode: `stateless` (default, new session per trigger) or `session` (find-or-create a persistent session scoped by `session_scope`).", "type": "string" }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", + "session_scope": { + "description": "When `session_mode` is `session`, controls session scoping: `per_user` (default), `per_key`, `per_org`, or `global`.", "type": "string" }, - "user": { - "description": "Owning user", - "type": "string" + "structured_message_template_ids": { + "description": "Config IDs of AgentMessageSchema templates that constrain the agent's responses to predefined structured formats.", + "items": { + "type": "string" + }, + "type": "array" } }, - "required": [ - "id" - ], "type": "object" }, - "ContextSource": { - "description": "Schema for a context source.\n\nMaps to serialized context source output from developer portal API.\n", + "RoutinePreset": { + "description": "A routine preset entry in the preset listing endpoint. Describes *what*\na preset is, not a per-routine configuration — that's `PresetConfig`.\n", "properties": { - "agent": { - "description": "Owning agent", - "type": "string" - }, - "context_installation": { - "description": "Associated installation", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Public ID (cso_...)", - "type": "string" - }, - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "org": { - "description": "Owning organization", - "type": "string" - }, - "parent_source": { - "description": "Parent source", - "type": "string" - }, - "payload": { - "description": "Type-specific configuration", - "type": "object" - }, - "sandbox": { - "description": "Owning sandbox", - "type": "string" + "applicable_events": { + "description": "Event types this preset accepts. `[\"*\"]` means any event. Other event types are rejected at routine validation time.", + "items": { + "type": "string" + }, + "type": "array" }, - "state": { - "description": "State: active or paused", - "type": "string" + "chainable": { + "description": "Whether this preset may appear as a step inside a `:chain` routine. Presets with session or async execution models are not chainable.", + "type": "boolean" }, - "team": { - "description": "Owning team", + "description": { + "description": "Preset description", "type": "string" }, - "thread": { - "description": "Associated thread", + "label": { + "description": "Display label", "type": "string" }, - "type": { - "description": "Source type (e.g., gmail, github_activity)", + "name": { + "description": "Preset name (e.g. do_task)", "type": "string" }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" + "sessionable": { + "description": "Whether this preset maintains a persistent chatroom session across turns (e.g. `participate`). Sessionable presets don't expose instructions or session-mode fields at the routine level.", + "type": "boolean" }, - "user": { - "description": "Owning user", - "type": "string" + "unique": { + "description": "Whether only one routine with this preset may exist per agent. Enforced at the AgentRoutine unique-index layer.", + "type": "boolean" } }, "required": [ - "id", - "type", - "state" + "name", + "label", + "description", + "applicable_events", + "sessionable", + "unique", + "chainable" ], "type": "object" }, - "Credential": { - "description": "API schema for a user credential.", + "Team": { + "description": "API schema for a team.", "properties": { - "alt_domains": { - "description": "Alternative domains", + "acl": { + "$ref": "#/components/schemas/Acl", + "description": "Access control list. Contains grants array with principal_type, principal, and actions. Null when no ACL restrictions are applied." + }, + "app": { + "description": "Application", + "type": "string" + }, + "badges": { + "description": "Badge counts by category", "type": "object" }, "created_at": { @@ -3336,20 +2370,23 @@ "type": "string" }, "description": { - "description": "Description", + "description": "Team description", "type": "string" }, - "domain": { - "description": "Primary domain", + "id": { + "description": "Team ID", "type": "string" }, - "id": { - "description": "Credential ID (ucr_...)", + "membership_status": { + "description": "Viewer's membership role (owner, admin, member) or null if not a member", "type": "string" }, - "last_accessed_at": { - "description": "Last accessed timestamp", - "format": "date-time", + "metadata": { + "description": "Team metadata", + "type": "object" + }, + "name": { + "description": "Team name", "type": "string" }, "org": { @@ -3360,8 +2397,8 @@ "description": "Sandbox", "type": "string" }, - "secret_group": { - "description": "Secret group ID", + "slug": { + "description": "URL slug", "type": "string" }, "updated_at": { @@ -3375,90 +2412,72 @@ ], "type": "object" }, - "CredentialWithSecrets": { - "description": "API schema for a credential with decrypted secret values.", - "properties": { - "credential": { - "description": "The credential with decrypted values", - "type": "object" - } - }, - "required": [ - "credential" - ], - "type": "object" - }, - "CreditBalance": { - "description": "Schema for credit balance response.", + "TeamInvite": { + "description": "Schema for a team invite response.\n", "properties": { - "available_cents": { - "description": "Available credit balance in cents", - "type": "integer" - }, - "currency": { - "description": "Currency code (e.g. usd)", + "code": { + "description": "6-character invite code", "type": "string" - }, - "has_payment_method": { - "description": "Whether a saved payment method exists", - "type": "boolean" } }, "required": [ - "available_cents", - "currency", - "has_payment_method" + "code" ], "type": "object" }, - "CustomObject": { - "description": "API schema for a custom object.", + "TeamMembership": { + "description": "API schema for a team membership.", "properties": { + "agent": { + "$ref": "#/components/schemas/Agent", + "description": "Agent object (when loaded)" + }, "created_at": { - "description": "Created timestamp", + "description": "Creation timestamp", "format": "date-time", "type": "string" }, - "fields": { - "description": "Object field values", - "type": "object" - }, "id": { - "description": "Public ID (cobj_...)", + "description": "Membership ID", "type": "string" }, - "org": { - "description": "Organization", + "joined_at": { + "description": "Join timestamp", + "format": "date-time", "type": "string" }, - "row_key": { - "description": "Row key", - "type": "string" + "metadata": { + "description": "Membership metadata", + "type": "object" }, - "sandbox": { - "description": "Sandbox identifier", + "name": { + "description": "Member name", "type": "string" }, - "schema_type": { - "description": "Schema type (lookup_key)", + "profile_picture": { + "$ref": "#/components/schemas/ImageSource", + "description": "Profile picture" + }, + "role": { + "description": "Role in team", "type": "string" }, "team": { - "description": "Owning team", + "description": "Team object (when loaded)", + "type": "object" + }, + "type": { + "description": "Member type (user, agent, unknown)", "type": "string" }, "updated_at": { - "description": "Updated timestamp", + "description": "Last update timestamp", "format": "date-time", "type": "string" }, "user": { - "description": "Owning user", - "type": "string" - }, - "version": { - "description": "Aggregate version for OCC", - "type": "integer" + "$ref": "#/components/schemas/User", + "description": "User object (when loaded)" } }, "required": [ @@ -3466,531 +2485,407 @@ ], "type": "object" }, - "Dataset": { - "description": "Schema for an analytics dataset definition.\n", + "TeamMembershipListResponse": { + "description": "Paginated list response for team memberships.", "properties": { - "dimensions": { - "description": "Available dimensions", + "data": { + "description": "List of team memberships", "items": { - "$ref": "#/components/schemas/DatasetDimension" + "$ref": "#/components/schemas/TeamMembership" }, "type": "array" }, - "metrics": { - "description": "Available metrics", - "items": { - "$ref": "#/components/schemas/DatasetMetric" - }, - "type": "array" + "has_next": { + "description": "Whether a next page exists", + "type": "boolean" }, - "name": { - "description": "Dataset identifier", - "type": "string" + "has_prev": { + "description": "Whether a previous page exists", + "type": "boolean" }, - "time_dimension": { - "$ref": "#/components/schemas/DatasetDimension", - "description": "Time dimension for time series queries" - } - }, - "required": [ - "name", - "dimensions", - "metrics" - ], - "type": "object" - }, - "DatasetDimension": { - "description": "Schema for a dataset dimension field.\n", - "properties": { - "label": { - "description": "Human-readable label", - "type": "string" + "page": { + "description": "Current page number", + "type": "integer" }, - "name": { - "description": "Dimension identifier", - "type": "string" + "page_size": { + "description": "Results per page", + "type": "integer" }, - "type": { - "description": "Data type (string, integer, boolean, datetime, date)", - "type": "string" + "total_entries": { + "description": "Total number of entries", + "type": "integer" + }, + "total_pages": { + "description": "Total number of pages", + "type": "integer" } }, "required": [ - "name", - "type", - "label" + "data" ], "type": "object" }, - "DatasetMetric": { - "description": "Schema for a dataset metric field.\n", + "Thread": { + "description": "API schema for a chat thread.", "properties": { - "aggregation": { - "description": "Aggregation function (sum, count, avg, min, max, count_distinct)", + "agent_user": { + "description": "Owning agent user", "type": "string" }, - "label": { - "description": "Human-readable label", + "created_at": { + "description": "Creation timestamp", + "format": "date-time", "type": "string" }, - "name": { - "description": "Metric identifier", + "creator": { + "$ref": "#/components/schemas/User", + "description": "Creator user object" + }, + "description": { + "description": "Thread description", "type": "string" }, - "type": { - "description": "Output type (integer, float)", + "id": { + "description": "Thread ID (thr_...)", "type": "string" - } - }, - "required": [ - "name", - "type", - "aggregation", - "label" - ], - "type": "object" - }, - "DatasetQueryResult": { - "description": "Schema for a dataset query result.\n", - "properties": { - "columns": { - "description": "Column definitions with name, type, and label", - "items": { - "type": "object" - }, - "type": "array" }, - "meta": { - "description": "Query metadata (total_rows, query_time_ms)", - "type": "object" + "is_channel": { + "description": "Whether this is a channel", + "type": "boolean" }, - "rows": { - "description": "Result rows as maps of column_name → value", - "items": { - "type": "object" - }, - "type": "array" - } - }, - "required": [ - "columns", - "rows", - "meta" - ], - "type": "object" - }, - "DeletionConfirmation": { - "description": "Schema for delete operations that return a deleted count.", - "properties": { - "deleted_count": { - "description": "Number of deleted records", - "type": "integer" - } - }, - "required": [ - "deleted_count" - ], - "type": "object" - }, - "Developer": { - "description": "Schema for developer account billing settings.", - "properties": { - "auto_reup_amount_cents": { - "description": "Amount (cents) to charge when threshold is crossed", - "type": "integer" + "is_default": { + "description": "Whether this is the default thread", + "type": "boolean" }, - "auto_reup_enabled": { - "description": "Whether automatic credit reup is enabled", + "is_transient": { + "description": "Whether this thread is transient", "type": "boolean" }, - "auto_reup_threshold_cents": { - "description": "Balance threshold (cents) to trigger auto-reup", - "type": "integer" + "is_unlisted": { + "description": "Whether this thread is unlisted", + "type": "boolean" }, - "billing_provider_environment": { - "description": "Stripe environment (live or test)", + "key": { + "description": "Thread key", "type": "string" }, - "billing_provider_id": { - "description": "Stripe customer ID", + "last_activity": { + "description": "Last activity timestamp", + "format": "date-time", "type": "string" }, - "pending_plan": { - "description": "Plan change awaiting Stripe confirmation, or __clear__ to remove plan", - "type": "string" + "metadata": { + "description": "Thread metadata", + "type": "object" }, - "plan": { - "description": "Active billing plan (e.g. paygo)", - "type": "string" - } - }, - "type": "object" - }, - "DeveloperOrg": { - "description": "Schema for an organization.\n\nMaps to serialized org output from developer portal API.\n", - "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", + "org": { + "description": "Organization", "type": "string" }, - "description": { - "description": "Organization description", - "type": "string" + "parent_message": { + "$ref": "#/components/schemas/Message", + "description": "Parent message object" }, - "domain": { - "description": "Primary domain", - "type": "string" + "participant": { + "description": "Participant users", + "items": { + "type": "string" + }, + "type": "array" }, - "id": { - "description": "Public ID (org_...)", - "type": "string" + "participants": { + "description": "Participant user objects", + "items": { + "$ref": "#/components/schemas/User" + }, + "type": "array" }, - "industry": { - "description": "Industry category", - "type": "string" + "participating_actor": { + "description": "Actors participating in thread", + "items": { + "type": "string" + }, + "type": "array" }, - "name": { - "description": "Organization name", + "participating_agents": { + "description": "Agents participating in thread", + "items": { + "$ref": "#/components/schemas/Agent" + }, + "type": "array" + }, + "role": { + "description": "User's role in the thread", "type": "string" }, "sandbox": { - "description": "Sandbox identifier (nullable)", + "description": "Sandbox identifier", "type": "string" }, + "settings": { + "$ref": "#/components/schemas/ThreadSettings", + "description": "Thread settings" + }, "slug": { - "description": "URL-safe slug", + "description": "Thread slug", "type": "string" }, - "status": { - "description": "Status (active, suspended, trialing)", + "sub_threads": { + "description": "Sub-threads", + "items": { + "type": "object" + }, + "type": "array" + }, + "team": { + "description": "Owning team", + "type": "string" + }, + "title": { + "description": "Thread title", "type": "string" }, + "ttl": { + "description": "Time-to-live in seconds", + "type": "integer" + }, + "unread_count": { + "description": "Unread message count", + "type": "integer" + }, "updated_at": { - "description": "Updated timestamp", + "description": "Last update timestamp", "format": "date-time", "type": "string" }, - "website": { - "description": "Website URL", + "user": { + "description": "Owning user", "type": "string" } }, "required": [ - "id", - "name", - "slug", - "domain" + "id" ], "type": "object" }, - "DeveloperSystemAccessToken": { - "description": "Schema for a system access token (developer admin view).\n\nMaps to serialized system access token output from developer portal API.\n", + "ThreadMember": { + "description": "API schema for a thread member.", "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Public ID (sat_...)", + "membership_type": { + "description": "Membership type (owner or member)", "type": "string" }, - "last_used_at": { - "description": "Last used timestamp", - "format": "date-time", + "thread": { + "description": "Thread", "type": "string" }, - "name": { - "description": "Optional label for the token", + "user": { + "$ref": "#/components/schemas/User", + "description": "User details (when loaded)" + } + }, + "type": "object" + }, + "ThreadReadStatus": { + "description": "Schema for thread read status response.\n", + "properties": { + "last_read_message": { + "description": "Last read message", "type": "string" }, - "revoked_at": { - "description": "Revoked timestamp", - "format": "date-time", + "thread": { + "description": "Thread", "type": "string" }, - "token": { - "description": "Raw JWT (only present on creation)", - "type": "string" + "unread_count": { + "description": "Number of unread messages", + "type": "integer" } }, "required": [ - "id" + "thread", + "unread_count" ], "type": "object" }, - "DeveloperThread": { - "description": "Schema for a thread in the developer portal.\n\nMaps to serialized thread output from developer portal API.\n", + "ThreadSettings": { + "description": "Schema for thread settings response.\n\nUsed by thread settings show/update endpoints.\n", + "properties": { + "agent_enabled": { + "description": "Whether the agent is enabled for this thread", + "type": "boolean" + } + }, + "type": "object" + }, + "User": { + "description": "API schema for a user.", "properties": { - "app_name": { - "description": "Associated app name", + "alias": { + "description": "User alias/handle", "type": "string" }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", + "email": { + "description": "User email address", "type": "string" }, "id": { - "description": "Public ID (thr_...)", + "description": "User ID", "type": "string" }, - "is_channel": { - "description": "Whether this is a channel thread", - "type": "boolean" - }, - "is_default": { - "description": "Whether this is the default thread", - "type": "boolean" - }, - "is_unlisted": { - "description": "Whether thread is hidden from listings", - "type": "boolean" + "metadata": { + "description": "User metadata", + "type": "object" }, - "key": { - "description": "Unique key within owner scope", + "name": { + "description": "User display name", "type": "string" }, "org": { - "description": "Organization (nullable)", - "type": "string" - }, - "owner": { - "description": "Owner public", - "type": "string" - }, - "owner_name": { - "description": "Owner display name", - "type": "string" - }, - "owner_type": { - "description": "Owner type: team, user, agent, or nil", + "description": "Organization", "type": "string" }, "sandbox": { - "description": "Sandbox identifier (nullable)", - "type": "string" - }, - "slug": { - "description": "URL-friendly slug", - "type": "string" - }, - "title": { - "description": "Thread title", - "type": "string" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", + "description": "Sandbox", "type": "string" } }, "required": [ - "id", - "title" + "id" ], "type": "object" }, - "DeveloperUser": { - "description": "Schema for a user (developer admin view).\n\nMaps to serialized user output from developer portal API.\n", + "UserInvite": { + "description": "API schema for a user invite.", "properties": { - "alias": { - "description": "User alias", - "type": "string" - }, - "confirmed_at": { - "description": "Email confirmed timestamp", - "format": "date-time", - "type": "string" - }, "created_at": { - "description": "Created timestamp", + "description": "Creation timestamp", "format": "date-time", "type": "string" }, - "email": { - "description": "Email address", - "type": "string" - }, - "full_name": { - "description": "Full name", - "type": "string" - }, "id": { - "description": "Public ID (usr_...)", - "type": "string" - }, - "is_system_user": { - "description": "Whether this is a system user", - "type": "boolean" - }, - "org": { - "description": "Organization (nullable)", - "type": "string" - }, - "org_name": { - "description": "Organization display name (nullable)", + "description": "Invite ID (uin_...)", "type": "string" }, - "org_role": { - "description": "Organization role (admin, member, viewer; nullable)", + "key": { + "description": "Invite key", "type": "string" }, - "password": { - "description": "Temporary plaintext password returned on reset", - "type": "string" + "metadata": { + "description": "Invite metadata", + "type": "object" }, - "sandbox": { - "description": "Sandbox identifier (nullable)", + "thread": { + "description": "Thread", "type": "string" }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" + "user": { + "$ref": "#/components/schemas/InviteCreator", + "description": "Invite creator" } }, "required": [ - "id", - "email" + "id" ], "type": "object" }, - "DeviceAuthorizationResponse": { - "description": "API schema for OAuth device authorization responses.", + "ValidationResult": { + "description": "Schema for config validation result.\n", "properties": { - "device_code": { - "description": "Device verification code", - "type": "string" - }, - "expires_in": { - "description": "TTL in seconds", - "type": "integer" - }, - "interval": { - "description": "Polling interval in seconds", - "type": "integer" - }, - "user_code": { - "description": "User-facing verification code", - "type": "string" + "errors": { + "description": "List of validation errors", + "items": { + "type": "string" + }, + "type": "array" }, - "verification_uri": { - "description": "Base verification URI", - "type": "string" + "valid": { + "description": "Whether the config is valid", + "type": "boolean" }, - "verification_uri_complete": { - "description": "Full verification URI with code", - "type": "string" - } - }, - "required": [ - "device_code", - "user_code", - "verification_uri", - "verification_uri_complete", - "expires_in", - "interval" - ], - "type": "object" - }, - "DeviceAuthorizationStatusResponse": { - "description": "API schema for OAuth device authorization approval and denial responses.", - "properties": { - "status": { - "description": "Authorization status (approved or denied)", - "type": "string" + "warnings": { + "description": "Optional warnings emitted during validation", + "items": { + "type": "string" + }, + "type": "array" } }, "required": [ - "status" + "valid" ], "type": "object" }, - "Domain": { - "description": "Schema for a registered domain.\n\nMaps to serialized domain output from developer portal API.\n", + "WorkerStatus": { + "description": "API schema for background worker status on a routine run.", "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "domain": { - "description": "Domain name", - "type": "string" + "attempt": { + "description": "Current attempt number (0 = not yet attempted)", + "type": "integer" }, - "id": { - "description": "Public ID (dad_...)", - "type": "string" + "max_attempts": { + "description": "Maximum allowed attempts", + "type": "integer" }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", + "status": { + "description": "Worker state: queued, executing, retrying, completed, discarded, or cancelled", "type": "string" - }, - "verified": { - "description": "Whether domain is verified", - "type": "boolean" } }, "required": [ - "id", - "domain" + "status", + "attempt", + "max_attempts" ], "type": "object" }, - "DomainEvent": { - "description": "Schema for a developer portal domain event.", + "WorkingMemoryEntry": { + "description": "API schema for a working memory entry.", "properties": { "agent": { - "description": "Agent identifier", + "description": "Owning agent", "type": "string" }, "created_at": { - "description": "Created timestamp", + "description": "Creation timestamp", "format": "date-time", "type": "string" }, - "event_name": { - "description": "Event name", + "expires_at": { + "description": "Expiration timestamp", + "format": "date-time", "type": "string" }, "id": { - "description": "Domain event ID", + "description": "Memory entry ID (amm_...)", "type": "string" }, - "idempotency_key": { - "description": "Idempotency key for the event", + "key": { + "description": "Memory key", "type": "string" }, - "payload": { - "description": "Event payload", - "type": "object" - }, - "team": { - "description": "Team identifier", + "updated_at": { + "description": "Last update timestamp", + "format": "date-time", "type": "string" }, - "user": { - "description": "User identifier", + "value": { + "description": "Memory value", "type": "string" } }, "required": [ - "id", - "event_name", - "payload" + "id" ], "type": "object" }, - "DomainEventPage": { - "description": "Schema for paginated domain event responses.", + "WorkingMemoryEntryListResponse": { + "description": "Paginated list response for working memory entries.", "properties": { "data": { - "description": "Domain events", + "description": "List of working memory entries", "items": { - "$ref": "#/components/schemas/DomainEvent" + "$ref": "#/components/schemas/WorkingMemoryEntry" }, "type": "array" }, @@ -4007,4198 +2902,478 @@ "type": "integer" }, "page_size": { - "description": "Page size", + "description": "Results per page", "type": "integer" }, "total_entries": { - "description": "Total entries", + "description": "Total number of entries", "type": "integer" }, "total_pages": { - "description": "Total pages", + "description": "Total number of pages", "type": "integer" } }, "required": [ - "data", - "page", - "page_size", - "total_entries", - "total_pages", - "has_next", - "has_prev" - ], - "type": "object" - }, - "EncryptedSecret": { - "description": "Schema for an encrypted secret payload.", - "properties": { - "encrypted_value": { - "description": "Encrypted ciphertext value", - "type": "string" - } - }, - "required": [ - "encrypted_value" + "data" ], "type": "object" - }, - "EvalResult": { - "description": "Schema for an eval result.", - "properties": { - "agent_response": { - "description": "Agent response", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "duration_ms": { - "description": "Execution duration", - "type": "integer" - }, - "grader_details": { - "description": "Grader details", - "type": "object" - }, - "id": { - "description": "Eval result ID", - "type": "string" - }, - "run": { - "description": "Parent eval run identifier", - "type": "string" + } + } + }, + "info": { + "description": "Agent-first API for runtime + developer control-plane operations (users, teams, agents, routines, context, workflows, integrations, and webhooks).", + "title": "ArchAstro Platform API", + "version": "v1" + }, + "openapi": "3.0.0", + "paths": { + "/api/v1/activity_feed": { + "get": { + "operationId": "get_api_v1_activity_feed", + "parameters": [ + { + "description": "Filter by kind (routine_run, automation_run, generic)", + "in": "query", + "name": "kind", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } }, - "score": { - "description": "Result score", - "type": "number" + { + "description": "Filter by level (debug, info, warn, error, audit)", + "in": "query", + "name": "level", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } }, - "status": { - "description": "Result status", - "type": "string" - }, - "task": { - "description": "Eval task identifier", - "type": "string" - }, - "task_input": { - "description": "Task input summary", - "type": "string" - }, - "transcript": { - "description": "Execution transcript", - "type": "object" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "run", - "status" - ], - "type": "object" - }, - "EvalResultList": { - "description": "Schema for eval result list responses.", - "properties": { - "data": { - "description": "Eval results", - "items": { - "$ref": "#/components/schemas/EvalResult" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "EvalRun": { - "description": "Schema for an eval run.", - "properties": { - "agent": { - "description": "Agent identifier", - "type": "string" - }, - "agent_name": { - "description": "Agent name", - "type": "string" - }, - "completed_at": { - "description": "Completion timestamp", - "format": "date-time", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Eval run ID", - "type": "string" - }, - "results": { - "description": "Eval results for this run", - "items": { - "$ref": "#/components/schemas/EvalResult" - }, - "type": "array" - }, - "started_at": { - "description": "Start timestamp", - "format": "date-time", - "type": "string" - }, - "status": { - "description": "Run status", - "type": "string" - }, - "suite": { - "description": "Eval suite identifier", - "type": "string" - }, - "summary": { - "description": "Aggregate run summary", - "type": "object" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "suite", - "status" - ], - "type": "object" - }, - "EvalRunList": { - "description": "Schema for eval run list responses.", - "properties": { - "data": { - "description": "Eval runs", - "items": { - "$ref": "#/components/schemas/EvalRun" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "EvalSuite": { - "description": "Schema for an eval suite.", - "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "description": { - "description": "Suite description", - "type": "string" - }, - "id": { - "description": "Eval suite ID", - "type": "string" - }, - "name": { - "description": "Suite name", - "type": "string" - }, - "org": { - "description": "Owner organization identifier", - "type": "string" - }, - "status": { - "description": "Suite status", - "type": "string" - }, - "tasks": { - "description": "Eval tasks included in the suite", - "items": { - "$ref": "#/components/schemas/EvalTask" - }, - "type": "array" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - }, - "user": { - "description": "Owner user identifier", - "type": "string" - } - }, - "required": [ - "id", - "name", - "status" - ], - "type": "object" - }, - "EvalSuiteList": { - "description": "Schema for eval suite list responses.", - "properties": { - "data": { - "description": "Eval suites", - "items": { - "$ref": "#/components/schemas/EvalSuite" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "EvalTask": { - "description": "Schema for an eval task.", - "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "expected_outcome": { - "description": "Expected outcome", - "type": "string" - }, - "grading_criteria": { - "description": "Grading criteria", - "items": { - "type": "object" - }, - "type": "array" - }, - "id": { - "description": "Eval task ID", - "type": "string" - }, - "input_message": { - "description": "Task input message", - "type": "string" - }, - "mock_agent_memory": { - "description": "Mock agent memory", - "type": "object" - }, - "mock_context_items": { - "description": "Mock context items", - "items": { - "type": "object" - }, - "type": "array" + { + "description": "Filter by agent IDs", + "in": "query", + "name": "agent", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } }, - "mock_datetime": { - "description": "Mock datetime", - "type": "string" + { + "description": "Filter by thread IDs", + "in": "query", + "name": "thread", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } }, - "mock_participants": { - "description": "Mock participants", - "items": { - "type": "object" - }, - "type": "array" + { + "description": "Filter by organization IDs", + "in": "query", + "name": "org", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } }, - "mock_tools": { - "description": "Mock tool definitions", - "items": { - "type": "object" - }, - "type": "array" + { + "description": "Filter by correlation group", + "in": "query", + "name": "correlation_id", + "required": false, + "schema": { + "type": "string" + } }, - "status": { - "description": "Task status", - "type": "string" + { + "description": "Maximum number of results (default 50, max 100)", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "type": "integer" + } }, - "suite": { - "description": "Parent eval suite identifier", - "type": "string" + { + "description": "Cursor for fetching older entries", + "in": "query", + "name": "before_cursor", + "required": false, + "schema": { + "type": "string" + } }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" + { + "description": "Cursor for fetching newer entries", + "in": "query", + "name": "after_cursor", + "required": false, + "schema": { + "type": "string" + } } - }, - "required": [ - "id", - "suite", - "input_message", - "expected_outcome", - "status" ], - "type": "object" - }, - "EvalTaskList": { - "description": "Schema for eval task list responses.", - "properties": { - "data": { - "description": "Eval tasks", - "items": { - "$ref": "#/components/schemas/EvalTask" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "EventCatalogEntry": { - "description": "Schema for an event catalog entry with full payload schema and sample.\n", - "properties": { - "description": { - "description": "Human-readable description", - "type": "string" - }, - "name": { - "description": "Event name (e.g., thread.created)", - "type": "string" - }, - "parent": { - "description": "Parent envelope name (only present for sub_event entries)", - "type": "string" - }, - "sample": { - "description": "Sample payload for this event", - "type": "object" - }, - "schema": { - "description": "JSON Schema describing the event payload", - "type": "object" - }, - "sub_events": { - "description": "Known sub-event types (only present for envelope entries)", - "items": { - "type": "string" - }, - "type": "array" - }, - "type": { - "description": "Entry type: \"event\" for exact events, \"envelope\" for wildcard families", - "type": "string" - } - }, - "required": [ - "name", - "description", - "schema", - "sample" - ], - "type": "object" - }, - "EventType": { - "description": "Schema for an event type available for automation triggers.\n\nRepresents events from the workflow event catalog.\n", - "properties": { - "description": { - "description": "Human-readable description", - "type": "string" - }, - "name": { - "description": "Event name (e.g., thread.created)", - "type": "string" - } - }, - "required": [ - "name", - "description" - ], - "type": "object" - }, - "FileRefreshResult": { - "description": "API schema for file URL refresh responses.", - "properties": { - "image_source": { - "$ref": "#/components/schemas/ImageSource", - "description": "Updated image source with fresh URL" - }, - "success": { - "description": "Whether the refresh succeeded", - "type": "boolean" - } - }, - "required": [ - "success", - "image_source" - ], - "type": "object" - }, - "ImageSource": { - "description": "API schema for image source metadata.", - "properties": { - "file": { - "description": "Storage file", - "type": "string" - }, - "height": { - "description": "Image height in pixels", - "type": "integer" - }, - "media": { - "description": "Media", - "type": "string" - }, - "mime_type": { - "description": "Image MIME type", - "type": "string" - }, - "refresh_url": { - "description": "URL to refresh signed URL", - "type": "string" - }, - "url": { - "description": "Image URL", - "type": "string" - }, - "width": { - "description": "Image width in pixels", - "type": "integer" - } - }, - "type": "object" - }, - "Installation": { - "description": "API schema for an installation.", - "properties": { - "agent": { - "description": "Owning agent", - "type": "string" - }, - "config": { - "description": "Configuration", - "type": "object" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Installation ID (cin_...)", - "type": "string" - }, - "kind": { - "description": "Installation kind", - "type": "string" - }, - "shared_integration": { - "description": "Bound shared integration", - "type": "string" - }, - "state": { - "description": "Installation state", - "type": "string" - }, - "status_payload": { - "description": "Status payload", - "type": "object" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "InstallationKind": { - "description": "API schema for an installation kind.", - "properties": { - "accepts_sources": { - "description": "Whether this kind accepts sources", - "type": "boolean" - }, - "category": { - "description": "Category", - "type": "string" - }, - "config_schema": { - "description": "JSON schema for configuration", - "type": "object" - }, - "description": { - "description": "Description", - "type": "string" - }, - "kind": { - "description": "Installation kind identifier", - "type": "string" - }, - "label": { - "description": "Display label", - "type": "string" - }, - "provider": { - "description": "Integration provider", - "type": "string" - }, - "requires_integration": { - "description": "Whether this kind requires an integration", - "type": "boolean" - } - }, - "required": [ - "kind" - ], - "type": "object" - }, - "InstallationKindListResponse": { - "description": "List response for installation kinds.", - "properties": { - "data": { - "description": "List of installation kinds", - "items": { - "$ref": "#/components/schemas/InstallationKind" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "InstallationListResponse": { - "description": "List response for installations.", - "properties": { - "data": { - "description": "List of installations", - "items": { - "$ref": "#/components/schemas/Installation" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "InstallationSource": { - "description": "API schema for an installation source.", - "properties": { - "agent": { - "description": "Owning agent", - "type": "string" - }, - "context_installation": { - "description": "Installation ID", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Source ID (cso_...)", - "type": "string" - }, - "metadata": { - "description": "Arbitrary metadata", - "type": "object" - }, - "parent_source": { - "description": "Parent source ID", - "type": "string" - }, - "payload": { - "description": "Source payload", - "type": "object" - }, - "state": { - "description": "Source state", - "type": "string" - }, - "team": { - "description": "Team ID", - "type": "string" - }, - "thread": { - "description": "Thread ID", - "type": "string" - }, - "type": { - "description": "Source type", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "user": { - "description": "User ID", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "InstallationSourceListResponse": { - "description": "List response for installation sources.", - "properties": { - "data": { - "description": "List of installation sources", - "items": { - "$ref": "#/components/schemas/InstallationSource" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "Integration": { - "description": "Schema for integration records with connector state.", - "properties": { - "id": { - "description": "Integration ID", - "type": "string" - }, - "org": { - "description": "Organization (nullable)", - "type": "string" - }, - "provider": { - "description": "Provider identifier", - "type": "string" - }, - "sandbox": { - "description": "Sandbox identifier (nullable)", - "type": "string" - }, - "secret_group": { - "description": "Secret group", - "type": "string" - }, - "state": { - "description": "Connector state information", - "type": "object" - }, - "team": { - "description": "Team (if team-scoped)", - "type": "string" - }, - "user": { - "description": "User (if user-scoped)", - "type": "string" - }, - "workspace_key": { - "description": "Provider workspace identifier", - "type": "string" - } - }, - "required": [ - "id", - "provider", - "state" - ], - "type": "object" - }, - "IntegrationAction": { - "description": "Schema for integration action metadata.", - "properties": { - "description": { - "description": "Action description", - "type": "string" - }, - "json_schema": { - "description": "JSON Schema for action parameters", - "type": "object" - }, - "key": { - "description": "Action key (e.g., gmail.list_messages)", - "type": "string" - }, - "scopes_any_of": { - "description": "Required scope sets for this action", - "type": "object" - } - }, - "required": [ - "key", - "json_schema" - ], - "type": "object" - }, - "IntegrationCreateParams": { - "description": "Integration fields for auto-creating the underlying integration.\n\nWhen creating an agent installation for an `integration/*` kind, callers\ncan pass this object to auto-create the underlying Integration record.\nRequired fields depend on the kind's auth type:\n\n- `app_installation` kinds (slack_bot, github_app): requires `installation_id`\n- `oauth` kinds (gmail, outlook, slack): requires `access_token`\n", - "properties": { - "access_token": { - "description": "OAuth access token or API key", - "type": "string" - }, - "installation_id": { - "description": "External installation ID (e.g. GitHub App installation ID, Slack team_id)", - "type": "string" - }, - "metadata": { - "description": "Provider-specific metadata (e.g. bot_user_id)", - "type": "object" - }, - "refresh_token": { - "description": "OAuth refresh token", - "type": "string" - }, - "workspace_key": { - "description": "Workspace name or identifier", - "type": "string" - } - }, - "type": "object" - }, - "IntegrationProvider": { - "description": "Schema for an integration provider entry.\n\nRepresents an available integration provider (OAuth or MCP) that can be\nused with `create integration --provider `.\n", - "properties": { - "auth_type": { - "description": "Auth mechanism: oauth, bearer, or app_installation", - "type": "string" - }, - "description": { - "description": "Short description of the provider", - "type": "string" - }, - "display_name": { - "description": "Human-readable display name", - "type": "string" - }, - "provider": { - "description": "Provider key (e.g., google, mcp:system:mcp-github)", - "type": "string" - }, - "type": { - "description": "Provider type: oauth, mcp, or app_installation", - "type": "string" - } - }, - "required": [ - "provider", - "display_name", - "type", - "auth_type" - ], - "type": "object" - }, - "KeyValueStorageEntry": { - "description": "Schema for a key-value storage entry.\n\nMaps exactly to render_entry/1 output in ApiStorageController.\n", - "properties": { - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "key": { - "description": "Storage key", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "user": { - "description": "User", - "type": "string" - }, - "value": { - "description": "Stored value", - "type": "string" - } - }, - "required": [ - "user", - "key", - "value" - ], - "type": "object" - }, - "KeyValueStorageEntryList": { - "description": "List response for key-value storage entries.", - "properties": { - "data": { - "description": "Storage entries owned by the caller", - "items": { - "$ref": "#/components/schemas/KeyValueStorageEntry" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "KnowledgeSearchResult": { - "description": "API schema for a knowledge search result item.", - "properties": { - "content": { - "description": "Normalized content text", - "type": "string" - }, - "content_type": { - "description": "Content MIME type", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Item ID (cim_...)", - "type": "string" - }, - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "raw_content": { - "description": "Raw content data", - "type": "object" - }, - "type": { - "description": "Source type (requires preloaded :source association)", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "LlmCall": { - "description": "Schema for an LLM session call.\n\nMaps to serialized LLM call output from developer portal API.\n", - "properties": { - "call_id": { - "description": "Unique call UUID", - "type": "string" - }, - "completion_tokens": { - "description": "Number of completion tokens", - "type": "integer" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "error_message": { - "description": "Error message if call failed", - "type": "string" - }, - "id": { - "description": "Public ID (alc_...)", - "type": "string" - }, - "latency_ms": { - "description": "Latency in milliseconds", - "type": "integer" - }, - "message_count": { - "description": "Number of messages included in the call metadata", - "type": "integer" - }, - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "model": { - "description": "LLM model name", - "type": "string" - }, - "prompt_tokens": { - "description": "Number of prompt tokens", - "type": "integer" - }, - "session_id": { - "description": "Session UUID grouping related calls", - "type": "string" - }, - "source": { - "description": "Machine-readable call source key", - "type": "string" - }, - "status": { - "description": "Call status (success or error)", - "type": "string" - }, - "team": { - "description": "Team if team-scoped", - "type": "string" - }, - "total_tokens": { - "description": "Total tokens (prompt + completion)", - "type": "integer" - }, - "trajectory": { - "description": "Trajectory identifier", - "type": "string" - }, - "user": { - "description": "User if user-scoped", - "type": "string" - } - }, - "required": [ - "id", - "session_id", - "call_id", - "prompt_tokens", - "completion_tokens", - "total_tokens", - "latency_ms" - ], - "type": "object" - }, - "LlmCallSourceOption": { - "description": "Source option metadata for LLM call filtering.\n", - "properties": { - "label": { - "description": "Human-friendly source label", - "type": "string" - }, - "source": { - "description": "Machine-readable LLM source key", - "type": "string" - } - }, - "required": [ - "source", - "label" - ], - "type": "object" - }, - "LlmCallTrajectory": { - "description": "Schema for LLM call trajectory contents.", - "properties": { - "download_url": { - "description": "Signed transcript download URL", - "type": "string" - }, - "messages": { - "description": "Trajectory messages", - "items": { - "type": "object" - }, - "type": "array" - } - }, - "required": [ - "messages" - ], - "type": "object" - }, - "Media": { - "description": "API schema for a media item.", - "properties": { - "content_type": { - "description": "Original variant content type", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "filename": { - "description": "Original variant filename", - "type": "string" - }, - "height": { - "description": "Original variant height", - "type": "integer" - }, - "id": { - "description": "Media ID", - "type": "string" - }, - "media_type": { - "description": "Media type", - "type": "string" - }, - "name": { - "description": "Media name", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "url": { - "description": "Original variant URL", - "type": "string" - }, - "variants": { - "description": "Media variants", - "items": { - "$ref": "#/components/schemas/MediaVariant" - }, - "type": "array" - }, - "width": { - "description": "Original variant width", - "type": "integer" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "MediaVariant": { - "description": "API schema for a media variant.", - "properties": { - "content_type": { - "description": "File content type", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "file": { - "description": "Storage file", - "type": "string" - }, - "filename": { - "description": "Original filename", - "type": "string" - }, - "height": { - "description": "Height in pixels", - "type": "integer" - }, - "id": { - "description": "Variant ID", - "type": "string" - }, - "image_source": { - "$ref": "#/components/schemas/ImageSource", - "description": "Image source metadata" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "url": { - "description": "Signed download URL", - "type": "string" - }, - "variant_key": { - "description": "Variant key (original, thumbnail, etc)", - "type": "string" - }, - "width": { - "description": "Width in pixels", - "type": "integer" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "Member": { - "description": "Schema for an app member (account with role on an app).\n\nMaps to serialized membership output from developer portal API.\n", - "properties": { - "account": { - "$ref": "#/components/schemas/MemberAccount", - "description": "Associated account" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Public ID (dar_...)", - "type": "string" - }, - "role": { - "description": "Role (admin, developer)", - "type": "string" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "role", - "account" - ], - "type": "object" - }, - "MemberAccount": { - "description": "Associated account", - "properties": { - "alias": { - "description": "Account alias", - "type": "string" - }, - "email": { - "description": "Account email", - "type": "string" - }, - "full_name": { - "description": "Full name", - "type": "string" - }, - "id": { - "description": "Account public ID (dva_...)", - "type": "string" - } - }, - "required": [ - "id", - "email" - ], - "type": "object" - }, - "MemberInvite": { - "description": "Schema for a pending member invite.\n\nMaps to serialized invite output from developer portal API.\n", - "properties": { - "email": { - "description": "Invitee's email address", - "type": "string" - }, - "expires_at": { - "description": "When the invite expires", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Public ID (ami_...)", - "type": "string" - }, - "invited_at": { - "description": "When the invite was created", - "format": "date-time", - "type": "string" - }, - "inviter": { - "description": "Account that sent the invite", - "type": "object" - }, - "role": { - "description": "Role (admin, developer)", - "type": "string" - }, - "status": { - "description": "Invite status (pending or expired)", - "type": "string" - } - }, - "required": [ - "id", - "email", - "role", - "status", - "invited_at", - "expires_at" - ], - "type": "object" - }, - "Message": { - "description": "API schema for a chat message.", - "properties": { - "actors": { - "description": "Message actors", - "items": { - "$ref": "#/components/schemas/Actor" - }, - "type": "array" - }, - "agent": { - "description": "Agent if sent by an agent user", - "type": "string" - }, - "attachments": { - "description": "Message attachments", - "items": { - "$ref": "#/components/schemas/Attachment" - }, - "type": "array" - }, - "branched_thread": { - "description": "Branched thread (if message spawned a thread)", - "type": "string" - }, - "content": { - "description": "Message content", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "has_replies": { - "description": "Whether message has replies", - "type": "boolean" - }, - "id": { - "description": "Message ID (msg_...)", - "type": "string" - }, - "idempotency_key": { - "description": "Client-provided idempotency key", - "type": "string" - }, - "legacy_agent": { - "description": "Legacy agent if sent by legacy chat agent", - "type": "string" - }, - "metadata": { - "description": "Message metadata", - "type": "object" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "reactions": { - "description": "Message reactions", - "items": { - "$ref": "#/components/schemas/MessageReaction" - }, - "type": "array" - }, - "rendering_mode": { - "description": "Rendering mode hint", - "type": "string" - }, - "replies": { - "description": "Inline replies (if loaded)", - "items": { - "type": "object" - }, - "type": "array" - }, - "replies_after_cursor": { - "description": "Cursor for replies pagination", - "type": "string" - }, - "replies_before_cursor": { - "description": "Cursor for replies pagination", - "type": "string" - }, - "reply_count": { - "description": "Number of replies", - "type": "integer" - }, - "reply_to": { - "description": "Parent message object (if loaded)", - "type": "object" - }, - "sandbox": { - "description": "Sandbox identifier", - "type": "string" - }, - "team": { - "description": "Team", - "type": "string" - }, - "thread": { - "description": "Parent thread", - "type": "string" - }, - "user": { - "description": "Author user (public ID or expanded object when loaded)", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "MessageReaction": { - "description": "Schema for inline message reactions.\n\nThis is the compact format used in Message.reactions[], which differs from\nthe full Reaction schema used in standalone reaction endpoints.\nMaps to format_reactions_for_client/1 output.\n", - "properties": { - "payload": { - "description": "Reaction payload (e.g., {emoji: '👍'})", - "type": "object" - }, - "type": { - "description": "Reaction type (e.g., emoji_reaction)", - "type": "string" - }, - "user": { - "description": "User who added the reaction", - "type": "string" - } - }, - "required": [ - "type" - ], - "type": "object" - }, - "MessageUpdateParams": { - "description": "Schema for message update request parameters.\n\nUsed as the body wrapper when updating a message.\n", - "properties": { - "content": { - "description": "New message content", - "type": "string" - } - }, - "type": "object" - }, - "MetadataFilter": { - "description": "Filter object for matching thread metadata.", - "properties": { - "key": { - "description": "Metadata key to match", - "type": "string" - }, - "type": { - "description": "Filter type (must be \"metadata\")", - "type": "string" - }, - "value": { - "description": "Metadata value to match", - "type": "string" - } - }, - "required": [ - "type", - "key", - "value" - ], - "type": "object" - }, - "NotificationSettingUpdate": { - "description": "Schema for a single notification setting update entry.\n", - "properties": { - "level": { - "description": "Notification level (global, team, thread)", - "type": "string" - }, - "muted": { - "description": "Whether notifications are muted", - "type": "boolean" - }, - "team": { - "description": "Team (required for team-level settings)", - "type": "string" - }, - "thread": { - "description": "Thread (required for thread-level settings)", - "type": "string" - } - }, - "required": [ - "level", - "muted" - ], - "type": "object" - }, - "OAuthClient": { - "description": "Schema for an OAuth client registration.", - "properties": { - "client_id": { - "description": "Public OAuth client ID", - "type": "string" - }, - "client_name": { - "description": "Display name for the client", - "type": "string" - }, - "client_secret": { - "description": "Client secret shown only at creation", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "enabled": { - "description": "Whether the client is enabled", - "type": "boolean" - }, - "id": { - "description": "OAuth client registration ID", - "type": "string" - }, - "redirect_uris": { - "description": "Allowed redirect URIs", - "items": { - "type": "string" - }, - "type": "array" - }, - "scopes": { - "description": "Allowed OAuth scopes", - "items": { - "type": "string" - }, - "type": "array" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "client_id", - "client_name", - "redirect_uris", - "scopes", - "enabled" - ], - "type": "object" - }, - "OAuthClientList": { - "description": "Schema for OAuth client list responses.", - "properties": { - "data": { - "description": "OAuth clients", - "items": { - "$ref": "#/components/schemas/OAuthClient" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "OAuthError": { - "description": "OAuth error response per RFC 6749", - "properties": { - "error": { - "description": "Error code (e.g. slow_down, invalid_grant)", - "type": "string" - }, - "error_description": { - "description": "Human-readable error description", - "type": "string" - } - }, - "required": [ - "error" - ], - "type": "object" - }, - "OAuthProvider": { - "description": "Schema for an OAuth provider configuration.\n\nMaps to serialized OAuth provider output from developer portal API.\n", - "properties": { - "callback_urls": { - "description": "Allowed callback URLs", - "items": { - "type": "string" - }, - "type": "array" - }, - "client_id": { - "description": "OAuth client ID", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "display_name": { - "description": "Display name", - "type": "string" - }, - "enabled": { - "description": "Whether provider is enabled", - "type": "boolean" - }, - "id": { - "description": "Public ID (dop_...)", - "type": "string" - }, - "provider": { - "description": "Provider type (github, google)", - "type": "string" - }, - "scopes": { - "description": "OAuth scopes", - "items": { - "type": "string" - }, - "type": "array" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "provider", - "client_id" - ], - "type": "object" - }, - "OAuthTokenResponse": { - "description": "API schema for OAuth token endpoint responses.", - "properties": { - "access_token": { - "description": "OAuth access token", - "type": "string", - "x-sdk": "access_token" - }, - "expires_in": { - "description": "Token TTL in seconds", - "type": "integer", - "x-sdk": "token_expiry" - }, - "refresh_token": { - "description": "OAuth refresh token", - "type": "string", - "x-sdk": "refresh_token" - }, - "scope": { - "description": "Granted scopes (space-separated)", - "type": "string" - }, - "token_type": { - "description": "Token type (Bearer)", - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/User", - "description": "Authenticated user" - } - }, - "required": [ - "access_token", - "token_type", - "expires_in" - ], - "type": "object" - }, - "Org": { - "description": "API schema for an organization.", - "properties": { - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "description": { - "description": "Description", - "type": "string" - }, - "domain": { - "description": "Domain", - "type": "string" - }, - "id": { - "description": "Organization ID (org_...)", - "type": "string" - }, - "industry": { - "description": "Industry", - "type": "string" - }, - "name": { - "description": "Organization name", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - }, - "slug": { - "description": "URL slug", - "type": "string" - }, - "status": { - "description": "Status", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "website": { - "description": "Website URL", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "OrgAuthPolicy": { - "description": "Schema for org auth policy response.\n", - "properties": { - "allowed_email_domains": { - "description": "Allowed email domains", - "items": { - "type": "string" - }, - "type": "array" - }, - "auth_method": { - "description": "Auth method (default, sso)", - "type": "string" - }, - "require_2fa": { - "description": "Whether 2FA is required", - "type": "boolean" - }, - "sso_providers": { - "description": "Enabled SSO providers", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "auth_method", - "require_2fa", - "sso_providers", - "allowed_email_domains" - ], - "type": "object" - }, - "OrgEnvVar": { - "description": "Schema for an organization environment variable response that includes the\nplaintext value.\n", - "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "description": { - "description": "Optional description", - "type": "string" - }, - "id": { - "description": "Organization env var ID (oev_...)", - "type": "string" - }, - "key": { - "description": "Environment variable key", - "type": "string" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - }, - "value": { - "description": "Environment variable value", - "type": "string" - } - }, - "required": [ - "id", - "key", - "value" - ], - "type": "object" - }, - "OrgEnvVarMasked": { - "description": "Schema for an organization environment variable response that masks the\nsecret value.\n", - "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "description": { - "description": "Optional description", - "type": "string" - }, - "id": { - "description": "Organization env var ID (oev_...)", - "type": "string" - }, - "key": { - "description": "Environment variable key", - "type": "string" - }, - "masked_value": { - "description": "Masked environment variable value", - "type": "string" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "key", - "masked_value" - ], - "type": "object" - }, - "OrgEnvVarMaskedList": { - "description": "Schema for organization environment variable list responses.", - "properties": { - "data": { - "description": "Organization environment variables", - "items": { - "$ref": "#/components/schemas/OrgEnvVarMasked" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "OrgSamlSettings": { - "description": "Schema for SAML provider settings response.\n\nMasks certificate contents — exposes only boolean flags indicating whether\na primary/secondary certificate is configured.\n", - "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "enabled": { - "description": "Whether the provider is active", - "type": "boolean" - }, - "entity_id": { - "description": "IdP entity ID", - "type": "string" - }, - "has_certificate": { - "description": "Whether a primary certificate is configured", - "type": "boolean" - }, - "has_certificate_secondary": { - "description": "Whether a secondary certificate is configured", - "type": "boolean" - }, - "id": { - "description": "SAML provider ID (saml_...)", - "type": "string" - }, - "label": { - "description": "Display label for the SSO button", - "type": "string" - }, - "sso_url": { - "description": "IdP SSO URL", - "type": "string" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "entity_id", - "sso_url" - ], - "type": "object" - }, - "PaginatedMessages": { - "description": "Schema for paginated messages response.\n\nUsed by thread messages list endpoints.\n", - "properties": { - "after_cursor": { - "description": "Cursor for fetching items after this point", - "type": "string" - }, - "before_cursor": { - "description": "Cursor for fetching items before this point", - "type": "string" - }, - "messages": { - "description": "List of message objects", - "items": { - "$ref": "#/components/schemas/Message" - }, - "type": "array" - } - }, - "required": [ - "messages" - ], - "type": "object" - }, - "PaginatedReplies": { - "description": "Schema for paginated message replies response.\n\nUsed by message replies list endpoints.\nNote: This response is NOT wrapped in a \"data\" field.\n", - "properties": { - "after_cursor": { - "description": "Cursor for fetching items after this point", - "type": "string" - }, - "before_cursor": { - "description": "Cursor for fetching items before this point", - "type": "string" - }, - "has_more": { - "description": "Whether more replies exist beyond the current page", - "type": "boolean" - }, - "replies": { - "description": "List of reply message objects", - "items": { - "$ref": "#/components/schemas/Message" - }, - "type": "array" - }, - "total_count": { - "description": "Total number of replies", - "type": "integer" - } - }, - "required": [ - "replies" - ], - "type": "object" - }, - "PasswordUpdateParams": { - "description": "Schema for password update parameters.\n", - "properties": { - "password": { - "description": "New password", - "type": "string" - }, - "password_confirmation": { - "description": "New password confirmation", - "type": "string" - } - }, - "required": [ - "password", - "password_confirmation" - ], - "type": "object" - }, - "Persona": { - "description": "API schema for a persona.", - "properties": { - "activated": { - "description": "Whether persona is activated", - "type": "boolean" - }, - "agent": { - "description": "Associated agent (always nil)", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Persona ID", - "type": "string" - }, - "is_active": { - "description": "Whether persona is active", - "type": "boolean" - }, - "is_enabled_for_thread": { - "description": "Whether persona is enabled for thread", - "type": "boolean" - }, - "metadata": { - "description": "Persona metadata", - "type": "object" - }, - "name": { - "description": "Persona display name", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "personality": { - "description": "Persona personality description", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - }, - "team": { - "description": "Owning team", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "user": { - "description": "Owning user", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "PersonaCreateParams": { - "description": "Schema for persona creation parameters.\n", - "properties": { - "name": { - "description": "Persona display name", - "type": "string" - }, - "personality": { - "description": "Persona personality description", - "type": "string" - }, - "profile_picture_style": { - "description": "Profile picture generation style", - "type": "string" - } - }, - "required": [ - "name", - "personality" - ], - "type": "object" - }, - "PersonaUpdateParams": { - "description": "Schema for persona update parameters.\n", - "properties": { - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "name": { - "description": "Persona display name", - "type": "string" - }, - "personality": { - "description": "Persona personality description", - "type": "string" - } - }, - "type": "object" - }, - "PictureParams": { - "description": "Schema for picture upload parameters.\n\nUsed for uploading profile pictures via base64 encoded data.\n", - "properties": { - "data": { - "description": "Base64 encoded image data", - "type": "string" - }, - "filename": { - "description": "Original filename", - "type": "string" - }, - "mime_type": { - "description": "MIME type of the image", - "type": "string" - } - }, - "required": [ - "data", - "mime_type", - "filename" - ], - "type": "object" - }, - "PublicOrg": { - "description": "Public org schema for authenticated endpoints.\n\nOnly exposes fields safe for any authenticated user: id, name, domain,\nand logo. Does NOT expose sandbox, status, industry, description, or\nother internal fields that the Developer.Org schema includes.\n", - "properties": { - "domain": { - "description": "Primary domain", - "type": "string" - }, - "id": { - "description": "Public ID (org_...)", - "type": "string" - }, - "name": { - "description": "Organization name", - "type": "string" - } - }, - "required": [ - "id", - "name", - "domain" - ], - "type": "object" - }, - "PushNotificationResult": { - "description": "API schema for push notification test results.", - "properties": { - "results": { - "description": "Per-device results", - "items": { - "type": "object" - }, - "type": "array" - }, - "success": { - "description": "Whether the notification was sent", - "type": "boolean" - }, - "total_sent": { - "description": "Number of notifications sent", - "type": "integer" - } - }, - "required": [ - "success" - ], - "type": "object" - }, - "Reaction": { - "description": "API schema for a message reaction.", - "properties": { - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "feedback_type": { - "description": "Type of feedback (e.g., emoji_reaction)", - "type": "string" - }, - "id": { - "description": "Reaction ID (umf_...)", - "type": "string" - }, - "message": { - "description": "Message the reaction is on", - "type": "string" - }, - "payload": { - "description": "Reaction payload (e.g., {emoji: ...})", - "type": "object" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "user": { - "description": "User who added the reaction", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "ResolvedTool": { - "description": false, - "properties": { - "description": { - "description": "What this tool does", - "type": "string" - }, - "name": { - "description": "Callable tool function name", - "type": "string" - }, - "parameters": { - "description": "JSON Schema describing the expected input", - "type": "object" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "RoutinePreset": { - "description": "A routine preset with its metadata.", - "properties": { - "config": { - "description": "Default configuration", - "type": "object" - }, - "description": { - "description": "Preset description", - "type": "string" - }, - "event_type": { - "description": "Event type", - "type": "string" - }, - "label": { - "description": "Display label", - "type": "string" - }, - "name": { - "description": "Preset name", - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "RuntimeEnvVar": { - "description": "Schema for runtime environment variable metadata.", - "properties": { - "description": { - "description": "Optional description", - "type": "string" - }, - "key": { - "description": "Environment variable key", - "type": "string" - }, - "source": { - "description": "Source of the env var (app or org)", - "type": "string" - } - }, - "required": [ - "key", - "source" - ], - "type": "object" - }, - "RuntimeEnvVarList": { - "description": "Schema for runtime environment variable metadata list responses.", - "properties": { - "data": { - "description": "Runtime environment variables available to the current script context", - "items": { - "$ref": "#/components/schemas/RuntimeEnvVar" - }, - "type": "array" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "Sandbox": { - "description": "Schema for a developer sandbox.\n", - "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Public ID (dsb_...)", - "type": "string" - }, - "keys": { - "description": "Sandbox API keys", - "items": { - "$ref": "#/components/schemas/SandboxKey" - }, - "type": "array" - }, - "name": { - "description": "Sandbox name", - "type": "string" - }, - "slug": { - "description": "Sandbox slug (unique per app)", - "type": "string" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "name", - "slug" - ], - "type": "object" - }, - "SandboxEmail": { - "description": "Schema for a sandbox-captured email.\n", - "properties": { - "bcc": { - "description": "BCC recipients", - "items": { - "type": "object" - }, - "type": "array" - }, - "cc": { - "description": "CC recipients", - "items": { - "type": "object" - }, - "type": "array" - }, - "created_at": { - "description": "When the email was captured", - "format": "date-time", - "type": "string" - }, - "from_address": { - "description": "Sender email address", - "type": "string" - }, - "from_name": { - "description": "Sender display name", - "type": "string" - }, - "headers": { - "description": "Custom email headers", - "type": "object" - }, - "html_body": { - "description": "HTML body", - "type": "string" - }, - "id": { - "description": "Public ID (sem_...)", - "type": "string" - }, - "reply_to": { - "description": "Reply-to address", - "type": "object" - }, - "subject": { - "description": "Email subject", - "type": "string" - }, - "text_body": { - "description": "Plain text body", - "type": "string" - }, - "to": { - "description": "Recipients [{name, address}]", - "items": { - "type": "object" - }, - "type": "array" - } - }, - "required": [ - "id", - "from_address", - "to" - ], - "type": "object" - }, - "SandboxKey": { - "description": "Schema for a sandbox API key.\n", - "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "expires_at": { - "description": "Expiry timestamp", - "format": "date-time", - "type": "string" - }, - "full_key": { - "description": "Full key shown only once at creation", - "type": "string" - }, - "id": { - "description": "Public ID (dsk_...)", - "type": "string" - }, - "key_hint": { - "description": "Last 4 chars hint", - "type": "string" - }, - "key_value": { - "description": "Full key (publishable only)", - "type": "string" - }, - "last_used_at": { - "description": "Last used timestamp", - "format": "date-time", - "type": "string" - }, - "status": { - "description": "Status (active, revoked)", - "type": "string" - }, - "type": { - "description": "Key type (publishable, secret)", - "type": "string" - } - }, - "required": [ - "id", - "type", - "status" - ], - "type": "object" - }, - "ScheduledJob": { - "description": "API schema for a scheduled job.", - "properties": { - "args": { - "description": "Job arguments", - "type": "object" - }, - "description": { - "description": "Job description", - "type": "string" - }, - "id": { - "description": "Job ID", - "type": "string" - }, - "recurring": { - "description": "Recurrence pattern", - "type": "string" - }, - "scheduled_at": { - "description": "Scheduled execution time", - "format": "date-time", - "type": "string" - }, - "thread": { - "description": "Thread", - "type": "string" - }, - "title": { - "description": "Job title", - "type": "string" - }, - "worker": { - "description": "Worker module name", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "Scrape": { - "description": "API schema for a scrape result.", - "properties": { - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "description": { - "description": "Page description", - "type": "string" - }, - "id": { - "description": "Scrape ID (scp_...)", - "type": "string" - }, - "image_height": { - "description": "Image height in pixels", - "type": "integer" - }, - "image_url": { - "description": "Image URL", - "type": "string" - }, - "image_width": { - "description": "Image width in pixels", - "type": "integer" - }, - "last_scraped_at": { - "description": "Last scraped timestamp", - "format": "date-time", - "type": "string" - }, - "metadata": { - "description": "Scrape metadata", - "type": "object" - }, - "status": { - "description": "Scrape status", - "type": "string" - }, - "title": { - "description": "Page title", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "url": { - "description": "Scraped URL", - "type": "string" - }, - "version": { - "description": "Scrape version", - "type": "integer" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "Secret": { - "description": "API schema for a secret (user, team, or user-team).", - "properties": { - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "description": { - "description": "Secret description", - "type": "string" - }, - "id": { - "description": "Secret ID", - "type": "string" - }, - "last_accessed_at": { - "description": "Last accessed timestamp", - "format": "date-time", - "type": "string" - }, - "name": { - "description": "Secret name", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - }, - "secret_group": { - "description": "Secret group", - "type": "string" - }, - "team": { - "description": "Team", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "SecretValue": { - "description": "API schema for a decrypted secret value response.", - "properties": { - "name": { - "description": "Secret name", - "type": "string" - }, - "value": { - "description": "Decrypted secret value", - "type": "string" - } - }, - "required": [ - "name", - "value" - ], - "type": "object" - }, - "StatusPing": { - "description": "API schema for the status/ping health check response.", - "properties": { - "success": { - "description": "Whether the ping succeeded", - "type": "boolean" - }, - "token": { - "description": "Token status details", - "type": "object" - }, - "user": { - "$ref": "#/components/schemas/User", - "description": "Authenticated user (if token is valid)" - } - }, - "required": [ - "success", - "token" - ], - "type": "object" - }, - "StorageFile": { - "description": "API schema for a storage file.", - "properties": { - "content_type": { - "description": "MIME content type", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "filename": { - "description": "Original filename", - "type": "string" - }, - "id": { - "description": "File ID", - "type": "string" - }, - "image_source": { - "$ref": "#/components/schemas/ImageSource", - "description": "Image source metadata" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - }, - "size": { - "description": "File size in bytes", - "type": "integer" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "url": { - "description": "Signed download URL", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "SystemAccessToken": { - "description": "API schema for a system access token.", - "properties": { - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Token ID (sat_...)", - "type": "string" - }, - "last_used_at": { - "description": "Last used timestamp", - "format": "date-time", - "type": "string" - }, - "name": { - "description": "Token name", - "type": "string" - }, - "revoked_at": { - "description": "Revocation timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "Task": { - "description": "API schema for a task.", - "properties": { - "closed_at": { - "description": "When the task was closed", - "format": "date-time", - "type": "string" - }, - "comments_count": { - "description": "Number of comments", - "type": "integer" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "created_by": { - "description": "Legacy creator", - "type": "string" - }, - "created_by_actor": { - "description": "Creator actor details", - "type": "object" - }, - "created_by_persona": { - "description": "Creator persona", - "type": "string" - }, - "created_by_type": { - "description": "Creator type (user, agent)", - "type": "string" - }, - "created_by_user": { - "description": "Creator user", - "type": "string" - }, - "description": { - "description": "Task description", - "type": "string" - }, - "due_date": { - "description": "Due date", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Task ID (tsk_...)", - "type": "string" - }, - "links": { - "description": "Related links", - "type": "object" - }, - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "name": { - "description": "Task name", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "owner": { - "description": "Legacy owner", - "type": "string" - }, - "owner_actor": { - "description": "Owner actor details", - "type": "object" - }, - "owner_persona": { - "description": "Owner persona", - "type": "string" - }, - "owner_user": { - "description": "Owner user", - "type": "string" - }, - "priority": { - "description": "Priority level (0-4)", - "type": "integer" - }, - "sandbox": { - "description": "Sandbox identifier", - "type": "string" - }, - "status": { - "description": "Task status", - "type": "string" - }, - "team": { - "description": "Team", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "name", - "status" - ], - "type": "object" - }, - "TaskActivityEntry": { - "description": "Schema for a task activity entry.\n\nMaps exactly to the activity entries produced by TaskActivitySentenceGenerator.\n", - "properties": { - "event_id": { - "description": "Event ID", - "type": "string" - }, - "event_type": { - "description": "Type of event", - "type": "string" - }, - "sentence": { - "description": "Human-readable description of the activity", - "type": "string" - }, - "timestamp": { - "description": "When the event occurred", - "format": "date-time", - "type": "string" - } - }, - "type": "object" - }, - "TaskComment": { - "description": "API schema for a task comment.", - "properties": { - "author": { - "description": "Legacy author", - "type": "string" - }, - "author_actor": { - "description": "Author actor details", - "type": "object" - }, - "author_persona": { - "description": "Author persona", - "type": "string" - }, - "author_user": { - "description": "Author user", - "type": "string" - }, - "body": { - "description": "Comment body text", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Comment ID", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "sandbox": { - "description": "Sandbox identifier", - "type": "string" - }, - "task": { - "description": "Task", - "type": "string" - }, - "team": { - "description": "Team", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "body" - ], - "type": "object" - }, - "TaskCreateParams": { - "description": "Schema for task creation parameters.\n\nUsed by both Users.Tasks.Create and Teams.Tasks.Create actions.\n", - "properties": { - "description": { - "description": "Task description", - "type": "string" - }, - "due_date": { - "description": "Due date", - "format": "date-time", - "type": "string" - }, - "links": { - "description": "Related links", - "type": "object" - }, - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "name": { - "description": "Task name", - "type": "string" - }, - "owner_persona": { - "description": "Owner persona if assigned to agent", - "type": "string" - }, - "owner_user": { - "description": "Owner user if assigned to user", - "type": "string" - }, - "priority": { - "description": "Priority level (0-4)", - "type": "integer" - }, - "status": { - "description": "Task status (open, in_progress, done)", - "type": "string" - }, - "task": { - "description": "Custom task ID (optional, auto-generated if not provided)", - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "TaskUpdateParams": { - "description": "Schema for task update parameters.\n\nUsed by both Users.Tasks.Update and Teams.Tasks.Update actions.\nAll fields are optional since updates only modify provided fields.\n", - "properties": { - "description": { - "description": "Task description", - "type": "string" - }, - "due_date": { - "description": "Due date", - "format": "date-time", - "type": "string" - }, - "links": { - "description": "Related links", - "type": "object" - }, - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "name": { - "description": "Task name", - "type": "string" - }, - "owner_persona": { - "description": "Owner persona if assigned to agent", - "type": "string" - }, - "owner_user": { - "description": "Owner user if assigned to user", - "type": "string" - }, - "priority": { - "description": "Priority level (0-4)", - "type": "integer" - }, - "status": { - "description": "Task status (open, in_progress, done)", - "type": "string" - } - }, - "type": "object" - }, - "Team": { - "description": "API schema for a team.", - "properties": { - "acl": { - "$ref": "#/components/schemas/Acl", - "description": "Access control list. Contains grants array with principal_type, principal, and actions. Null when no ACL restrictions are applied." - }, - "app": { - "description": "Application", - "type": "string" - }, - "badges": { - "description": "Badge counts by category", - "type": "object" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "description": { - "description": "Team description", - "type": "string" - }, - "id": { - "description": "Team ID", - "type": "string" - }, - "membership_status": { - "description": "Viewer's membership role (owner, admin, member) or null if not a member", - "type": "string" - }, - "metadata": { - "description": "Team metadata", - "type": "object" - }, - "name": { - "description": "Team name", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - }, - "slug": { - "description": "URL slug", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "TeamCreateParams": { - "description": "Schema for team creation parameters.\n", - "properties": { - "acl": { - "$ref": "#/components/schemas/Acl", - "description": "Access control list" - }, - "description": { - "description": "Team description", - "type": "string" - }, - "metadata": { - "description": "Arbitrary key-value metadata", - "type": "object" - }, - "name": { - "description": "Team name", - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - }, - "TeamInvite": { - "description": "Schema for a team invite response.\n", - "properties": { - "code": { - "description": "6-character invite code", - "type": "string" - } - }, - "required": [ - "code" - ], - "type": "object" - }, - "TeamMember": { - "description": "Schema for a team member.\n", - "properties": { - "alias": { - "description": "User alias", - "type": "string" - }, - "email": { - "description": "User email", - "type": "string" - }, - "full_name": { - "description": "User full name", - "type": "string" - }, - "id": { - "description": "Public user ID", - "type": "string" - }, - "role": { - "description": "Role in the team (owner, admin, member)", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "TeamMembership": { - "description": "API schema for a team membership.", - "properties": { - "agent": { - "$ref": "#/components/schemas/Agent", - "description": "Agent object (when loaded)" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Membership ID", - "type": "string" - }, - "joined_at": { - "description": "Join timestamp", - "format": "date-time", - "type": "string" - }, - "metadata": { - "description": "Membership metadata", - "type": "object" - }, - "name": { - "description": "Member name", - "type": "string" - }, - "profile_picture": { - "$ref": "#/components/schemas/ImageSource", - "description": "Profile picture" - }, - "role": { - "description": "Role in team", - "type": "string" - }, - "team": { - "description": "Team object (when loaded)", - "type": "object" - }, - "type": { - "description": "Member type (user, agent, unknown)", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/User", - "description": "User object (when loaded)" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "TeamMembershipListResponse": { - "description": "Paginated list response for team memberships.", - "properties": { - "data": { - "description": "List of team memberships", - "items": { - "$ref": "#/components/schemas/TeamMembership" - }, - "type": "array" - }, - "has_next": { - "description": "Whether a next page exists", - "type": "boolean" - }, - "has_prev": { - "description": "Whether a previous page exists", - "type": "boolean" - }, - "page": { - "description": "Current page number", - "type": "integer" - }, - "page_size": { - "description": "Results per page", - "type": "integer" - }, - "total_entries": { - "description": "Total number of entries", - "type": "integer" - }, - "total_pages": { - "description": "Total number of pages", - "type": "integer" - } - }, - "required": [ - "data" - ], - "type": "object" - }, - "TeamUpdateParams": { - "description": "Schema for team update parameters.\n", - "properties": { - "acl": { - "$ref": "#/components/schemas/Acl", - "description": "Access control list" - }, - "description": { - "description": "Team description", - "type": "string" - }, - "metadata": { - "description": "Arbitrary key-value metadata", - "type": "object" - }, - "name": { - "description": "Team name", - "type": "string" - }, - "profile_picture": { - "$ref": "#/components/schemas/TeamUpdateParamsProfilePicture", - "description": "Base64-encoded profile picture" - } - }, - "type": "object" - }, - "TeamUpdateParamsProfilePicture": { - "description": "Base64-encoded profile picture", - "properties": { - "data": { - "description": "Base64 encoded image data", - "type": "string" - }, - "filename": { - "description": "Original filename", - "type": "string" - }, - "mime_type": { - "description": "MIME type of the image", - "type": "string" - } - }, - "type": "object" - }, - "TemplateFilter": { - "description": "Filter object for matching personas by template ID.", - "properties": { - "id": { - "description": "Persona template ID to match", - "type": "string" - }, - "type": { - "description": "Filter type (must be \"template\")", - "type": "string" - } - }, - "required": [ - "type", - "id" - ], - "type": "object" - }, - "Thread": { - "description": "API schema for a chat thread.", - "properties": { - "agent_user": { - "description": "Owning agent user", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "creator": { - "$ref": "#/components/schemas/User", - "description": "Creator user object" - }, - "description": { - "description": "Thread description", - "type": "string" - }, - "id": { - "description": "Thread ID (thr_...)", - "type": "string" - }, - "is_channel": { - "description": "Whether this is a channel", - "type": "boolean" - }, - "is_default": { - "description": "Whether this is the default thread", - "type": "boolean" - }, - "is_transient": { - "description": "Whether this thread is transient", - "type": "boolean" - }, - "is_unlisted": { - "description": "Whether this thread is unlisted", - "type": "boolean" - }, - "key": { - "description": "Thread key", - "type": "string" - }, - "last_activity": { - "description": "Last activity timestamp", - "format": "date-time", - "type": "string" - }, - "metadata": { - "description": "Thread metadata", - "type": "object" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "parent_message": { - "$ref": "#/components/schemas/Message", - "description": "Parent message object" - }, - "participant": { - "description": "Participant users", - "items": { - "type": "string" - }, - "type": "array" - }, - "participants": { - "description": "Participant user objects", - "items": { - "$ref": "#/components/schemas/User" - }, - "type": "array" - }, - "participating_actor": { - "description": "Actors participating in thread", - "items": { - "type": "string" - }, - "type": "array" - }, - "participating_agents": { - "description": "Agents participating in thread", - "items": { - "$ref": "#/components/schemas/Agent" - }, - "type": "array" - }, - "role": { - "description": "User's role in the thread", - "type": "string" - }, - "sandbox": { - "description": "Sandbox identifier", - "type": "string" - }, - "settings": { - "$ref": "#/components/schemas/ThreadSettings", - "description": "Thread settings" - }, - "slug": { - "description": "Thread slug", - "type": "string" - }, - "sub_threads": { - "description": "Sub-threads", - "items": { - "type": "object" - }, - "type": "array" - }, - "team": { - "description": "Owning team", - "type": "string" - }, - "title": { - "description": "Thread title", - "type": "string" - }, - "ttl": { - "description": "Time-to-live in seconds", - "type": "integer" - }, - "unread_count": { - "description": "Unread message count", - "type": "integer" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "user": { - "description": "Owning user", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "ThreadAction": { - "description": "API schema for a thread action.", - "properties": { - "call_to_action": { - "description": "Call to action text", - "type": "string" - }, - "completion_result": { - "description": "Result after action completion", - "type": "object" - }, - "id": { - "description": "Thread action ID (tha_...)", - "type": "string" - }, - "metadata": { - "description": "Action metadata", - "type": "object" - }, - "native_template": { - "description": "Native template for mobile clients", - "type": "object" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "path": { - "description": "URL path for action", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - }, - "status": { - "description": "Action status (active, canceled, done)", - "type": "string" - }, - "type": { - "description": "Action type (connect_google, add_credential, send_email)", - "type": "string" - } - }, - "required": [ - "id", - "type", - "status" - ], - "type": "object" - }, - "ThreadCreateParams": { - "description": "Schema for thread creation parameters.\n\nUsed by both Users.Threads.Create and Teams.Threads.Create actions.\n", - "properties": { - "create_legacy_agent": { - "description": "Create a legacy chat agent for this thread", - "type": "boolean" - }, - "description": { - "description": "Thread description", - "type": "string" - }, - "is_unlisted": { - "description": "Whether the thread is unlisted", - "type": "boolean" - }, - "key": { - "description": "Unique key for the thread", - "type": "string" - }, - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "org_id": { - "description": "Organization ID", - "type": "string" - }, - "profile_picture": { - "$ref": "#/components/schemas/ThreadCreateParamsProfilePicture", - "description": "Base64 encoded profile picture" - }, - "settings": { - "$ref": "#/components/schemas/ThreadSettings", - "description": "Thread settings" - }, - "title": { - "description": "Thread title", - "type": "string" - } - }, - "type": "object" - }, - "ThreadCreateParamsProfilePicture": { - "description": "Base64 encoded profile picture", - "properties": { - "data": { - "description": "Base64 encoded image data", - "type": "string" - }, - "filename": { - "description": "Original filename", - "type": "string" - }, - "mime_type": { - "description": "MIME type of the image", - "type": "string" - } - }, - "type": "object" - }, - "ThreadDetail": { - "description": "Schema for thread detail response in the developer portal.\n\nExtended thread data including members and associated entities.\n", - "properties": { - "agent": { - "description": "Associated agent info (id, name)", - "type": "object" - }, - "app_name": { - "description": "Associated app name", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "creator": { - "description": "Thread creator info (id, email, full_name)", - "type": "object" - }, - "id": { - "description": "Public ID (thr_...)", - "type": "string" - }, - "is_channel": { - "description": "Whether this is a channel thread", - "type": "boolean" - }, - "is_default": { - "description": "Whether this is the default thread", - "type": "boolean" - }, - "is_unlisted": { - "description": "Whether thread is hidden from listings", - "type": "boolean" - }, - "key": { - "description": "Unique key within owner scope", - "type": "string" - }, - "members": { - "description": "Thread member list", - "items": { - "type": "object" - }, - "type": "array" - }, - "metadata": { - "description": "Thread metadata", - "type": "object" - }, - "org": { - "description": "Organization (nullable)", - "type": "string" - }, - "owner": { - "description": "Owner public", - "type": "string" - }, - "owner_name": { - "description": "Owner display name", - "type": "string" - }, - "owner_type": { - "description": "Owner type: team, user, agent, or nil", - "type": "string" - }, - "sandbox": { - "description": "Sandbox identifier (nullable)", - "type": "string" - }, - "slug": { - "description": "URL-friendly slug", - "type": "string" - }, - "title": { - "description": "Thread title", - "type": "string" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "title" - ], - "type": "object" - }, - "ThreadMember": { - "description": "API schema for a thread member.", - "properties": { - "membership_type": { - "description": "Membership type (owner or member)", - "type": "string" - }, - "thread": { - "description": "Thread", - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/User", - "description": "User details (when loaded)" - } - }, - "type": "object" - }, - "ThreadMessage": { - "description": "Schema for a thread message in the developer portal.\n\nMaps to serialized message output from developer portal API.\n", - "properties": { - "admin": { - "description": "Admin-only metadata and trajectory", - "type": "object" - }, - "agent": { - "description": "Agent identifier (nullable)", - "type": "string" - }, - "app": { - "description": "App identifier", - "type": "string" - }, - "attachments": { - "description": "Message attachments", - "items": { - "$ref": "#/components/schemas/Attachment" - }, - "type": "array" - }, - "content": { - "description": "Message content", - "type": "string" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Public ID (msg_...)", - "type": "string" - }, - "org": { - "description": "Organization (nullable)", - "type": "string" - }, - "sandbox": { - "description": "Sandbox identifier (nullable)", - "type": "string" - }, - "sender": { - "description": "Sender public", - "type": "string" - }, - "sender_name": { - "description": "Display name of sender", - "type": "string" - }, - "sender_type": { - "description": "Type: user, agent, or system", - "type": "string" - }, - "team": { - "description": "Team identifier (nullable)", - "type": "string" - }, - "user": { - "description": "User identifier (nullable)", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "ThreadMessageTrajectory": { - "description": "API schema for a thread message trajectory.", - "properties": { - "agent_message": { - "description": "Agent message", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Thread message trajectory ID (tmt_...)", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - }, - "thread": { - "description": "Thread", - "type": "string" - }, - "trajectory": { - "description": "Trajectory", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "user_message": { - "description": "User message", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "ThreadReadStatus": { - "description": "Schema for thread read status response.\n", - "properties": { - "last_read_message": { - "description": "Last read message", - "type": "string" - }, - "thread": { - "description": "Thread", - "type": "string" - }, - "unread_count": { - "description": "Number of unread messages", - "type": "integer" - } - }, - "required": [ - "thread", - "unread_count" - ], - "type": "object" - }, - "ThreadSettings": { - "description": "Schema for thread settings response.\n\nUsed by thread settings show/update endpoints.\n", - "properties": { - "agent_enabled": { - "description": "Whether the agent is enabled for this thread", - "type": "boolean" - } - }, - "type": "object" - }, - "ThreadUpdateParams": { - "description": "Schema for thread update parameters.\n\nUsed by both Users.Threads.Update and Teams.Threads.Update actions.\n", - "properties": { - "description": { - "description": "Thread description", - "type": "string" - }, - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "profile_picture": { - "$ref": "#/components/schemas/ThreadUpdateParamsProfilePicture", - "description": "Base64 encoded profile picture" - }, - "title": { - "description": "Thread title", - "type": "string" - } - }, - "type": "object" - }, - "ThreadUpdateParamsProfilePicture": { - "description": "Base64 encoded profile picture", - "properties": { - "data": { - "description": "Base64 encoded image data", - "type": "string" - }, - "filename": { - "description": "Original filename", - "type": "string" - }, - "mime_type": { - "description": "MIME type of the image", - "type": "string" - } - }, - "type": "object" - }, - "Trajectory": { - "description": "API schema for an AI trajectory.", - "properties": { - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "file": { - "description": "Storage file", - "type": "string" - }, - "id": { - "description": "Trajectory ID (trj_...)", - "type": "string" - }, - "messages": { - "description": "Trajectory messages", - "type": "object" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - }, - "team": { - "description": "Team", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "User": { - "description": "API schema for a user.", - "properties": { - "alias": { - "description": "User alias/handle", - "type": "string" - }, - "email": { - "description": "User email address", - "type": "string" - }, - "id": { - "description": "User ID", - "type": "string" - }, - "metadata": { - "description": "User metadata", - "type": "object" - }, - "name": { - "description": "User display name", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "UserFeedback": { - "description": "API schema for user feedback on messages.", - "properties": { - "comment": { - "description": "Optional comment", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Feedback ID", - "type": "string" - }, - "message": { - "description": "Message", - "type": "string" - }, - "org": { - "description": "Organization", - "type": "string" - }, - "rating": { - "description": "Rating (positive/negative)", - "type": "string" - }, - "sandbox": { - "description": "Sandbox", - "type": "string" - }, - "source": { - "description": "Feedback source", - "type": "string" - }, - "thread": { - "description": "Thread", - "type": "string" - }, - "updated_at": { - "description": "Update timestamp", - "format": "date-time", - "type": "string" - } - }, - "required": [ - "id", - "message", - "thread", - "rating", - "source" - ], - "type": "object" - }, - "UserInvite": { - "description": "API schema for a user invite.", - "properties": { - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Invite ID (uin_...)", - "type": "string" - }, - "key": { - "description": "Invite key", - "type": "string" - }, - "metadata": { - "description": "Invite metadata", - "type": "object" - }, - "thread": { - "description": "Thread", - "type": "string" - }, - "user": { - "$ref": "#/components/schemas/User", - "description": "Invite creator" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "ValidationResult": { - "description": "Schema for config validation result.\n", - "properties": { - "errors": { - "description": "List of validation errors", - "items": { - "type": "string" - }, - "type": "array" - }, - "valid": { - "description": "Whether the config is valid", - "type": "boolean" - }, - "warnings": { - "description": "Optional warnings emitted during validation", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "required": [ - "valid" - ], - "type": "object" - }, - "Webhook": { - "description": "Schema for a developer webhook.\n\nMaps to serialized webhook output from developer portal API.\n", - "properties": { - "context_installation": { - "description": "Bound context installation", - "type": "string" - }, - "context_sources": { - "description": "Bound context sources", - "items": { - "type": "string" - }, - "type": "array" - }, - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "enabled": { - "description": "Whether the webhook is enabled", - "type": "boolean" - }, - "id": { - "description": "Public ID (whk_...)", - "type": "string" - }, - "lookup_key": { - "description": "Lookup key for generic webhooks", - "type": "string" - }, - "metadata": { - "description": "Additional metadata", - "type": "object" - }, - "provider": { - "description": "Provider type for known providers (github, slack), nil for generic webhooks", - "type": "string" - }, - "updated_at": { - "description": "Updated timestamp", - "format": "date-time", - "type": "string" - }, - "webhook_url": { - "description": "URL to send webhooks to", - "type": "string" - } - }, - "required": [ - "id", - "enabled", - "webhook_url" - ], - "type": "object" - }, - "WebhookEvent": { - "description": "Schema for a webhook event.\n\nMaps to serialized webhook event output from developer portal API.\n", - "properties": { - "created_at": { - "description": "Created timestamp", - "format": "date-time", - "type": "string" - }, - "error": { - "description": "Error message if failed", - "type": "string" - }, - "event_type": { - "description": "Event type from the provider", - "type": "string" - }, - "headers": { - "description": "Request headers", - "type": "object" - }, - "id": { - "description": "Public ID (whe_...)", - "type": "string" - }, - "payload": { - "description": "Event payload", - "type": "object" - }, - "processed_at": { - "description": "When the event was processed", - "format": "date-time", - "type": "string" - }, - "status": { - "description": "Processing status (pending, processed, failed)", - "type": "string" - } - }, - "required": [ - "id", - "status" - ], - "type": "object" - }, - "WorkerStatus": { - "description": "API schema for background worker status on a routine run.", - "properties": { - "attempt": { - "description": "Current attempt number (0 = not yet attempted)", - "type": "integer" - }, - "max_attempts": { - "description": "Maximum allowed attempts", - "type": "integer" - }, - "status": { - "description": "Worker state: queued, executing, retrying, completed, discarded, or cancelled", - "type": "string" - } - }, - "required": [ - "status", - "attempt", - "max_attempts" - ], - "type": "object" - }, - "WorkingMemoryEntry": { - "description": "API schema for a working memory entry.", - "properties": { - "agent": { - "description": "Owning agent", - "type": "string" - }, - "created_at": { - "description": "Creation timestamp", - "format": "date-time", - "type": "string" - }, - "expires_at": { - "description": "Expiration timestamp", - "format": "date-time", - "type": "string" - }, - "id": { - "description": "Memory entry ID (amm_...)", - "type": "string" - }, - "key": { - "description": "Memory key", - "type": "string" - }, - "updated_at": { - "description": "Last update timestamp", - "format": "date-time", - "type": "string" - }, - "value": { - "description": "Memory value", - "type": "string" - } - }, - "required": [ - "id" - ], - "type": "object" - }, - "WorkingMemoryEntryListResponse": { - "description": "Paginated list response for working memory entries.", - "properties": { - "data": { - "description": "List of working memory entries", - "items": { - "$ref": "#/components/schemas/WorkingMemoryEntry" + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "description": "Cursor-paginated list of activity feed entries", + "properties": { + "after_cursor": { + "description": "Cursor for fetching newer entries", + "type": "string" + }, + "before_cursor": { + "description": "Cursor for fetching older entries", + "type": "string" + }, + "data": { + "description": "The entries", + "items": { + "description": "API schema for an activity feed entry.", + "properties": { + "agent": { + "description": "Agent (public ID or expanded object when loaded)", + "oneOf": [ + { + "type": "string" + }, + { + "description": "API schema for an agent.", + "properties": { + "acl": { + "description": "Access control list. Contains grants array with principal_type, principal, and actions. Null when no ACL restrictions are applied.", + "properties": { + "add": { + "description": "Patch mode: grants to add or merge into existing", + "items": { + "description": "API schema for a single ACL grant entry.", + "properties": { + "actions": { + "description": "List of allowed actions (e.g. read, write)", + "items": { + "type": "string" + }, + "type": "array" + }, + "principal": { + "description": "Principal identifier (UUID for user/team/org/agent_user, role name for org_role, omit for everyone)", + "type": "string" + }, + "principal_type": { + "description": "Principal type: user, team, org, org_role, agent, or everyone", + "type": "string" + } + }, + "required": [ + "principal_type", + "actions" + ], + "type": "object" + }, + "type": "array" + }, + "grants": { + "description": "Replace mode: full list of grants (replaces all existing). Use [] to clear.", + "items": { + "description": "API schema for a single ACL grant entry.", + "properties": { + "actions": { + "description": "List of allowed actions (e.g. read, write)", + "items": { + "type": "string" + }, + "type": "array" + }, + "principal": { + "description": "Principal identifier (UUID for user/team/org/agent_user, role name for org_role, omit for everyone)", + "type": "string" + }, + "principal_type": { + "description": "Principal type: user, team, org, org_role, agent, or everyone", + "type": "string" + } + }, + "required": [ + "principal_type", + "actions" + ], + "type": "object" + }, + "type": "array" + }, + "remove": { + "description": "Patch mode: principals to remove from existing", + "items": { + "description": "API schema for identifying a principal to remove from an ACL.", + "properties": { + "principal": { + "description": "Principal identifier to remove (omit for everyone)", + "type": "string" + }, + "principal_type": { + "description": "Principal type to remove", + "type": "string" + } + }, + "required": [ + "principal_type" + ], + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "app": { + "description": "Application", + "type": "string" + }, + "created_at": { + "description": "Creation timestamp", + "format": "date-time", + "type": "string" + }, + "default_model": { + "description": "Default AI model", + "type": "string" + }, + "email": { + "description": "Agent email", + "type": "string" + }, + "id": { + "description": "Agent ID (agi_...)", + "type": "string" + }, + "identity": { + "description": "Identity prompt", + "type": "string" + }, + "lookup_key": { + "description": "Unique lookup key", + "type": "string" + }, + "metadata": { + "description": "Arbitrary metadata", + "type": "object" + }, + "name": { + "description": "Agent name", + "type": "string" + }, + "org": { + "description": "Organization", + "type": "string" + }, + "phone_number": { + "description": "Agent phone number", + "type": "string" + }, + "sandbox": { + "description": "Sandbox", + "type": "string" + }, + "team": { + "description": "Owning team", + "type": "string" + }, + "updated_at": { + "description": "Last update timestamp", + "format": "date-time", + "type": "string" + }, + "user": { + "description": "Owning user", + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + } + ] + }, + "app": { + "description": "Application", + "type": "string" + }, + "attachments": { + "description": "Entry attachments", + "items": { + "type": "object" + }, + "type": "array" + }, + "automation_run": { + "description": "Automation run", + "type": "string" + }, + "content": { + "description": "Longer explanation (markdown)", + "type": "string" + }, + "correlation_id": { + "description": "Correlation ID for grouped entries", + "type": "string" + }, + "created_at": { + "description": "Creation timestamp", + "format": "date-time", + "type": "string" + }, + "id": { + "description": "Entry ID (afe_...)", + "type": "string" + }, + "kind": { + "description": "Entry kind", + "type": "string" + }, + "level": { + "description": "Severity level", + "type": "string" + }, + "metadata": { + "description": "Entry metadata", + "type": "object" + }, + "org": { + "description": "Organization", + "type": "string" + }, + "routine_run": { + "description": "Routine run", + "type": "string" + }, + "sandbox": { + "description": "Sandbox identifier", + "type": "string" + }, + "session_record": { + "description": "Agent session", + "type": "string" + }, + "team": { + "description": "Team", + "type": "string" + }, + "thread": { + "description": "Thread", + "type": "string" + }, + "title": { + "description": "One-line summary", + "type": "string" + }, + "updated_at": { + "description": "Last update timestamp", + "format": "date-time", + "type": "string" + }, + "user": { + "description": "User (public ID or expanded object when loaded)", + "oneOf": [ + { + "type": "string" + }, + { + "description": "API schema for a user.", + "properties": { + "alias": { + "description": "User alias/handle", + "type": "string" + }, + "email": { + "description": "User email address", + "type": "string" + }, + "id": { + "description": "User ID", + "type": "string" + }, + "metadata": { + "description": "User metadata", + "type": "object" + }, + "name": { + "description": "User display name", + "type": "string" + }, + "org": { + "description": "Organization", + "type": "string" + }, + "sandbox": { + "description": "Sandbox", + "type": "string" + } + }, + "required": [ + "id" + ], + "type": "object" + } + ] + } + }, + "required": [ + "id" + ], + "type": "object" + }, + "type": "array" + }, + "has_more": { + "description": "Whether more items exist beyond this page", + "type": "boolean" + } + }, + "required": [ + "data", + "has_more" + ], + "type": "object" + } + } }, - "type": "array" - }, - "has_next": { - "description": "Whether a next page exists", - "type": "boolean" - }, - "has_prev": { - "description": "Whether a previous page exists", - "type": "boolean" - }, - "page": { - "description": "Current page number", - "type": "integer" - }, - "page_size": { - "description": "Results per page", - "type": "integer" + "description": "Successful response" }, - "total_entries": { - "description": "Total number of entries", - "type": "integer" + "400": { + "description": "Invalid cursor" }, - "total_pages": { - "description": "Total number of pages", - "type": "integer" + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "App-scoped token required. Use a token scoped to the target app." } }, - "required": [ - "data" - ], - "type": "object" + "x-auth": [ + "publishable_key", + "bearer" + ] } - } - }, - "info": { - "description": "Agent-first API for runtime + developer control-plane operations (users, teams, agents, routines, context, workflows, integrations, and webhooks).", - "title": "ArchAstro Platform API", - "version": "v1" - }, - "openapi": "3.0.0", - "paths": { + }, "/api/v1/agent_computers/{computer}": { "delete": { "operationId": "delete_api_v1_agent_computers__computer", @@ -8291,25 +3466,16 @@ "application/json": { "schema": { "properties": { - "app": { - "description": "App ID", - "type": "string" - }, "command": { "description": "Shell command to execute", "type": "string" }, - "computer": { - "description": "Computer ID", - "type": "string" - }, "dir": { "description": "Working directory for the command", "type": "string" } }, "required": [ - "computer", "command" ], "type": "object" @@ -8362,29 +3528,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "app": { - "description": "App ID", - "type": "string" - }, - "computer": { - "description": "Computer ID", - "type": "string" - } - }, - "required": [ - "computer" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -8537,29 +3680,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "app": { - "description": "App ID", - "type": "string" - }, - "installation": { - "description": "Installation ID", - "type": "string" - } - }, - "required": [ - "installation" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -8648,14 +3768,6 @@ "application/json": { "schema": { "properties": { - "app": { - "description": "App ID", - "type": "string" - }, - "installation": { - "description": "Installation ID", - "type": "string" - }, "payload": { "description": "Source payload", "type": "object" @@ -8666,7 +3778,6 @@ } }, "required": [ - "installation", "type", "payload" ], @@ -8720,29 +3831,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "app": { - "description": "App ID", - "type": "string" - }, - "installation": { - "description": "Installation ID", - "type": "string" - } - }, - "required": [ - "installation" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -8792,22 +3880,11 @@ "application/json": { "schema": { "properties": { - "app": { - "description": "App ID", - "type": "string" - }, - "installation": { - "description": "Installation ID", - "type": "string" - }, "reason": { "description": "Optional suspension reason", "type": "string" } }, - "required": [ - "installation" - ], "type": "object" } } @@ -9138,10 +4215,6 @@ }, "type": "object" }, - "app": { - "description": "App ID", - "type": "string" - }, "config": { "description": "Config ID", "type": "string" @@ -9159,7 +4232,7 @@ "type": "string" }, "handler_type": { - "description": "Handler type", + "description": "Handler type: workflow_graph, script, preset, or chain", "type": "string" }, "lookup_key": { @@ -9176,16 +4249,43 @@ }, "preset_config": { "description": "Preset config", + "properties": { + "instructions": { + "description": "Custom task or behavior instructions for the preset (max 10,000 chars).", + "type": "string" + }, + "llm": { + "description": "LLM invocation settings (e.g. a `model` override for this routine/step).", + "properties": { + "model": { + "description": "Model identifier. When set, overrides the agent's default_model.", + "type": "string" + } + }, + "type": "object" + }, + "session_mode": { + "description": "Session mode: `stateless` (default, new session per trigger) or `session` (find-or-create a persistent session scoped by `session_scope`).", + "type": "string" + }, + "session_scope": { + "description": "When `session_mode` is `session`, controls session scoping: `per_user` (default), `per_key`, `per_org`, or `global`.", + "type": "string" + }, + "structured_message_template_ids": { + "description": "Config IDs of AgentMessageSchema templates that constrain the agent's responses to predefined structured formats.", + "items": { + "type": "string" + }, + "type": "array" + } + }, "type": "object" }, "preset_name": { "description": "Preset name", "type": "string" }, - "routine": { - "description": "Routine ID", - "type": "string" - }, "schedule": { "description": "Cron expression for scheduled routines", "type": "string" @@ -9194,14 +4294,91 @@ "description": "Script content", "type": "string" }, + "steps": { + "description": "Linear sequence of steps (required when handler_type is \"chain\"; must be empty otherwise). See the Step schema for per-step fields. Replaces the step list entirely — send the full desired list, not a diff.", + "items": { + "description": "API schema for a single chain-routine step.\n\nMirrors the shape of `ArchAstro.Agents.Routines.Step` as seen by clients,\nwith one API-side normalization: clients send `config` (matching the\nroutine-level field name), and `cast/1` rewrites it to `config_id` so\ndownstream changeset code sees the canonical key.\n\nServer-side validation (handler-body mutual exclusion, `config_id`\nexistence + kind, unique step names within a chain) is authoritative\n— this schema only defines the *shape* of the request payload.\n", + "properties": { + "config": { + "description": "Config ID (for handler_type: workflow_graph, or as an alternative to inline `script` when handler_type: script). Normalized to `config_id` internally.", + "type": "string" + }, + "handler_type": { + "description": "Handler type for this step: preset, script, or workflow_graph", + "type": "string" + }, + "inputs": { + "description": "Optional map binding prior step outputs to this step's inputs.", + "type": "object" + }, + "name": { + "description": "Optional step label. Must be unique within the chain if set.", + "type": "string" + }, + "on_error": { + "description": "Error policy: halt (default), continue, or retry.", + "type": "string" + }, + "output_key": { + "description": "Optional name under which this step's result is addressable downstream. Defaults to `name`.", + "type": "string" + }, + "preset_config": { + "description": "Preset configuration (same shape as the routine-level preset_config). May include `llm: {model}` to override the agent's default_model for this step.", + "properties": { + "instructions": { + "description": "Custom task or behavior instructions for the preset (max 10,000 chars).", + "type": "string" + }, + "llm": { + "description": "LLM invocation settings (e.g. a `model` override for this routine/step).", + "properties": { + "model": { + "description": "Model identifier. When set, overrides the agent's default_model.", + "type": "string" + } + }, + "type": "object" + }, + "session_mode": { + "description": "Session mode: `stateless` (default, new session per trigger) or `session` (find-or-create a persistent session scoped by `session_scope`).", + "type": "string" + }, + "session_scope": { + "description": "When `session_mode` is `session`, controls session scoping: `per_user` (default), `per_key`, `per_org`, or `global`.", + "type": "string" + }, + "structured_message_template_ids": { + "description": "Config IDs of AgentMessageSchema templates that constrain the agent's responses to predefined structured formats.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "preset_name": { + "description": "Preset name (for handler_type: preset)", + "type": "string" + }, + "script": { + "description": "Inline script source (for handler_type: script)", + "type": "string" + } + }, + "required": [ + "handler_type" + ], + "type": "object" + }, + "type": "array" + }, "trigger_context": { "description": "Trigger context: chat_session or event", "type": "string" } }, - "required": [ - "routine" - ], "type": "object" } } @@ -9252,29 +4429,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "app": { - "description": "App ID", - "type": "string" - }, - "routine": { - "description": "Routine ID", - "type": "string" - } - }, - "required": [ - "routine" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -9324,10 +4478,6 @@ "application/json": { "schema": { "properties": { - "app": { - "description": "App ID", - "type": "string" - }, "idempotency_key": { "description": "Idempotency key to deduplicate invocations", "type": "string" @@ -9340,10 +4490,6 @@ "description": "Optional per-call metadata", "type": "object" }, - "routine": { - "description": "Routine ID or lookup_key", - "type": "string" - }, "session_key": { "description": "Session key (required when session_scope is per_key)", "type": "string" @@ -9354,7 +4500,6 @@ } }, "required": [ - "routine", "message" ], "type": "object" @@ -9407,29 +4552,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "app": { - "description": "App ID", - "type": "string" - }, - "routine": { - "description": "Routine ID", - "type": "string" - } - }, - "required": [ - "routine" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -9631,10 +4753,6 @@ "description": "Agent ID", "type": "string" }, - "app": { - "description": "App ID", - "type": "string" - }, "instructions": { "description": "Task description for the session", "type": "string" @@ -9699,6 +4817,9 @@ "403": { "description": "Forbidden - app scope required" }, + "404": { + "description": "Agent not found" + }, "422": { "description": "Validation failed" } @@ -9799,22 +4920,11 @@ "application/json": { "schema": { "properties": { - "agent_session": { - "description": "Agent session ID", - "type": "string" - }, - "app": { - "description": "App ID", - "type": "string" - }, "metadata": { "description": "Arbitrary metadata", "type": "object" } }, - "required": [ - "agent_session" - ], "type": "object" } } @@ -9865,29 +4975,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "agent_session": { - "description": "Agent session ID", - "type": "string" - }, - "app": { - "description": "App ID", - "type": "string" - } - }, - "required": [ - "agent_session" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -9934,14 +5021,6 @@ "application/json": { "schema": { "properties": { - "agent_session": { - "description": "Agent session ID", - "type": "string" - }, - "app": { - "description": "App ID", - "type": "string" - }, "content": { "description": "Message content", "type": "string" @@ -9956,7 +5035,6 @@ } }, "required": [ - "agent_session", "content" ], "type": "object" @@ -10028,6 +5106,9 @@ }, "403": { "description": "Forbidden - app scope required" + }, + "404": { + "description": "Agent not found" } }, "x-auth": [ @@ -10047,10 +5128,6 @@ "description": "Agent ID", "type": "string" }, - "app": { - "description": "App ID", - "type": "string" - }, "config": { "description": "Skill config ID", "type": "string" @@ -10191,17 +5268,9 @@ ], "requestBody": { "content": { - "application/json": { - "schema": { - "properties": { - "agent_skill": { - "description": "Agent skill ID", - "type": "string" - }, - "app": { - "description": "App ID", - "type": "string" - }, + "application/json": { + "schema": { + "properties": { "instruction": { "description": "Instruction override", "type": "string" @@ -10211,9 +5280,6 @@ "type": "object" } }, - "required": [ - "agent_skill" - ], "type": "object" } } @@ -10264,29 +5330,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "agent_skill": { - "description": "Agent skill ID", - "type": "string" - }, - "app": { - "description": "App ID", - "type": "string" - } - }, - "required": [ - "agent_skill" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -10328,29 +5371,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "agent_skill": { - "description": "Agent skill ID", - "type": "string" - }, - "app": { - "description": "App ID", - "type": "string" - } - }, - "required": [ - "agent_skill" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -10417,6 +5437,9 @@ }, "403": { "description": "Forbidden - app scope required" + }, + "404": { + "description": "Agent not found" } }, "x-auth": [ @@ -10546,10 +5569,6 @@ "application/json": { "schema": { "properties": { - "app": { - "description": "App ID", - "type": "string" - }, "builtin_tool_config": { "description": "Built-in tool config", "type": "object" @@ -10589,15 +5608,8 @@ "parameters_config": { "description": "Config ID for a reusable JsonSchema", "type": "string" - }, - "tool": { - "description": "Tool ID", - "type": "string" } }, - "required": [ - "tool" - ], "type": "object" } } @@ -10648,29 +5660,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "app": { - "description": "App ID", - "type": "string" - }, - "tool": { - "description": "Tool ID", - "type": "string" - } - }, - "required": [ - "tool" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -10715,29 +5704,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "app": { - "description": "App ID", - "type": "string" - }, - "tool": { - "description": "Tool ID", - "type": "string" - } - }, - "required": [ - "tool" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -10922,10 +5888,6 @@ }, "type": "object" }, - "app": { - "description": "App ID", - "type": "string" - }, "email": { "description": "Agent email", "type": "string" @@ -11055,7 +6017,7 @@ "description": "Unauthorized" }, "403": { - "description": "Forbidden - app scope required" + "description": "App-scoped token required. Use a token scoped to the target app.; Permission denied. The connected account may not have the required permissions. Try reconnecting your account." }, "404": { "description": "Agent not found" @@ -11208,14 +6170,6 @@ }, "type": "object" }, - "agent": { - "description": "Agent ID", - "type": "string" - }, - "app": { - "description": "App ID", - "type": "string" - }, "email": { "description": "Agent email", "type": "string" @@ -11280,9 +6234,6 @@ "type": "string" } }, - "required": [ - "agent" - ], "type": "object" } } @@ -11377,14 +6328,6 @@ "application/json": { "schema": { "properties": { - "agent": { - "description": "Agent ID", - "type": "string" - }, - "app": { - "description": "App ID", - "type": "string" - }, "config": { "description": "Computer configuration", "type": "object" @@ -11407,7 +6350,6 @@ } }, "required": [ - "agent", "name" ], "type": "object" @@ -11504,14 +6446,6 @@ "application/json": { "schema": { "properties": { - "agent": { - "description": "Agent ID", - "type": "string" - }, - "app": { - "description": "App ID", - "type": "string" - }, "config": { "description": "Optional configuration", "type": "object" @@ -11552,7 +6486,6 @@ } }, "required": [ - "agent", "kind" ], "type": "object" @@ -11733,14 +6666,6 @@ }, "type": "object" }, - "agent": { - "description": "Agent ID", - "type": "string" - }, - "app": { - "description": "App ID", - "type": "string" - }, "config": { "description": "Config ID (for workflow_graph handler)", "type": "string" @@ -11758,7 +6683,7 @@ "type": "string" }, "handler_type": { - "description": "Handler type: workflow_graph, script, or preset", + "description": "Handler type: workflow_graph, script, preset, or chain", "type": "string" }, "lookup_key": { @@ -11775,6 +6700,37 @@ }, "preset_config": { "description": "Preset config", + "properties": { + "instructions": { + "description": "Custom task or behavior instructions for the preset (max 10,000 chars).", + "type": "string" + }, + "llm": { + "description": "LLM invocation settings (e.g. a `model` override for this routine/step).", + "properties": { + "model": { + "description": "Model identifier. When set, overrides the agent's default_model.", + "type": "string" + } + }, + "type": "object" + }, + "session_mode": { + "description": "Session mode: `stateless` (default, new session per trigger) or `session` (find-or-create a persistent session scoped by `session_scope`).", + "type": "string" + }, + "session_scope": { + "description": "When `session_mode` is `session`, controls session scoping: `per_user` (default), `per_key`, `per_org`, or `global`.", + "type": "string" + }, + "structured_message_template_ids": { + "description": "Config IDs of AgentMessageSchema templates that constrain the agent's responses to predefined structured formats.", + "items": { + "type": "string" + }, + "type": "array" + } + }, "type": "object" }, "preset_name": { @@ -11793,13 +6749,92 @@ "description": "Initial status: draft or active (default: draft)", "type": "string" }, + "steps": { + "description": "Linear sequence of steps (required when handler_type is \"chain\"; must be empty otherwise). See the Step schema for the per-step fields. Exactly one handler body field (preset_name, script, or config) must be populated per step, matching that step's handler_type.", + "items": { + "description": "API schema for a single chain-routine step.\n\nMirrors the shape of `ArchAstro.Agents.Routines.Step` as seen by clients,\nwith one API-side normalization: clients send `config` (matching the\nroutine-level field name), and `cast/1` rewrites it to `config_id` so\ndownstream changeset code sees the canonical key.\n\nServer-side validation (handler-body mutual exclusion, `config_id`\nexistence + kind, unique step names within a chain) is authoritative\n— this schema only defines the *shape* of the request payload.\n", + "properties": { + "config": { + "description": "Config ID (for handler_type: workflow_graph, or as an alternative to inline `script` when handler_type: script). Normalized to `config_id` internally.", + "type": "string" + }, + "handler_type": { + "description": "Handler type for this step: preset, script, or workflow_graph", + "type": "string" + }, + "inputs": { + "description": "Optional map binding prior step outputs to this step's inputs.", + "type": "object" + }, + "name": { + "description": "Optional step label. Must be unique within the chain if set.", + "type": "string" + }, + "on_error": { + "description": "Error policy: halt (default), continue, or retry.", + "type": "string" + }, + "output_key": { + "description": "Optional name under which this step's result is addressable downstream. Defaults to `name`.", + "type": "string" + }, + "preset_config": { + "description": "Preset configuration (same shape as the routine-level preset_config). May include `llm: {model}` to override the agent's default_model for this step.", + "properties": { + "instructions": { + "description": "Custom task or behavior instructions for the preset (max 10,000 chars).", + "type": "string" + }, + "llm": { + "description": "LLM invocation settings (e.g. a `model` override for this routine/step).", + "properties": { + "model": { + "description": "Model identifier. When set, overrides the agent's default_model.", + "type": "string" + } + }, + "type": "object" + }, + "session_mode": { + "description": "Session mode: `stateless` (default, new session per trigger) or `session` (find-or-create a persistent session scoped by `session_scope`).", + "type": "string" + }, + "session_scope": { + "description": "When `session_mode` is `session`, controls session scoping: `per_user` (default), `per_key`, `per_org`, or `global`.", + "type": "string" + }, + "structured_message_template_ids": { + "description": "Config IDs of AgentMessageSchema templates that constrain the agent's responses to predefined structured formats.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "preset_name": { + "description": "Preset name (for handler_type: preset)", + "type": "string" + }, + "script": { + "description": "Inline script source (for handler_type: script)", + "type": "string" + } + }, + "required": [ + "handler_type" + ], + "type": "object" + }, + "type": "array" + }, "trigger_context": { "description": "Trigger context: chat_session or event (default: event)", "type": "string" } }, "required": [ - "agent", "name", "handler_type" ], @@ -11878,6 +6913,9 @@ }, "403": { "description": "Forbidden - app scope required" + }, + "404": { + "description": "Agent not found" } }, "x-auth": [ @@ -11903,14 +6941,6 @@ "application/json": { "schema": { "properties": { - "agent": { - "description": "Agent ID", - "type": "string" - }, - "app": { - "description": "App ID", - "type": "string" - }, "builtin_tool_config": { "description": "Built-in tool config", "type": "object" @@ -11957,7 +6987,6 @@ } }, "required": [ - "agent", "kind" ], "type": "object" @@ -12315,10 +7344,6 @@ "application/json": { "schema": { "properties": { - "agent": { - "description": "Agent ID", - "type": "string" - }, "max_results": { "description": "Max results to return", "type": "integer" @@ -12344,7 +7369,6 @@ } }, "required": [ - "agent", "query" ], "type": "object" @@ -12447,14 +7471,6 @@ "application/json": { "schema": { "properties": { - "agent": { - "description": "Agent ID", - "type": "string" - }, - "app": { - "description": "App ID", - "type": "string" - }, "skip_welcome_message": { "description": "Skip automatic welcome message", "type": "boolean" @@ -12495,7 +7511,6 @@ } }, "required": [ - "agent", "thread" ], "type": "object" @@ -13141,10 +8156,6 @@ "application/json": { "schema": { "properties": { - "artifact": { - "description": "Artifact ID", - "type": "string" - }, "description": { "description": "Artifact description", "type": "string" @@ -13171,7 +8182,6 @@ } }, "required": [ - "artifact", "from_version" ], "type": "object" @@ -13227,25 +8237,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "artifact": { - "description": "Artifact ID", - "type": "string" - } - }, - "required": [ - "artifact" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "204": { "description": "No content" @@ -13621,14 +8612,6 @@ "application/json": { "schema": { "properties": { - "app": { - "description": "App ID (optional, derived from auth key if omitted)", - "type": "string" - }, - "automation": { - "description": "Automation ID or lookup_key", - "type": "string" - }, "idempotency_key": { "description": "Idempotency key to deduplicate invocations", "type": "string" @@ -13638,9 +8621,6 @@ "type": "object" } }, - "required": [ - "automation" - ], "type": "object" } } @@ -13707,6 +8687,27 @@ "schema": { "type": "string" } + }, + { + "description": "Filter by exact lookup_key match", + "in": "query", + "name": "lookup_key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Filter: children of any listed parent config ID (pass one ID to fetch a single bundle's children)", + "in": "query", + "name": "parents", + "required": false, + "schema": { + "items": { + "type": "string" + }, + "type": "array" + } } ], "responses": { @@ -13789,10 +8790,18 @@ "description": "Organization", "type": "string" }, + "parent": { + "description": "Parent config ID (bundle children only)", + "type": "string" + }, "raw_content": { "description": "Raw file content (system configs only)", "type": "string" }, + "relative_path": { + "description": "Path within parent bundle (bundle children only)", + "type": "string" + }, "sandbox": { "description": "Sandbox identifier", "type": "string" @@ -13873,10 +8882,18 @@ "description": "Content mime type", "type": "string" }, + "parent": { + "description": "Parent config ID (for bundle children, e.g. files under a Skill)", + "type": "string" + }, "raw_content": { "description": "Raw content (YAML/JSON/etc)", "type": "string" }, + "relative_path": { + "description": "Path within the parent bundle (required when parent is set)", + "type": "string" + }, "team": { "description": "Team ID (for team-owned configs)", "type": "string" @@ -14197,10 +9214,18 @@ "description": "Organization", "type": "string" }, + "parent": { + "description": "Parent config ID (bundle children only)", + "type": "string" + }, "raw_content": { "description": "Raw file content (system configs only)", "type": "string" }, + "relative_path": { + "description": "Path within parent bundle (bundle children only)", + "type": "string" + }, "sandbox": { "description": "Sandbox identifier", "type": "string" @@ -14316,10 +9341,6 @@ "description": "Scope the clone to an org (must match viewer's org if set)", "type": "string" }, - "system": { - "description": "Source system config path or lookup_key", - "type": "string" - }, "team": { "description": "Clone to this team", "type": "string" @@ -14333,9 +9354,6 @@ "type": "string" } }, - "required": [ - "system" - ], "type": "object" } } @@ -14549,10 +9567,6 @@ "description": "Description of changes", "type": "string" }, - "config": { - "description": "Config ID", - "type": "string" - }, "data": { "description": "Additional structured data stored on the version", "type": "object" @@ -14569,6 +9583,10 @@ "description": "Raw content (YAML/JSON/etc)", "type": "string" }, + "relative_path": { + "description": "Update relative path within parent bundle", + "type": "string" + }, "team": { "description": "Team ID (for team-owned configs)", "type": "string" @@ -14583,7 +9601,6 @@ } }, "required": [ - "config", "raw_content", "mime_type" ], @@ -14642,10 +9659,6 @@ "application/json": { "schema": { "properties": { - "config": { - "description": "Config ID", - "type": "string" - }, "team": { "description": "Team ID (for team-owned configs)", "type": "string" @@ -14655,9 +9668,6 @@ "type": "string" } }, - "required": [ - "config" - ], "type": "object" } } @@ -14779,10 +9789,6 @@ "application/json": { "schema": { "properties": { - "config": { - "description": "Config ID", - "type": "string" - }, "team": { "description": "Team ID (for team-owned configs)", "type": "string" @@ -14792,9 +9798,6 @@ "type": "string" } }, - "required": [ - "config" - ], "type": "object" } } @@ -15037,17 +10040,12 @@ "description": "Object field values to update", "type": "object" }, - "object": { - "description": "Object ID", - "type": "string" - }, "type": { "description": "Object schema type (lookup_key)", "type": "string" } }, "required": [ - "object", "fields" ], "type": "object" @@ -15182,23 +10180,134 @@ ] } }, + "/api/v1/invites/accept": { + "post": { + "operationId": "post_api_v1_invites_accept", + "parameters": [], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "key": { + "description": "Invite key", + "type": "string" + } + }, + "required": [ + "key" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInvite" + } + } + }, + "description": "Successful response" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Invite not found" + }, + "409": { + "description": "Conflict" + }, + "422": { + "description": "Validation failed" + }, + "429": { + "description": "Too many requests" + } + }, + "x-auth": [ + "publishable_key", + "bearer" + ] + } + }, "/api/v1/kv": { "get": { "operationId": "get_api_v1_kv", - "parameters": [], + "parameters": [ + { + "description": "Page number (developer / S2S, default 1)", + "in": "query", + "name": "page", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Results per page (developer / S2S, default 25, max 100)", + "in": "query", + "name": "page_size", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "description": "Filter by a specific user ID (developer / S2S)", + "in": "query", + "name": "user", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Substring match on user email and full name (developer / S2S)", + "in": "query", + "name": "user_search", + "required": false, + "schema": { + "type": "string" + } + }, + { + "description": "Prefix filter on the storage key (developer / S2S)", + "in": "query", + "name": "key", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/KeyValueStorageEntryList" + "$ref": "#/components/schemas/KeyValueStorageEntryPage" } } }, "description": "Successful response" }, + "400": { + "description": "Bad request" + }, "401": { "description": "Unauthorized" + }, + "403": { + "description": "App-scoped token required. Use a token scoped to the target app." } }, "x-auth": [ @@ -15218,6 +10327,10 @@ "description": "Storage key", "type": "string" }, + "user": { + "description": "Target user ID. Required when calling as a developer or with a server-to-server key; ignored for end-user callers.", + "type": "string" + }, "value": { "description": "Value to store", "type": "string" @@ -15250,6 +10363,12 @@ "401": { "description": "Unauthorized" }, + "403": { + "description": "Forbidden; App-scoped token required. Use a token scoped to the target app." + }, + "404": { + "description": "User not found" + }, "422": { "description": "Invalid parameters" } @@ -15284,8 +10403,11 @@ "401": { "description": "Unauthorized" }, + "403": { + "description": "Forbidden; App-scoped token required. Use a token scoped to the target app." + }, "404": { - "description": "Entry not found" + "description": "Entry not found; User not found" } }, "x-auth": [ @@ -15304,6 +10426,15 @@ "schema": { "type": "string" } + }, + { + "description": "Target user ID. Required when calling as a developer or with a server-to-server key; ignored for end-user callers.", + "in": "query", + "name": "user", + "required": false, + "schema": { + "type": "string" + } } ], "responses": { @@ -15323,8 +10454,11 @@ "401": { "description": "Unauthorized" }, + "403": { + "description": "Forbidden; App-scoped token required. Use a token scoped to the target app." + }, "404": { - "description": "Entry not found" + "description": "Entry not found; User not found" } }, "x-auth": [ @@ -15350,6 +10484,10 @@ "application/json": { "schema": { "properties": { + "user": { + "description": "Target user ID. Required when calling as a developer or with a server-to-server key; ignored for end-user callers.", + "type": "string" + }, "value": { "description": "Value to store", "type": "string" @@ -15381,6 +10519,12 @@ "401": { "description": "Unauthorized" }, + "403": { + "description": "Forbidden; App-scoped token required. Use a token scoped to the target app." + }, + "404": { + "description": "User not found" + }, "422": { "description": "Invalid parameters" } @@ -15964,10 +11108,6 @@ }, "type": "object" }, - "app": { - "description": "App ID", - "type": "string" - }, "description": { "description": "Team description", "type": "string" @@ -16260,10 +11400,6 @@ }, "type": "object" }, - "app": { - "description": "App ID", - "type": "string" - }, "description": { "description": "Team description", "type": "string" @@ -16293,15 +11429,8 @@ } }, "type": "object" - }, - "team": { - "description": "Team ID", - "type": "string" } }, - "required": [ - "team" - ], "type": "object" } } @@ -16720,17 +11849,12 @@ "description": "Object field values", "type": "object" }, - "team": { - "description": "Team ID", - "type": "string" - }, "type": { "description": "Object schema type (lookup_key)", "type": "string" } }, "required": [ - "team", "type", "fields" ], @@ -16781,25 +11905,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "team": { - "description": "Team ID", - "type": "string" - } - }, - "required": [ - "team" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -16841,25 +11946,6 @@ } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "team": { - "description": "Team ID", - "type": "string" - } - }, - "required": [ - "team" - ], - "type": "object" - } - } - }, - "required": true - }, "responses": { "200": { "content": { @@ -16919,15 +12005,8 @@ "agent": { "description": "Optional agent ID — when provided, adds the agent to the team instead of the user", "type": "string" - }, - "team": { - "description": "Team ID", - "type": "string" } }, - "required": [ - "team" - ], "type": "object" } } @@ -17339,26 +12418,15 @@ "description": "Agent ID (provide exactly one of user_id or agent_id)", "type": "string" }, - "app": { - "description": "App ID", - "type": "string" - }, "role": { "description": "Member role (default: member)", "type": "string" }, - "team": { - "description": "Team ID", - "type": "string" - }, "user": { "description": "User ID (provide exactly one of user_id or agent_id)", "type": "string" } }, - "required": [ - "team" - ], "type": "object" } } @@ -18203,10 +13271,6 @@ "description": "Skip automatic welcome message", "type": "boolean" }, - "team": { - "description": "Team ID", - "type": "string" - }, "thread": { "description": "Thread attributes", "properties": { @@ -18271,7 +13335,6 @@ } }, "required": [ - "team", "thread" ], "type": "object" @@ -18364,15 +13427,8 @@ "content": { "description": "New message content", "type": "string" - }, - "message": { - "description": "Message ID", - "type": "string" } }, - "required": [ - "message" - ], "type": "object" } } @@ -18466,14 +13522,9 @@ "emoji": { "description": "Emoji to add as reaction", "type": "string" - }, - "message": { - "description": "Message ID", - "type": "string" } }, "required": [ - "message", "emoji" ], "type": "object" @@ -18753,18 +13804,11 @@ }, "type": "object" }, - "thread": { - "description": "Thread ID", - "type": "string" - }, "title": { "description": "Thread title", "type": "string" } }, - "required": [ - "thread" - ], "type": "object" } } @@ -19042,10 +14086,6 @@ "description": "The message ID to mark as the last read", "type": "string" }, - "thread": { - "description": "Thread ID", - "type": "string" - }, "use_latest_message": { "description": "If true, uses the latest message in the thread", "type": "boolean" @@ -19055,9 +14095,6 @@ "type": "string" } }, - "required": [ - "thread" - ], "type": "object" } } @@ -19243,10 +14280,6 @@ "description": "Membership type: \"owner\" or \"member\" (defaults to \"member\")", "type": "string" }, - "thread": { - "description": "Thread ID", - "type": "string" - }, "type": { "description": "Member type: \"user\" or \"agent\"", "type": "string" @@ -19257,7 +14290,6 @@ } }, "required": [ - "thread", "type" ], "type": "object" @@ -19813,14 +14845,9 @@ "filename" ], "type": "object" - }, - "thread": { - "description": "Thread ID", - "type": "string" } }, "required": [ - "thread", "picture" ], "type": "object" @@ -20049,14 +15076,9 @@ "settings": { "description": "Settings to update", "type": "object" - }, - "thread": { - "description": "Thread ID", - "type": "string" } }, "required": [ - "thread", "settings" ], "type": "object" @@ -20367,6 +15389,86 @@ ] } }, + "/api/v1/users/{user}/invites": { + "post": { + "operationId": "post_api_v1_users__user_invites", + "parameters": [ + { + "description": "User ID", + "in": "path", + "name": "user", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "invite": { + "description": "Invite parameters", + "properties": { + "metadata": { + "description": "Arbitrary JSON metadata attached to the invite", + "type": "object" + }, + "persona_id": { + "description": "Optional persona to bind the invite to", + "type": "string" + }, + "thread_id": { + "description": "Optional thread to bind the invite to (thr_...)", + "type": "string" + } + }, + "type": "object" + } + }, + "required": [ + "invite" + ], + "type": "object" + } + } + }, + "required": true + }, + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserInvite" + } + } + }, + "description": "Successful response" + }, + "401": { + "description": "Unauthorized" + }, + "403": { + "description": "Forbidden" + }, + "404": { + "description": "Thread not found" + }, + "409": { + "description": "Resource already exists" + }, + "422": { + "description": "Validation failed; Invites cannot be created for team threads; Invalid thread id; User context is required" + } + }, + "x-auth": [ + "publishable_key", + "bearer" + ] + } + }, "/api/v1/users/{user}/orgs": { "get": { "operationId": "get_api_v1_users__user_orgs", @@ -20515,15 +15617,8 @@ } }, "type": "object" - }, - "user": { - "description": "User ID", - "type": "string" } }, - "required": [ - "user" - ], "type": "object" } } @@ -21468,14 +16563,9 @@ } }, "type": "object" - }, - "user": { - "description": "User ID", - "type": "string" } }, "required": [ - "user", "thread" ], "type": "object" @@ -21781,96 +16871,6 @@ "bearer" ], "x-channels": [ - { - "description": "Phoenix channel for real-time activity feed updates.\n\nClients join a topic scoped to an agent or org and receive\n`new_entry` events as feed entries are created.\n\n## Topics\n\n * `\"api:activity_feed:agent:{agent_user_id}\"` — entries for a specific agent\n * `\"api:activity_feed:org:{org_id}\"` — entries for an entire org/tenant\n", - "joins": [ - { - "description": "Join an agent-scoped activity feed", - "name": "join_agent", - "params": { - "properties": { - "agent_id": { - "type": "string" - } - }, - "required": [ - "agent_id" - ], - "type": "object" - }, - "pattern": "api:activity_feed:agent:{agent_id}", - "returns": { - "type": "object" - } - }, - { - "description": "Join an org-scoped activity feed", - "name": "join_org", - "params": { - "properties": { - "org_id": { - "type": "string" - } - }, - "required": [ - "org_id" - ], - "type": "object" - }, - "pattern": "api:activity_feed:org:{org_id}", - "returns": { - "type": "object" - } - } - ], - "messages": [ - { - "description": "List activity feed entries with cursor-based pagination", - "event": "list_entries", - "params": { - "properties": { - "after_cursor": { - "type": "string" - }, - "before_cursor": { - "type": "string" - }, - "kind": { - "type": "string" - }, - "level": { - "type": "string" - }, - "limit": { - "type": "integer" - } - }, - "type": "object" - }, - "returns": { - "type": "object" - } - } - ], - "name": "ApiActivityFeedChannel", - "pushes": [ - { - "description": null, - "event": "new_entry", - "payload": { - "properties": { - "entry": { - "type": "object" - } - }, - "type": "object" - } - } - ], - "x-auth": [ - "bearer" - ] - }, { "description": "Channel for real-time chat messaging.\n\nSupports team-scoped and user-scoped threads with keyed, transient, and direct\nthread access patterns.\n", "joins": [ @@ -23101,6 +18101,96 @@ "bearer" ] }, + { + "description": "Phoenix channel for real-time activity feed updates.\n\nClients join a topic scoped to an agent or org and receive\n`new_entry` events as feed entries are created.\n\n## Topics\n\n * `\"api:activity_feed:agent:{agent_user_id}\"` — entries for a specific agent\n * `\"api:activity_feed:org:{org_id}\"` — entries for an entire org/tenant\n", + "joins": [ + { + "description": "Join an agent-scoped activity feed", + "name": "join_agent", + "params": { + "properties": { + "agent_id": { + "type": "string" + } + }, + "required": [ + "agent_id" + ], + "type": "object" + }, + "pattern": "api:activity_feed:agent:{agent_id}", + "returns": { + "type": "object" + } + }, + { + "description": "Join an org-scoped activity feed", + "name": "join_org", + "params": { + "properties": { + "org_id": { + "type": "string" + } + }, + "required": [ + "org_id" + ], + "type": "object" + }, + "pattern": "api:activity_feed:org:{org_id}", + "returns": { + "type": "object" + } + } + ], + "messages": [ + { + "description": "List activity feed entries with cursor-based pagination", + "event": "list_entries", + "params": { + "properties": { + "after_cursor": { + "type": "string" + }, + "before_cursor": { + "type": "string" + }, + "kind": { + "type": "string" + }, + "level": { + "type": "string" + }, + "limit": { + "type": "integer" + } + }, + "type": "object" + }, + "returns": { + "type": "object" + } + } + ], + "name": "ApiActivityFeedChannel", + "pushes": [ + { + "description": null, + "event": "new_entry", + "payload": { + "properties": { + "entry": { + "type": "object" + } + }, + "type": "object" + } + } + ], + "x-auth": [ + "bearer" + ] + }, { "description": "Channel for real-time custom object collaboration.\n\nClients join `api:object:{object_id}` to receive the current object state\nand subscribe to field-level updates. Mutations are sent as key:value maps.\n", "joins": [ diff --git a/src/phx_channel/__init__.py b/src/archastro/phx_channel/__init__.py similarity index 100% rename from src/phx_channel/__init__.py rename to src/archastro/phx_channel/__init__.py diff --git a/src/phx_channel/channel.py b/src/archastro/phx_channel/channel.py similarity index 99% rename from src/phx_channel/channel.py rename to src/archastro/phx_channel/channel.py index e00f36c..82b5ce8 100644 --- a/src/phx_channel/channel.py +++ b/src/archastro/phx_channel/channel.py @@ -12,7 +12,7 @@ if TYPE_CHECKING: from .socket import Socket -logger = logging.getLogger("phx_channel") +logger = logging.getLogger("archastro.phx_channel") DEFAULT_TIMEOUT_S = 10 diff --git a/src/phx_channel/harness.py b/src/archastro/phx_channel/harness.py similarity index 100% rename from src/phx_channel/harness.py rename to src/archastro/phx_channel/harness.py diff --git a/src/phx_channel/socket.py b/src/archastro/phx_channel/socket.py similarity index 99% rename from src/phx_channel/socket.py rename to src/archastro/phx_channel/socket.py index 509700d..1feab75 100644 --- a/src/phx_channel/socket.py +++ b/src/archastro/phx_channel/socket.py @@ -18,7 +18,7 @@ from .channel import Channel -logger = logging.getLogger("phx_channel") +logger = logging.getLogger("archastro.phx_channel") # Default backoff schedule (milliseconds) matching the Phoenix JS client DEFAULT_RECONNECT_BACKOFF_MS = [10, 50, 100, 150, 200, 250, 500, 1000, 2000] diff --git a/src/phx_channel/tests/test_unit.py b/src/archastro/phx_channel/tests/test_unit.py similarity index 99% rename from src/phx_channel/tests/test_unit.py rename to src/archastro/phx_channel/tests/test_unit.py index a1d7da8..bd932cf 100644 --- a/src/phx_channel/tests/test_unit.py +++ b/src/archastro/phx_channel/tests/test_unit.py @@ -7,8 +7,8 @@ import pytest -from phx_channel.channel import Channel, ChannelError -from phx_channel.socket import Socket +from archastro.phx_channel.channel import Channel, ChannelError +from archastro.phx_channel.socket import Socket class MockSocket: diff --git a/src/archastro/platform/__init__.py b/src/archastro/platform/__init__.py index 8444a44..c9b655f 100644 --- a/src/archastro/platform/__init__.py +++ b/src/archastro/platform/__init__.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 2f93d08a58dd +# Content hash: 02004325aba1 from importlib.metadata import version as _pkg_version diff --git a/src/archastro/platform/channels/__init__.py b/src/archastro/platform/channels/__init__.py index d902108..8b3ab30 100644 --- a/src/archastro/platform/channels/__init__.py +++ b/src/archastro/platform/channels/__init__.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: faf7321571f8 +# Content hash: 707e0d843182 from .api_activity_feed_channel import ApiActivityFeedChannel # noqa: F401 from .api_chat_channel import ApiChatChannel # noqa: F401 diff --git a/src/archastro/platform/channels/api_activity_feed_channel.py b/src/archastro/platform/channels/api_activity_feed_channel.py index 5bdf83b..23f2d90 100644 --- a/src/archastro/platform/channels/api_activity_feed_channel.py +++ b/src/archastro/platform/channels/api_activity_feed_channel.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 38296a1885db +# Content hash: dd35ef8c137c from typing import TYPE_CHECKING if TYPE_CHECKING: - from phx_channel.socket import Socket + from archastro.phx_channel.socket import Socket # Phoenix channel for real-time activity feed updates. diff --git a/src/archastro/platform/channels/api_chat_channel.py b/src/archastro/platform/channels/api_chat_channel.py index a77186a..6a2647b 100644 --- a/src/archastro/platform/channels/api_chat_channel.py +++ b/src/archastro/platform/channels/api_chat_channel.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 92ff6b6531d7 +# Content hash: 43a5e72f8141 from typing import TYPE_CHECKING if TYPE_CHECKING: - from phx_channel.socket import Socket + from archastro.phx_channel.socket import Socket # Channel for real-time chat messaging. diff --git a/src/archastro/platform/channels/api_object_channel.py b/src/archastro/platform/channels/api_object_channel.py index 8626112..5b06724 100644 --- a/src/archastro/platform/channels/api_object_channel.py +++ b/src/archastro/platform/channels/api_object_channel.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 2e14189cffac +# Content hash: 0a476fd1bde0 from typing import TYPE_CHECKING if TYPE_CHECKING: - from phx_channel.socket import Socket + from archastro.phx_channel.socket import Socket # Channel for real-time custom object collaboration. diff --git a/src/archastro/platform/client.py b/src/archastro/platform/client.py index e29f83d..856914d 100644 --- a/src/archastro/platform/client.py +++ b/src/archastro/platform/client.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 838be0139962 +# Content hash: 2eba50bf001e from .auth import AuthClient from .runtime.http_client import HttpClient @@ -28,6 +28,7 @@ def __init__( ) self.auth = AuthClient(self._http) self.v1 = V1(self._http) + self.activity_feed = self.v1.activity_feed self.agent_computers = self.v1.agent_computers self.agent_installations = self.v1.agent_installations self.agent_routines = self.v1.agent_routines @@ -41,6 +42,7 @@ def __init__( self.config = self.v1.config self.custom_objects = self.v1.custom_objects self.installation_sources = self.v1.installation_sources + self.invites = self.v1.invites self.kv = self.v1.kv self.orgs = self.v1.orgs self.team_memberships = self.v1.team_memberships diff --git a/src/archastro/platform/types/__init__.py b/src/archastro/platform/types/__init__.py index 22d5532..67356ae 100644 --- a/src/archastro/platform/types/__init__.py +++ b/src/archastro/platform/types/__init__.py @@ -1,20 +1,15 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 8f970598bc0c +# Content hash: ed1138b11d56 from .agents import * # noqa: F401,F403 from .ai import * # noqa: F401,F403 from .artifacts import * # noqa: F401,F403 from .automations import * # noqa: F401,F403 -from .chat import * # noqa: F401,F403 from .common import * # noqa: F401,F403 from .config import * # noqa: F401,F403 from .image import * # noqa: F401,F403 -from .members import * # noqa: F401,F403 -from .orgs import * # noqa: F401,F403 -from .reactions import * # noqa: F401,F403 -from .schedules import * # noqa: F401,F403 -from .system import * # noqa: F401,F403 +from .invites import * # noqa: F401,F403 from .teams import * # noqa: F401,F403 from .threads import * # noqa: F401,F403 from .users import * # noqa: F401,F403 diff --git a/src/archastro/platform/types/agents.py b/src/archastro/platform/types/agents.py index e579fc6..ba5691d 100644 --- a/src/archastro/platform/types/agents.py +++ b/src/archastro/platform/types/agents.py @@ -1,11 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 4a4313dd8d9e +# Content hash: ca785cc1d093 from pydantic import BaseModel -from .common import Acl, ResolvedTool, WorkerStatus +from .common import Acl, PresetConfig, WorkerStatus from .config import Config @@ -52,16 +52,6 @@ class AgentComputerListResponse(BaseModel): data: list[AgentComputer] # List of agent computers -# API schema for an agent conversation history session. -class AgentConversationHistory(BaseModel): - created_at: str | None = None # Creation timestamp - last_interaction_at: str | None = None # Last interaction timestamp - name: str | None = None # Session name - org: str | None = None # Organization - sandbox: str | None = None # Sandbox - session: str | None = None # Session ID (ach_...) - - # API schema for an agent export response. # Contains the reconstructed AgentTemplate and all dependent config files # needed for a fully self-contained re-deploy. @@ -70,76 +60,6 @@ class AgentExport(BaseModel): template: dict[str, object] # AgentTemplate config object -# API schema for an agent impersonation skill summary. -class AgentImpersonationSkillSummary(BaseModel): - description: str | None = None # Skill description - id: str # Skill config ID - name: str # Skill display name - slug: str # Skill slug - - -# API schema for an agent tool. -class AgentTool(BaseModel): - agent: str | None = None # Owning agent ID - app: str | None = None # Application ID - builtin_tool_config: dict[str, object] | None = None # Builtin tool configuration - builtin_tool_key: str | None = None # Builtin tool key - config: str | None = None # Config ID - created_at: str | None = None # Creation timestamp - description: str | None = None # Tool description - handler_type: str | None = None # Handler type - id: str # Tool ID (atl_...) - instruction: str | None = None # Tool instruction - kind: str | None = None # Tool kind - lookup_key: str | None = None # Unique lookup key - metadata: dict[str, object] | None = None # Arbitrary metadata - name: str | None = None # Tool name - parameters: dict[str, object] | None = None # Tool parameters - parameters_config: str | None = None # Parameters config ID - status: str | None = None # Tool status - updated_at: str | None = None # Last update timestamp - - -# API schema for a full agent impersonation manifest. -class AgentImpersonationManifest(BaseModel): - agent: Agent # Agent identity and metadata - skills: list[AgentImpersonationSkillSummary] # Linked skills - tools: list[AgentTool] # Active tools - - -# API schema for an agent impersonation skill file entry. -class AgentImpersonationSkillFile(BaseModel): - content_type: str | None = None # Raw content type for the file - download_url: str # URL to fetch raw file contents - path: str # Relative path within the skill bundle - - -# API schema for an agent impersonation skill list response. -class AgentImpersonationSkillList(BaseModel): - data: list[AgentImpersonationSkillSummary] # Agent-linked skills - - -# API schema for an agent impersonation skill manifest. -class AgentImpersonationSkillManifest(BaseModel): - description: str | None = None # Skill description - entrypoint: str # Primary file path for the skill - files: list[AgentImpersonationSkillFile] # Skill files - id: str # Skill config ID - name: str # Skill display name - slug: str # Skill slug - - -# API schema for the resolved callable tools list response. -class AgentImpersonationToolList(BaseModel): - data: list[ResolvedTool] # Resolved callable tools - - -# API schema for the result of running an agent tool via impersonation. -class AgentImpersonationToolRunResult(BaseModel): - duration_ms: int # Execution duration in milliseconds - result: dict[str, object] # Tool execution result - - # Paginated list response for agents. class AgentListResponse(BaseModel): data: list[Agent] # List of agents @@ -166,11 +86,12 @@ class AgentRoutine(BaseModel): lookup_key: str | None = None # Unique lookup key metadata: dict[str, object] | None = None # Arbitrary metadata name: str | None = None # Routine name - preset_config: dict[str, object] | None = None # Preset configuration + preset_config: PresetConfig | None = None # Preset configuration preset_name: str | None = None # Preset name schedule: str | None = None # Schedule expression script: str | None = None # Script content status: str | None = None # Routine status + steps: list[dict[str, object]] | None = None trigger_context: str | None = None # Trigger context updated_at: str | None = None # Last update timestamp @@ -271,6 +192,28 @@ class AgentSkillList(BaseModel): data: list[AgentSkill] # List of agent skills +# API schema for an agent tool. +class AgentTool(BaseModel): + agent: str | None = None # Owning agent ID + app: str | None = None # Application ID + builtin_tool_config: dict[str, object] | None = None # Builtin tool configuration + builtin_tool_key: str | None = None # Builtin tool key + config: str | None = None # Config ID + created_at: str | None = None # Creation timestamp + description: str | None = None # Tool description + handler_type: str | None = None # Handler type + id: str # Tool ID (atl_...) + instruction: str | None = None # Tool instruction + kind: str | None = None # Tool kind + lookup_key: str | None = None # Unique lookup key + metadata: dict[str, object] | None = None # Arbitrary metadata + name: str | None = None # Tool name + parameters: dict[str, object] | None = None # Tool parameters + parameters_config: str | None = None # Parameters config ID + status: str | None = None # Tool status + updated_at: str | None = None # Last update timestamp + + # List response for agent tools. class AgentToolListResponse(BaseModel): data: list[AgentTool] # List of agent tools diff --git a/src/archastro/platform/types/ai.py b/src/archastro/platform/types/ai.py index f043db3..6209491 100644 --- a/src/archastro/platform/types/ai.py +++ b/src/archastro/platform/types/ai.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: dd157bff62eb +# Content hash: d5d29e182e00 from pydantic import BaseModel @@ -41,12 +41,6 @@ class AICompletionResult(BaseModel): token_usage: dict[str, object] | None = None # Token usage keyed by model -# Schema for an input image (base64-encoded) used in image editing. -class AIImageInput(BaseModel): - image_data: str # Base64-encoded image data - image_type: str # MIME type (e.g. image/png, image/jpeg) - - # Schema for an AI image generation result. class AIImageResult(BaseModel): aspect_ratio: str | None = None # Aspect ratio (e.g. 16:9) @@ -60,21 +54,3 @@ class AIImageResult(BaseModel): size: str | None = None # Size string (e.g. 1024x1024) usage: dict[str, object] | None = None # Token/usage information width: int | None = None # Image width in pixels - - -# Schema for AI model information. -class AIModel(BaseModel): - id: str # Model identifier - - -# OpenAI-style function tool definition. -class AIToolFunction(BaseModel): - description: str | None = None # Function description - name: str # Function name - parameters: dict[str, object] # JSON Schema for function parameters - - -# OpenAI-style tool definition. -class AITool(BaseModel): - function: AIToolFunction # Function tool definition - type: str # Tool type (function) diff --git a/src/archastro/platform/types/artifacts.py b/src/archastro/platform/types/artifacts.py index 5a6e254..516e27e 100644 --- a/src/archastro/platform/types/artifacts.py +++ b/src/archastro/platform/types/artifacts.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 9249f05697f5 +# Content hash: b0045e748f72 from pydantic import BaseModel @@ -28,18 +28,3 @@ class Artifact(BaseModel): updated_at: str | None = None # Last update timestamp user: str | None = None # User version: int | None = None # Current version number - - -# API schema for an artifact version. -class ArtifactVersion(BaseModel): - artifact: str | None = None # Parent artifact - change_description: str | None = None # Description of changes - content_type: str | None = None # MIME content type - created_at: str | None = None # Creation timestamp - file: str | None = None # Storage file - file_name: str | None = None # Original filename - file_url: str | None = None # Signed file URL - id: str # Artifact version ID - image_source: ImageSource | None = None # Image source metadata - updated_at: str | None = None # Last update timestamp - version_number: int | None = None # Version number diff --git a/src/archastro/platform/types/automations.py b/src/archastro/platform/types/automations.py index 0cc8328..697e28e 100644 --- a/src/archastro/platform/types/automations.py +++ b/src/archastro/platform/types/automations.py @@ -1,35 +1,11 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: cf4220547a44 +# Content hash: 65ce20d0f7e6 from pydantic import BaseModel -# Schema for a developer automation. -# Maps to serialized automation output from developer portal API. -class Automation(BaseModel): - app: str # App (dap_...) - config: str | None = None # Associated config (cfg_...) - created_at: str | None = None # Created timestamp - created_by_user: str | None = None # Creator user (usr_...) - creator: str | None = None # Creator account (dac_...) - description: str | None = None # Optional description - id: str # Public ID (aut_...) - input_schema_config: str | None = None # Input schema config (cfg_...) - invoke_auth: str | None = None # Auth mode: secret_key or user - lookup_key: str | None = None # Optional unique lookup key - metadata: dict[str, object] | None = None # Arbitrary metadata - name: str # Automation name - run_as_agent: str | None = None # Agent to run as (agt_...) - run_as_user: str | None = None # User to run as (usr_...) - schedule: str | None = None # Cron expression for scheduled type - status: str # Status: draft, running, or paused - trigger: str | None = None # Event name for trigger type - type: str # Type: trigger, scheduled, or invoked - updated_at: str | None = None # Updated timestamp - - # Schema for an automation run. # Maps to serialized automation run output from developer portal API. class AutomationRun(BaseModel): diff --git a/src/archastro/platform/types/chat.py b/src/archastro/platform/types/chat.py deleted file mode 100644 index 8ac9c39..0000000 --- a/src/archastro/platform/types/chat.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. -# This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 073cdd4840cf - - -from pydantic import BaseModel - -from .agents import Agent -from .users import User - - -# API schema for a chat member (user or agent). -class ChatMember(BaseModel): - agent: Agent | None = None # Agent object (for agent members) - membership_type: str | None = None # Membership type - type: str # Member type (user or agent) - user: User | None = None # User object (for user members) diff --git a/src/archastro/platform/types/common.py b/src/archastro/platform/types/common.py index 9cbd12f..5bed0bd 100644 --- a/src/archastro/platform/types/common.py +++ b/src/archastro/platform/types/common.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 1a52d465f51e +# Content hash: dc6b8d943c66 from pydantic import BaseModel @@ -9,18 +9,6 @@ from .users import User -# Schema for the current developer account. -class Account(BaseModel): - alias: str | None = None # Developer alias - created_at: str # Account creation date - email: str # Email address - email_verified: bool # Whether email is verified - full_name: str | None = None # Full name - id: str # Account ID - system_role: str # System role - timezone: str | None = None # IANA timezone - - # API schema for a single ACL grant entry. class AclGrant(BaseModel): actions: list[str] # List of allowed actions (e.g. read, write) @@ -48,30 +36,6 @@ class Acl(BaseModel): remove: list[AclRemoveTarget] | None = None # Patch mode: principals to remove from existing -# API schema for an activity feed entry. -class ActivityFeedEntry(BaseModel): - agent: str | dict[str, object] | None = None - app: str | None = None # Application - attachments: list[dict[str, object]] | None = None # Entry attachments - automation_run: str | None = None # Automation run - content: str | None = None # Longer explanation (markdown) - correlation_id: str | None = None # Correlation ID for grouped entries - created_at: str | None = None # Creation timestamp - id: str # Entry ID (afe_...) - kind: str | None = None # Entry kind - level: str | None = None # Severity level - metadata: dict[str, object] | None = None # Entry metadata - org: str | None = None # Organization - routine_run: str | None = None # Routine run - sandbox: str | None = None # Sandbox identifier - session_record: str | None = None # Agent session - team: str | None = None # Team - thread: str | None = None # Thread - title: str | None = None # One-line summary - updated_at: str | None = None # Last update timestamp - user: str | dict[str, object] | None = None - - # Schema for a message actor (user or agent). # Actors represent the entity that sent a message. # Maps to the actor format from MessageActorHelper.build_actor/1. @@ -82,10 +46,27 @@ class Actor(BaseModel): profile_picture: ImageSource | None = None # Profile picture -class ResolvedTool(BaseModel): - description: str | None = None # What this tool does - name: str # Callable tool function name - parameters: dict[str, object] | None = None # JSON Schema describing the expected input +# API schema for per-routine LLM invocation settings. +# Mirrors `ArchAstro.Agents.Routines.LLMConfig`. When `model` is present, +# it overrides the agent's `default_model` for the routine (or step). +class LLMConfig(BaseModel): + model: str | None = None # Model identifier. When set, overrides the agent's default_model. + + +# API schema for preset handler configuration. +# Mirrors `ArchAstro.Agents.Routines.PresetConfig`. Used wherever a request +# or response carries a preset config routine-level and chain-step-level. +# Server-side validation (length/format rules on `instructions`, enum checks +# on `session_mode`/`session_scope`, model lookup against +# `ChatCompletion.models/0`) is authoritative. This schema defines the +# request shape and typed response shape so OpenAPI consumers see real +# types instead of an opaque object. +class PresetConfig(BaseModel): + instructions: str | None = None + llm: LLMConfig | None = None + session_mode: str | None = None + session_scope: str | None = None + structured_message_template_ids: list[str] | None = None # API schema for background worker status on a routine run. @@ -95,143 +76,6 @@ class WorkerStatus(BaseModel): status: str # Worker state: queued, executing, retrying, completed, discarded, or cancelled -# Schema for an API call record. -# Maps to serialized API call output from developer portal API. -class ApiCall(BaseModel): - api_key_type: str | None = None # API key type (publishable or secret) - created_at: str | None = None # Created timestamp - error_message: str | None = None # Error message if request failed - event_type: str | None = None # Webhook event type (e.g. push, pull_request) - full_url: str # Full request URL with query string - handler_module: str | None = None # ApiDsl action module - id: str # Public ID (aac_...) - ip_address: str | None = None # Client IP address - latency_ms: int # Latency in milliseconds - metadata: dict[str, object] | None = None - method: str # HTTP method - org: str | None = None # Org if org-scoped - path: str # Sanitized path with param placeholders - query_string: str | None = None # Query string - request_body: dict[str, object] | None = None # Request body payload (webhooks only) - request_headers: dict[str, object] | None = None # Request headers (webhooks only) - request_id: str | None = None # Request ID from Plug.RequestId - status_code: int # HTTP status code - team: str | None = None # Team if team-scoped - thread: str | None = None # Thread if thread-scoped - user: str | None = None # User if user-scoped - - -# Schema for a documented API endpoint in the developer API explorer. -class ApiExplorerEndpoint(BaseModel): - deprecated: bool # Whether the route is deprecated - description: str | None = None # Endpoint description - errors: list[dict[str, object]] # Documented error responses - method: str # HTTP method - params: list[dict[str, object]] # Documented params - path: str # Route path - returns: dict[str, object] | None = None # Return schema description - scope: str # Endpoint scope - tags: list[str] # Route tags - - -# Schema for the API explorer response. -class ApiExplorerIndex(BaseModel): - data: list[ApiExplorerEndpoint] # Documented API endpoints - schemas: dict[str, object] | None = None # Collected schema definitions - - -# Schema for a sandbox API key. -class SandboxKey(BaseModel): - created_at: str | None = None # Created timestamp - expires_at: str | None = None # Expiry timestamp - full_key: str | None = None # Full key shown only once at creation - id: str # Public ID (dsk_...) - key_hint: str | None = None # Last 4 chars hint - key_value: str | None = None # Full key (publishable only) - last_used_at: str | None = None # Last used timestamp - status: str # Status (active, revoked) - type: str # Key type (publishable, secret) - - -# Schema for a developer sandbox. -class Sandbox(BaseModel): - created_at: str | None = None # Created timestamp - id: str # Public ID (dsb_...) - keys: list[SandboxKey] | None = None # Sandbox API keys - name: str # Sandbox name - slug: str # Sandbox slug (unique per app) - updated_at: str | None = None # Updated timestamp - - -# Schema for a developer app. -# Maps to serialized app output from developer portal API. -class App(BaseModel): - app_slug: str | None = None # Workspace slug (if set) - app_url: str | None = None # App URL - brand_name: str | None = None # Brand name for emails - created_at: str | None = None # Created timestamp - description: str | None = None # App description - from_name: str | None = None # From name for emails - id: str # Public ID (dap_...) - marketing_url: str | None = None # Marketing URL - muted_color: str | None = None # Muted hex color - name: str # App name - primary_color: str | None = None # Primary hex color - sandboxes: list[Sandbox] | None = None # App sandboxes with keys - status: str # Status (active, suspended) - support_email: str | None = None # Support email address - third_party_oauth_enabled: bool | None = None # Third-party OAuth enabled - updated_at: str | None = None # Updated timestamp - - -# Schema for an app environment variable response with a masked value. -class AppEnvVarMasked(BaseModel): - created_at: str | None = None # Created timestamp - description: str | None = None # Optional description - id: str # Environment variable ID - key: str # Environment variable key - masked_value: str # Masked environment variable value - updated_at: str | None = None # Updated timestamp - - -# Schema for masked app environment variable list responses. -class AppEnvVarMaskedList(BaseModel): - data: list[AppEnvVarMasked] # Environment variables - - -# Schema for an app environment variable response that includes the plaintext value. -class AppEnvVarPlaintext(BaseModel): - created_at: str | None = None # Created timestamp - description: str | None = None # Optional description - id: str # Environment variable ID - key: str # Environment variable key - updated_at: str | None = None # Updated timestamp - value: str # Plaintext environment variable value - - -# Schema for an API key. -# Maps to serialized app key output from developer portal API. -class AppKey(BaseModel): - created_at: str | None = None # Created timestamp - full_key: str | None = None # Full key shown only once at creation - id: str # Public ID (dak_...) - key_hint: str | None = None # Last 4 chars hint - key_value: str | None = None # Full key (publishable only) - last_used_at: str | None = None # Last used timestamp - status: str # Status (active, revoked) - type: str # Key type (publishable, secret) - - -# Schema for an app slug mapping. -class AppSlug(BaseModel): - app: str # App identifier - created_at: str | None = None # Created timestamp - creator: str | None = None # Creator identifier - id: str # Slug record ID - slug: str # Globally unique slug - updated_at: str | None = None # Updated timestamp - - # API schema for a media variant. class MediaVariant(BaseModel): content_type: str | None = None # File content type @@ -282,32 +126,6 @@ class AuthTokens(BaseModel): user: User # Authenticated user -# Schema for a billing plan. -class BillingPlan(BaseModel): - description: str | None = None # Plan description - id: str | None = None # Plan identifier (e.g. paygo) - name: str | None = None # Human-readable plan name - target: str | None = None # Entity type this plan applies to (developer or org) - - -# Schema for app billing settings. -class BillingSettingsApp(BaseModel): - billing_account: str | None = None # Developer account that owns billing (public ID) - org_billing_enabled: bool | None = None # Whether orgs get their own Stripe customers - - -# Schema for org billing settings. -class BillingSettingsOrg(BaseModel): - auto_reup_amount_cents: int | None = None - auto_reup_enabled: bool | None = None # Whether automatic credit reup is enabled - auto_reup_threshold_cents: int | None = None - billing_provider_environment: str | None = None # Stripe environment (live or test) - billing_provider_id: str | None = None # Stripe customer ID - pending_plan: str | None = None - plan: str | None = None # Active billing plan (e.g. enterprise-pilot) - primary_user: str | None = None # Org admin user who is the billing contact (public ID) - - # An individual tool within a builtin tool catalog entry. class BuiltinTool(BaseModel): description: str | None = None # Tool description @@ -327,157 +145,12 @@ class BuiltinToolCatalogEntry(BaseModel): tools: list[BuiltinTool] | None = None # List of individual tools -# Schema for Stripe Checkout Session creation result. -class CheckoutSessionResult(BaseModel): - checkout_url: str # Stripe Checkout URL to redirect the user to - - -# Schema for comment creation parameters. -# Used by both Users.Tasks.CreateComment and Teams.Tasks.CreateComment actions. -class CommentCreateParams(BaseModel): - body: str # Comment body text - - # Result of executing a command on an agent computer. class ComputerExecResult(BaseModel): exit_code: int | None = None # Process exit code output: str | None = None # Command output -# Schema for a user credential. -# Maps to serialized credential output from developer portal API. -class ContextCredential(BaseModel): - alt_domains: list[str] | None = None # Alternative domains - created_at: str | None = None # Created timestamp - description: str | None = None # Human-readable description - domain: str # Domain (e.g., app.schoology.com) - id: str # Public ID (ucr_...) - last_accessed_at: str | None = None # Last accessed timestamp - updated_at: str | None = None # Updated timestamp - user: str | None = None # Owning user - - -# API schema for a context entry. -class ContextEntry(BaseModel): - after_cursor: str | None = None # Pagination cursor (after) - agent_user: str | None = None # Agent user - before_cursor: str | None = None # Pagination cursor (before) - created_at: str | None = None # Creation timestamp - files: list[dict[str, object]] | None = None # Loaded file objects - id: str # Context entry ID - links: list[dict[str, object]] | None = None # Loaded link objects - media: list[dict[str, object]] | None = None # Loaded media objects - metadata: dict[str, object] | None = None # Entry metadata - org: str | None = None # Organization - sandbox: str | None = None # Sandbox identifier - team: str | None = None # Team - text: str | None = None # Entry text - updated_at: str | None = None # Last update timestamp - user: str | None = None # User - - -# Schema for a context ingestion. -# Maps to serialized context ingestion output from developer portal API. -class ContextIngestion(BaseModel): - agent: str | None = None # Agent - completed_at: str | None = None # Completed timestamp - created_at: str | None = None # Created timestamp - error: dict[str, object] | None = None # Error details (if failed) - id: str # Public ID (cig_...) - metadata: dict[str, object] | None = None # Additional metadata - source: str | None = None # Source ID - started_at: str | None = None # Started timestamp - status: str # Status (pending, running, awaiting_callback, succeeded, failed) - team: str | None = None # Owning team ID - updated_at: str | None = None # Updated timestamp - user: str | None = None # Owning user ID - - -# Schema for a context integration. -# Maps to serialized integration output from developer portal API. -class ContextIntegration(BaseModel): - agent: str | None = None # Owning agent - auth_type: str # Auth type: oauth or app_installation - connected_at: str | None = None # Connection timestamp - created_at: str | None = None # Created timestamp - expires_at: str | None = None # Token expiration timestamp - id: str # Public ID (int_...) - installation: str | None = None # External installation (e.g. GitHub App installation) - last_refreshed_at: str | None = None # Last token refresh timestamp - metadata: dict[str, object] | None = None # Additional metadata - org: str | None = None # Owning org - provider: str # Provider name (e.g., google, github) - scopes: list[str] | None = None # OAuth scopes - status: str # Connection status: connected, disconnected, or token_expired - team: str | None = None # Owning team - updated_at: str | None = None # Updated timestamp - user: str | None = None # Owning user - workspace_key: str | None = None # Workspace key - - -# Schema for a context item. -# Maps to serialized context item output from developer portal API. -class ContextItem(BaseModel): - agent: str | None = None # Agent - content_type: str | None = None # Content type - created_at: str | None = None # Created timestamp - id: str # Public ID (cim_...) - item_group: str | None = None # Item group if part of a group - metadata: dict[str, object] | None = None # Additional metadata - normalized_content: str | None = None # Normalized content text - raw_content: dict[str, object] | None = None # Raw content data - source: str | None = None # Source - team: str | None = None # Owning team - updated_at: str | None = None # Updated timestamp - user: str | None = None # Owning user - - -# Schema for a context source. -# Maps to serialized context source output from developer portal API. -class ContextSource(BaseModel): - agent: str | None = None # Owning agent - context_installation: str | None = None # Associated installation - created_at: str | None = None # Created timestamp - id: str # Public ID (cso_...) - metadata: dict[str, object] | None = None # Additional metadata - org: str | None = None # Owning organization - parent_source: str | None = None # Parent source - payload: dict[str, object] | None = None # Type-specific configuration - sandbox: str | None = None # Owning sandbox - state: str # State: active or paused - team: str | None = None # Owning team - thread: str | None = None # Associated thread - type: str # Source type (e.g., gmail, github_activity) - updated_at: str | None = None # Updated timestamp - user: str | None = None # Owning user - - -# API schema for a user credential. -class Credential(BaseModel): - alt_domains: dict[str, object] | None = None # Alternative domains - created_at: str | None = None # Creation timestamp - description: str | None = None # Description - domain: str | None = None # Primary domain - id: str # Credential ID (ucr_...) - last_accessed_at: str | None = None # Last accessed timestamp - org: str | None = None # Organization - sandbox: str | None = None # Sandbox - secret_group: str | None = None # Secret group ID - updated_at: str | None = None # Last update timestamp - - -# API schema for a credential with decrypted secret values. -class CredentialWithSecrets(BaseModel): - credential: dict[str, object] # The credential with decrypted values - - -# Schema for credit balance response. -class CreditBalance(BaseModel): - available_cents: int # Available credit balance in cents - currency: str # Currency code (e.g. usd) - has_payment_method: bool # Whether a saved payment method exists - - # API schema for a custom object. class CustomObject(BaseModel): created_at: str | None = None # Created timestamp @@ -493,117 +166,6 @@ class CustomObject(BaseModel): version: int | None = None # Aggregate version for OCC -# Schema for a dataset dimension field. -class DatasetDimension(BaseModel): - label: str # Human-readable label - name: str # Dimension identifier - type: str # Data type (string, integer, boolean, datetime, date) - - -# Schema for a dataset metric field. -class DatasetMetric(BaseModel): - aggregation: str # Aggregation function (sum, count, avg, min, max, count_distinct) - label: str # Human-readable label - name: str # Metric identifier - type: str # Output type (integer, float) - - -# Schema for an analytics dataset definition. -class Dataset(BaseModel): - dimensions: list[DatasetDimension] # Available dimensions - metrics: list[DatasetMetric] # Available metrics - name: str # Dataset identifier - time_dimension: DatasetDimension | None = None # Time dimension for time series queries - - -# Schema for a dataset query result. -class DatasetQueryResult(BaseModel): - columns: list[dict[str, object]] # Column definitions with name, type, and label - meta: dict[str, object] # Query metadata (total_rows, query_time_ms) - rows: list[dict[str, object]] # Result rows as maps of column_name → value - - -# Schema for delete operations that return a deleted count. -class DeletionConfirmation(BaseModel): - deleted_count: int # Number of deleted records - - -# Schema for developer account billing settings. -class Developer(BaseModel): - auto_reup_amount_cents: int | None = None - auto_reup_enabled: bool | None = None # Whether automatic credit reup is enabled - auto_reup_threshold_cents: int | None = None - billing_provider_environment: str | None = None # Stripe environment (live or test) - billing_provider_id: str | None = None # Stripe customer ID - pending_plan: str | None = None - plan: str | None = None # Active billing plan (e.g. paygo) - - -# Schema for an organization. -# Maps to serialized org output from developer portal API. -class DeveloperOrg(BaseModel): - created_at: str | None = None # Created timestamp - description: str | None = None # Organization description - domain: str # Primary domain - id: str # Public ID (org_...) - industry: str | None = None # Industry category - name: str # Organization name - sandbox: str | None = None # Sandbox identifier (nullable) - slug: str # URL-safe slug - status: str | None = None # Status (active, suspended, trialing) - updated_at: str | None = None # Updated timestamp - website: str | None = None # Website URL - - -# Schema for a system access token (developer admin view). -# Maps to serialized system access token output from developer portal API. -class DeveloperSystemAccessToken(BaseModel): - created_at: str | None = None # Created timestamp - id: str # Public ID (sat_...) - last_used_at: str | None = None # Last used timestamp - name: str | None = None # Optional label for the token - revoked_at: str | None = None # Revoked timestamp - token: str | None = None # Raw JWT (only present on creation) - - -# Schema for a thread in the developer portal. -# Maps to serialized thread output from developer portal API. -class DeveloperThread(BaseModel): - app_name: str | None = None # Associated app name - created_at: str | None = None # Created timestamp - id: str # Public ID (thr_...) - is_channel: bool | None = None # Whether this is a channel thread - is_default: bool | None = None # Whether this is the default thread - is_unlisted: bool | None = None # Whether thread is hidden from listings - key: str | None = None # Unique key within owner scope - org: str | None = None # Organization (nullable) - owner: str | None = None # Owner public - owner_name: str | None = None # Owner display name - owner_type: str | None = None # Owner type: team, user, agent, or nil - sandbox: str | None = None # Sandbox identifier (nullable) - slug: str | None = None # URL-friendly slug - title: str # Thread title - updated_at: str | None = None # Updated timestamp - - -# Schema for a user (developer admin view). -# Maps to serialized user output from developer portal API. -class DeveloperUser(BaseModel): - alias: str | None = None # User alias - confirmed_at: str | None = None # Email confirmed timestamp - created_at: str | None = None # Created timestamp - email: str # Email address - full_name: str | None = None # Full name - id: str # Public ID (usr_...) - is_system_user: bool | None = None # Whether this is a system user - org: str | None = None # Organization (nullable) - org_name: str | None = None # Organization display name (nullable) - org_role: str | None = None # Organization role (admin, member, viewer; nullable) - password: str | None = None # Temporary plaintext password returned on reset - sandbox: str | None = None # Sandbox identifier (nullable) - updated_at: str | None = None # Updated timestamp - - # API schema for OAuth device authorization responses. class DeviceAuthorizationResponse(BaseModel): device_code: str # Device verification code @@ -619,149 +181,6 @@ class DeviceAuthorizationStatusResponse(BaseModel): status: str # Authorization status (approved or denied) -# Schema for a registered domain. -# Maps to serialized domain output from developer portal API. -class Domain(BaseModel): - created_at: str | None = None # Created timestamp - domain: str # Domain name - id: str # Public ID (dad_...) - updated_at: str | None = None # Updated timestamp - verified: bool | None = None # Whether domain is verified - - -# Schema for a developer portal domain event. -class DomainEvent(BaseModel): - agent: str | None = None # Agent identifier - created_at: str | None = None # Created timestamp - event_name: str # Event name - id: str # Domain event ID - idempotency_key: str | None = None # Idempotency key for the event - payload: dict[str, object] # Event payload - team: str | None = None # Team identifier - user: str | None = None # User identifier - - -# Schema for paginated domain event responses. -class DomainEventPage(BaseModel): - data: list[DomainEvent] # Domain events - has_next: bool # Whether a next page exists - has_prev: bool # Whether a previous page exists - page: int # Current page number - page_size: int # Page size - total_entries: int # Total entries - total_pages: int # Total pages - - -# Schema for an encrypted secret payload. -class EncryptedSecret(BaseModel): - encrypted_value: str # Encrypted ciphertext value - - -# Schema for an eval result. -class EvalResult(BaseModel): - agent_response: str | None = None # Agent response - created_at: str | None = None # Created timestamp - duration_ms: int | None = None # Execution duration - grader_details: dict[str, object] | None = None # Grader details - id: str # Eval result ID - run: str # Parent eval run identifier - score: float | None = None # Result score - status: str # Result status - task: str | None = None # Eval task identifier - task_input: str | None = None # Task input summary - transcript: dict[str, object] | None = None # Execution transcript - updated_at: str | None = None # Updated timestamp - - -# Schema for eval result list responses. -class EvalResultList(BaseModel): - data: list[EvalResult] # Eval results - - -# Schema for an eval run. -class EvalRun(BaseModel): - agent: str | None = None # Agent identifier - agent_name: str | None = None # Agent name - completed_at: str | None = None # Completion timestamp - created_at: str | None = None # Created timestamp - id: str # Eval run ID - results: list[EvalResult] | None = None # Eval results for this run - started_at: str | None = None # Start timestamp - status: str # Run status - suite: str # Eval suite identifier - summary: dict[str, object] | None = None # Aggregate run summary - updated_at: str | None = None # Updated timestamp - - -# Schema for eval run list responses. -class EvalRunList(BaseModel): - data: list[EvalRun] # Eval runs - - -# Schema for an eval task. -class EvalTask(BaseModel): - created_at: str | None = None # Created timestamp - expected_outcome: str # Expected outcome - grading_criteria: list[dict[str, object]] | None = None # Grading criteria - id: str # Eval task ID - input_message: str # Task input message - mock_agent_memory: dict[str, object] | None = None # Mock agent memory - mock_context_items: list[dict[str, object]] | None = None # Mock context items - mock_datetime: str | None = None # Mock datetime - mock_participants: list[dict[str, object]] | None = None # Mock participants - mock_tools: list[dict[str, object]] | None = None # Mock tool definitions - status: str # Task status - suite: str # Parent eval suite identifier - updated_at: str | None = None # Updated timestamp - - -# Schema for an eval suite. -class EvalSuite(BaseModel): - created_at: str | None = None # Created timestamp - description: str | None = None # Suite description - id: str # Eval suite ID - name: str # Suite name - org: str | None = None # Owner organization identifier - status: str # Suite status - tasks: list[EvalTask] | None = None # Eval tasks included in the suite - updated_at: str | None = None # Updated timestamp - user: str | None = None # Owner user identifier - - -# Schema for eval suite list responses. -class EvalSuiteList(BaseModel): - data: list[EvalSuite] # Eval suites - - -# Schema for eval task list responses. -class EvalTaskList(BaseModel): - data: list[EvalTask] # Eval tasks - - -# Schema for an event catalog entry with full payload schema and sample. -class EventCatalogEntry(BaseModel): - description: str # Human-readable description - name: str # Event name (e.g., thread.created) - parent: str | None = None # Parent envelope name (only present for sub_event entries) - sample: dict[str, object] # Sample payload for this event - schema: dict[str, object] # JSON Schema describing the event payload - sub_events: list[str] | None = None - type: str | None = None - - -# Schema for an event type available for automation triggers. -# Represents events from the workflow event catalog. -class EventType(BaseModel): - description: str # Human-readable description - name: str # Event name (e.g., thread.created) - - -# API schema for file URL refresh responses. -class FileRefreshResult(BaseModel): - image_source: ImageSource # Updated image source with fresh URL - success: bool # Whether the refresh succeeded - - # API schema for an installation. class Installation(BaseModel): agent: str | None = None # Owning agent @@ -819,52 +238,6 @@ class InstallationSourceListResponse(BaseModel): data: list[InstallationSource] # List of installation sources -# Schema for integration records with connector state. -class Integration(BaseModel): - id: str # Integration ID - org: str | None = None # Organization (nullable) - provider: str # Provider identifier - sandbox: str | None = None # Sandbox identifier (nullable) - secret_group: str | None = None # Secret group - state: dict[str, object] # Connector state information - team: str | None = None # Team (if team-scoped) - user: str | None = None # User (if user-scoped) - workspace_key: str | None = None # Provider workspace identifier - - -# Schema for integration action metadata. -class IntegrationAction(BaseModel): - description: str | None = None # Action description - json_schema: dict[str, object] # JSON Schema for action parameters - key: str # Action key (e.g., gmail.list_messages) - scopes_any_of: dict[str, object] | None = None # Required scope sets for this action - - -# Integration fields for auto-creating the underlying integration. -# When creating an agent installation for an `integration/*` kind, callers -# can pass this object to auto-create the underlying Integration record. -# Required fields depend on the kind's auth type: -# - `app_installation` kinds (slack_bot, github_app): requires `installation_id` -# - `oauth` kinds (gmail, outlook, slack): requires `access_token` -class IntegrationCreateParams(BaseModel): - access_token: str | None = None # OAuth access token or API key - installation_id: str | None = None - metadata: dict[str, object] | None = None # Provider-specific metadata (e.g. bot_user_id) - refresh_token: str | None = None # OAuth refresh token - workspace_key: str | None = None # Workspace name or identifier - - -# Schema for an integration provider entry. -# Represents an available integration provider (OAuth or MCP) that can be -# used with `create integration --provider `. -class IntegrationProvider(BaseModel): - auth_type: str # Auth mechanism: oauth, bearer, or app_installation - description: str | None = None # Short description of the provider - display_name: str # Human-readable display name - provider: str # Provider key (e.g., google, mcp:system:mcp-github) - type: str # Provider type: oauth, mcp, or app_installation - - # Schema for a key-value storage entry. # Maps exactly to render_entry/1 output in ApiStorageController. class KeyValueStorageEntry(BaseModel): @@ -875,71 +248,32 @@ class KeyValueStorageEntry(BaseModel): value: str # Stored value -# List response for key-value storage entries. -class KeyValueStorageEntryList(BaseModel): - data: list[KeyValueStorageEntry] # Storage entries owned by the caller +# Schema for a key-value storage entry, optionally enriched with a summary of +# the owning user. +# Used by the dual-mode list endpoint: user-JWT callers omit the user_email / +# user_name fields (they know who they are); developer / S2S callers populate +# them so the portal can render an owner column without a per-row lookup. +class KeyValueStorageEntryWithUser(BaseModel): + created_at: str # Creation timestamp + key: str # Storage key + updated_at: str # Last update timestamp + user: str # User ID + user_email: str | None = None # User email (developer / S2S only) + user_name: str | None = None # User display name (developer / S2S only) + value: str # Stored value -# API schema for a knowledge search result item. -class KnowledgeSearchResult(BaseModel): - content: str | None = None # Normalized content text - content_type: str | None = None # Content MIME type - created_at: str | None = None # Creation timestamp - id: str # Item ID (cim_...) - metadata: dict[str, object] | None = None # Additional metadata - raw_content: dict[str, object] | None = None # Raw content data - type: str | None = None # Source type (requires preloaded :source association) - - -# Schema for an LLM session call. -# Maps to serialized LLM call output from developer portal API. -class LlmCall(BaseModel): - call_id: str # Unique call UUID - completion_tokens: int # Number of completion tokens - created_at: str | None = None # Created timestamp - error_message: str | None = None # Error message if call failed - id: str # Public ID (alc_...) - latency_ms: int # Latency in milliseconds - message_count: int | None = None # Number of messages included in the call metadata - metadata: dict[str, object] | None = None # Additional metadata - model: str | None = None # LLM model name - prompt_tokens: int # Number of prompt tokens - session_id: str # Session UUID grouping related calls - source: str | None = None # Machine-readable call source key - status: str | None = None # Call status (success or error) - team: str | None = None # Team if team-scoped - total_tokens: int # Total tokens (prompt + completion) - trajectory: str | None = None # Trajectory identifier - user: str | None = None # User if user-scoped - - -# Source option metadata for LLM call filtering. -class LlmCallSourceOption(BaseModel): - label: str # Human-friendly source label - source: str # Machine-readable LLM source key - - -# Schema for LLM call trajectory contents. -class LlmCallTrajectory(BaseModel): - download_url: str | None = None # Signed transcript download URL - messages: list[dict[str, object]] # Trajectory messages - - -# API schema for a media item. -class Media(BaseModel): - content_type: str | None = None # Original variant content type - created_at: str | None = None # Creation timestamp - filename: str | None = None # Original variant filename - height: int | None = None # Original variant height - id: str # Media ID - media_type: str | None = None # Media type - name: str | None = None # Media name - org: str | None = None # Organization - sandbox: str | None = None # Sandbox - updated_at: str | None = None # Last update timestamp - url: str | None = None # Original variant URL - variants: list[MediaVariant] | None = None # Media variants - width: int | None = None # Original variant width +# Response envelope for the dual-mode key-value list endpoint. +# User-JWT callers receive `%{data: [...]}` (no pagination fields). +# Developer / S2S callers receive `%{data: [...]}` plus pagination metadata. +class KeyValueStorageEntryPage(BaseModel): + data: list[KeyValueStorageEntryWithUser] # Storage entries on this page + has_next: bool | None = None # Whether a next page exists (developer / S2S only) + has_prev: bool | None = None # Whether a previous page exists (developer / S2S only) + page: int | None = None # Current page number (developer / S2S only) + page_size: int | None = None # Results per page (developer / S2S only) + total_entries: int | None = None # Total entries matching the filters (developer / S2S only) + total_pages: int | None = None # Total number of pages (developer / S2S only) # Schema for inline message reactions. @@ -979,65 +313,6 @@ class Message(BaseModel): user: str | None = None # Author user (public ID or expanded object when loaded) -# Schema for message update request parameters. -# Used as the body wrapper when updating a message. -class MessageUpdateParams(BaseModel): - content: str | None = None # New message content - - -# Filter object for matching thread metadata. -class MetadataFilter(BaseModel): - key: str # Metadata key to match - type: str # Filter type (must be "metadata") - value: str # Metadata value to match - - -# Schema for a single notification setting update entry. -class NotificationSettingUpdate(BaseModel): - level: str # Notification level (global, team, thread) - muted: bool # Whether notifications are muted - team: str | None = None # Team (required for team-level settings) - thread: str | None = None # Thread (required for thread-level settings) - - -# Schema for an OAuth client registration. -class OAuthClient(BaseModel): - client_id: str # Public OAuth client ID - client_name: str # Display name for the client - client_secret: str | None = None # Client secret shown only at creation - created_at: str | None = None # Created timestamp - enabled: bool # Whether the client is enabled - id: str # OAuth client registration ID - redirect_uris: list[str] # Allowed redirect URIs - scopes: list[str] # Allowed OAuth scopes - updated_at: str | None = None # Updated timestamp - - -# Schema for OAuth client list responses. -class OAuthClientList(BaseModel): - data: list[OAuthClient] # OAuth clients - - -# OAuth error response per RFC 6749 -class OAuthError(BaseModel): - error: str # Error code (e.g. slow_down, invalid_grant) - error_description: str | None = None # Human-readable error description - - -# Schema for an OAuth provider configuration. -# Maps to serialized OAuth provider output from developer portal API. -class OAuthProvider(BaseModel): - callback_urls: list[str] | None = None # Allowed callback URLs - client_id: str # OAuth client ID - created_at: str | None = None # Created timestamp - display_name: str | None = None # Display name - enabled: bool | None = None # Whether provider is enabled - id: str # Public ID (dop_...) - provider: str # Provider type (github, google) - scopes: list[str] | None = None # OAuth scopes - updated_at: str | None = None # Updated timestamp - - # API schema for OAuth token endpoint responses. class OAuthTokenResponse(BaseModel): access_token: str # OAuth access token @@ -1048,14 +323,6 @@ class OAuthTokenResponse(BaseModel): user: User | None = None # Authenticated user -# Schema for paginated messages response. -# Used by thread messages list endpoints. -class PaginatedMessages(BaseModel): - after_cursor: str | None = None # Cursor for fetching items after this point - before_cursor: str | None = None # Cursor for fetching items before this point - messages: list[Message] # List of message objects - - # Schema for paginated message replies response. # Used by message replies list endpoints. # Note: This response is NOT wrapped in a "data" field. @@ -1067,263 +334,16 @@ class PaginatedReplies(BaseModel): total_count: int | None = None # Total number of replies -# Schema for password update parameters. -class PasswordUpdateParams(BaseModel): - password: str # New password - password_confirmation: str # New password confirmation - - -# API schema for a persona. -class Persona(BaseModel): - activated: bool | None = None # Whether persona is activated - agent: str | None = None # Associated agent (always nil) - created_at: str | None = None # Creation timestamp - id: str # Persona ID - is_active: bool | None = None # Whether persona is active - is_enabled_for_thread: bool | None = None # Whether persona is enabled for thread - metadata: dict[str, object] | None = None # Persona metadata - name: str | None = None # Persona display name - org: str | None = None # Organization - personality: str | None = None # Persona personality description - sandbox: str | None = None # Sandbox - team: str | None = None # Owning team - updated_at: str | None = None # Last update timestamp - user: str | None = None # Owning user - - -# Schema for persona creation parameters. -class PersonaCreateParams(BaseModel): - name: str # Persona display name - personality: str # Persona personality description - profile_picture_style: str | None = None # Profile picture generation style - - -# Schema for persona update parameters. -class PersonaUpdateParams(BaseModel): - metadata: dict[str, object] | None = None # Additional metadata - name: str | None = None # Persona display name - personality: str | None = None # Persona personality description - - -# Schema for picture upload parameters. -# Used for uploading profile pictures via base64 encoded data. -class PictureParams(BaseModel): - data: str # Base64 encoded image data - filename: str # Original filename - mime_type: str # MIME type of the image - - -# Public org schema for authenticated endpoints. -# Only exposes fields safe for any authenticated user: id, name, domain, -# and logo. Does NOT expose sandbox, status, industry, description, or -# other internal fields that the Developer.Org schema includes. -class PublicOrg(BaseModel): - domain: str # Primary domain - id: str # Public ID (org_...) - name: str # Organization name - - -# API schema for push notification test results. -class PushNotificationResult(BaseModel): - results: list[dict[str, object]] | None = None # Per-device results - success: bool # Whether the notification was sent - total_sent: int | None = None # Number of notifications sent - - -# A routine preset with its metadata. +# A routine preset entry in the preset listing endpoint. Describes *what* +# a preset is, not a per-routine configuration that's `PresetConfig`. class RoutinePreset(BaseModel): - config: dict[str, object] | None = None # Default configuration - description: str | None = None # Preset description - event_type: str | None = None # Event type - label: str | None = None # Display label - name: str # Preset name - - -# Schema for runtime environment variable metadata. -class RuntimeEnvVar(BaseModel): - description: str | None = None # Optional description - key: str # Environment variable key - source: str # Source of the env var (app or org) - - -# Schema for runtime environment variable metadata list responses. -class RuntimeEnvVarList(BaseModel): - data: list[RuntimeEnvVar] - - -# Schema for a sandbox-captured email. -class SandboxEmail(BaseModel): - bcc: list[dict[str, object]] | None = None # BCC recipients - cc: list[dict[str, object]] | None = None # CC recipients - created_at: str | None = None # When the email was captured - from_address: str # Sender email address - from_name: str | None = None # Sender display name - headers: dict[str, object] | None = None # Custom email headers - html_body: str | None = None # HTML body - id: str # Public ID (sem_...) - reply_to: dict[str, object] | None = None # Reply-to address - subject: str | None = None # Email subject - text_body: str | None = None # Plain text body - to: list[dict[str, object]] # Recipients [{name, address}] - - -# API schema for a scrape result. -class Scrape(BaseModel): - created_at: str | None = None # Creation timestamp - description: str | None = None # Page description - id: str # Scrape ID (scp_...) - image_height: int | None = None # Image height in pixels - image_url: str | None = None # Image URL - image_width: int | None = None # Image width in pixels - last_scraped_at: str | None = None # Last scraped timestamp - metadata: dict[str, object] | None = None # Scrape metadata - status: str | None = None # Scrape status - title: str | None = None # Page title - updated_at: str | None = None # Last update timestamp - url: str | None = None # Scraped URL - version: int | None = None # Scrape version - - -# API schema for a secret (user, team, or user-team). -class Secret(BaseModel): - created_at: str | None = None # Creation timestamp - description: str | None = None # Secret description - id: str # Secret ID - last_accessed_at: str | None = None # Last accessed timestamp - name: str | None = None # Secret name - org: str | None = None # Organization - sandbox: str | None = None # Sandbox - secret_group: str | None = None # Secret group - team: str | None = None # Team - updated_at: str | None = None # Last update timestamp - - -# API schema for a decrypted secret value response. -class SecretValue(BaseModel): - name: str # Secret name - value: str # Decrypted secret value - - -# API schema for the status/ping health check response. -class StatusPing(BaseModel): - success: bool # Whether the ping succeeded - token: dict[str, object] # Token status details - user: User | None = None # Authenticated user (if token is valid) - - -# API schema for a storage file. -class StorageFile(BaseModel): - content_type: str | None = None # MIME content type - created_at: str | None = None # Creation timestamp - filename: str | None = None # Original filename - id: str # File ID - image_source: ImageSource | None = None # Image source metadata - org: str | None = None # Organization - sandbox: str | None = None # Sandbox - size: int | None = None # File size in bytes - updated_at: str | None = None # Last update timestamp - url: str | None = None # Signed download URL - - -# API schema for a task. -class Task(BaseModel): - closed_at: str | None = None # When the task was closed - comments_count: int | None = None # Number of comments - created_at: str | None = None # Creation timestamp - created_by: str | None = None # Legacy creator - created_by_actor: dict[str, object] | None = None # Creator actor details - created_by_persona: str | None = None # Creator persona - created_by_type: str | None = None # Creator type (user, agent) - created_by_user: str | None = None # Creator user - description: str | None = None # Task description - due_date: str | None = None # Due date - id: str # Task ID (tsk_...) - links: dict[str, object] | None = None # Related links - metadata: dict[str, object] | None = None # Additional metadata - name: str # Task name - org: str | None = None # Organization - owner: str | None = None # Legacy owner - owner_actor: dict[str, object] | None = None # Owner actor details - owner_persona: str | None = None # Owner persona - owner_user: str | None = None # Owner user - priority: int | None = None # Priority level (0-4) - sandbox: str | None = None # Sandbox identifier - status: str # Task status - team: str | None = None # Team - updated_at: str | None = None # Last update timestamp - - -# Schema for a task activity entry. -# Maps exactly to the activity entries produced by TaskActivitySentenceGenerator. -class TaskActivityEntry(BaseModel): - event_id: str | None = None # Event ID - event_type: str | None = None # Type of event - sentence: str | None = None # Human-readable description of the activity - timestamp: str | None = None # When the event occurred - - -# API schema for a task comment. -class TaskComment(BaseModel): - author: str | None = None # Legacy author - author_actor: dict[str, object] | None = None # Author actor details - author_persona: str | None = None # Author persona - author_user: str | None = None # Author user - body: str # Comment body text - created_at: str | None = None # Creation timestamp - id: str # Comment ID - org: str | None = None # Organization - sandbox: str | None = None # Sandbox identifier - task: str | None = None # Task - team: str | None = None # Team - updated_at: str | None = None # Last update timestamp - - -# Schema for task creation parameters. -# Used by both Users.Tasks.Create and Teams.Tasks.Create actions. -class TaskCreateParams(BaseModel): - description: str | None = None # Task description - due_date: str | None = None # Due date - links: dict[str, object] | None = None # Related links - metadata: dict[str, object] | None = None # Additional metadata - name: str # Task name - owner_persona: str | None = None # Owner persona if assigned to agent - owner_user: str | None = None # Owner user if assigned to user - priority: int | None = None # Priority level (0-4) - status: str | None = None # Task status (open, in_progress, done) - task: str | None = None # Custom task ID (optional, auto-generated if not provided) - - -# Schema for task update parameters. -# Used by both Users.Tasks.Update and Teams.Tasks.Update actions. -# All fields are optional since updates only modify provided fields. -class TaskUpdateParams(BaseModel): - description: str | None = None # Task description - due_date: str | None = None # Due date - links: dict[str, object] | None = None # Related links - metadata: dict[str, object] | None = None # Additional metadata - name: str | None = None # Task name - owner_persona: str | None = None # Owner persona if assigned to agent - owner_user: str | None = None # Owner user if assigned to user - priority: int | None = None # Priority level (0-4) - status: str | None = None # Task status (open, in_progress, done) - - -# Filter object for matching personas by template ID. -class TemplateFilter(BaseModel): - id: str # Persona template ID to match - type: str # Filter type (must be "template") - - -# API schema for an AI trajectory. -class Trajectory(BaseModel): - created_at: str | None = None # Creation timestamp - file: str | None = None # Storage file - id: str # Trajectory ID (trj_...) - messages: dict[str, object] | None = None # Trajectory messages - org: str | None = None # Organization - sandbox: str | None = None # Sandbox - team: str | None = None # Team - updated_at: str | None = None # Last update timestamp + applicable_events: list[str] + chainable: bool + description: str # Preset description + label: str # Display label + name: str # Preset name (e.g. do_task) + sessionable: bool + unique: bool # Schema for config validation result. @@ -1333,34 +353,6 @@ class ValidationResult(BaseModel): warnings: list[str] | None = None # Optional warnings emitted during validation -# Schema for a developer webhook. -# Maps to serialized webhook output from developer portal API. -class Webhook(BaseModel): - context_installation: str | None = None # Bound context installation - context_sources: list[str] | None = None # Bound context sources - created_at: str | None = None # Created timestamp - enabled: bool # Whether the webhook is enabled - id: str # Public ID (whk_...) - lookup_key: str | None = None # Lookup key for generic webhooks - metadata: dict[str, object] | None = None # Additional metadata - provider: str | None = None - updated_at: str | None = None # Updated timestamp - webhook_url: str # URL to send webhooks to - - -# Schema for a webhook event. -# Maps to serialized webhook event output from developer portal API. -class WebhookEvent(BaseModel): - created_at: str | None = None # Created timestamp - error: str | None = None # Error message if failed - event_type: str | None = None # Event type from the provider - headers: dict[str, object] | None = None # Request headers - id: str # Public ID (whe_...) - payload: dict[str, object] | None = None # Event payload - processed_at: str | None = None # When the event was processed - status: str # Processing status (pending, processed, failed) - - # API schema for a working memory entry. class WorkingMemoryEntry(BaseModel): agent: str | None = None # Owning agent diff --git a/src/archastro/platform/types/config.py b/src/archastro/platform/types/config.py index bbb935f..32deb33 100644 --- a/src/archastro/platform/types/config.py +++ b/src/archastro/platform/types/config.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 281daa2b3413 +# Content hash: 1fd527ba85c1 from pydantic import BaseModel @@ -27,7 +27,9 @@ class Config(BaseModel): lookup_key: str | None = None # Optional lookup key mime_type: str | None = None # Content mime type org: str | None = None # Organization + parent: str | None = None # Parent config ID (bundle children only) raw_content: str | None = None # Raw file content (system configs only) + relative_path: str | None = None # Path within parent bundle (bundle children only) sandbox: str | None = None # Sandbox identifier team: str | None = None # Team updated_at: str | None = None # Last update timestamp @@ -35,35 +37,8 @@ class Config(BaseModel): virtual_path: str | None = None # Unique path within the team -# Schema for a config kind in the list response. -class ConfigKind(BaseModel): - classification: str # Kind classification: root or supplemental - description: str | None = None - kind: str # The config kind name (e.g., Agent, APITool) - sample_available: bool # Whether a YAML sample is available - schema_available: bool # Whether a JSON schema is available - - # Schema for a config kind's JSON schema and sample response. class ConfigKindSchema(BaseModel): json_schema: dict[str, object] | None = None kind: str # The config kind name sample_yaml: str | None = None - - -# Schema for batch-loaded config content and metadata. -class ConfigLoadResult(BaseModel): - content: dict[str, object] # Fully resolved content tree - metadata: dict[str, object] # Metadata map keyed by JSON path - - -# Schema for a sample config payload. -class ConfigSample(BaseModel): - kind: str # Config kind - mime_type: str # Content MIME type - sample_yaml: str # Sample YAML content - - -# Schema for batch-save config metadata. -class ConfigSaveResult(BaseModel): - metadata: dict[str, object] # Updated metadata with version numbers diff --git a/src/archastro/platform/types/invites.py b/src/archastro/platform/types/invites.py new file mode 100644 index 0000000..15d9ef8 --- /dev/null +++ b/src/archastro/platform/types/invites.py @@ -0,0 +1,19 @@ +# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. +# This file is auto-generated by @archastro/sdk-generator. Do not edit. +# Content hash: e753f8b6bcbe + + +from pydantic import BaseModel + +from .image import ImageSource + + +# Minimal public-safe projection of the user who created an invite. +# Invites are fetched by unauthenticated recipients on the `/auth/invites/:id` +# route, so this schema deliberately exposes only the fields needed to render a +# join screen id, display name, and profile picture. Email, org, sandbox, and +# other fields on the full `User` schema are omitted. +class InviteCreator(BaseModel): + id: str # User ID + name: str | None = None # Display name + profile_picture: ImageSource | None = None # Profile picture diff --git a/src/archastro/platform/types/members.py b/src/archastro/platform/types/members.py deleted file mode 100644 index f89d826..0000000 --- a/src/archastro/platform/types/members.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. -# This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 312f3a1abc69 - - -from pydantic import BaseModel - - -# Associated account -class MemberAccount(BaseModel): - alias: str | None = None # Account alias - email: str # Account email - full_name: str | None = None # Full name - id: str # Account public ID (dva_...) - - -# Schema for an app member (account with role on an app). -# Maps to serialized membership output from developer portal API. -class Member(BaseModel): - account: MemberAccount # Associated account - created_at: str | None = None # Created timestamp - id: str # Public ID (dar_...) - role: str # Role (admin, developer) - updated_at: str | None = None # Updated timestamp - - -# Schema for a pending member invite. -# Maps to serialized invite output from developer portal API. -class MemberInvite(BaseModel): - email: str # Invitee's email address - expires_at: str # When the invite expires - id: str # Public ID (ami_...) - invited_at: str # When the invite was created - inviter: dict[str, object] | None = None # Account that sent the invite - role: str # Role (admin, developer) - status: str # Invite status (pending or expired) diff --git a/src/archastro/platform/types/orgs.py b/src/archastro/platform/types/orgs.py deleted file mode 100644 index c7b2338..0000000 --- a/src/archastro/platform/types/orgs.py +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. -# This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 7dd0f65b6882 - - -from pydantic import BaseModel - - -# API schema for an organization. -class Org(BaseModel): - created_at: str | None = None # Creation timestamp - description: str | None = None # Description - domain: str | None = None # Domain - id: str # Organization ID (org_...) - industry: str | None = None # Industry - name: str | None = None # Organization name - sandbox: str | None = None # Sandbox - slug: str | None = None # URL slug - status: str | None = None # Status - updated_at: str | None = None # Last update timestamp - website: str | None = None # Website URL - - -# Schema for org auth policy response. -class OrgAuthPolicy(BaseModel): - allowed_email_domains: list[str] # Allowed email domains - auth_method: str # Auth method (default, sso) - require_2fa: bool # Whether 2FA is required - sso_providers: list[str] # Enabled SSO providers - - -# Schema for an organization environment variable response that includes the -# plaintext value. -class OrgEnvVar(BaseModel): - created_at: str | None = None # Created timestamp - description: str | None = None # Optional description - id: str # Organization env var ID (oev_...) - key: str # Environment variable key - updated_at: str | None = None # Updated timestamp - value: str # Environment variable value - - -# Schema for an organization environment variable response that masks the -# secret value. -class OrgEnvVarMasked(BaseModel): - created_at: str | None = None # Created timestamp - description: str | None = None # Optional description - id: str # Organization env var ID (oev_...) - key: str # Environment variable key - masked_value: str # Masked environment variable value - updated_at: str | None = None # Updated timestamp - - -# Schema for organization environment variable list responses. -class OrgEnvVarMaskedList(BaseModel): - data: list[OrgEnvVarMasked] # Organization environment variables - - -# Schema for SAML provider settings response. -# Masks certificate contents exposes only boolean flags indicating whether -# a primary/secondary certificate is configured. -class OrgSamlSettings(BaseModel): - created_at: str | None = None # Created timestamp - enabled: bool | None = None # Whether the provider is active - entity_id: str # IdP entity ID - has_certificate: bool | None = None # Whether a primary certificate is configured - has_certificate_secondary: bool | None = None - id: str # SAML provider ID (saml_...) - label: str | None = None # Display label for the SSO button - sso_url: str # IdP SSO URL - updated_at: str | None = None # Updated timestamp diff --git a/src/archastro/platform/types/reactions.py b/src/archastro/platform/types/reactions.py deleted file mode 100644 index 2108568..0000000 --- a/src/archastro/platform/types/reactions.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. -# This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 372147c98176 - - -from pydantic import BaseModel - - -# API schema for a message reaction. -class Reaction(BaseModel): - created_at: str | None = None # Creation timestamp - feedback_type: str | None = None # Type of feedback (e.g., emoji_reaction) - id: str # Reaction ID (umf_...) - message: str | None = None # Message the reaction is on - payload: dict[str, object] | None = None # Reaction payload (e.g., {emoji: ...}) - updated_at: str | None = None # Last update timestamp - user: str | None = None # User who added the reaction diff --git a/src/archastro/platform/types/schedules.py b/src/archastro/platform/types/schedules.py deleted file mode 100644 index c26789b..0000000 --- a/src/archastro/platform/types/schedules.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. -# This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 076a326b1561 - - -from pydantic import BaseModel - - -# API schema for a scheduled job. -class ScheduledJob(BaseModel): - args: dict[str, object] | None = None # Job arguments - description: str | None = None # Job description - id: str # Job ID - recurring: str | None = None # Recurrence pattern - scheduled_at: str | None = None # Scheduled execution time - thread: str | None = None # Thread - title: str | None = None # Job title - worker: str | None = None # Worker module name diff --git a/src/archastro/platform/types/system.py b/src/archastro/platform/types/system.py deleted file mode 100644 index d9d2c70..0000000 --- a/src/archastro/platform/types/system.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. -# This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 287fea7c998c - - -from pydantic import BaseModel - - -# API schema for a system access token. -class SystemAccessToken(BaseModel): - created_at: str | None = None # Creation timestamp - id: str # Token ID (sat_...) - last_used_at: str | None = None # Last used timestamp - name: str | None = None # Token name - revoked_at: str | None = None # Revocation timestamp diff --git a/src/archastro/platform/types/teams.py b/src/archastro/platform/types/teams.py index 6cc9550..db3106f 100644 --- a/src/archastro/platform/types/teams.py +++ b/src/archastro/platform/types/teams.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 72cfccc727f0 +# Content hash: a5c81c4952e9 from pydantic import BaseModel @@ -28,28 +28,11 @@ class Team(BaseModel): updated_at: str | None = None # Last update timestamp -# Schema for team creation parameters. -class TeamCreateParams(BaseModel): - acl: Acl | None = None # Access control list - description: str | None = None # Team description - metadata: dict[str, object] | None = None # Arbitrary key-value metadata - name: str # Team name - - # Schema for a team invite response. class TeamInvite(BaseModel): code: str # 6-character invite code -# Schema for a team member. -class TeamMember(BaseModel): - alias: str | None = None # User alias - email: str | None = None # User email - full_name: str | None = None # User full name - id: str # Public user ID - role: str | None = None # Role in the team (owner, admin, member) - - # API schema for a team membership. class TeamMembership(BaseModel): agent: Agent | None = None # Agent object (when loaded) @@ -75,19 +58,3 @@ class TeamMembershipListResponse(BaseModel): page_size: int | None = None # Results per page total_entries: int | None = None # Total number of entries total_pages: int | None = None # Total number of pages - - -# Base64-encoded profile picture -class TeamUpdateParamsProfilePicture(BaseModel): - data: str | None = None # Base64 encoded image data - filename: str | None = None # Original filename - mime_type: str | None = None # MIME type of the image - - -# Schema for team update parameters. -class TeamUpdateParams(BaseModel): - acl: Acl | None = None # Access control list - description: str | None = None # Team description - metadata: dict[str, object] | None = None # Arbitrary key-value metadata - name: str | None = None # Team name - profile_picture: TeamUpdateParamsProfilePicture | None = None diff --git a/src/archastro/platform/types/threads.py b/src/archastro/platform/types/threads.py index 60f3e72..38591d7 100644 --- a/src/archastro/platform/types/threads.py +++ b/src/archastro/platform/types/threads.py @@ -1,12 +1,12 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 18b91477c258 +# Content hash: 245cb0b878e6 from pydantic import BaseModel from .agents import Agent -from .common import Attachment, Message +from .common import Message from .users import User @@ -49,65 +49,6 @@ class Thread(BaseModel): user: str | None = None # Owning user -# API schema for a thread action. -class ThreadAction(BaseModel): - call_to_action: str | None = None # Call to action text - completion_result: dict[str, object] | None = None # Result after action completion - id: str # Thread action ID (tha_...) - metadata: dict[str, object] | None = None # Action metadata - native_template: dict[str, object] | None = None # Native template for mobile clients - org: str | None = None # Organization - path: str | None = None # URL path for action - sandbox: str | None = None # Sandbox - status: str # Action status (active, canceled, done) - type: str # Action type (connect_google, add_credential, send_email) - - -# Base64 encoded profile picture -class ThreadCreateParamsProfilePicture(BaseModel): - data: str | None = None # Base64 encoded image data - filename: str | None = None # Original filename - mime_type: str | None = None # MIME type of the image - - -# Schema for thread creation parameters. -# Used by both Users.Threads.Create and Teams.Threads.Create actions. -class ThreadCreateParams(BaseModel): - create_legacy_agent: bool | None = None # Create a legacy chat agent for this thread - description: str | None = None # Thread description - is_unlisted: bool | None = None # Whether the thread is unlisted - key: str | None = None # Unique key for the thread - metadata: dict[str, object] | None = None # Additional metadata - org_id: str | None = None # Organization ID - profile_picture: ThreadCreateParamsProfilePicture | None = None - settings: ThreadSettings | None = None # Thread settings - title: str | None = None # Thread title - - -# Schema for thread detail response in the developer portal. -# Extended thread data including members and associated entities. -class ThreadDetail(BaseModel): - agent: dict[str, object] | None = None # Associated agent info (id, name) - app_name: str | None = None # Associated app name - created_at: str | None = None # Created timestamp - creator: dict[str, object] | None = None # Thread creator info (id, email, full_name) - id: str # Public ID (thr_...) - is_channel: bool | None = None # Whether this is a channel thread - is_default: bool | None = None # Whether this is the default thread - is_unlisted: bool | None = None # Whether thread is hidden from listings - key: str | None = None # Unique key within owner scope - members: list[dict[str, object]] | None = None # Thread member list - metadata: dict[str, object] | None = None # Thread metadata - org: str | None = None # Organization (nullable) - owner: str | None = None # Owner public - owner_name: str | None = None # Owner display name - owner_type: str | None = None # Owner type: team, user, agent, or nil - sandbox: str | None = None # Sandbox identifier (nullable) - slug: str | None = None # URL-friendly slug - title: str # Thread title - updated_at: str | None = None # Updated timestamp - - # API schema for a thread member. class ThreadMember(BaseModel): membership_type: str | None = None # Membership type (owner or member) @@ -115,56 +56,8 @@ class ThreadMember(BaseModel): user: User | None = None # User details (when loaded) -# Schema for a thread message in the developer portal. -# Maps to serialized message output from developer portal API. -class ThreadMessage(BaseModel): - admin: dict[str, object] | None = None # Admin-only metadata and trajectory - agent: str | None = None # Agent identifier (nullable) - app: str | None = None # App identifier - attachments: list[Attachment] | None = None # Message attachments - content: str | None = None # Message content - created_at: str | None = None # Created timestamp - id: str # Public ID (msg_...) - org: str | None = None # Organization (nullable) - sandbox: str | None = None # Sandbox identifier (nullable) - sender: str | None = None # Sender public - sender_name: str | None = None # Display name of sender - sender_type: str | None = None # Type: user, agent, or system - team: str | None = None # Team identifier (nullable) - user: str | None = None # User identifier (nullable) - - -# API schema for a thread message trajectory. -class ThreadMessageTrajectory(BaseModel): - agent_message: str | None = None # Agent message - created_at: str | None = None # Creation timestamp - id: str # Thread message trajectory ID (tmt_...) - org: str | None = None # Organization - sandbox: str | None = None # Sandbox - thread: str | None = None # Thread - trajectory: str | None = None # Trajectory - updated_at: str | None = None # Last update timestamp - user_message: str | None = None # User message - - # Schema for thread read status response. class ThreadReadStatus(BaseModel): last_read_message: str | None = None # Last read message thread: str # Thread unread_count: int # Number of unread messages - - -# Base64 encoded profile picture -class ThreadUpdateParamsProfilePicture(BaseModel): - data: str | None = None # Base64 encoded image data - filename: str | None = None # Original filename - mime_type: str | None = None # MIME type of the image - - -# Schema for thread update parameters. -# Used by both Users.Threads.Update and Teams.Threads.Update actions. -class ThreadUpdateParams(BaseModel): - description: str | None = None # Thread description - metadata: dict[str, object] | None = None # Additional metadata - profile_picture: ThreadUpdateParamsProfilePicture | None = None - title: str | None = None # Thread title diff --git a/src/archastro/platform/types/users.py b/src/archastro/platform/types/users.py index 0a12e0c..d6fcc3f 100644 --- a/src/archastro/platform/types/users.py +++ b/src/archastro/platform/types/users.py @@ -1,10 +1,12 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: c8aa91e7db51 +# Content hash: ffe54ff8c4dc from pydantic import BaseModel +from .invites import InviteCreator + # API schema for a user. class User(BaseModel): @@ -17,20 +19,6 @@ class User(BaseModel): sandbox: str | None = None # Sandbox -# API schema for user feedback on messages. -class UserFeedback(BaseModel): - comment: str | None = None # Optional comment - created_at: str | None = None # Creation timestamp - id: str # Feedback ID - message: str # Message - org: str | None = None # Organization - rating: str # Rating (positive/negative) - sandbox: str | None = None # Sandbox - source: str # Feedback source - thread: str # Thread - updated_at: str | None = None # Update timestamp - - # API schema for a user invite. class UserInvite(BaseModel): created_at: str | None = None # Creation timestamp @@ -38,4 +26,4 @@ class UserInvite(BaseModel): key: str | None = None # Invite key metadata: dict[str, object] | None = None # Invite metadata thread: str | None = None # Thread - user: User | None = None # Invite creator + user: InviteCreator | None = None # Invite creator diff --git a/src/archastro/platform/v1/__init__.py b/src/archastro/platform/v1/__init__.py index d935a9b..bcacbe4 100644 --- a/src/archastro/platform/v1/__init__.py +++ b/src/archastro/platform/v1/__init__.py @@ -1,8 +1,9 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 313121911804 +# Content hash: c3728fbcf7d7 from ..runtime.http_client import HttpClient +from .resources.activity_feed import ActivityFeedResource from .resources.agent_computers import AgentComputerResource from .resources.agent_installations import AgentInstallationResource from .resources.agent_routines import AgentRoutineResource @@ -17,6 +18,7 @@ from .resources.config import ConfigResource from .resources.custom_objects import CustomObjectResource from .resources.installation_sources import InstallationSourceResource +from .resources.invites import InviteResource from .resources.kv import KvResource from .resources.orgs import OrgResource from .resources.team_memberships import TeamMembershipResource @@ -28,6 +30,7 @@ class V1: def __init__(self, http: HttpClient): + self.activity_feed = ActivityFeedResource(http) self.agent_computers = AgentComputerResource(http) self.agent_installations = AgentInstallationResource(http) self.agent_routines = AgentRoutineResource(http) @@ -41,6 +44,7 @@ def __init__(self, http: HttpClient): self.config = ConfigResource(http) self.custom_objects = CustomObjectResource(http) self.installation_sources = InstallationSourceResource(http) + self.invites = InviteResource(http) self.kv = KvResource(http) self.orgs = OrgResource(http) self.team_memberships = TeamMembershipResource(http) diff --git a/src/archastro/platform/v1/resources/__init__.py b/src/archastro/platform/v1/resources/__init__.py index 1761e5f..104fc21 100644 --- a/src/archastro/platform/v1/resources/__init__.py +++ b/src/archastro/platform/v1/resources/__init__.py @@ -1,7 +1,8 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 34e16a3c161d +# Content hash: e9beee30a308 +from .activity_feed import ActivityFeedResource # noqa: F401 from .agent_computers import AgentComputerResource # noqa: F401 from .agent_installations import AgentInstallationResource # noqa: F401 from .agent_routines import AgentRoutineResource # noqa: F401 @@ -16,6 +17,7 @@ from .config import ConfigResource # noqa: F401 from .custom_objects import CustomObjectResource # noqa: F401 from .installation_sources import InstallationSourceResource # noqa: F401 +from .invites import InviteResource # noqa: F401 from .kv import KvResource # noqa: F401 from .orgs import OrgResource # noqa: F401 from .team_memberships import TeamMembershipResource # noqa: F401 diff --git a/src/archastro/platform/v1/resources/activity_feed.py b/src/archastro/platform/v1/resources/activity_feed.py new file mode 100644 index 0000000..41f069a --- /dev/null +++ b/src/archastro/platform/v1/resources/activity_feed.py @@ -0,0 +1,15 @@ +# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. +# This file is auto-generated by @archastro/sdk-generator. Do not edit. +# Content hash: 4da450443cc0 + +from __future__ import annotations + +from ...runtime.http_client import HttpClient + + +class ActivityFeedResource: + def __init__(self, http: HttpClient): + self._http = http + + async def list(self, **params) -> dict[str, object]: + return await self._http.request("/api/v1/activity_feed", query=params) diff --git a/src/archastro/platform/v1/resources/agent_computers.py b/src/archastro/platform/v1/resources/agent_computers.py index d916326..bd9ef9e 100644 --- a/src/archastro/platform/v1/resources/agent_computers.py +++ b/src/archastro/platform/v1/resources/agent_computers.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 89ecfaf6798d +# Content hash: 3b150acaddae from __future__ import annotations @@ -26,9 +26,8 @@ async def exec(self, computer: str, input: dict) -> ComputerExecResult: body=input, ) - async def refresh(self, computer: str, input: dict) -> AgentComputer: + async def refresh(self, computer: str) -> AgentComputer: return await self._http.request( f"/api/v1/agent_computers/{computer}/refresh", method="POST", - body=input, ) diff --git a/src/archastro/platform/v1/resources/agent_installations.py b/src/archastro/platform/v1/resources/agent_installations.py index 907daf2..585960a 100644 --- a/src/archastro/platform/v1/resources/agent_installations.py +++ b/src/archastro/platform/v1/resources/agent_installations.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 5e1a91eb424d +# Content hash: bacdef93e676 from __future__ import annotations @@ -44,18 +44,16 @@ async def delete(self, installation: str) -> None: async def get(self, installation: str) -> Installation: return await self._http.request(f"/api/v1/agent_installations/{installation}") - async def activate(self, installation: str, input: dict) -> Installation: + async def activate(self, installation: str) -> Installation: return await self._http.request( f"/api/v1/agent_installations/{installation}/activate", method="POST", - body=input, ) - async def pause(self, installation: str, input: dict) -> Installation: + async def pause(self, installation: str) -> Installation: return await self._http.request( f"/api/v1/agent_installations/{installation}/pause", method="POST", - body=input, ) async def suspend(self, installation: str, input: dict) -> Installation: diff --git a/src/archastro/platform/v1/resources/agent_routines.py b/src/archastro/platform/v1/resources/agent_routines.py index e312554..c6b1c69 100644 --- a/src/archastro/platform/v1/resources/agent_routines.py +++ b/src/archastro/platform/v1/resources/agent_routines.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: a82c9d260196 +# Content hash: eb6304dc8b82 from __future__ import annotations @@ -46,12 +46,8 @@ async def update(self, routine: str, input: dict) -> AgentRoutine: body=input, ) - async def activate(self, routine: str, input: dict) -> AgentRoutine: - return await self._http.request( - f"/api/v1/agent_routines/{routine}/activate", - method="POST", - body=input, - ) + async def activate(self, routine: str) -> AgentRoutine: + return await self._http.request(f"/api/v1/agent_routines/{routine}/activate", method="POST") async def invoke(self, routine: str, input: dict) -> AgentRoutineRun: return await self._http.request( @@ -60,12 +56,8 @@ async def invoke(self, routine: str, input: dict) -> AgentRoutineRun: body=input, ) - async def pause(self, routine: str, input: dict) -> AgentRoutine: - return await self._http.request( - f"/api/v1/agent_routines/{routine}/pause", - method="POST", - body=input, - ) + async def pause(self, routine: str) -> AgentRoutine: + return await self._http.request(f"/api/v1/agent_routines/{routine}/pause", method="POST") async def runs(self, routine: str, **params) -> AgentRoutineRunListResponse: return await self._http.request(f"/api/v1/agent_routines/{routine}/runs", query=params) diff --git a/src/archastro/platform/v1/resources/agent_sessions.py b/src/archastro/platform/v1/resources/agent_sessions.py index 145d0eb..d864de9 100644 --- a/src/archastro/platform/v1/resources/agent_sessions.py +++ b/src/archastro/platform/v1/resources/agent_sessions.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 80d7f1bf4f68 +# Content hash: 2688af2a4f73 from __future__ import annotations @@ -31,11 +31,10 @@ async def update(self, agent_session: str, input: dict) -> AgentSession: body=input, ) - async def cancel(self, agent_session: str, input: dict) -> AgentSession: + async def cancel(self, agent_session: str) -> AgentSession: return await self._http.request( f"/api/v1/agent_sessions/{agent_session}/cancel", method="POST", - body=input, ) async def message(self, agent_session: str, input: dict) -> AgentSession: diff --git a/src/archastro/platform/v1/resources/agent_skills.py b/src/archastro/platform/v1/resources/agent_skills.py index 3bad517..e5f8af3 100644 --- a/src/archastro/platform/v1/resources/agent_skills.py +++ b/src/archastro/platform/v1/resources/agent_skills.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 9d50fb9aaf2b +# Content hash: cefc46fa179c from __future__ import annotations @@ -31,16 +31,14 @@ async def update(self, agent_skill: str, input: dict) -> AgentSkill: body=input, ) - async def activate(self, agent_skill: str, input: dict) -> AgentSkill: + async def activate(self, agent_skill: str) -> AgentSkill: return await self._http.request( f"/api/v1/agent_skills/{agent_skill}/activate", method="POST", - body=input, ) - async def deactivate(self, agent_skill: str, input: dict) -> AgentSkill: + async def deactivate(self, agent_skill: str) -> AgentSkill: return await self._http.request( f"/api/v1/agent_skills/{agent_skill}/deactivate", method="POST", - body=input, ) diff --git a/src/archastro/platform/v1/resources/agent_tools.py b/src/archastro/platform/v1/resources/agent_tools.py index 6b8542f..901f3fc 100644 --- a/src/archastro/platform/v1/resources/agent_tools.py +++ b/src/archastro/platform/v1/resources/agent_tools.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 401cf286192c +# Content hash: e584b56fa939 from __future__ import annotations @@ -28,16 +28,8 @@ async def get(self, tool: str) -> AgentTool: async def update(self, tool: str, input: dict) -> AgentTool: return await self._http.request(f"/api/v1/agent_tools/{tool}", method="PATCH", body=input) - async def activate(self, tool: str, input: dict) -> AgentTool: - return await self._http.request( - f"/api/v1/agent_tools/{tool}/activate", - method="POST", - body=input, - ) - - async def deactivate(self, tool: str, input: dict) -> AgentTool: - return await self._http.request( - f"/api/v1/agent_tools/{tool}/deactivate", - method="POST", - body=input, - ) + async def activate(self, tool: str) -> AgentTool: + return await self._http.request(f"/api/v1/agent_tools/{tool}/activate", method="POST") + + async def deactivate(self, tool: str) -> AgentTool: + return await self._http.request(f"/api/v1/agent_tools/{tool}/deactivate", method="POST") diff --git a/src/archastro/platform/v1/resources/artifacts.py b/src/archastro/platform/v1/resources/artifacts.py index 985c9a1..5bfe314 100644 --- a/src/archastro/platform/v1/resources/artifacts.py +++ b/src/archastro/platform/v1/resources/artifacts.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: ee1ab3825faa +# Content hash: 8801f42e28cb from __future__ import annotations @@ -21,8 +21,8 @@ async def get(self, artifact: str) -> Artifact: async def replace(self, artifact: str, input: dict) -> Artifact: return await self._http.request(f"/api/v1/artifacts/{artifact}", method="PUT", body=input) - async def archive(self, artifact: str, input: dict) -> None: - await self._http.request(f"/api/v1/artifacts/{artifact}/archive", method="POST", body=input) + async def archive(self, artifact: str) -> None: + await self._http.request(f"/api/v1/artifacts/{artifact}/archive", method="POST") async def content(self, artifact: str, **params) -> dict[str, str]: return await self._http.request_raw(f"/api/v1/artifacts/{artifact}/content", query=params) diff --git a/src/archastro/platform/v1/resources/invites.py b/src/archastro/platform/v1/resources/invites.py new file mode 100644 index 0000000..29454b8 --- /dev/null +++ b/src/archastro/platform/v1/resources/invites.py @@ -0,0 +1,16 @@ +# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. +# This file is auto-generated by @archastro/sdk-generator. Do not edit. +# Content hash: 2496705f5593 + +from __future__ import annotations + +from ...runtime.http_client import HttpClient +from ...types.users import UserInvite + + +class InviteResource: + def __init__(self, http: HttpClient): + self._http = http + + async def accept(self, input: dict) -> UserInvite: + return await self._http.request("/api/v1/invites/accept", method="POST", body=input) diff --git a/src/archastro/platform/v1/resources/kv.py b/src/archastro/platform/v1/resources/kv.py index a1b3cf6..70c15a1 100644 --- a/src/archastro/platform/v1/resources/kv.py +++ b/src/archastro/platform/v1/resources/kv.py @@ -1,19 +1,19 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 302b2035ea0e +# Content hash: 60c07cf1454a from __future__ import annotations from ...runtime.http_client import HttpClient -from ...types.common import KeyValueStorageEntry, KeyValueStorageEntryList +from ...types.common import KeyValueStorageEntry, KeyValueStorageEntryPage class KvResource: def __init__(self, http: HttpClient): self._http = http - async def list(self) -> KeyValueStorageEntryList: - return await self._http.request("/api/v1/kv") + async def list(self, **params) -> KeyValueStorageEntryPage: + return await self._http.request("/api/v1/kv", query=params) async def create(self, input: dict) -> KeyValueStorageEntry: return await self._http.request("/api/v1/kv", method="POST", body=input) @@ -21,8 +21,8 @@ async def create(self, input: dict) -> KeyValueStorageEntry: async def delete(self, key: str) -> None: await self._http.request(f"/api/v1/kv/{key}", method="DELETE") - async def get(self, key: str) -> KeyValueStorageEntry: - return await self._http.request(f"/api/v1/kv/{key}") + async def get(self, key: str, **params) -> KeyValueStorageEntry: + return await self._http.request(f"/api/v1/kv/{key}", query=params) async def upsert(self, key: str, input: dict) -> KeyValueStorageEntry: return await self._http.request(f"/api/v1/kv/{key}", method="PUT", body=input) diff --git a/src/archastro/platform/v1/resources/teams.py b/src/archastro/platform/v1/resources/teams.py index 233274f..c63b907 100644 --- a/src/archastro/platform/v1/resources/teams.py +++ b/src/archastro/platform/v1/resources/teams.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: b37aff69b1bd +# Content hash: 43dd6f7ebab8 from __future__ import annotations @@ -96,11 +96,11 @@ async def get(self, team: str) -> Team: async def update(self, team: str, input: dict) -> Team: return await self._http.request(f"/api/v1/teams/{team}", method="PATCH", body=input) - async def invite(self, team: str, input: dict) -> TeamInvite: - return await self._http.request(f"/api/v1/teams/{team}/invite", method="POST", body=input) + async def invite(self, team: str) -> TeamInvite: + return await self._http.request(f"/api/v1/teams/{team}/invite", method="POST") - async def invites(self, team: str, input: dict) -> dict[str, object]: - return await self._http.request(f"/api/v1/teams/{team}/invites", method="POST", body=input) + async def invites(self, team: str) -> dict[str, object]: + return await self._http.request(f"/api/v1/teams/{team}/invites", method="POST") async def join(self, team: str, input: dict) -> None: """ diff --git a/src/archastro/platform/v1/resources/users.py b/src/archastro/platform/v1/resources/users.py index 7b37192..1703be7 100644 --- a/src/archastro/platform/v1/resources/users.py +++ b/src/archastro/platform/v1/resources/users.py @@ -1,13 +1,13 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 55945071c81b +# Content hash: 523e3fab9259 from __future__ import annotations from ...runtime.http_client import HttpClient from ...types.artifacts import Artifact from ...types.threads import Thread -from ...types.users import User +from ...types.users import User, UserInvite class UserArtifactResource: @@ -48,6 +48,9 @@ async def me(self) -> User: async def get(self, user: str) -> User: return await self._http.request(f"/api/v1/users/{user}") + async def invites(self, user: str, input: dict) -> UserInvite: + return await self._http.request(f"/api/v1/users/{user}/invites", method="POST", body=input) + async def orgs(self, user: str) -> dict[str, object]: return await self._http.request(f"/api/v1/users/{user}/orgs") diff --git a/tests/contract/channels/test_api_activity_feed_channel.py b/tests/contract/channels/test_api_activity_feed_channel.py index 6498cfd..ed5d916 100644 --- a/tests/contract/channels/test_api_activity_feed_channel.py +++ b/tests/contract/channels/test_api_activity_feed_channel.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 321ffd7740ac +# Content hash: 3addd5900aca """ Contract tests for ApiActivityFeedChannel — generated from the channel spec. @@ -16,9 +16,9 @@ import pytest import pytest_asyncio +from archastro.phx_channel import HarnessServiceClient +from archastro.phx_channel.channel import ChannelError from archastro.platform.channels.api_activity_feed_channel import ApiActivityFeedChannel -from phx_channel import HarnessServiceClient -from phx_channel.channel import ChannelError # Mark every coroutine in this file as async. Generated tests are imported # into arbitrary SDK projects whose pytest config may or may not set diff --git a/tests/contract/channels/test_api_chat_channel.py b/tests/contract/channels/test_api_chat_channel.py index 567571c..64c1db9 100644 --- a/tests/contract/channels/test_api_chat_channel.py +++ b/tests/contract/channels/test_api_chat_channel.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 9dfd1ebdb695 +# Content hash: 569a22633273 """ Contract tests for ApiChatChannel — generated from the channel spec. @@ -16,9 +16,9 @@ import pytest import pytest_asyncio +from archastro.phx_channel import HarnessServiceClient +from archastro.phx_channel.channel import ChannelError from archastro.platform.channels.api_chat_channel import ApiChatChannel -from phx_channel import HarnessServiceClient -from phx_channel.channel import ChannelError # Mark every coroutine in this file as async. Generated tests are imported # into arbitrary SDK projects whose pytest config may or may not set diff --git a/tests/contract/channels/test_api_object_channel.py b/tests/contract/channels/test_api_object_channel.py index 791bfef..a867bd0 100644 --- a/tests/contract/channels/test_api_object_channel.py +++ b/tests/contract/channels/test_api_object_channel.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: f8787a7eb96f +# Content hash: cf08faca2361 """ Contract tests for ApiObjectChannel — generated from the channel spec. @@ -16,9 +16,9 @@ import pytest import pytest_asyncio +from archastro.phx_channel import HarnessServiceClient +from archastro.phx_channel.channel import ChannelError from archastro.platform.channels.api_object_channel import ApiObjectChannel -from phx_channel import HarnessServiceClient -from phx_channel.channel import ChannelError # Mark every coroutine in this file as async. Generated tests are imported # into arbitrary SDK projects whose pytest config may or may not set diff --git a/tests/contract/v1/test_activity_feed.py b/tests/contract/v1/test_activity_feed.py new file mode 100644 index 0000000..78e00af --- /dev/null +++ b/tests/contract/v1/test_activity_feed.py @@ -0,0 +1,55 @@ +# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. +# This file is auto-generated by @archastro/sdk-generator. Do not edit. +# Content hash: 172c53c0def4 + +import pytest + +from archastro.platform import PlatformClient +from archastro.platform.runtime.http_client import ApiError + +PRISM_URL = "http://127.0.0.1:4040" + + +def _client() -> PlatformClient: + return PlatformClient( + base_url=PRISM_URL, + default_headers={"x-archastro-api-key": "pk_test-key"}, + access_token="test-token", + ) + + +def _error_client(code: int) -> PlatformClient: + return PlatformClient( + base_url=PRISM_URL, + default_headers={"x-archastro-api-key": "pk_test-key", "Prefer": f"code={code}"}, + access_token="test-token", + ) + + +async def test_activity_feed_list_success(): + client = _client() + result = await client.v1.activity_feed.list() + assert result is not None + assert "data" in result + assert isinstance(result["data"], list) + + +async def test_activity_feed_list_error_400(): + ec = _error_client(400) + with pytest.raises(ApiError) as exc_info: + await ec.v1.activity_feed.list() + assert exc_info.value.status == 400 + + +async def test_activity_feed_list_error_401(): + ec = _error_client(401) + with pytest.raises(ApiError) as exc_info: + await ec.v1.activity_feed.list() + assert exc_info.value.status == 401 + + +async def test_activity_feed_list_error_403(): + ec = _error_client(403) + with pytest.raises(ApiError) as exc_info: + await ec.v1.activity_feed.list() + assert exc_info.value.status == 403 diff --git a/tests/contract/v1/test_agent_computers.py b/tests/contract/v1/test_agent_computers.py index 6b02b31..2a3877d 100644 --- a/tests/contract/v1/test_agent_computers.py +++ b/tests/contract/v1/test_agent_computers.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: a5481f7b6264 +# Content hash: e5ef24c69095 import pytest @@ -82,70 +82,60 @@ async def test_agent_computers_get_error_404(): async def test_agent_computers_exec_success(): client = _client() - result = await client.v1.agent_computers.exec( - "test-value", {"command": "test-value", "computer": "test-value"} - ) + result = await client.v1.agent_computers.exec("test-value", {"command": "test-value"}) assert result is not None async def test_agent_computers_exec_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_computers.exec( - "test-value", {"command": "test-value", "computer": "test-value"} - ) + await ec.v1.agent_computers.exec("test-value", {"command": "test-value"}) assert exc_info.value.status == 401 async def test_agent_computers_exec_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_computers.exec( - "test-value", {"command": "test-value", "computer": "test-value"} - ) + await ec.v1.agent_computers.exec("test-value", {"command": "test-value"}) assert exc_info.value.status == 403 async def test_agent_computers_exec_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_computers.exec( - "test-value", {"command": "test-value", "computer": "test-value"} - ) + await ec.v1.agent_computers.exec("test-value", {"command": "test-value"}) assert exc_info.value.status == 404 async def test_agent_computers_exec_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_computers.exec( - "test-value", {"command": "test-value", "computer": "test-value"} - ) + await ec.v1.agent_computers.exec("test-value", {"command": "test-value"}) assert exc_info.value.status == 422 async def test_agent_computers_refresh_success(): client = _client() - result = await client.v1.agent_computers.refresh("test-value", {"computer": "test-value"}) + result = await client.v1.agent_computers.refresh("test-value") assert result is not None async def test_agent_computers_refresh_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_computers.refresh("test-value", {"computer": "test-value"}) + await ec.v1.agent_computers.refresh("test-value") assert exc_info.value.status == 401 async def test_agent_computers_refresh_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_computers.refresh("test-value", {"computer": "test-value"}) + await ec.v1.agent_computers.refresh("test-value") assert exc_info.value.status == 403 async def test_agent_computers_refresh_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_computers.refresh("test-value", {"computer": "test-value"}) + await ec.v1.agent_computers.refresh("test-value") assert exc_info.value.status == 404 diff --git a/tests/contract/v1/test_agent_installations.py b/tests/contract/v1/test_agent_installations.py index 8839354..dfbffe9 100644 --- a/tests/contract/v1/test_agent_installations.py +++ b/tests/contract/v1/test_agent_installations.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 3ec14aeaa53e +# Content hash: 21f1c7ed0841 import pytest @@ -102,107 +102,103 @@ async def test_agent_installations_get_error_404(): async def test_agent_installations_activate_success(): client = _client() - result = await client.v1.agent_installations.activate( - "test-value", {"installation": "test-value"} - ) + result = await client.v1.agent_installations.activate("test-value") assert result is not None async def test_agent_installations_activate_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_installations.activate("test-value", {"installation": "test-value"}) + await ec.v1.agent_installations.activate("test-value") assert exc_info.value.status == 401 async def test_agent_installations_activate_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_installations.activate("test-value", {"installation": "test-value"}) + await ec.v1.agent_installations.activate("test-value") assert exc_info.value.status == 403 async def test_agent_installations_activate_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_installations.activate("test-value", {"installation": "test-value"}) + await ec.v1.agent_installations.activate("test-value") assert exc_info.value.status == 404 async def test_agent_installations_activate_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_installations.activate("test-value", {"installation": "test-value"}) + await ec.v1.agent_installations.activate("test-value") assert exc_info.value.status == 422 async def test_agent_installations_pause_success(): client = _client() - result = await client.v1.agent_installations.pause("test-value", {"installation": "test-value"}) + result = await client.v1.agent_installations.pause("test-value") assert result is not None async def test_agent_installations_pause_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_installations.pause("test-value", {"installation": "test-value"}) + await ec.v1.agent_installations.pause("test-value") assert exc_info.value.status == 401 async def test_agent_installations_pause_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_installations.pause("test-value", {"installation": "test-value"}) + await ec.v1.agent_installations.pause("test-value") assert exc_info.value.status == 403 async def test_agent_installations_pause_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_installations.pause("test-value", {"installation": "test-value"}) + await ec.v1.agent_installations.pause("test-value") assert exc_info.value.status == 404 async def test_agent_installations_pause_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_installations.pause("test-value", {"installation": "test-value"}) + await ec.v1.agent_installations.pause("test-value") assert exc_info.value.status == 422 async def test_agent_installations_suspend_success(): client = _client() - result = await client.v1.agent_installations.suspend( - "test-value", {"installation": "test-value"} - ) + result = await client.v1.agent_installations.suspend("test-value", {}) assert result is not None async def test_agent_installations_suspend_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_installations.suspend("test-value", {"installation": "test-value"}) + await ec.v1.agent_installations.suspend("test-value", {}) assert exc_info.value.status == 401 async def test_agent_installations_suspend_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_installations.suspend("test-value", {"installation": "test-value"}) + await ec.v1.agent_installations.suspend("test-value", {}) assert exc_info.value.status == 403 async def test_agent_installations_suspend_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_installations.suspend("test-value", {"installation": "test-value"}) + await ec.v1.agent_installations.suspend("test-value", {}) assert exc_info.value.status == 404 async def test_agent_installations_suspend_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_installations.suspend("test-value", {"installation": "test-value"}) + await ec.v1.agent_installations.suspend("test-value", {}) assert exc_info.value.status == 422 @@ -236,7 +232,7 @@ async def test_agent_installations_installation_sources_list_error_404(): async def test_agent_installations_installation_sources_create_success(): client = _client() result = await client.v1.agent_installations.installation_sources.create( - "test-value", {"installation": "test-value", "payload": {}, "type": "test"} + "test-value", {"payload": {}, "type": "test"} ) assert result is not None @@ -245,7 +241,7 @@ async def test_agent_installations_installation_sources_create_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: await ec.v1.agent_installations.installation_sources.create( - "test-value", {"installation": "test-value", "payload": {}, "type": "test"} + "test-value", {"payload": {}, "type": "test"} ) assert exc_info.value.status == 401 @@ -254,7 +250,7 @@ async def test_agent_installations_installation_sources_create_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: await ec.v1.agent_installations.installation_sources.create( - "test-value", {"installation": "test-value", "payload": {}, "type": "test"} + "test-value", {"payload": {}, "type": "test"} ) assert exc_info.value.status == 403 @@ -263,7 +259,7 @@ async def test_agent_installations_installation_sources_create_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: await ec.v1.agent_installations.installation_sources.create( - "test-value", {"installation": "test-value", "payload": {}, "type": "test"} + "test-value", {"payload": {}, "type": "test"} ) assert exc_info.value.status == 404 @@ -272,6 +268,6 @@ async def test_agent_installations_installation_sources_create_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: await ec.v1.agent_installations.installation_sources.create( - "test-value", {"installation": "test-value", "payload": {}, "type": "test"} + "test-value", {"payload": {}, "type": "test"} ) assert exc_info.value.status == 422 diff --git a/tests/contract/v1/test_agent_routines.py b/tests/contract/v1/test_agent_routines.py index 1ca96ee..4b56698 100644 --- a/tests/contract/v1/test_agent_routines.py +++ b/tests/contract/v1/test_agent_routines.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 1c3246e1c210 +# Content hash: 732092c410d9 import pytest @@ -122,140 +122,130 @@ async def test_agent_routines_get_error_404(): async def test_agent_routines_update_success(): client = _client() - result = await client.v1.agent_routines.update("test-value", {"routine": "test-value"}) + result = await client.v1.agent_routines.update("test-value", {}) assert result is not None async def test_agent_routines_update_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.update("test-value", {"routine": "test-value"}) + await ec.v1.agent_routines.update("test-value", {}) assert exc_info.value.status == 401 async def test_agent_routines_update_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.update("test-value", {"routine": "test-value"}) + await ec.v1.agent_routines.update("test-value", {}) assert exc_info.value.status == 403 async def test_agent_routines_update_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.update("test-value", {"routine": "test-value"}) + await ec.v1.agent_routines.update("test-value", {}) assert exc_info.value.status == 404 async def test_agent_routines_update_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.update("test-value", {"routine": "test-value"}) + await ec.v1.agent_routines.update("test-value", {}) assert exc_info.value.status == 422 async def test_agent_routines_activate_success(): client = _client() - result = await client.v1.agent_routines.activate("test-value", {"routine": "test-value"}) + result = await client.v1.agent_routines.activate("test-value") assert result is not None async def test_agent_routines_activate_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.activate("test-value", {"routine": "test-value"}) + await ec.v1.agent_routines.activate("test-value") assert exc_info.value.status == 401 async def test_agent_routines_activate_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.activate("test-value", {"routine": "test-value"}) + await ec.v1.agent_routines.activate("test-value") assert exc_info.value.status == 403 async def test_agent_routines_activate_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.activate("test-value", {"routine": "test-value"}) + await ec.v1.agent_routines.activate("test-value") assert exc_info.value.status == 404 async def test_agent_routines_activate_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.activate("test-value", {"routine": "test-value"}) + await ec.v1.agent_routines.activate("test-value") assert exc_info.value.status == 422 async def test_agent_routines_invoke_success(): client = _client() - result = await client.v1.agent_routines.invoke( - "test-value", {"message": "test-value", "routine": "test-value"} - ) + result = await client.v1.agent_routines.invoke("test-value", {"message": "test-value"}) assert result is not None async def test_agent_routines_invoke_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.invoke( - "test-value", {"message": "test-value", "routine": "test-value"} - ) + await ec.v1.agent_routines.invoke("test-value", {"message": "test-value"}) assert exc_info.value.status == 401 async def test_agent_routines_invoke_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.invoke( - "test-value", {"message": "test-value", "routine": "test-value"} - ) + await ec.v1.agent_routines.invoke("test-value", {"message": "test-value"}) assert exc_info.value.status == 403 async def test_agent_routines_invoke_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.invoke( - "test-value", {"message": "test-value", "routine": "test-value"} - ) + await ec.v1.agent_routines.invoke("test-value", {"message": "test-value"}) assert exc_info.value.status == 404 async def test_agent_routines_invoke_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.invoke( - "test-value", {"message": "test-value", "routine": "test-value"} - ) + await ec.v1.agent_routines.invoke("test-value", {"message": "test-value"}) assert exc_info.value.status == 422 async def test_agent_routines_pause_success(): client = _client() - result = await client.v1.agent_routines.pause("test-value", {"routine": "test-value"}) + result = await client.v1.agent_routines.pause("test-value") assert result is not None async def test_agent_routines_pause_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.pause("test-value", {"routine": "test-value"}) + await ec.v1.agent_routines.pause("test-value") assert exc_info.value.status == 401 async def test_agent_routines_pause_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.pause("test-value", {"routine": "test-value"}) + await ec.v1.agent_routines.pause("test-value") assert exc_info.value.status == 403 async def test_agent_routines_pause_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_routines.pause("test-value", {"routine": "test-value"}) + await ec.v1.agent_routines.pause("test-value") assert exc_info.value.status == 404 diff --git a/tests/contract/v1/test_agent_sessions.py b/tests/contract/v1/test_agent_sessions.py index d2d7345..c3c45f5 100644 --- a/tests/contract/v1/test_agent_sessions.py +++ b/tests/contract/v1/test_agent_sessions.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 50c616fa1fbc +# Content hash: d151df8b05da import pytest @@ -75,6 +75,13 @@ async def test_agent_sessions_create_error_403(): assert exc_info.value.status == 403 +async def test_agent_sessions_create_error_404(): + ec = _error_client(404) + with pytest.raises(ApiError) as exc_info: + await ec.v1.agent_sessions.create({"agent": "test-value", "instructions": "test-value"}) + assert exc_info.value.status == 404 + + async def test_agent_sessions_create_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: @@ -138,104 +145,94 @@ async def test_agent_sessions_get_error_404(): async def test_agent_sessions_update_success(): client = _client() - result = await client.v1.agent_sessions.update("test-value", {"agent_session": "test-value"}) + result = await client.v1.agent_sessions.update("test-value", {}) assert result is not None async def test_agent_sessions_update_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_sessions.update("test-value", {"agent_session": "test-value"}) + await ec.v1.agent_sessions.update("test-value", {}) assert exc_info.value.status == 401 async def test_agent_sessions_update_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_sessions.update("test-value", {"agent_session": "test-value"}) + await ec.v1.agent_sessions.update("test-value", {}) assert exc_info.value.status == 403 async def test_agent_sessions_update_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_sessions.update("test-value", {"agent_session": "test-value"}) + await ec.v1.agent_sessions.update("test-value", {}) assert exc_info.value.status == 404 async def test_agent_sessions_update_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_sessions.update("test-value", {"agent_session": "test-value"}) + await ec.v1.agent_sessions.update("test-value", {}) assert exc_info.value.status == 422 async def test_agent_sessions_cancel_success(): client = _client() - result = await client.v1.agent_sessions.cancel("test-value", {"agent_session": "test-value"}) + result = await client.v1.agent_sessions.cancel("test-value") assert result is not None async def test_agent_sessions_cancel_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_sessions.cancel("test-value", {"agent_session": "test-value"}) + await ec.v1.agent_sessions.cancel("test-value") assert exc_info.value.status == 401 async def test_agent_sessions_cancel_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_sessions.cancel("test-value", {"agent_session": "test-value"}) + await ec.v1.agent_sessions.cancel("test-value") assert exc_info.value.status == 403 async def test_agent_sessions_cancel_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_sessions.cancel("test-value", {"agent_session": "test-value"}) + await ec.v1.agent_sessions.cancel("test-value") assert exc_info.value.status == 404 async def test_agent_sessions_message_success(): client = _client() - result = await client.v1.agent_sessions.message( - "test-value", {"agent_session": "test-value", "content": "test content"} - ) + result = await client.v1.agent_sessions.message("test-value", {"content": "test content"}) assert result is not None async def test_agent_sessions_message_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_sessions.message( - "test-value", {"agent_session": "test-value", "content": "test content"} - ) + await ec.v1.agent_sessions.message("test-value", {"content": "test content"}) assert exc_info.value.status == 401 async def test_agent_sessions_message_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_sessions.message( - "test-value", {"agent_session": "test-value", "content": "test content"} - ) + await ec.v1.agent_sessions.message("test-value", {"content": "test content"}) assert exc_info.value.status == 403 async def test_agent_sessions_message_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_sessions.message( - "test-value", {"agent_session": "test-value", "content": "test content"} - ) + await ec.v1.agent_sessions.message("test-value", {"content": "test content"}) assert exc_info.value.status == 404 async def test_agent_sessions_message_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_sessions.message( - "test-value", {"agent_session": "test-value", "content": "test content"} - ) + await ec.v1.agent_sessions.message("test-value", {"content": "test content"}) assert exc_info.value.status == 422 diff --git a/tests/contract/v1/test_agent_skills.py b/tests/contract/v1/test_agent_skills.py index 6cb3db3..bff3239 100644 --- a/tests/contract/v1/test_agent_skills.py +++ b/tests/contract/v1/test_agent_skills.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 04324cac9db4 +# Content hash: e51b2cc82b09 import pytest @@ -46,6 +46,13 @@ async def test_agent_skills_list_error_403(): assert exc_info.value.status == 403 +async def test_agent_skills_list_error_404(): + ec = _error_client(404) + with pytest.raises(ApiError) as exc_info: + await ec.v1.agent_skills.list() + assert exc_info.value.status == 404 + + async def test_agent_skills_create_success(): client = _client() result = await client.v1.agent_skills.create({"agent": "test-value", "config": "test-value"}) @@ -136,87 +143,87 @@ async def test_agent_skills_get_error_404(): async def test_agent_skills_update_success(): client = _client() - result = await client.v1.agent_skills.update("test-value", {"agent_skill": "test-value"}) + result = await client.v1.agent_skills.update("test-value", {}) assert result is not None async def test_agent_skills_update_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_skills.update("test-value", {"agent_skill": "test-value"}) + await ec.v1.agent_skills.update("test-value", {}) assert exc_info.value.status == 401 async def test_agent_skills_update_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_skills.update("test-value", {"agent_skill": "test-value"}) + await ec.v1.agent_skills.update("test-value", {}) assert exc_info.value.status == 403 async def test_agent_skills_update_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_skills.update("test-value", {"agent_skill": "test-value"}) + await ec.v1.agent_skills.update("test-value", {}) assert exc_info.value.status == 404 async def test_agent_skills_update_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_skills.update("test-value", {"agent_skill": "test-value"}) + await ec.v1.agent_skills.update("test-value", {}) assert exc_info.value.status == 422 async def test_agent_skills_activate_success(): client = _client() - result = await client.v1.agent_skills.activate("test-value", {"agent_skill": "test-value"}) + result = await client.v1.agent_skills.activate("test-value") assert result is not None async def test_agent_skills_activate_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_skills.activate("test-value", {"agent_skill": "test-value"}) + await ec.v1.agent_skills.activate("test-value") assert exc_info.value.status == 401 async def test_agent_skills_activate_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_skills.activate("test-value", {"agent_skill": "test-value"}) + await ec.v1.agent_skills.activate("test-value") assert exc_info.value.status == 403 async def test_agent_skills_activate_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_skills.activate("test-value", {"agent_skill": "test-value"}) + await ec.v1.agent_skills.activate("test-value") assert exc_info.value.status == 404 async def test_agent_skills_deactivate_success(): client = _client() - result = await client.v1.agent_skills.deactivate("test-value", {"agent_skill": "test-value"}) + result = await client.v1.agent_skills.deactivate("test-value") assert result is not None async def test_agent_skills_deactivate_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_skills.deactivate("test-value", {"agent_skill": "test-value"}) + await ec.v1.agent_skills.deactivate("test-value") assert exc_info.value.status == 401 async def test_agent_skills_deactivate_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_skills.deactivate("test-value", {"agent_skill": "test-value"}) + await ec.v1.agent_skills.deactivate("test-value") assert exc_info.value.status == 403 async def test_agent_skills_deactivate_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_skills.deactivate("test-value", {"agent_skill": "test-value"}) + await ec.v1.agent_skills.deactivate("test-value") assert exc_info.value.status == 404 diff --git a/tests/contract/v1/test_agent_tools.py b/tests/contract/v1/test_agent_tools.py index a790b81..e73108a 100644 --- a/tests/contract/v1/test_agent_tools.py +++ b/tests/contract/v1/test_agent_tools.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: a10f73f80349 +# Content hash: 56ecba915acb import pytest @@ -46,6 +46,13 @@ async def test_agent_tools_list_error_403(): assert exc_info.value.status == 403 +async def test_agent_tools_list_error_404(): + ec = _error_client(404) + with pytest.raises(ApiError) as exc_info: + await ec.v1.agent_tools.list() + assert exc_info.value.status == 404 + + async def test_agent_tools_catalog_success(): client = _client() result = await client.v1.agent_tools.catalog() @@ -122,94 +129,94 @@ async def test_agent_tools_get_error_404(): async def test_agent_tools_update_success(): client = _client() - result = await client.v1.agent_tools.update("test-value", {"tool": "test-value"}) + result = await client.v1.agent_tools.update("test-value", {}) assert result is not None async def test_agent_tools_update_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_tools.update("test-value", {"tool": "test-value"}) + await ec.v1.agent_tools.update("test-value", {}) assert exc_info.value.status == 401 async def test_agent_tools_update_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_tools.update("test-value", {"tool": "test-value"}) + await ec.v1.agent_tools.update("test-value", {}) assert exc_info.value.status == 403 async def test_agent_tools_update_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_tools.update("test-value", {"tool": "test-value"}) + await ec.v1.agent_tools.update("test-value", {}) assert exc_info.value.status == 404 async def test_agent_tools_update_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_tools.update("test-value", {"tool": "test-value"}) + await ec.v1.agent_tools.update("test-value", {}) assert exc_info.value.status == 422 async def test_agent_tools_activate_success(): client = _client() - result = await client.v1.agent_tools.activate("test-value", {"tool": "test-value"}) + result = await client.v1.agent_tools.activate("test-value") assert result is not None async def test_agent_tools_activate_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_tools.activate("test-value", {"tool": "test-value"}) + await ec.v1.agent_tools.activate("test-value") assert exc_info.value.status == 401 async def test_agent_tools_activate_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_tools.activate("test-value", {"tool": "test-value"}) + await ec.v1.agent_tools.activate("test-value") assert exc_info.value.status == 403 async def test_agent_tools_activate_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_tools.activate("test-value", {"tool": "test-value"}) + await ec.v1.agent_tools.activate("test-value") assert exc_info.value.status == 404 async def test_agent_tools_activate_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_tools.activate("test-value", {"tool": "test-value"}) + await ec.v1.agent_tools.activate("test-value") assert exc_info.value.status == 422 async def test_agent_tools_deactivate_success(): client = _client() - result = await client.v1.agent_tools.deactivate("test-value", {"tool": "test-value"}) + result = await client.v1.agent_tools.deactivate("test-value") assert result is not None async def test_agent_tools_deactivate_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_tools.deactivate("test-value", {"tool": "test-value"}) + await ec.v1.agent_tools.deactivate("test-value") assert exc_info.value.status == 401 async def test_agent_tools_deactivate_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_tools.deactivate("test-value", {"tool": "test-value"}) + await ec.v1.agent_tools.deactivate("test-value") assert exc_info.value.status == 403 async def test_agent_tools_deactivate_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agent_tools.deactivate("test-value", {"tool": "test-value"}) + await ec.v1.agent_tools.deactivate("test-value") assert exc_info.value.status == 404 diff --git a/tests/contract/v1/test_agents.py b/tests/contract/v1/test_agents.py index dc83f8f..76a473c 100644 --- a/tests/contract/v1/test_agents.py +++ b/tests/contract/v1/test_agents.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 4326b01f839d +# Content hash: 2297a97943f4 import pytest @@ -143,42 +143,42 @@ async def test_agents_get_error_404(): async def test_agents_update_success(): client = _client() - result = await client.v1.agents.update("test-value", {"agent": "test-value"}) + result = await client.v1.agents.update("test-value", {}) assert result is not None async def test_agents_update_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.update("test-value", {"agent": "test-value"}) + await ec.v1.agents.update("test-value", {}) assert exc_info.value.status == 401 async def test_agents_update_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.update("test-value", {"agent": "test-value"}) + await ec.v1.agents.update("test-value", {}) assert exc_info.value.status == 403 async def test_agents_update_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.update("test-value", {"agent": "test-value"}) + await ec.v1.agents.update("test-value", {}) assert exc_info.value.status == 404 async def test_agents_update_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.update("test-value", {"agent": "test-value"}) + await ec.v1.agents.update("test-value", {}) assert exc_info.value.status == 422 async def test_agents_agent_routines_success(): client = _client() result = await client.v1.agents.agent_routines( - "test-value", {"agent": "test-value", "handler_type": "test-value", "name": "test-name"} + "test-value", {"handler_type": "test-value", "name": "test-name"} ) assert result is not None @@ -187,7 +187,7 @@ async def test_agents_agent_routines_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: await ec.v1.agents.agent_routines( - "test-value", {"agent": "test-value", "handler_type": "test-value", "name": "test-name"} + "test-value", {"handler_type": "test-value", "name": "test-name"} ) assert exc_info.value.status == 401 @@ -196,7 +196,7 @@ async def test_agents_agent_routines_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: await ec.v1.agents.agent_routines( - "test-value", {"agent": "test-value", "handler_type": "test-value", "name": "test-name"} + "test-value", {"handler_type": "test-value", "name": "test-name"} ) assert exc_info.value.status == 403 @@ -205,7 +205,7 @@ async def test_agents_agent_routines_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: await ec.v1.agents.agent_routines( - "test-value", {"agent": "test-value", "handler_type": "test-value", "name": "test-name"} + "test-value", {"handler_type": "test-value", "name": "test-name"} ) assert exc_info.value.status == 404 @@ -214,7 +214,7 @@ async def test_agents_agent_routines_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: await ec.v1.agents.agent_routines( - "test-value", {"agent": "test-value", "handler_type": "test-value", "name": "test-name"} + "test-value", {"handler_type": "test-value", "name": "test-name"} ) assert exc_info.value.status == 422 @@ -275,9 +275,7 @@ async def test_agents_export_error_404(): async def test_agents_search_success(): client = _client() - result = await client.v1.agents.search( - "test-value", {"agent": "test-value", "query": "test-value"} - ) + result = await client.v1.agents.search("test-value", {"query": "test-value"}) assert result is not None assert "data" in result assert isinstance(result["data"], list) @@ -286,55 +284,55 @@ async def test_agents_search_success(): async def test_agents_search_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.search("test-value", {"agent": "test-value", "query": "test-value"}) + await ec.v1.agents.search("test-value", {"query": "test-value"}) assert exc_info.value.status == 401 async def test_agents_search_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.search("test-value", {"agent": "test-value", "query": "test-value"}) + await ec.v1.agents.search("test-value", {"query": "test-value"}) assert exc_info.value.status == 404 async def test_agents_search_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.search("test-value", {"agent": "test-value", "query": "test-value"}) + await ec.v1.agents.search("test-value", {"query": "test-value"}) assert exc_info.value.status == 422 async def test_agents_threads_success(): client = _client() - result = await client.v1.agents.threads("test-value", {"agent": "test-value", "thread": {}}) + result = await client.v1.agents.threads("test-value", {"thread": {}}) assert result is not None async def test_agents_threads_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.threads("test-value", {"agent": "test-value", "thread": {}}) + await ec.v1.agents.threads("test-value", {"thread": {}}) assert exc_info.value.status == 401 async def test_agents_threads_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.threads("test-value", {"agent": "test-value", "thread": {}}) + await ec.v1.agents.threads("test-value", {"thread": {}}) assert exc_info.value.status == 403 async def test_agents_threads_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.threads("test-value", {"agent": "test-value", "thread": {}}) + await ec.v1.agents.threads("test-value", {"thread": {}}) assert exc_info.value.status == 404 async def test_agents_threads_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.threads("test-value", {"agent": "test-value", "thread": {}}) + await ec.v1.agents.threads("test-value", {"thread": {}}) assert exc_info.value.status == 422 @@ -367,45 +365,35 @@ async def test_agents_agent_computers_list_error_404(): async def test_agents_agent_computers_create_success(): client = _client() - result = await client.v1.agents.agent_computers.create( - "test-value", {"agent": "test-value", "name": "test-name"} - ) + result = await client.v1.agents.agent_computers.create("test-value", {"name": "test-name"}) assert result is not None async def test_agents_agent_computers_create_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.agent_computers.create( - "test-value", {"agent": "test-value", "name": "test-name"} - ) + await ec.v1.agents.agent_computers.create("test-value", {"name": "test-name"}) assert exc_info.value.status == 401 async def test_agents_agent_computers_create_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.agent_computers.create( - "test-value", {"agent": "test-value", "name": "test-name"} - ) + await ec.v1.agents.agent_computers.create("test-value", {"name": "test-name"}) assert exc_info.value.status == 403 async def test_agents_agent_computers_create_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.agent_computers.create( - "test-value", {"agent": "test-value", "name": "test-name"} - ) + await ec.v1.agents.agent_computers.create("test-value", {"name": "test-name"}) assert exc_info.value.status == 404 async def test_agents_agent_computers_create_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.agent_computers.create( - "test-value", {"agent": "test-value", "name": "test-name"} - ) + await ec.v1.agents.agent_computers.create("test-value", {"name": "test-name"}) assert exc_info.value.status == 422 @@ -438,45 +426,35 @@ async def test_agents_agent_installations_list_error_404(): async def test_agents_agent_installations_create_success(): client = _client() - result = await client.v1.agents.agent_installations.create( - "test-value", {"agent": "test-value", "kind": "test"} - ) + result = await client.v1.agents.agent_installations.create("test-value", {"kind": "test"}) assert result is not None async def test_agents_agent_installations_create_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.agent_installations.create( - "test-value", {"agent": "test-value", "kind": "test"} - ) + await ec.v1.agents.agent_installations.create("test-value", {"kind": "test"}) assert exc_info.value.status == 401 async def test_agents_agent_installations_create_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.agent_installations.create( - "test-value", {"agent": "test-value", "kind": "test"} - ) + await ec.v1.agents.agent_installations.create("test-value", {"kind": "test"}) assert exc_info.value.status == 403 async def test_agents_agent_installations_create_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.agent_installations.create( - "test-value", {"agent": "test-value", "kind": "test"} - ) + await ec.v1.agents.agent_installations.create("test-value", {"kind": "test"}) assert exc_info.value.status == 404 async def test_agents_agent_installations_create_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.agent_installations.create( - "test-value", {"agent": "test-value", "kind": "test"} - ) + await ec.v1.agents.agent_installations.create("test-value", {"kind": "test"}) assert exc_info.value.status == 422 @@ -520,39 +498,44 @@ async def test_agents_agent_tools_list_error_403(): assert exc_info.value.status == 403 +async def test_agents_agent_tools_list_error_404(): + ec = _error_client(404) + with pytest.raises(ApiError) as exc_info: + await ec.v1.agents.agent_tools.list("test-value") + assert exc_info.value.status == 404 + + async def test_agents_agent_tools_create_success(): client = _client() - result = await client.v1.agents.agent_tools.create( - "test-value", {"agent": "test-value", "kind": "test"} - ) + result = await client.v1.agents.agent_tools.create("test-value", {"kind": "test"}) assert result is not None async def test_agents_agent_tools_create_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.agent_tools.create("test-value", {"agent": "test-value", "kind": "test"}) + await ec.v1.agents.agent_tools.create("test-value", {"kind": "test"}) assert exc_info.value.status == 401 async def test_agents_agent_tools_create_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.agent_tools.create("test-value", {"agent": "test-value", "kind": "test"}) + await ec.v1.agents.agent_tools.create("test-value", {"kind": "test"}) assert exc_info.value.status == 403 async def test_agents_agent_tools_create_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.agent_tools.create("test-value", {"agent": "test-value", "kind": "test"}) + await ec.v1.agents.agent_tools.create("test-value", {"kind": "test"}) assert exc_info.value.status == 404 async def test_agents_agent_tools_create_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.agents.agent_tools.create("test-value", {"agent": "test-value", "kind": "test"}) + await ec.v1.agents.agent_tools.create("test-value", {"kind": "test"}) assert exc_info.value.status == 422 diff --git a/tests/contract/v1/test_artifacts.py b/tests/contract/v1/test_artifacts.py index 370164a..58397e7 100644 --- a/tests/contract/v1/test_artifacts.py +++ b/tests/contract/v1/test_artifacts.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: cd8f35e16277 +# Content hash: 64d1f5f9dc06 import pytest @@ -82,71 +82,69 @@ async def test_artifacts_get_error_404(): async def test_artifacts_replace_success(): client = _client() - result = await client.v1.artifacts.replace( - "test-value", {"artifact": "test-value", "from_version": 1} - ) + result = await client.v1.artifacts.replace("test-value", {"from_version": 1}) assert result is not None async def test_artifacts_replace_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.artifacts.replace("test-value", {"artifact": "test-value", "from_version": 1}) + await ec.v1.artifacts.replace("test-value", {"from_version": 1}) assert exc_info.value.status == 401 async def test_artifacts_replace_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.artifacts.replace("test-value", {"artifact": "test-value", "from_version": 1}) + await ec.v1.artifacts.replace("test-value", {"from_version": 1}) assert exc_info.value.status == 403 async def test_artifacts_replace_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.artifacts.replace("test-value", {"artifact": "test-value", "from_version": 1}) + await ec.v1.artifacts.replace("test-value", {"from_version": 1}) assert exc_info.value.status == 404 async def test_artifacts_replace_error_409(): ec = _error_client(409) with pytest.raises(ApiError) as exc_info: - await ec.v1.artifacts.replace("test-value", {"artifact": "test-value", "from_version": 1}) + await ec.v1.artifacts.replace("test-value", {"from_version": 1}) assert exc_info.value.status == 409 async def test_artifacts_replace_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.artifacts.replace("test-value", {"artifact": "test-value", "from_version": 1}) + await ec.v1.artifacts.replace("test-value", {"from_version": 1}) assert exc_info.value.status == 422 async def test_artifacts_archive_success(): client = _client() - result = await client.v1.artifacts.archive("test-value", {"artifact": "test-value"}) + result = await client.v1.artifacts.archive("test-value") assert result is None async def test_artifacts_archive_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.artifacts.archive("test-value", {"artifact": "test-value"}) + await ec.v1.artifacts.archive("test-value") assert exc_info.value.status == 401 async def test_artifacts_archive_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.artifacts.archive("test-value", {"artifact": "test-value"}) + await ec.v1.artifacts.archive("test-value") assert exc_info.value.status == 403 async def test_artifacts_archive_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.artifacts.archive("test-value", {"artifact": "test-value"}) + await ec.v1.artifacts.archive("test-value") assert exc_info.value.status == 404 diff --git a/tests/contract/v1/test_automations.py b/tests/contract/v1/test_automations.py index 91cae1c..1db3769 100644 --- a/tests/contract/v1/test_automations.py +++ b/tests/contract/v1/test_automations.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 7586dd4e50cc +# Content hash: baf44e1e1e5c import pytest @@ -28,33 +28,33 @@ def _error_client(code: int) -> PlatformClient: async def test_automations_invoke_success(): client = _client() - result = await client.v1.automations.invoke("test-value", {"automation": "test-value"}) + result = await client.v1.automations.invoke("test-value", {}) assert result is not None async def test_automations_invoke_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.automations.invoke("test-value", {"automation": "test-value"}) + await ec.v1.automations.invoke("test-value", {}) assert exc_info.value.status == 401 async def test_automations_invoke_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.automations.invoke("test-value", {"automation": "test-value"}) + await ec.v1.automations.invoke("test-value", {}) assert exc_info.value.status == 403 async def test_automations_invoke_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.automations.invoke("test-value", {"automation": "test-value"}) + await ec.v1.automations.invoke("test-value", {}) assert exc_info.value.status == 404 async def test_automations_invoke_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.automations.invoke("test-value", {"automation": "test-value"}) + await ec.v1.automations.invoke("test-value", {}) assert exc_info.value.status == 422 diff --git a/tests/contract/v1/test_config.py b/tests/contract/v1/test_config.py index 462cdeb..070146f 100644 --- a/tests/contract/v1/test_config.py +++ b/tests/contract/v1/test_config.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: f97b2d7bdc4a +# Content hash: b189c489ea9d import pytest @@ -186,8 +186,7 @@ async def test_config_get_error_404(): async def test_config_replace_success(): client = _client() result = await client.v1.config.replace( - "test-value", - {"config": "test-value", "mime_type": "application/json", "raw_content": "test content"}, + "test-value", {"mime_type": "application/json", "raw_content": "test content"} ) assert result is not None @@ -196,12 +195,7 @@ async def test_config_replace_error_400(): ec = _error_client(400) with pytest.raises(ApiError) as exc_info: await ec.v1.config.replace( - "test-value", - { - "config": "test-value", - "mime_type": "application/json", - "raw_content": "test content", - }, + "test-value", {"mime_type": "application/json", "raw_content": "test content"} ) assert exc_info.value.status == 400 @@ -210,12 +204,7 @@ async def test_config_replace_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: await ec.v1.config.replace( - "test-value", - { - "config": "test-value", - "mime_type": "application/json", - "raw_content": "test content", - }, + "test-value", {"mime_type": "application/json", "raw_content": "test content"} ) assert exc_info.value.status == 401 @@ -224,12 +213,7 @@ async def test_config_replace_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: await ec.v1.config.replace( - "test-value", - { - "config": "test-value", - "mime_type": "application/json", - "raw_content": "test content", - }, + "test-value", {"mime_type": "application/json", "raw_content": "test content"} ) assert exc_info.value.status == 404 @@ -238,40 +222,35 @@ async def test_config_replace_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: await ec.v1.config.replace( - "test-value", - { - "config": "test-value", - "mime_type": "application/json", - "raw_content": "test content", - }, + "test-value", {"mime_type": "application/json", "raw_content": "test content"} ) assert exc_info.value.status == 422 async def test_config_archive_success(): client = _client() - result = await client.v1.config.archive("test-value", {"config": "test-value"}) + result = await client.v1.config.archive("test-value", {}) assert result is not None async def test_config_archive_error_400(): ec = _error_client(400) with pytest.raises(ApiError) as exc_info: - await ec.v1.config.archive("test-value", {"config": "test-value"}) + await ec.v1.config.archive("test-value", {}) assert exc_info.value.status == 400 async def test_config_archive_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.config.archive("test-value", {"config": "test-value"}) + await ec.v1.config.archive("test-value", {}) assert exc_info.value.status == 401 async def test_config_archive_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.config.archive("test-value", {"config": "test-value"}) + await ec.v1.config.archive("test-value", {}) assert exc_info.value.status == 404 @@ -305,28 +284,28 @@ async def test_config_content_error_404(): async def test_config_unarchive_success(): client = _client() - result = await client.v1.config.unarchive("test-value", {"config": "test-value"}) + result = await client.v1.config.unarchive("test-value", {}) assert result is not None async def test_config_unarchive_error_400(): ec = _error_client(400) with pytest.raises(ApiError) as exc_info: - await ec.v1.config.unarchive("test-value", {"config": "test-value"}) + await ec.v1.config.unarchive("test-value", {}) assert exc_info.value.status == 400 async def test_config_unarchive_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.config.unarchive("test-value", {"config": "test-value"}) + await ec.v1.config.unarchive("test-value", {}) assert exc_info.value.status == 401 async def test_config_unarchive_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.config.unarchive("test-value", {"config": "test-value"}) + await ec.v1.config.unarchive("test-value", {}) assert exc_info.value.status == 404 @@ -429,33 +408,33 @@ async def test_config_system_get_error_404(): async def test_config_system_clone_success(): client = _client() - result = await client.v1.config.system.clone("test-value", {"system": "test-value"}) + result = await client.v1.config.system.clone("test-value", {}) assert result is not None async def test_config_system_clone_error_400(): ec = _error_client(400) with pytest.raises(ApiError) as exc_info: - await ec.v1.config.system.clone("test-value", {"system": "test-value"}) + await ec.v1.config.system.clone("test-value", {}) assert exc_info.value.status == 400 async def test_config_system_clone_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.config.system.clone("test-value", {"system": "test-value"}) + await ec.v1.config.system.clone("test-value", {}) assert exc_info.value.status == 401 async def test_config_system_clone_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.config.system.clone("test-value", {"system": "test-value"}) + await ec.v1.config.system.clone("test-value", {}) assert exc_info.value.status == 404 async def test_config_system_clone_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.config.system.clone("test-value", {"system": "test-value"}) + await ec.v1.config.system.clone("test-value", {}) assert exc_info.value.status == 422 diff --git a/tests/contract/v1/test_custom_objects.py b/tests/contract/v1/test_custom_objects.py index c827dea..d3f3949 100644 --- a/tests/contract/v1/test_custom_objects.py +++ b/tests/contract/v1/test_custom_objects.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: a245f9200fe5 +# Content hash: 6b0e752eb1f4 import pytest @@ -68,28 +68,26 @@ async def test_custom_objects_get_error_404(): async def test_custom_objects_replace_success(): client = _client() - result = await client.v1.custom_objects.replace( - "test-value", {"fields": {}, "object": "test-value"} - ) + result = await client.v1.custom_objects.replace("test-value", {"fields": {}}) assert result is not None async def test_custom_objects_replace_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.custom_objects.replace("test-value", {"fields": {}, "object": "test-value"}) + await ec.v1.custom_objects.replace("test-value", {"fields": {}}) assert exc_info.value.status == 401 async def test_custom_objects_replace_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.custom_objects.replace("test-value", {"fields": {}, "object": "test-value"}) + await ec.v1.custom_objects.replace("test-value", {"fields": {}}) assert exc_info.value.status == 404 async def test_custom_objects_replace_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.custom_objects.replace("test-value", {"fields": {}, "object": "test-value"}) + await ec.v1.custom_objects.replace("test-value", {"fields": {}}) assert exc_info.value.status == 422 diff --git a/tests/contract/v1/test_invites.py b/tests/contract/v1/test_invites.py new file mode 100644 index 0000000..460ec82 --- /dev/null +++ b/tests/contract/v1/test_invites.py @@ -0,0 +1,74 @@ +# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. +# This file is auto-generated by @archastro/sdk-generator. Do not edit. +# Content hash: 3193c5471ba1 + +import pytest + +from archastro.platform import PlatformClient +from archastro.platform.runtime.http_client import ApiError + +PRISM_URL = "http://127.0.0.1:4040" + + +def _client() -> PlatformClient: + return PlatformClient( + base_url=PRISM_URL, + default_headers={"x-archastro-api-key": "pk_test-key"}, + access_token="test-token", + ) + + +def _error_client(code: int) -> PlatformClient: + return PlatformClient( + base_url=PRISM_URL, + default_headers={"x-archastro-api-key": "pk_test-key", "Prefer": f"code={code}"}, + access_token="test-token", + ) + + +async def test_invites_accept_success(): + client = _client() + result = await client.v1.invites.accept({"key": "test-key"}) + assert result is not None + + +async def test_invites_accept_error_401(): + ec = _error_client(401) + with pytest.raises(ApiError) as exc_info: + await ec.v1.invites.accept({"key": "test-key"}) + assert exc_info.value.status == 401 + + +async def test_invites_accept_error_403(): + ec = _error_client(403) + with pytest.raises(ApiError) as exc_info: + await ec.v1.invites.accept({"key": "test-key"}) + assert exc_info.value.status == 403 + + +async def test_invites_accept_error_404(): + ec = _error_client(404) + with pytest.raises(ApiError) as exc_info: + await ec.v1.invites.accept({"key": "test-key"}) + assert exc_info.value.status == 404 + + +async def test_invites_accept_error_409(): + ec = _error_client(409) + with pytest.raises(ApiError) as exc_info: + await ec.v1.invites.accept({"key": "test-key"}) + assert exc_info.value.status == 409 + + +async def test_invites_accept_error_422(): + ec = _error_client(422) + with pytest.raises(ApiError) as exc_info: + await ec.v1.invites.accept({"key": "test-key"}) + assert exc_info.value.status == 422 + + +async def test_invites_accept_error_429(): + ec = _error_client(429) + with pytest.raises(ApiError) as exc_info: + await ec.v1.invites.accept({"key": "test-key"}) + assert exc_info.value.status == 429 diff --git a/tests/contract/v1/test_kv.py b/tests/contract/v1/test_kv.py index 27a785b..83226b3 100644 --- a/tests/contract/v1/test_kv.py +++ b/tests/contract/v1/test_kv.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: dbb888c6a01c +# Content hash: bb54dd6c40ce import pytest @@ -32,6 +32,13 @@ async def test_kv_list_success(): assert result is not None +async def test_kv_list_error_400(): + ec = _error_client(400) + with pytest.raises(ApiError) as exc_info: + await ec.v1.kv.list() + assert exc_info.value.status == 400 + + async def test_kv_list_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: @@ -39,6 +46,13 @@ async def test_kv_list_error_401(): assert exc_info.value.status == 401 +async def test_kv_list_error_403(): + ec = _error_client(403) + with pytest.raises(ApiError) as exc_info: + await ec.v1.kv.list() + assert exc_info.value.status == 403 + + async def test_kv_create_success(): client = _client() result = await client.v1.kv.create({"key": "test-key", "value": "test-value"}) @@ -59,6 +73,20 @@ async def test_kv_create_error_401(): assert exc_info.value.status == 401 +async def test_kv_create_error_403(): + ec = _error_client(403) + with pytest.raises(ApiError) as exc_info: + await ec.v1.kv.create({"key": "test-key", "value": "test-value"}) + assert exc_info.value.status == 403 + + +async def test_kv_create_error_404(): + ec = _error_client(404) + with pytest.raises(ApiError) as exc_info: + await ec.v1.kv.create({"key": "test-key", "value": "test-value"}) + assert exc_info.value.status == 404 + + async def test_kv_create_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: @@ -86,6 +114,13 @@ async def test_kv_delete_error_401(): assert exc_info.value.status == 401 +async def test_kv_delete_error_403(): + ec = _error_client(403) + with pytest.raises(ApiError) as exc_info: + await ec.v1.kv.delete("test-key") + assert exc_info.value.status == 403 + + async def test_kv_delete_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: @@ -113,6 +148,13 @@ async def test_kv_get_error_401(): assert exc_info.value.status == 401 +async def test_kv_get_error_403(): + ec = _error_client(403) + with pytest.raises(ApiError) as exc_info: + await ec.v1.kv.get("test-key") + assert exc_info.value.status == 403 + + async def test_kv_get_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: @@ -140,6 +182,20 @@ async def test_kv_upsert_error_401(): assert exc_info.value.status == 401 +async def test_kv_upsert_error_403(): + ec = _error_client(403) + with pytest.raises(ApiError) as exc_info: + await ec.v1.kv.upsert("test-key", {"value": "test-value"}) + assert exc_info.value.status == 403 + + +async def test_kv_upsert_error_404(): + ec = _error_client(404) + with pytest.raises(ApiError) as exc_info: + await ec.v1.kv.upsert("test-key", {"value": "test-value"}) + assert exc_info.value.status == 404 + + async def test_kv_upsert_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: diff --git a/tests/contract/v1/test_teams.py b/tests/contract/v1/test_teams.py index 66aad1e..e562b66 100644 --- a/tests/contract/v1/test_teams.py +++ b/tests/contract/v1/test_teams.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 2ca47dd776e0 +# Content hash: a34e19ee35f6 import pytest @@ -165,116 +165,116 @@ async def test_teams_get_error_404(): async def test_teams_update_success(): client = _client() - result = await client.v1.teams.update("test-value", {"team": "test-value"}) + result = await client.v1.teams.update("test-value", {}) assert result is not None async def test_teams_update_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.update("test-value", {"team": "test-value"}) + await ec.v1.teams.update("test-value", {}) assert exc_info.value.status == 401 async def test_teams_update_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.update("test-value", {"team": "test-value"}) + await ec.v1.teams.update("test-value", {}) assert exc_info.value.status == 403 async def test_teams_update_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.update("test-value", {"team": "test-value"}) + await ec.v1.teams.update("test-value", {}) assert exc_info.value.status == 404 async def test_teams_update_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.update("test-value", {"team": "test-value"}) + await ec.v1.teams.update("test-value", {}) assert exc_info.value.status == 422 async def test_teams_invite_success(): client = _client() - result = await client.v1.teams.invite("test-value", {"team": "test-value"}) + result = await client.v1.teams.invite("test-value") assert result is not None async def test_teams_invite_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.invite("test-value", {"team": "test-value"}) + await ec.v1.teams.invite("test-value") assert exc_info.value.status == 401 async def test_teams_invite_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.invite("test-value", {"team": "test-value"}) + await ec.v1.teams.invite("test-value") assert exc_info.value.status == 403 async def test_teams_invite_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.invite("test-value", {"team": "test-value"}) + await ec.v1.teams.invite("test-value") assert exc_info.value.status == 404 async def test_teams_invites_success(): client = _client() - result = await client.v1.teams.invites("test-value", {"team": "test-value"}) + result = await client.v1.teams.invites("test-value") assert result is not None async def test_teams_invites_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.invites("test-value", {"team": "test-value"}) + await ec.v1.teams.invites("test-value") assert exc_info.value.status == 401 async def test_teams_invites_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.invites("test-value", {"team": "test-value"}) + await ec.v1.teams.invites("test-value") assert exc_info.value.status == 404 async def test_teams_join_success(): client = _client() - result = await client.v1.teams.join("test-value", {"team": "test-value"}) + result = await client.v1.teams.join("test-value", {}) assert result is None async def test_teams_join_error_400(): ec = _error_client(400) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.join("test-value", {"team": "test-value"}) + await ec.v1.teams.join("test-value", {}) assert exc_info.value.status == 400 async def test_teams_join_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.join("test-value", {"team": "test-value"}) + await ec.v1.teams.join("test-value", {}) assert exc_info.value.status == 401 async def test_teams_join_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.join("test-value", {"team": "test-value"}) + await ec.v1.teams.join("test-value", {}) assert exc_info.value.status == 403 async def test_teams_join_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.join("test-value", {"team": "test-value"}) + await ec.v1.teams.join("test-value", {}) assert exc_info.value.status == 404 @@ -386,7 +386,7 @@ async def test_teams_custom_objects_list_error_404(): async def test_teams_custom_objects_create_success(): client = _client() result = await client.v1.teams.custom_objects.create( - "test-value", {"fields": {}, "team": "test-value", "type": "test"} + "test-value", {"fields": {}, "type": "test"} ) assert result is not None @@ -394,27 +394,21 @@ async def test_teams_custom_objects_create_success(): async def test_teams_custom_objects_create_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.custom_objects.create( - "test-value", {"fields": {}, "team": "test-value", "type": "test"} - ) + await ec.v1.teams.custom_objects.create("test-value", {"fields": {}, "type": "test"}) assert exc_info.value.status == 401 async def test_teams_custom_objects_create_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.custom_objects.create( - "test-value", {"fields": {}, "team": "test-value", "type": "test"} - ) + await ec.v1.teams.custom_objects.create("test-value", {"fields": {}, "type": "test"}) assert exc_info.value.status == 404 async def test_teams_custom_objects_create_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.custom_objects.create( - "test-value", {"fields": {}, "team": "test-value", "type": "test"} - ) + await ec.v1.teams.custom_objects.create("test-value", {"fields": {}, "type": "test"}) assert exc_info.value.status == 422 @@ -442,28 +436,28 @@ async def test_teams_members_list_error_404(): async def test_teams_members_create_success(): client = _client() - result = await client.v1.teams.members.create("test-value", {"team": "test-value"}) + result = await client.v1.teams.members.create("test-value", {}) assert result is not None async def test_teams_members_create_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.members.create("test-value", {"team": "test-value"}) + await ec.v1.teams.members.create("test-value", {}) assert exc_info.value.status == 401 async def test_teams_members_create_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.members.create("test-value", {"team": "test-value"}) + await ec.v1.teams.members.create("test-value", {}) assert exc_info.value.status == 404 async def test_teams_members_create_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.members.create("test-value", {"team": "test-value"}) + await ec.v1.teams.members.create("test-value", {}) assert exc_info.value.status == 422 @@ -491,28 +485,26 @@ async def test_teams_threads_list_error_404(): async def test_teams_threads_create_success(): client = _client() - result = await client.v1.teams.threads.create( - "test-value", {"team": "test-value", "thread": {}} - ) + result = await client.v1.teams.threads.create("test-value", {"thread": {}}) assert result is not None async def test_teams_threads_create_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.threads.create("test-value", {"team": "test-value", "thread": {}}) + await ec.v1.teams.threads.create("test-value", {"thread": {}}) assert exc_info.value.status == 401 async def test_teams_threads_create_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.threads.create("test-value", {"team": "test-value", "thread": {}}) + await ec.v1.teams.threads.create("test-value", {"thread": {}}) assert exc_info.value.status == 404 async def test_teams_threads_create_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.teams.threads.create("test-value", {"team": "test-value", "thread": {}}) + await ec.v1.teams.threads.create("test-value", {"thread": {}}) assert exc_info.value.status == 422 diff --git a/tests/contract/v1/test_thread_messages.py b/tests/contract/v1/test_thread_messages.py index db5a9e2..f96de26 100644 --- a/tests/contract/v1/test_thread_messages.py +++ b/tests/contract/v1/test_thread_messages.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 2f46f00d5937 +# Content hash: 1d9e830fc739 import pytest @@ -62,35 +62,35 @@ async def test_thread_messages_delete_error_422(): async def test_thread_messages_replace_success(): client = _client() - result = await client.v1.thread_messages.replace("test-value", {"message": "test-value"}) + result = await client.v1.thread_messages.replace("test-value", {}) assert result is not None async def test_thread_messages_replace_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.thread_messages.replace("test-value", {"message": "test-value"}) + await ec.v1.thread_messages.replace("test-value", {}) assert exc_info.value.status == 401 async def test_thread_messages_replace_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.thread_messages.replace("test-value", {"message": "test-value"}) + await ec.v1.thread_messages.replace("test-value", {}) assert exc_info.value.status == 403 async def test_thread_messages_replace_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.thread_messages.replace("test-value", {"message": "test-value"}) + await ec.v1.thread_messages.replace("test-value", {}) assert exc_info.value.status == 404 async def test_thread_messages_replace_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.thread_messages.replace("test-value", {"message": "test-value"}) + await ec.v1.thread_messages.replace("test-value", {}) assert exc_info.value.status == 422 @@ -164,43 +164,33 @@ async def test_thread_messages_reactions_remove_error_422(): async def test_thread_messages_reactions_create_success(): client = _client() - result = await client.v1.thread_messages.reactions.create( - "test-value", {"emoji": "test-value", "message": "test-value"} - ) + result = await client.v1.thread_messages.reactions.create("test-value", {"emoji": "test-value"}) assert result is not None async def test_thread_messages_reactions_create_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.thread_messages.reactions.create( - "test-value", {"emoji": "test-value", "message": "test-value"} - ) + await ec.v1.thread_messages.reactions.create("test-value", {"emoji": "test-value"}) assert exc_info.value.status == 401 async def test_thread_messages_reactions_create_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.thread_messages.reactions.create( - "test-value", {"emoji": "test-value", "message": "test-value"} - ) + await ec.v1.thread_messages.reactions.create("test-value", {"emoji": "test-value"}) assert exc_info.value.status == 403 async def test_thread_messages_reactions_create_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.thread_messages.reactions.create( - "test-value", {"emoji": "test-value", "message": "test-value"} - ) + await ec.v1.thread_messages.reactions.create("test-value", {"emoji": "test-value"}) assert exc_info.value.status == 404 async def test_thread_messages_reactions_create_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.thread_messages.reactions.create( - "test-value", {"emoji": "test-value", "message": "test-value"} - ) + await ec.v1.thread_messages.reactions.create("test-value", {"emoji": "test-value"}) assert exc_info.value.status == 422 diff --git a/tests/contract/v1/test_threads.py b/tests/contract/v1/test_threads.py index 402f736..b5f80be 100644 --- a/tests/contract/v1/test_threads.py +++ b/tests/contract/v1/test_threads.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 497234290bcd +# Content hash: c11071041bcb import pytest @@ -82,35 +82,35 @@ async def test_threads_get_error_404(): async def test_threads_replace_success(): client = _client() - result = await client.v1.threads.replace("test-value", {"thread": "test-value"}) + result = await client.v1.threads.replace("test-value", {}) assert result is not None async def test_threads_replace_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.replace("test-value", {"thread": "test-value"}) + await ec.v1.threads.replace("test-value", {}) assert exc_info.value.status == 401 async def test_threads_replace_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.replace("test-value", {"thread": "test-value"}) + await ec.v1.threads.replace("test-value", {}) assert exc_info.value.status == 403 async def test_threads_replace_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.replace("test-value", {"thread": "test-value"}) + await ec.v1.threads.replace("test-value", {}) assert exc_info.value.status == 404 async def test_threads_replace_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.replace("test-value", {"thread": "test-value"}) + await ec.v1.threads.replace("test-value", {}) assert exc_info.value.status == 422 @@ -174,28 +174,28 @@ async def test_threads_artifacts_error_404(): async def test_threads_mark_read_success(): client = _client() - result = await client.v1.threads.mark_read("test-value", {"thread": "test-value"}) + result = await client.v1.threads.mark_read("test-value", {}) assert result is None async def test_threads_mark_read_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.mark_read("test-value", {"thread": "test-value"}) + await ec.v1.threads.mark_read("test-value", {}) assert exc_info.value.status == 401 async def test_threads_mark_read_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.mark_read("test-value", {"thread": "test-value"}) + await ec.v1.threads.mark_read("test-value", {}) assert exc_info.value.status == 404 async def test_threads_mark_read_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.mark_read("test-value", {"thread": "test-value"}) + await ec.v1.threads.mark_read("test-value", {}) assert exc_info.value.status == 422 @@ -235,8 +235,7 @@ async def test_threads_picture_success(): "data": "test-value", "filename": "test-value", "mime_type": "application/json", - }, - "thread": "test-value", + } }, ) assert result is not None @@ -252,8 +251,7 @@ async def test_threads_picture_error_401(): "data": "test-value", "filename": "test-value", "mime_type": "application/json", - }, - "thread": "test-value", + } }, ) assert exc_info.value.status == 401 @@ -269,8 +267,7 @@ async def test_threads_picture_error_403(): "data": "test-value", "filename": "test-value", "mime_type": "application/json", - }, - "thread": "test-value", + } }, ) assert exc_info.value.status == 403 @@ -286,8 +283,7 @@ async def test_threads_picture_error_404(): "data": "test-value", "filename": "test-value", "mime_type": "application/json", - }, - "thread": "test-value", + } }, ) assert exc_info.value.status == 404 @@ -303,8 +299,7 @@ async def test_threads_picture_error_422(): "data": "test-value", "filename": "test-value", "mime_type": "application/json", - }, - "thread": "test-value", + } }, ) assert exc_info.value.status == 422 @@ -424,30 +419,28 @@ async def test_threads_members_list_error_404(): async def test_threads_members_create_success(): client = _client() - result = await client.v1.threads.members.create( - "test-value", {"thread": "test-value", "type": "test"} - ) + result = await client.v1.threads.members.create("test-value", {"type": "test"}) assert result is not None async def test_threads_members_create_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.members.create("test-value", {"thread": "test-value", "type": "test"}) + await ec.v1.threads.members.create("test-value", {"type": "test"}) assert exc_info.value.status == 401 async def test_threads_members_create_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.members.create("test-value", {"thread": "test-value", "type": "test"}) + await ec.v1.threads.members.create("test-value", {"type": "test"}) assert exc_info.value.status == 404 async def test_threads_members_create_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.members.create("test-value", {"thread": "test-value", "type": "test"}) + await ec.v1.threads.members.create("test-value", {"type": "test"}) assert exc_info.value.status == 422 @@ -480,35 +473,33 @@ async def test_threads_settings_list_error_404(): async def test_threads_settings_replace_success(): client = _client() - result = await client.v1.threads.settings.replace( - "test-value", {"settings": {}, "thread": "test-value"} - ) + result = await client.v1.threads.settings.replace("test-value", {"settings": {}}) assert result is not None async def test_threads_settings_replace_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.settings.replace("test-value", {"settings": {}, "thread": "test-value"}) + await ec.v1.threads.settings.replace("test-value", {"settings": {}}) assert exc_info.value.status == 401 async def test_threads_settings_replace_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.settings.replace("test-value", {"settings": {}, "thread": "test-value"}) + await ec.v1.threads.settings.replace("test-value", {"settings": {}}) assert exc_info.value.status == 403 async def test_threads_settings_replace_error_404(): ec = _error_client(404) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.settings.replace("test-value", {"settings": {}, "thread": "test-value"}) + await ec.v1.threads.settings.replace("test-value", {"settings": {}}) assert exc_info.value.status == 404 async def test_threads_settings_replace_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.threads.settings.replace("test-value", {"settings": {}, "thread": "test-value"}) + await ec.v1.threads.settings.replace("test-value", {"settings": {}}) assert exc_info.value.status == 422 diff --git a/tests/contract/v1/test_users.py b/tests/contract/v1/test_users.py index fd79bbb..1b4bc5d 100644 --- a/tests/contract/v1/test_users.py +++ b/tests/contract/v1/test_users.py @@ -1,6 +1,6 @@ # Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. # This file is auto-generated by @archastro/sdk-generator. Do not edit. -# Content hash: 20b2d53d4c4f +# Content hash: d908db9b9d4b import pytest @@ -59,6 +59,47 @@ async def test_users_get_error_403(): assert exc_info.value.status == 403 +async def test_users_invites_success(): + client = _client() + result = await client.v1.users.invites("test-value", {"invite": {}}) + assert result is not None + + +async def test_users_invites_error_401(): + ec = _error_client(401) + with pytest.raises(ApiError) as exc_info: + await ec.v1.users.invites("test-value", {"invite": {}}) + assert exc_info.value.status == 401 + + +async def test_users_invites_error_403(): + ec = _error_client(403) + with pytest.raises(ApiError) as exc_info: + await ec.v1.users.invites("test-value", {"invite": {}}) + assert exc_info.value.status == 403 + + +async def test_users_invites_error_404(): + ec = _error_client(404) + with pytest.raises(ApiError) as exc_info: + await ec.v1.users.invites("test-value", {"invite": {}}) + assert exc_info.value.status == 404 + + +async def test_users_invites_error_409(): + ec = _error_client(409) + with pytest.raises(ApiError) as exc_info: + await ec.v1.users.invites("test-value", {"invite": {}}) + assert exc_info.value.status == 409 + + +async def test_users_invites_error_422(): + ec = _error_client(422) + with pytest.raises(ApiError) as exc_info: + await ec.v1.users.invites("test-value", {"invite": {}}) + assert exc_info.value.status == 422 + + async def test_users_orgs_success(): client = _client() result = await client.v1.users.orgs("test-value") @@ -76,21 +117,21 @@ async def test_users_orgs_error_401(): async def test_users_profile_success(): client = _client() - result = await client.v1.users.profile("test-value", {"user": "test-value"}) + result = await client.v1.users.profile("test-value", {}) assert result is not None async def test_users_profile_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.users.profile("test-value", {"user": "test-value"}) + await ec.v1.users.profile("test-value", {}) assert exc_info.value.status == 401 async def test_users_profile_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.users.profile("test-value", {"user": "test-value"}) + await ec.v1.users.profile("test-value", {}) assert exc_info.value.status == 422 @@ -167,28 +208,26 @@ async def test_users_threads_list_error_403(): async def test_users_threads_create_success(): client = _client() - result = await client.v1.users.threads.create( - "test-value", {"thread": {}, "user": "test-value"} - ) + result = await client.v1.users.threads.create("test-value", {"thread": {}}) assert result is not None async def test_users_threads_create_error_401(): ec = _error_client(401) with pytest.raises(ApiError) as exc_info: - await ec.v1.users.threads.create("test-value", {"thread": {}, "user": "test-value"}) + await ec.v1.users.threads.create("test-value", {"thread": {}}) assert exc_info.value.status == 401 async def test_users_threads_create_error_403(): ec = _error_client(403) with pytest.raises(ApiError) as exc_info: - await ec.v1.users.threads.create("test-value", {"thread": {}, "user": "test-value"}) + await ec.v1.users.threads.create("test-value", {"thread": {}}) assert exc_info.value.status == 403 async def test_users_threads_create_error_422(): ec = _error_client(422) with pytest.raises(ApiError) as exc_info: - await ec.v1.users.threads.create("test-value", {"thread": {}, "user": "test-value"}) + await ec.v1.users.threads.create("test-value", {"thread": {}}) assert exc_info.value.status == 422 diff --git a/tests/harness/test_harness.py b/tests/harness/test_harness.py index c744bcb..f63db3f 100644 --- a/tests/harness/test_harness.py +++ b/tests/harness/test_harness.py @@ -1,7 +1,7 @@ """ Smoke tests that drive the channel-harness service from the Python side. -Uses raw ``phx_channel.Socket`` + ``HarnessServiceClient`` — no generated +Uses raw ``archastro.phx_channel.Socket`` + ``HarnessServiceClient`` — no generated channel class involved. If these pass, the service's wire contract and the Python runtime's reply/push handling are both sound, which is the prerequisite for the emitted per-channel tests (added in a separate file by the generator). @@ -17,8 +17,8 @@ import pytest -from phx_channel import HarnessServiceClient, Socket -from phx_channel.channel import ChannelError +from archastro.phx_channel import HarnessServiceClient, Socket +from archastro.phx_channel.channel import ChannelError @pytest.fixture diff --git a/uv.lock b/uv.lock index 6340598..52616c9 100644 --- a/uv.lock +++ b/uv.lock @@ -34,6 +34,13 @@ dependencies = [ { name = "websockets" }, ] +[package.optional-dependencies] +dev = [ + { name = "pytest" }, + { name = "pytest-asyncio" }, + { name = "ruff" }, +] + [package.dev-dependencies] dev = [ { name = "pytest" }, @@ -45,8 +52,12 @@ dev = [ requires-dist = [ { name = "httpx", specifier = ">=0.27" }, { name = "pydantic", specifier = ">=2.0" }, + { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0" }, + { name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.24" }, + { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.11" }, { name = "websockets", specifier = ">=13.0" }, ] +provides-extras = ["dev"] [package.metadata.requires-dev] dev = [