post_api_projects_id_automation_setup
const url = 'https://example.com/api/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/automation/setup';const options = { method: 'POST', headers: { cookie: 'supacloud_session=<supacloud_session>', 'Content-Type': 'application/json' }, body: '{"auto_developer_enabled":true,"git_credential_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","git_default_branch":"example","git_provider":"example","git_repo_url":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/automation/setup \ --header 'Content-Type: application/json' \ --cookie supacloud_session=<supacloud_session> \ --data '{ "auto_developer_enabled": true, "git_credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "git_default_branch": "example", "git_provider": "example", "git_repo_url": "example" }'Configure project automation and register the associated forge webhook.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project id
Request Bodyrequired
Section titled “Request Bodyrequired”object
Example generated
{ "auto_developer_enabled": true, "git_credential_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "git_default_branch": "example", "git_provider": "example", "git_repo_url": "example"}Responses
Section titled “Responses”Automation configured successfully
object
object
D1 — materialized Auto Developer workflow id.
SC-11 (mig 447) — the trust ledger’s automatic down-clamp of the merge ceiling
({merge_ceiling, reason, since, evidence_snapshot_id, acknowledged_by}); None
= not clamped. Written only by queries::trust; read through
autonomy::trust_clamp_of, which fails closed on a value it cannot parse.
ADR 0045 §3.1 Stage 4 — OPTIONAL project autonomy override (mig 214, nullable
SMALLINT). None = inherit the workspace level (the precedence chain resolves
the first non-null). #[serde(default)] keeps pre-214 rows readable.
ADR 0045 §3.1 — per-axis Advanced override vector (mig 214, JSONB NOT NULL DEFAULT '{}'). Empty {} = no per-axis override.
'llm' (default) or 'rules' — how items are classified/prioritized.
Timestamp of the last successful scan that changed the backlog. A successful scan
that changed nothing refreshes it only once the value is an hour old, so an idle
project’s row is not rewritten every tick while a cursor older than that still means
the scans are failing. None until the first sweep.
Per-sweep daily budget cap in USD; None leaves only the workspace cap.
Per-sweep fan-out bound. None → falls back to max_concurrent_runs.
AUD-INT-011 (mig 451) — the cap on backlog runs parked on a human gate (a run
in waiting, or whose tree has a waiting human node or a pending tool
approval). Those runs no longer consume backlog_max_concurrent; dispatch
launches only while their count is below this cap. None = twice the
effective concurrency cap.
'pr_only' (default) | 'auto_on_green' | 'full_auto' (D5).
Kill-switch: the ticker skips a project whose flag is false.
N human approvals required on the in_review → done/merge step (D5).
SC-28 — the SPARSE per-project checkout override (projects.checkout, nullable
JSONB): clone depth, partial clone, clone timeout, submodules and the Git LFS
include set. None (SQL NULL) = inherit the built-in full single-branch clone.
SELECT * maps it, so the launch stamp reads it from the already-loaded row.
Validated on write by sc_types::CheckoutConfig; a stored value that no longer
parses is dropped at launch (not a safety knob: the runner’s LFS pointer check
runs regardless). #[serde(default)] keeps any non-SELECT * path readable.
#712 (ADR 0049) — the SPARSE standard-closeout override (mig 283, nullable
JSONB). None (SQL NULL) = inherit the workspace default entirely; an object
overrides only the steps it names (per-step first-non-null vs the workspace).
Parsed defensively via [sc_closeout_models::CloseoutConfigPatch::parse].
#[serde(default)] keeps any non-SELECT * deserialize path readable. #708 S4 types
the schema interior via CloseoutConfigPatch (was an opaque unknown).
object
Gates the Tier-0 closeout MEMORY proposal. None inherits the next tier.
#708 M5 (mig 296) — the project-TOTAL daily/monthly $-budget caps that AND-gate
EVERY task launch (not just backlog dispatch) under the workspace budget. None
leaves only the workspace cap. FromRow auto-maps them from SELECT *.
ADR 0045 Stage 1b — per-project blast-radius tool denylist (mig 210,
TEXT[] NOT NULL DEFAULT '{}'). #[serde(default)] so pre-209 rows (and any
Deserialize path without the field) read as [].
#1468 / ADR 0086 — the pushed sha256: digest, set when the image was built on
the runner fleet; launches pin it (<image_tag>@<digest>). NULL on a hub build.
SC-22 (mig 411) — the project-level issue close policy: 'on_completion'
(default, today’s behaviour: a completed issue-linked task closes its issue) |
'merged_pr_only' (only a pull request confirmed merged into the default branch
closes an issue). SELECT * maps it; readers parse it fail-closed through
sc_kernel::issue_close_policy::IssueClosePolicy::from_db. The serde default
keeps any non-SELECT * deserialize path on today’s behaviour.
ADR 0029 — tracker provider/key, OAuth credential and state-name overrides.
ADR 0029 Slice 7 — tracker auto-developer toggle + webhook HMAC secret.
Issue #110: per-project concurrency cap. None = unlimited.
#708 W13 (ADR 0061) — the SPARSE per-project memory-governance override (mig 289,
nullable JSONB). None (SQL NULL) = inherit the workspace policy entirely; an
object overrides only the memory scopes it names (folded per-scope over the
workspace via effective_memory_governance). #[serde(default)] keeps any
non-SELECT * deserialize path readable.
SC-21 (mig 436) — the SPARSE per-project notification override
(projects.notify_config, nullable JSONB): {human_action_channel, project_channel}. None (SQL NULL) = inherit everything. SELECT * maps it.
Validated on write by validate_notify_config; read fail-open through
[crate::models::NotifyConfig::from_value]. #[serde(default)] keeps any
non-SELECT * deserialize path readable.
ADR 0046 RUNG 1b — OPTIONAL project worker-group affinity override (mig 227,
nullable UUID[]). None = inherit (the column was NULL — contributes nothing
to the first-non-null profile->project->task chain); Some(vec![]) = an explicit
“no affinity from this source”. Resolved into the task’s required_labels by
services::runners::groups. #[serde(default)] keeps pre-227 rows readable.
SC-12 / #855 G1 (mig 448) — the CACHED, parsed routing artifact keyed on the
forge blob SHA ({path, blob_sha, loaded_at, parsed, findings, last_error}).
None = never loaded. SELECT * maps it, so backlog dispatch reads the
artifact off the already-loaded project row instead of a second query or a
per-item forge call. Parsed defensively via
sc_svc_foundation::routing_artifact::parse; a value that no longer parses
contributes NO routing.
SC-12 / #855 G1 (mig 448) — the repository path of this project’s routing
artifact. None (SQL NULL) = OFF: no file is read and the tier precedence
starts at the arm’s route_by_label. Conventionally
agents/routing/model-routing.yaml.
#1376 (mig 403) — the SPARSE per-project generic sidecar override
(projects.sidecars, nullable JSONB). None (SQL NULL) = inherit the
instance defaults entirely; an object overrides only the kinds it names.
SELECT * maps it, so the launch fold reads it from the already-loaded
project row instead of issuing a second SELECT sidecars. Parsed +
validated against the typed registry by sc_types::ProjectSidecarConfig;
a stored value that no longer parses fails the launch CLOSED. #[serde(default)]
keeps any non-SELECT * deserialize path readable.
SC-11 (mig 447) — the SPARSE trust-policy override (None = inherit the
workspace, then the built-in). Validated by sc_kernel::trust::TrustPolicy.
Example
{ "project": { "closeout_config": { "project_docs": { "condition": "if_touched" }, "user_docs": { "condition": "if_touched" }, "wiki": { "condition": "if_touched" } } }}Structured client error
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}Authentication required
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}Permission denied
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}Structured server error
The canonical JSON body of every error response. Every AppError serializes as
this exact shape; code is the generated stable machine-readable vocabulary.
object
Present only on an MCP budget refusal (429) — the refusing layer + retry hint.
object
The refusing layer.
The layer’s budget.
Seconds until a retry can pass, or null when it never will for this session.
Calls already counted in the layer.
Machine-readable, stable error code.
Present only on a quota-exceeded 403 — the inline upgrade-CTA payload.
object
The entitlement feature key that was hit, e.g. apps.max_count.
The plan’s limit for this key.
Where to send the user to upgrade.
Current usage (count or bytes, per the key).
Human-readable message (the server’s English text; the client may localize
by code).
Present on a launch refusal (400/403/409) — the structured facts only the refusing class can fill: occupancy, exhausted budget, or required labels.
object
Weighted workspace slots already held by starting/running agent runs.
The budget cap that refused.
Effective spend of the refusing budget scope (spend + in-flight reservations).
The workspace’s configured agent-concurrency cap.
The provider whose budget cap refused; absent for the workspace-wide cap.
Runner labels a fail-policy placement required and no runner offered.
Example
{ "code": "not_found"}