Skip to content

An open-source, faster Devin alternative

TypeScript

docs: reconcile to shipped backend — Repos/sources real, installations coming-soon

Igor Zalutski7ca990ff95a3
diff --git a/docs/agent-sessions/api-reference.mdx b/docs/agent-sessions/api-reference.mdx
index 32205fa9..4ae9c9fc 100644
--- a/docs/agent-sessions/api-reference.mdx
+++ b/docs/agent-sessions/api-reference.mdx
@@ -55,7 +55,7 @@ const session = await oc.sessions.get("ses_..."); // server, org key
</Tabs>
-`agent` is **required** (create a saved [agent](#agents) first); a resolvable model [credential](#credentials) is also required (`422 no_credential` otherwise). `key` gives get-or-create (one session per key); a request-level `Idempotency-Key` header makes a keyless create retry-safe. `metadata` is opaque **application routing state** — a JSON object (≤ 16 KB) stored on the session, returned by get/list, and delivered **verbatim in webhooks** so a callback handler can route to the right external record without a lookup; it is **never** shown to the model, **not** indexed/queryable, and distinct from `key` (get-or-create) and `Idempotency-Key` (dedupe). `input` is the task — a string or a full [envelope](/agent-sessions/messaging#message-input). For the managed runtimes (`claude`, `codex`), put all task-critical context in the task text. There's no fixed byte cap on `input`, but it counts against the model's context window — **truncate large inputs** (e.g. a PR diff) and have the agent pull the rest through its [sandbox tools](/agent-sessions/runtime-tools) (clone the repo, read files) rather than inlining it. `limits` `{ tokens, turn_seconds, turns }` are **non-monetary** — token budget, per-turn wall-clock, auto-run count; hitting one ends the turn with a matching `last_turn.yield_reason`. Destinations on an idempotent create-replay are ignored — manage them via the [destinations API](#destinations). `sources` checks out one or more repositories for the agent **before the first turn**; the checkout credential never enters the agent's sandbox (see [Repos & GitHub](#github-apps--repos)). Each entry references a registered [repo](#github-apps--repos) — `{ repo, ref, sha, name? }` — or is inline — `{ url, ref, sha, name?, auth }`. `ref` (the fetch ref, e.g. `refs/pull/N/head`) and `sha` are both **required**: the ref is fetched and the exact `sha` is pinned and verified. The create response echoes sanitized `sources`; poll `GET /sessions/:id/sources` for live status and `error_code` details.
+`agent` is **required** (create a saved [agent](#agents) first); a resolvable model [credential](#credentials) is also required (`422 no_credential` otherwise). `key` gives get-or-create (one session per key); a request-level `Idempotency-Key` header makes a keyless create retry-safe. `metadata` is opaque **application routing state** — a JSON object (≤ 16 KB) stored on the session, returned by get/list, and delivered **verbatim in webhooks** so a callback handler can route to the right external record without a lookup; it is **never** shown to the model, **not** indexed/queryable, and distinct from `key` (get-or-create) and `Idempotency-Key` (dedupe). `input` is the task — a string or a full [envelope](/agent-sessions/messaging#message-input). For the managed runtimes (`claude`, `codex`), put all task-critical context in the task text. There's no fixed byte cap on `input`, but it counts against the model's context window — **truncate large inputs** (e.g. a PR diff) and have the agent pull the rest through its [sandbox tools](/agent-sessions/runtime-tools) (clone the repo, read files) rather than inlining it. `limits` `{ tokens, turn_seconds, turns }` are **non-monetary** — token budget, per-turn wall-clock, auto-run count; hitting one ends the turn with a matching `last_turn.yield_reason`. Destinations on an idempotent create-replay are ignored — manage them via the [destinations API](#destinations). `sources` checks out one or more repositories for the agent **before the first turn**; the checkout credential never enters the agent's sandbox (see [Repos & GitHub](#github-apps--repos)). Each entry references a registered [repo](#github-apps--repos) — `{ repo, ref, sha, name? }` — or is inline — `{ url, ref, sha, name?, auth }`. `ref` (the fetch ref, e.g. `refs/pull/N/head`) and `sha` are both **required**: the ref is fetched and the exact `sha` is pinned and verified. The create response echoes sanitized `sources`; poll `GET /sessions/:id/sources` for live status.
Client tokens accept `scopes?` (subset of `read`, `steer`) and `ttl?` seconds, clamped to 60–86400 (SDK: `ttlSeconds`).
@@ -79,12 +79,13 @@ SessionSource = // a sources[] entry — WIRE
SourceAuth = // inline path ONLY (GitHub App-backed repos need none)
{ type: "risky_short_lived_token", token, expires_at } // workaround; short-lived; can't refresh
// SDK is camelCase: expiresAt (wire expires_at).
-SourceSummary = { name, status, path, sha, resolved_sha?,
- error_code?, error_message?, retryable? }
+SourceSummary = { name, status, path, sha, // returned today
+ resolved_sha?, error_code?, error_message?, retryable? } // forward-looking
// sanitized; in the create response + GET …/sources
-// status: pending | materializing | resolved | failed | unavailable | auth_required
-// error_code examples: source.auth_required, source.auth_ambiguous,
-// source.permission_missing, source.sha_mismatch, source.timeout
+// status today: pending | materializing | resolved | failed | auth_required
+// (unavailable is reserved/forward-looking)
+// error_code examples: source.auth_required, source.repo_not_selected,
+// source.permission_missing, source.mint_failed, source.ref_not_found, source.sha_mismatch
```
`yield_reason` (`completed | needs_input | error | budget_exceeded | deadline_exceeded | max_turns | canceled`; `requires_action` is reserved, not emitted yet) is the machine-readable "why the turn ended" — `needs_input` means the agent asked a question; answer it by [steering](#steer).
@@ -271,8 +272,8 @@ owns the App key and returns operation-scoped short-lived tokens).
| Call | Purpose |
| --- | --- |
-| `oc.github.apps.list()` | List GitHub Apps available to your org. |
-| `oc.github.installations.list(params?)` | List known installations for `oc_app` / `byo_stored_key`; optional for setup/status. |
+| `oc.github.apps.list()` | List GitHub Apps available to your org. _(coming soon)_ |
+| `oc.github.installations.list(params?)` | List installations for `oc_app` / `byo_stored_key`. _(coming soon; the OC App is resolved automatically — not needed to use a repo)_ |
| `oc.repos.create(params)` | Register (get-or-create) a repo. |
| `oc.repos.get(id)` · `oc.repos.list()` | Fetch / list. |
| `oc.repos.update(id, params)` | Update policy `defaults`. |
@@ -283,8 +284,8 @@ owns the App key and returns operation-scoped short-lived tokens).
| Method · Path | Purpose |
| --- | --- |
-| `GET /github/apps` | List GitHub Apps available to your org. |
-| `GET /github/installations?app_id=...` | List known installations for `oc_app` / `byo_stored_key`; optional for setup/status. |
+| `GET /github/apps` | List GitHub Apps available to your org. _(coming soon)_ |
+| `GET /github/installations?app_id=...` | List installations for `oc_app` / `byo_stored_key`. _(coming soon; OC App resolved automatically)_ |
| `POST /repos` | Register (get-or-create) a repo. |
| `GET /repos/:id` · `GET /repos` | Fetch / list. |
| `PATCH /repos/:id` | Update policy `defaults`. |
diff --git a/docs/agent-sessions/repos.mdx b/docs/agent-sessions/repos.mdx
index c5f351d3..d71278dd 100644
--- a/docs/agent-sessions/repos.mdx
+++ b/docs/agent-sessions/repos.mdx
@@ -56,17 +56,20 @@ publish/comment action.
</Warning>
Install the OC-owned App from its published GitHub App install URL. OpenComputer does not
-expose an SDK method to mint that URL because the App is owned by OpenComputer.
+expose an SDK method to mint that URL because the App is owned by OpenComputer. Once it's
+installed on a repo, reference that repo in a session's `sources` (below) — OpenComputer
+resolves the App and mints a token just in time.
-After installation, you can verify the App and visible installs:
+<Note>
+**Coming soon:** listing your Apps and installs (`oc.github.apps.list()` /
+`oc.github.installations.list()`). Today the OpenComputer App is resolved automatically;
+you don't need to enumerate installs to use a repo.
```ts
-const apps = await oc.github.apps.list();
-// [{ id: "gha_oc", appName: "OpenComputer", mode: "oc_app", status: "active" }]
-
const installs = await oc.github.installations.list({ appId: "gha_oc" });
// [{ id: "ghi_...", appId: "gha_oc", accountLogin: "acme", status: "active" }]
```
+</Note>
### Bring your own GitHub App (coming next)