Repository navigation
Add Hosted Agents /v2/agents OpenAPI (full harness surface) #1233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SSharma-10
wants to merge
13
commits into
main
Choose a base branch
from
ohs-v2-agents-openapi
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
8695354
Add Hosted Agents /v2/agents OpenAPI surface from harness swagger.
SSharma-10 d905e50
Fix Hosted Agents OpenAPI gaps vs harness swagger.
SSharma-10 b1724af
Rename Hosted Agents OpenAPI copy to Environment terminology
SSharma-10 6410a97
Align Harness Runtime OpenAPI tag with product docs
SSharma-10 91f9b1c
Make CreateSession/ValidatePolicy codegen-safe for pydo.
SSharma-10 d427307
emove x-content-schemas refs that break bundled Spectral lint
SSharma-10 ed53336
Rename Harness Runtime operationIds to harness_* for pydo codegen
SSharma-10 b4688c5
addressed comments
SSharma-10 96c692d
Fix Hosted Agents scopes and Insights fields
SSharma-10 cad8aeb
Update sandbox_size structure (#1237)
fumblehool 95f358e
Merge branch 'main' into ohs-v2-agents-openapi
SSharma-10 60c6422
Merge branch 'main' into ohs-v2-agents-openapi
anup-deka 439d1e7
Merge branch 'main' into ohs-v2-agents-openapi
gane5hvarma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
specification/resources/agents/agents_cancel_session_workspace_transfer.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| operationId: harness_cancel_session_workspace_transfer | ||
| summary: Cancel a staged workspace transfer. | ||
| description: 'Aborts an in-flight transfer. Idempotent: cancelling an already-terminal transfer returns | ||
| `aborted: false` with the current status. The request body is optional.' | ||
| tags: | ||
| - Harness Runtime | ||
| parameters: | ||
| - in: path | ||
| name: session_id | ||
| required: true | ||
| description: The session UUID. | ||
| schema: | ||
| type: string | ||
| example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 | ||
| example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 | ||
| - in: path | ||
| name: transfer_id | ||
| required: true | ||
| description: The workspace transfer identifier. | ||
| schema: | ||
| type: string | ||
| example: tr_example | ||
| example: tr_example | ||
| requestBody: | ||
| required: false | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| properties: | ||
| reason: | ||
| type: string | ||
| description: Optional caller-visible audit/debug context. | ||
| example: example | ||
| responses: | ||
| '200': | ||
| description: Cancel processed. | ||
| headers: &id001 | ||
| ratelimit-limit: | ||
| $ref: ../../shared/headers.yml#/ratelimit-limit | ||
| ratelimit-remaining: | ||
| $ref: ../../shared/headers.yml#/ratelimit-remaining | ||
| ratelimit-reset: | ||
| $ref: ../../shared/headers.yml#/ratelimit-reset | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/workspace_transfer_cancelled | ||
| '401': | ||
| $ref: ../../shared/responses/unauthorized.yml | ||
| '404': | ||
| $ref: ../../shared/responses/not_found.yml | ||
| '501': | ||
| description: Cancel is not supported by the active sandbox driver. | ||
| headers: *id001 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/error | ||
| '423': | ||
| description: This session is unavailable; contact support. | ||
| headers: *id001 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/error | ||
| '429': | ||
| $ref: ../../shared/responses/too_many_requests.yml | ||
| '500': | ||
| $ref: ../../shared/responses/server_error.yml | ||
| default: | ||
| $ref: ../../shared/responses/unexpected_error.yml | ||
| x-codeSamples: | ||
| - $ref: examples/curl/agents_cancel_session_workspace_transfer.yml | ||
| security: | ||
| - bearer_auth: | ||
| - agent_harness_session:operate |
93 changes: 93 additions & 0 deletions
93
specification/resources/agents/agents_commit_session_workspace_transfer.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| operationId: harness_commit_session_workspace_transfer | ||
| summary: Finalize a staged upload. | ||
| description: Upload only. Call once, after all parts have been uploaded. Completes the multipart upload | ||
| and starts the asynchronous import into the workspace. Responds 202; poll the transfer until `completed` | ||
| or `failed`. | ||
| tags: | ||
| - Harness Runtime | ||
| parameters: | ||
| - in: path | ||
| name: session_id | ||
| required: true | ||
| description: The session UUID. | ||
| schema: | ||
| type: string | ||
| example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 | ||
| example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 | ||
| - in: path | ||
| name: transfer_id | ||
| required: true | ||
| description: The workspace transfer identifier. | ||
| schema: | ||
| type: string | ||
| example: tr_example | ||
| example: tr_example | ||
| requestBody: | ||
| required: false | ||
| content: | ||
| application/json: | ||
| schema: | ||
| type: object | ||
| properties: | ||
| sha256: | ||
| type: string | ||
| description: Optional lowercase hex SHA-256. Must match the value supplied at create when | ||
| both are set. | ||
| example: example | ||
| responses: | ||
| '202': | ||
| description: Upload committed; import in progress. | ||
| headers: &id001 | ||
| ratelimit-limit: | ||
| $ref: ../../shared/headers.yml#/ratelimit-limit | ||
| ratelimit-remaining: | ||
| $ref: ../../shared/headers.yml#/ratelimit-remaining | ||
| ratelimit-reset: | ||
| $ref: ../../shared/headers.yml#/ratelimit-reset | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/workspace_upload_committed | ||
| '400': | ||
| description: Missing transfer_id, sha256 mismatch, or invalid JSON. | ||
| headers: *id001 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/error | ||
| '401': | ||
| $ref: ../../shared/responses/unauthorized.yml | ||
| '404': | ||
| $ref: ../../shared/responses/not_found.yml | ||
| '409': | ||
| description: Transfer is not in a committable state. | ||
| headers: *id001 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/error | ||
| '501': | ||
| description: Staged upload is not supported by the active sandbox driver. | ||
| headers: *id001 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/error | ||
| '423': | ||
| description: This session is unavailable; contact support. | ||
| headers: *id001 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/error | ||
| '429': | ||
| $ref: ../../shared/responses/too_many_requests.yml | ||
| '500': | ||
| $ref: ../../shared/responses/server_error.yml | ||
| default: | ||
| $ref: ../../shared/responses/unexpected_error.yml | ||
| x-codeSamples: | ||
| - $ref: examples/curl/agents_commit_session_workspace_transfer.yml | ||
| security: | ||
| - bearer_auth: | ||
| - agent_harness_session:operate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| operationId: harness_create_config | ||
| summary: Create an Environment Config (environment spec + optional Insights opt-in). | ||
| description: >- | ||
| Accepts name, environment-spec YAML text, and optional Insights telemetry opt-in. Tenant secrets | ||
| are declared inside the environment spec (write-only values), not as sibling request fields. | ||
| Responses never echo secret values; GET/create may include credential slot metadata | ||
| (name/source/provider only). Configs are immutable after create. | ||
| tags: | ||
| - Harness Runtime | ||
| requestBody: | ||
| required: true | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/agent_config_create_request | ||
| description: Environment Config create body. Secret values live in the environment-spec YAML and are never returned. | ||
| responses: | ||
| '201': | ||
| description: Config created. | ||
| headers: &id001 | ||
| ratelimit-limit: | ||
| $ref: ../../shared/headers.yml#/ratelimit-limit | ||
| ratelimit-remaining: | ||
| $ref: ../../shared/headers.yml#/ratelimit-remaining | ||
| ratelimit-reset: | ||
| $ref: ../../shared/headers.yml#/ratelimit-reset | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/agent_config_response | ||
| '400': | ||
| description: Invalid name, JSON wrapper, or environment spec. | ||
| headers: *id001 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/error | ||
| '401': | ||
| $ref: ../../shared/responses/unauthorized.yml | ||
| '409': | ||
| description: An active config with this name already exists for the team. | ||
| headers: *id001 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/error | ||
| '413': | ||
| description: Request body exceeds 1 MiB. | ||
| headers: *id001 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/error | ||
| '415': | ||
| description: Content-Type is not application/json. | ||
| headers: *id001 | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: models/definitions.yml#/error | ||
| '500': | ||
| $ref: ../../shared/responses/server_error.yml | ||
| '429': | ||
| $ref: ../../shared/responses/too_many_requests.yml | ||
| default: | ||
| $ref: ../../shared/responses/unexpected_error.yml | ||
| x-codeSamples: | ||
| - $ref: examples/curl/agents_create_config.yml | ||
| security: | ||
| - bearer_auth: | ||
| - agent_harness_session:create |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.