Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
162 changes: 156 additions & 6 deletions openapi.json
Original file line numberDiff line numberDiff line change
Expand Up@@ -1668,7 +1668,22 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Browser"
"oneOf": [
{
"$ref": "#/components/schemas/Browser"
},
{
"$ref": "#/components/schemas/Desktop"
}
],
"discriminator": {
"propertyName": "kind",
"mapping": {
"web": "#/components/schemas/Browser",
"desktop": "#/components/schemas/Desktop"
}
},
"title": "Create"
}
}
}
Expand DownExpand Up@@ -1920,7 +1935,22 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Browser"
"oneOf": [
{
"$ref": "#/components/schemas/Browser"
},
{
"$ref": "#/components/schemas/Desktop"
}
],
"discriminator": {
"propertyName": "kind",
"mapping": {
"web": "#/components/schemas/Browser",
"desktop": "#/components/schemas/Desktop"
}
},
"title": "Update"
}
}
}
Expand DownExpand Up@@ -4550,6 +4580,16 @@
"title": "Kind",
"default": "web"
},
"host": {
"type": "string",
"enum": [
"user_device",
"cloud"
],
"title": "Host",
"description": "Where the browser runs: 'cloud' on H Company infrastructure, or 'user_device' on your own machine.",
"default": "cloud"
},
"start_url": {
"type": "string",
"title": "Start Url",
Expand All@@ -4562,6 +4602,18 @@
"description": "Run the browser without a visible window.",
"default": false
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id",
"description": "Connect to an existing browser session by id instead of starting a new one."
},
"mode": {
"oneOf": [
{
Expand DownExpand Up@@ -4592,7 +4644,7 @@
}
],
"title": "Vault Id",
"description": "Id of a vault config to bind to this browser, letting the agent sign in to sites with secrets resolved from the vault. The vault must belong to the caller's organization. Omit to run without secret access."
"description": "Id of a vault config to bind to this browser, letting the agent sign in to sites with secrets resolved from the vault. The vault must belong to the caller's organization. Only supported on cloud-hosted browsers. Omit to run without secret access."
},
"browser_profile_id": {
"anyOf": [
Expand All@@ -4605,7 +4657,13 @@
}
],
"title": "Browser Profile Id",
"description": "Id of a browser profile to load into this browser, restoring saved cookies and storage state from a prior session. The profile must belong to the caller's organization. Omit to run with a fresh profile."
"description": "Id of a browser profile to load into this browser, restoring saved cookies and storage state from a prior session. The profile must belong to the caller's organization. Only supported on cloud-hosted browsers. Omit to run with a fresh profile."
},
"persist_browser_profile": {
"type": "boolean",
"title": "Persist Browser Profile",
"description": "When true, the browser profile is updated with this session's final browser state (cookies, storage) when the session ends. Requires browser_profile_id. Only one active session at a time may persist a given profile; concurrent read-only use is always allowed.",
"default": false
},
"network": {
"anyOf": [
Expand DownExpand Up@@ -5013,13 +5071,68 @@
"title": "CronTiming",
"description": "Cron cadence evaluated in an IANA timezone."
},
"Desktop": {
"properties": {
"id": {
"type": "string",
"minLength": 1,
"title": "Id",
"description": "Catalog identifier for this environment."
},
"kind": {
"type": "string",
"const": "desktop",
"title": "Kind",
"default": "desktop"
},
"host": {
"type": "string",
"title": "Host",
"const": "user_device"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id",
"description": "Connect to an existing desktop session by id instead of starting a new one."
}
},
"type": "object",
"required": [
"id",
"host"
],
"title": "Desktop",
"description": "A desktop the agent controls via mouse, keyboard, and screenshots."
},
"Environment": {
"$ref": "#/components/schemas/Browser"
"oneOf": [
{
"$ref": "#/components/schemas/Browser"
},
{
"$ref": "#/components/schemas/Desktop"
}
],
"discriminator": {
"propertyName": "kind",
"mapping": {
"desktop": "#/components/schemas/Desktop",
"web": "#/components/schemas/Browser"
}
}
},
"EnvironmentKind": {
"type": "string",
"enum": [
"web"
"web",
"desktop"
],
"title": "EnvironmentKind",
"description": "Environment family."
Expand DownExpand Up@@ -5937,6 +6050,21 @@
},
"PatchEnvironment": {
"properties": {
"host": {
"anyOf": [
{
"type": "string",
"enum": [
"user_device",
"cloud"
]
},
{
"type": "null"
}
],
"title": "Host"
},
"start_url": {
"anyOf": [
{
Expand All@@ -5959,6 +6087,17 @@
],
"title": "Headless"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id"
},
"mode": {
"anyOf": [
{
Expand DownExpand Up@@ -6008,6 +6147,17 @@
],
"title": "Browser Profile Id"
},
"persist_browser_profile": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Persist Browser Profile"
},
"network": {
"anyOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "hai-agents"
version = "1.0.5"
version = "1.0.6"
description = "Python SDK for H Company's Computer-Use Agents: autonomous agents powered by Holo."
requires-python = ">=3.10"
readme = "README.md"
Expand Down
39 changes: 36 additions & 3 deletions src/hai_agents/__init__.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,7 +37,7 @@
AnswerEventAnswer,
AnswerOutcome,
Browser,
BrowserKind,
BrowserHost,
BrowserMode,
BrowserMode_Text,
BrowserMode_Visual,
Expand All@@ -48,9 +48,13 @@
BrowserVisualMode,
CronTiming,
CronTimingType,
Desktop,
DesktopHost,
Environment,
EnvironmentKind,
EnvironmentPage,
Environment_Desktop,
Environment_Web,
ErrorEvent,
ErrorEventKind,
Feedback,
Expand DownExpand Up@@ -154,10 +158,17 @@
from .client import AsyncClient, Client
from .environment import HaiAgentsEnvironment
from .environments import (
CreateEnvironmentRequest,
CreateEnvironmentRequest_Desktop,
CreateEnvironmentRequest_Web,
ListEnvironmentsRequestSortItem,
PatchEnvironmentHost,
PatchEnvironmentMode,
PatchEnvironmentMode_Text,
PatchEnvironmentMode_Visual,
UpdateEnvironmentRequestBody,
UpdateEnvironmentRequestBody_Desktop,
UpdateEnvironmentRequestBody_Web,
)
from .polling import (
AnswerValidationError,
Expand DownExpand Up@@ -225,7 +236,7 @@
"AsyncClient": ".client",
"AsyncSessionHandle": ".polling",
"Browser": ".types",
"BrowserKind": ".types",
"BrowserHost": ".types",
"BrowserMode": ".types",
"BrowserMode_Text": ".types",
"BrowserMode_Visual": ".types",
Expand All@@ -235,13 +246,20 @@
"BrowserTextMode": ".types",
"BrowserVisualMode": ".types",
"Client": ".client",
"CreateEnvironmentRequest": ".environments",
"CreateEnvironmentRequest_Desktop": ".environments",
"CreateEnvironmentRequest_Web": ".environments",
"CronTiming": ".types",
"CronTimingType": ".types",
"DefaultAioHttpClient": "._default_clients",
"DefaultAsyncHttpxClient": "._default_clients",
"Desktop": ".types",
"DesktopHost": ".types",
"Environment": ".types",
"EnvironmentKind": ".types",
"EnvironmentPage": ".types",
"Environment_Desktop": ".types",
"Environment_Web": ".types",
"ErrorEvent": ".types",
"ErrorEventKind": ".types",
"Feedback": ".types",
Expand DownExpand Up@@ -286,6 +304,7 @@
"PatchAgentEnvironmentsItem": ".agents",
"PatchAgentSkillsItem": ".agents",
"PatchAgentSubagentsItem": ".agents",
"PatchEnvironmentHost": ".environments",
"PatchEnvironmentMode": ".environments",
"PatchEnvironmentMode_Text": ".environments",
"PatchEnvironmentMode_Visual": ".environments",
Expand DownExpand Up@@ -346,6 +365,9 @@
"TrajectoryEvent": ".types",
"TrajectoryStatus": ".types",
"UnprocessableEntityError": ".errors",
"UpdateEnvironmentRequestBody": ".environments",
"UpdateEnvironmentRequestBody_Desktop": ".environments",
"UpdateEnvironmentRequestBody_Web": ".environments",
"UserMessageBatch": ".types",
"UserMessageEvent": ".types",
"UserMessageEventType": ".types",
Expand DownExpand Up@@ -442,7 +464,7 @@ def __dir__():
"AsyncClient",
"AsyncSessionHandle",
"Browser",
"BrowserKind",
"BrowserHost",
"BrowserMode",
"BrowserMode_Text",
"BrowserMode_Visual",
Expand All@@ -452,13 +474,20 @@ def __dir__():
"BrowserTextMode",
"BrowserVisualMode",
"Client",
"CreateEnvironmentRequest",
"CreateEnvironmentRequest_Desktop",
"CreateEnvironmentRequest_Web",
"CronTiming",
"CronTimingType",
"DefaultAioHttpClient",
"DefaultAsyncHttpxClient",
"Desktop",
"DesktopHost",
"Environment",
"EnvironmentKind",
"EnvironmentPage",
"Environment_Desktop",
"Environment_Web",
"ErrorEvent",
"ErrorEventKind",
"Feedback",
Expand DownExpand Up@@ -503,6 +532,7 @@ def __dir__():
"PatchAgentEnvironmentsItem",
"PatchAgentSkillsItem",
"PatchAgentSubagentsItem",
"PatchEnvironmentHost",
"PatchEnvironmentMode",
"PatchEnvironmentMode_Text",
"PatchEnvironmentMode_Visual",
Expand DownExpand Up@@ -563,6 +593,9 @@ def __dir__():
"TrajectoryEvent",
"TrajectoryStatus",
"UnprocessableEntityError",
"UpdateEnvironmentRequestBody",
"UpdateEnvironmentRequestBody_Desktop",
"UpdateEnvironmentRequestBody_Web",
"UserMessageBatch",
"UserMessageEvent",
"UserMessageEventType",
Expand Down
Loading
Loading