socialistic connector

Connector API

Errors

Errors are JSON { "code", "detail"? } with a matching HTTP status.

HTTP errors

StatusCodeMeaning
401UNAUTHORIZEDMissing credential
401INVALID_API_KEYUnknown or deleted key
401INVALID_TOKENOAuth access token expired, revoked, or bound to another resource
403INSUFFICIENT_SCOPEThe token’s scopes do not cover this endpoint — detail.scope names the one needed
403FORBIDDENA token bound to other skills tried to act on this one
403SESSION_CREDENTIAL_REQUIREDA runtime callback was called with a credential that belongs to no session
404SKILL_NOT_FOUNDUnknown skill, or not yours
404SESSION_NOT_FOUNDUnknown session, or not yours
400INVALID_JSONRequest body is not valid JSON
400INVALID_REQUESTMalformed request body, or a query parameter that is unknown or out of range
400INVALID_SOURCE_URLSearching skills: the source_url filter is not a GitHub repository URL
400INVALID_SOURCE_URLMatching public skills: a source filter is not a GitHub repository or skill URL
400INVALID_MODELThe hosted_model_id (or a platform-mode generation / understanding capability’s model) is not a model the platform serves — a typo or a retired id; detail.model_id names it; a floating alias the catalog places no build behind counts too. On import, nothing was created. Checked against the platform’s model catalog on every platform-served model write; if the catalog cannot be read the id is accepted, and a model that cannot run surfaces as MODEL_UNRESOLVED when a session starts
409SKILL_BUILTINA built-in skill cannot be deleted
409NOT_SHAREABLEActivate before serving config is set
403GITHUB_NOT_CONNECTEDThis account has not installed the Socialistic GitHub App — connect it once in the Creator Console, then retry (or upload an archive instead)
403GITHUB_REPO_NOT_ACCESSIBLEThe repo is outside every installation this account connected
422INVALID_GITHUB_URLThe github_url is not a GitHub repository URL — another host, no owner/repo path, or credentials embedded in it
422REPO_UNREACHABLECannot read the GitHub repo — wrong URL, or private and the App is not installed on it
422PACK_TOO_LARGEThe repository is larger than the import will package — import a subtree (/tree/<branch>/<path>) instead of the whole repo
502UPSTREAM_ERRORThe repo was readable but packaging it did not finish — nothing was created, retry
502MCP_UNAVAILABLECreating a session: one of the skill’s MCP servers could not be reached or would not list its tools, so no session was created. It is the skill’s server, not your request — retry later, or tell the skill’s creator
429RATE_LIMITEDPer-key rate limit exceeded
429IMPORT_RATE_LIMITEDPOST /v1/skills/github-import: this caller created its hourly allowance of new skills — a link that is already listed still answers
429GITHUB_RATE_LIMITEDGitHub’s own quota is exhausted — retry after a short wait
404CAPABILITY_NOT_FOUNDNo capability with that id on the skill’s draft
400INVALID_CAPABILITY_CONFIGThe capability’s config was refused — detail.fieldErrors names the fields. Besides its schema: a generation / understanding capability accepts platform or relay (with api_key), never account; moving a relay endpoint to another origin requires its new key; and an account-mode inference model needs an active connection of yours for that provider
422CAPABILITY_TYPE_NOT_ATTACHABLEThe capability type is still under development
409BILLING_SINGLETON / INFERENCE_SINGLETONEvery skill has exactly one of each — update it instead of attaching a second one or detaching it
409TRAFFIC_SINGLETONThe skill already has its public-page copy — update it instead
409REVISION_LEGACY_FORMATThe skill predates the capability model — its capabilities cannot be edited or its draft published; re-import it
409CAPABILITY_SET_INVALIDPublish: the draft’s capabilities break a rule the set must keep — detail names the rules; GET /draft/capabilities shows them as validation.violations
409SOURCE_CAPABILITY_REQUIREDPublish: the skill is the canonical skill for a GitHub path, and every version it publishes must keep a code capability pointing at that path — attach one for the path, then publish
409SOURCE_CAPABILITY_LOCKEDA draft write would detach a canonical skill’s source capability or point it at another repository or subpath — changing its ref is allowed
501NOT_IMPLEMENTEDPOST /v1/public/skills/search is reserved and not available yet — use POST /v1/public/skills/match
409REVISION_NOT_DRAFTThe draft was published while this write was in flight — retry, and it lands on a new draft
409REVISION_CONFLICTA concurrent update changed the draft while a platform-model check was in flight — re-read the draft and retry
400CODE_FILES_READ_ONLYTried to write files on a repository-backed package — edit the repo and re-resolve its ref instead
503PRICING_UNAVAILABLEThe model price list could not be read — retry shortly. Distinct from OWN_CHARGE_PRICE_REQUIRED, which means the model has no price at all
503 / 422MODEL_UNRESOLVEDThe skill's platform-served model is a floating alias (~vendor/family-latest) that could not be pinned to a concrete build for this session. 503 when the model catalog could not be read — retry shortly; 422 when the catalog places no build behind the alias — the skill's model needs changing
500INTERNAL_ERRORUnexpected server-side failure

OAuth token endpoint

POST https://socialistic.ai/oauth/tokenanswers in the OAuth 2.0 shape (RFC 6749 §5.2) so stock client libraries can read it: { "error" } instead of { "code" }.

StatusErrorMeaning
400invalid_requestA required parameter is missing, malformed or repeated, or the body is over 16 KiB
400unsupported_grant_typegrant_type is neither authorization_code nor refresh_token
400invalid_grantThe code is unknown, expired, already used, or was issued to another client, redirect_uri or PKCE challenge; or the refresh token is unknown, expired, revoked or already rotated (which revokes the authorization)
400invalid_targetresource is not one this server issues tokens for, or not the one the code was issued for
400invalid_scopeA refresh asked for a scope the authorization does not hold

Toscana protocol

The /v1/toscana endpoints add these to the shared codes above.

StatusCodeMeaning
401INVALID_TOKENThe JWT isn’t HS256, its signature doesn’t match the key its iss names, it has expired or was minted to live longer than allowed — or it is a session JWT sent to an endpoint that only takes service credentials
400UNSUPPORTED_FIELDA Gateway field Socialistic can’t honor was set: config or ephemeral on createSession, stream, turnEnv or maxCostUsd on send_message. detail names it
4xxGATEWAY_REJECTEDToscana refused a relayed host tool call, with its own status. On submit_tool_result, 412 means the call is no longer pending — the outcome is lost; don’t retry
404RUN_NOT_FOUNDNo such run, or not one of yours on this skill
409TOSCANA_RUNTIME_UNAVAILABLEcreateSession: the skill’s new sessions are routed to the legacy runtime, which this protocol can’t serve. Nothing was created

Runtime callback

The agent-side publish callback authorizes with a session’s OAuth access token rather than an API key, so it answers with its own set on top of the shared codes above.

StatusCodeMeaning
401UNAUTHORIZEDNo Authorization: Bearer header
401INVALID_TOKENThe token is expired or revoked (each turn’s token replaces the last)
403INSUFFICIENT_SCOPEThe token does not carry skill:create
403SESSION_CREDENTIAL_REQUIREDThe credential belongs to no session (an API key or an app’s token)
403FORBIDDENThe token’s session belongs to another account
403SESSION_ALREADY_IMPORTEDThis session already completed an import; the credential is one-shot
404SESSION_NOT_FOUNDThe credential’s session no longer exists
400INVALID_JSONJSON form: body is not JSON
400INVALID_REQUESTJSON form: body failed schema validation
400INVALID_ARCHIVEArchive is empty, not valid base64, or the upload ended mid-stream
413ARCHIVE_TOO_LARGERequest body over the import ceiling
422SKILL_CANNOT_PARSEDNo usable SKILL.md at the archive root
422SKILL_MD_INVALIDSKILL.md parsed but is not a valid skill
422SKILL_MD_MISSING_FRONTMATTERSKILL.md has no YAML frontmatter
422UNSAFE_ENTRYArchive contains a path that escapes its root
422UPLOAD_TOO_LARGEArchive is within the request ceiling but over the packager’s limit
422INVALID_ARCHIVEBytes are not a readable archive (as a 400 above, the body itself never arrived)
422ARCHIVE_BINARY_UNSUPPORTEDThe archive carries non-text files. A skill’s files are delivered as text, so import the project as a code repository instead, or remove them. Editor/OS noise (.DS_Store, __MACOSX/) is ignored, not refused

Sending a message

