Skip to content

Integrate Harness APIs#680

Open
SSharma-10 wants to merge 12 commits into
mainfrom
OHS_endpoints
Open

Integrate Harness APIs#680
SSharma-10 wants to merge 12 commits into
mainfrom
OHS_endpoints

Conversation

@SSharma-10

Copy link
Copy Markdown
Contributor

No description provided.

SSharma-10 and others added 2 commits June 26, 2026 16:38
… interface (#682)

* Create hosted-agent sessions from an agents.yaml manifest

The harness-api backend provisions a session entirely from the agent
spec, so replace the legacy JSON create(agent_kind=...) with
create_from_manifest(), which uploads the manifest verbatim as
Content-Type: application/x-yaml. The spec defines the runtime adapter,
sandbox, env vars, and egress; there are no other arguments.

- Add create_from_manifest() to the sync and async session clients,
  sharing manifest-normalization and YAML media-type helpers.
- Remove the now-unsupported create(agent_kind=...) path.
- Point the create_session.py example at a spec file and add
  session_e2e.py demonstrating the full create -> attach (send a
  prompt, stream SSE back) -> destroy flow.
- Cover manifest upload in the sync and new async unit tests; drop the
  legacy create test.

* regenerate fix

* fix

---------

Co-authored-by: SSharma-10 <shivanisharma@digitalocean.com>
logwolvy
logwolvy previously approved these changes Jun 29, 2026
Four standalone scripts exercising the permissions block:
- policy_auto_allow.py  — touch * → allow runs without HITL
- policy_auto_deny.py   — ls * → deny blocks without HITL prompt
- policy_hitl_ask.py    — defaultAction: ask gates unmatched commands;
                          tests both approve and reject resolution paths
- policy_write_interception.py — Write/Edit (non-Bash) tool intercepted
                                 under defaultAction: ask
All scripts load the base AGENT_SPEC, inject a permissions block, and
assert pass/fail without external YAML files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants