diff --git a/plugins/harnessrouter/skills/harnessrouter/references/api-reference.md b/plugins/harnessrouter/skills/harnessrouter/references/api-reference.md index 057ba58..098a68d 100644 --- a/plugins/harnessrouter/skills/harnessrouter/references/api-reference.md +++ b/plugins/harnessrouter/skills/harnessrouter/references/api-reference.md @@ -15,7 +15,7 @@ existing sessions to learn a shape. - Catalog: `GET /v1/bases`, `GET /v1/models`, `GET /v1/harnesses/{id}/models` - Harnesses: list, create, get, replace, delete, memory - Responses: start (stream, background, blocking), get, cancel -- Sessions: list, get, turns, files, cancel +- Sessions: list, get, turns, files, cancel, share - Container files: content and `/pdf` - Files upload: `POST /v1/files`, `DELETE /v1/files/{id}` - Tool secrets: `PUT` and `DELETE /v1/mcp-secrets/{name}` @@ -328,6 +328,7 @@ Follow-up on the same result (the canonical body): | neither | | Blocks until the task ends and answers the final response object. | | `max_step`, `timeout_seconds`, `max_cost_usd` | optional | Per-task budgets; otherwise the Harness's, otherwise `runtimeDefaults`. | | `model` | optional | Overrides the Harness's `default_model` for this task. | +| `reasoning` | optional | `{"effort": ""}`: how much the model thinks on this task. It wins over the Harness's `reasoning_effort`. Levels: `none`, `minimal`, `low`, `medium`, `high`, `xhigh`; another value is refused (`400`). Use the levels the model lists under `reasoning` in `GET /v1/bases`: a model with an empty list takes none, and a level it does not take is not applied. One Harness can then offer a quick and a thorough mode. | | Header `Idempotency-Key` | recommended | Same key plus same body replays the first task's result without running it again (as a 2-frame stream when `stream` is true, as JSON otherwise). Same key with a different body: `409 conflict`. | A follow-up continues after the session's latest turn whatever `previous_response_id` names; it @@ -378,6 +379,9 @@ Answered by `GET /v1/responses/{id}`, by a blocking `POST`, and inside the termi Here `filename` is the path relative to the working directory (`site/index.html`). - `status`: `in_progress`, `completed`, `incomplete`, `failed`, `cancelled`. Terminal: the last four. - `incomplete_details.reason` observed: `max_steps`, `timeout`. +- `reasoning` is `null` when the task asked for no level (neither the request nor the Harness). + Otherwise it is `{"effort": "", "applied": ""}`; + `applied: "default"` means the level was not applied and the model ran as it does without one. - `served_model` may be `null` or a provider-qualified id such as `anthropic/claude-haiku-4.5`. - Tool names differ by base (`write`, `bash` on `dsh`; `Write`, `Bash` on `claude-code`). - `metadata.session_id` is the session to persist. @@ -469,6 +473,22 @@ Stops whatever the session is running. An open stream for that task then ends with `response.failed` whose `response.status` is `"cancelled"`. +### POST /v1/sessions/{session_id}/share + +Publishes a read-only view of the session that anyone with the link can open, without a key. +No body (or `{"enabled": true}`) publishes; `{"enabled": false}` takes it back. Publishing again +reuses the same token. + +```json +{"object": "session.share", "enabled": true, "token": "shr…", "id": "shr…", "url": "/share/shr…"} +``` + +`GET` on the same path answers the same object. `url` is a path: the page people open is that +path on the HarnessRouter console's address, and the API host answers the same path with JSON. The link +shows the whole conversation and every file in the session's working directory, so share only a +session the user chose to make public, and say so where the link is created. Once it is taken +back, the link answers `404`. + ## Container files ### GET /v1/containers/{session_id}/files/{file_id}/content diff --git a/tests/test_cloud_scope.py b/tests/test_cloud_scope.py index fb86674..6ac6c62 100644 --- a/tests/test_cloud_scope.py +++ b/tests/test_cloud_scope.py @@ -86,6 +86,17 @@ def test_memory_guidance_names_no_internal_systems(self): for n, line in enumerate(p.read_text().splitlines(), 1) if forbidden.search(line)] self.assertEqual(failures, []) + def test_per_task_reasoning_and_session_share_are_documented(self): + # Builders read the Skill, not the protocol: a team that found reasoning_effort only on the + # Harness concluded it could not be set per task, and one that wanted a run link to paste + # into a report did not know a session can be shared. Both are served; both must be listed. + api = (SKILL_ROOT / "references" / "api-reference.md").read_text() + self.assertIn('| `reasoning` | optional | `{"effort": ""}`', api) + self.assertIn("It wins over the Harness's `reasoning_effort`", api) + self.assertIn("### POST /v1/sessions/{session_id}/share", api) + self.assertIn('`{"enabled": false}` takes it back', api) + self.assertIn("every file in the session's working directory", api) + def test_skill_relative_markdown_links_resolve(self): markdown_files = [SKILL_ROOT / "SKILL.md", *sorted((SKILL_ROOT / "references").glob("*.md"))] failures = []