POST …/runs answers a run that could not start with its own codes, on top of the shared ones above. Apart from UPSTREAM_ERROR, nothing started and nothing was charged.

StatusCodeMeaning
409RUN_PENDINGThe session is still busy with a previous run — retry once it finishes. detail.pending_run_id names that run when known, so a caller whose own send timed out can poll it
409PRIOR_RUN_UNSETTLEDA run is held because one of your earlier runs (in any session) has ended but its usage is not reported yet — retry in a few minutes, once it settles
409SESSION_READ_ONLYThe session ran on a retired runtime and can no longer be continued — create a new session; its history stays readable
422WALLET_COLDYour wallet is too low to start a run
429WALLET_HELDYour wallet balance is held by parallel sessions — wait for one to finish, then retry
503GITHUB_SKILL_SEARCH_DISABLED(GitHub skill search) Not offered on this deployment — nothing was created
422SKILL_NOT_CONFIGURED / LLM_CONFIG_ERRORThe skill’s serving configuration is incomplete or invalid
422OWN_CHARGE_PRICE_REQUIREDThe skill’s model has no published price to charge by
422IDEMPOTENCY_KEY_REUSED(GitHub skill search) This Idempotency-Key was already used for a different task — nothing was started; use a new key
429QUEUE_FULL(busy_policy: "enqueue") The session already holds as many waiting runs as it can — retry once one has started
409RUN_NOT_STEERABLE(steer) The run is not executing — queued, starting or finished. Nothing is redirected to another run; send a message instead
409IDEMPOTENCY_IN_PROGRESS(GitHub skill search) An earlier start under the same Idempotency-Key is still being created — retry shortly to get its session and run back
409STEER_UNCONFIRMED(steer) An earlier attempt under the same Idempotency-Key may have arrived — do not resend
501STEER_UNSUPPORTED(steer) The runtime serving the session cannot steer yet — send a message instead
413ATTACHMENT_TOO_LARGEAn attachment exceeds the maximum request size
502ATTACHMENT_STAGING_FAILEDAn attached file could not be staged for the agent — re-upload and retry
502UPSTREAM_ERRORThe agent runtime did not confirm the run. It may still have started — retry with the same Idempotency-Key to get that run back rather than start another
404RUN_NOT_FOUND(run status, steer) No such run in this session. Cancel never answers this — cancelling an unknown or finished run is a no-op

SSE error_code values

Codes carried by a run.failed frame, including the ones below. The full set is the RunErrorCode enum in the published contracts, and it can grow: treat a code you do not recognize as UNKNOWN.

CodeMeaning
KEY_INVALIDAPI key not recognized
KEY_EXPIREDAPI key expired or revoked
RATE_LIMITUpstream rate limit or quota exceeded
PROVIDER_CREDITS_EXHAUSTEDUpstream provider credits depleted
PROVIDER_ERRORUpstream provider returned 4xx/5xx
MODEL_IMAGE_UNSUPPORTEDAn image was attached but the model is text-only
STREAM_TIMEOUTThe stream from the agent went silent and could not be restored — read the run status or session history for what was saved
GATEWAY_TIMEOUTThe agent runtime was unreachable or at capacity — retry later
ATTACHMENT_STAGING_FAILEDAn attached file could not be staged for the agent — re-upload and retry
RUN_PENDINGThe session was still busy with a previous run (HTTP 409 on POST /runs) — retry once it finishes
PRIOR_RUN_UNSETTLEDOne of your earlier runs had not finished settling, so a new run could not start (HTTP 409 on POST /runs) — retry in a few minutes
SESSION_READ_ONLYThe session ran on a retired runtime and can no longer be continued (HTTP 409 on POST /runs) — create a new session; its history stays readable
QUEUE_EXPIREDA queued run waited too long (30 minutes) behind the session’s work and never started
CANCELLEDThe run was cancelled
GOOSE_ERRORAgent runtime error (setup, tool timeout, internal)
UNKNOWNCould not classify the failure

SSE error_stage values

WHERE in the request chain the failure surfaced, orthogonal to error_code (WHAT kind of failure):

StageMeaning
agentGoose agent runtime error (tool failure, setup, etc.)
gatewayServing layer rejected the request (auth, billing, config)
providerUpstream model provider returned an error
networkCouldn’t reach the agent or the stream dropped
unknownCould not determine