GitHub
A single GitHub account — personal or bot — wired into your circle as a typed dev-collaboration surface: read repos, manage issues and pull requests, review and merge, and dispatch Actions workflows, all gated by one access token's scopes.
Working with it
Opening a GitHub launches a connection manager — its dedicated working surface.
How it appears
The same element type rendered as a definition, a circle instance, and a live workspace card.
When to use / not
When to use
- Giving an agent or automation a scoped window into GitHub — list repos, read issues, PRs, releases, and commits, or search code without standing up your own API client.
- Driving write actions through an approval gate: the draft → approve → publish flow on issues and PRs lets a human sign off before anything lands on GitHub.
- Dispatching a workflow_dispatch run and polling its status, so a flow can kick off CI/CD or a scheduled job in a repo and react to the result.
- Acting as the auth anchor for mirroring a circle's library to a GitHub repo — the connector holds the token and surfaces the mirror's sync/disconnect controls.
When not to use
- Talking to a different code forge or a generic REST endpoint that isn't GitHub — use the http element for arbitrary HTTP calls.
- Posting alerts or run results into a chat workspace — reach for slack, discord, or teams; this connector speaks dev-collab verbs, not channel messaging.
- Cloning, building, or running repository code — github reads and manages metadata over GitHub's API; executing code is the actions and app elements' job.
Topology
Created from the library and placed inside an app or circle. It is a top-level building block you compose with other elements.
Properties
account_handlestring- GitHub username (the owner of the PAT), e.g. 'iggy-lapalme'
display_namestringexecutor_policyobjectbrowserobjectdefault_orgstring- Default GitHub organization for list-repos / search-code / search-issues when not specified
rate_limitsobject- Caps on outbound GitHub activity per account, per rolling period
Capabilities
Inherited from io
- Network
- Observe
Operations
- activityGET
- approve-draftPOST
- attachmentsGET
- batch_statsGET
- capture-cookiesPOST
- close-issuePOST
- composePOST
- contextGET
- createPOST
- deleteDELETE
- disablePOST
- draft-issuePOST
- draft-prPOST
- enablePOST
- export_bundleGET
- fetch-commitPOST
- fetch-issuePOST
- fetch-prPOST
- fetch-repoPOST
- fetch-workflow-runPOST
- getGET
- get-activity-statsPOST
- healthGET
- import_bundlePOST
- intentionGET
- list-draftsPOST
- list-issuesPOST
- list-prsPOST
- list-releasesPOST
- list-reposPOST
- list-workflow-runsPOST
- list-workflowsPOST
- merge-prPOST
- promotePOST
- publish-issuePOST
- publish-issue-commentPOST
- publish-prPOST
- publish-pr-commentPOST
- readmeGET
- readme_updatePOST
- receivePOST
- remove-modifierPOST
- reopen-issuePOST
- restorePOST
- review-prPOST
- schemaGET
- search-codePOST
- search-issuesPOST
- sendPOST
- sourceGET
- source_branchesGET
- source_promotePOST
- source_repairPOST
- source_statusGET
- source_validatePOST
- statsGET
- test_connectionPOST
- treeGET
- trigger-workflowPOST
- updatePATCH
- update_metaPATCH
- versionGET
Composition
Errors / when it fails
- account_handle is required — the GitHub username owning this PAT
- Fails unless:
account_handle != null && len(account_handle) > 0 - owner_user_id is required
- Fails unless:
owner_user_id != null && len(owner_user_id) > 0 - executor_policy.default is mcp but mcp.transport is not set
- Fails unless:
executor_policy.default != "mcp" || (mcp != null && mcp.transport != null)
Validation rules
- API executor is not implemented in MVP — ops will return GITHUB_OP_NOT_ON_EXECUTOR
GitHub (github)
Category: io | Form: | Symbol: Gh
One GitHub account — read repos, manage issues and pull requests, trigger workflows
Represents a single GitHub account (personal or bot) with a typed op surface for code collaboration: list/fetch repos, list/fetch/publish issues + PRs, comment on issues and PRs, merge PRs, trigger workflow runs, read releases and commits. Shares the io/* element shape with the social connectors (linkedin, twitter, facebook, instagram) but the ops are dev-collab rather than outreach. For mcp, run the official github-mcp-server (Go binary, https://github.com/github/github-mcp-server) and supply GITHUB_PERSONAL_ACCESS_TOKEN via env_refs. A token with the right scopes (repo, workflow, read:org) gates what ops succeed.
Guide
One GitHub account — read repos, manage issues and pull requests, trigger workflows
What It Does
GitHub is an IO connector that represents a single GitHub account (personal or bot) with a typed operation surface for code collaboration. It can list and fetch repositories, list/fetch/open/comment-on/close/reopen issues, list/fetch/review/merge pull requests, list and trigger Actions workflows, and read releases and commits — plus search code and issues across accessible repos.
Write operations on issues and PRs follow a draft → approve → publish pattern: draft-issue / draft-pr stage the content, approve-draft authorizes it, and publish-issue / publish-pr create it on GitHub. This lets an approval gate (the evaluator modifier) wrap creation the same way it does on the social connectors. Comments skip the draft step.
Operations are transported through a pluggable executor — mcp (the official github/github-mcp-server Go binary), browser (a user-browser), or api. The default is mcp; api is not implemented in the MVP. Credentials flow via spec.mcp.env_refs as a modifiers/variable row mapped to GITHUB_PERSONAL_ACCESS_TOKEN, and the PAT’s scopes (repo, workflow, read:org) gate which ops succeed. GitHub Flavored Markdown is supported; issue/PR titles are required and bodies cap at 65535 characters.
Element Definition
| Field | Value |
|---|---|
| Type | github |
| Category | io |
| Form | atom |
| Handler | GithubHandler |
| Shell role | connector |
| Auth methods | bearer, none |
| Delivery mode | async (exponential retry, max 2; streaming not supported) |
Properties
| Field | Type | Default | Description |
|---|---|---|---|
account_handle | string | — | GitHub username owning the PAT (required; maxLength 64). Also the element name/slug template. |
display_name | string | — | Display name (maxLength 256). |
owner_user_id | string (uuid) | — | Owning user (required). |
executor_policy.default | string | mcp | Default executor: mcp, browser, or api. |
executor_policy.overrides | object | — | Per-op executor overrides. |
executor_policy.mcp_server_ref / browser_ref | string | — | Element pickers for the MCP server / browser. |
mcp.transport | string | stdio | MCP transport: stdio, http, or sse. |
mcp.env_refs | object | — | Expected key GITHUB_PERSONAL_ACCESS_TOKEN (optional GITHUB_HOST for Enterprise). |
mcp.tools_allowlist | array | — | Restrict which github-mcp-server tools may be invoked. |
browser.mode | string | user_browser | Browser mode: user_browser or headless. |
default_org | string | — | Default org for list-repos / search-code / search-issues (maxLength 64). |
rate_limits.calls_per_hour | integer | 500 | Outbound call cap per rolling hour. |
rate_limits.calls_per_day | integer | 5000 | Outbound call cap per rolling day. |
rate_limits.profile_visits_per_day | integer | 500 | Profile-visit cap per day. |
rate_limits.follows_per_day | integer | 50 | Follow cap per day. |
rate_limits.messages_per_day | integer | 0 | No-op for GitHub (not a GitHub concept). |
Ports
Output port schemas defined in contract.yaml:
- GithubRepo —
full_name,owner,name,private,default_branch,url,description,stars,forks(required:full_name,owner,name). - GithubIssue —
number,title,body,state(open/closed),author,labels,url(required:number,title,state). - GithubPullRequest —
number,title,body,state(open/closed/merged),head,base,author,mergeable,url(required:number,title,state,head,base). - GithubWorkflowRun —
id,name,status,conclusion,created_at,url.
Capabilities
| ID | Description |
|---|---|
github-repo-read | List and fetch repository metadata |
github-issues | List, fetch, open, comment on, close, reopen issues |
github-pull-requests | List, fetch, open, comment on, review, merge PRs |
github-workflows | List workflows, trigger runs, inspect run history |
github-search | Search code and issues across repos |
executor-pluggable | Operations transported via mcp, browser, or api |
Attaches: rate-limit, auth-policy, evaluator. Uses: variable, user-browser.
Error Codes
| Code | Class | Retryable | Recovery |
|---|---|---|---|
GITHUB_AUTH_FAILED | auth | no | reconnect (pat_token) |
GITHUB_TOKEN_INSUFFICIENT_SCOPES | auth | no | configure (pat_scopes) |
GITHUB_RATE_LIMITED | internal | yes | wait |
GITHUB_OP_NOT_ON_EXECUTOR | validation | no | configure (executor_policy) |
GITHUB_DRAFT_NOT_APPROVED | validation | no | none |
GITHUB_MCP_UNREACHABLE | internal | yes | configure (mcp_transport) |
GITHUB_REPO_NOT_FOUND | validation | no | none |
GITHUB_PR_NOT_MERGEABLE | validation | no | none |
Operations
All operations are POST {slug}/ops/{path} unless noted. auth is the required PAT scope level (read / write).
Repositories
- list-repos —
POST list-repos(read). List repositories accessible to the authenticated user (or an org). Input:affiliation(owner/collaborator/organization_member/all, defaultall),org,limit(default 30, max 100). - fetch-repo —
POST fetch-repo(read). Fetch a repository’s metadata byfull_name. Input:repo(required,owner/repo).
Issues
- list-issues —
POST list-issues(read). List issues on a repo. Input:repo(required),state(open/closed/all, defaultopen),labels,limit. - fetch-issue —
POST fetch-issue(read). Fetch one issue by number. Input:repo,number(required). - draft-issue —
POST draft-issue(write). Draft a new issue (requires approval to publish). Input:repo,title,body(required);labels,assignees. - publish-issue —
POST publish-issue(write). Create an approved issue on GitHub. Input:draft_id(required, uuid). - publish-issue-comment —
POST publish-issue-comment(write). Post a comment on an issue (no draft step). Input:repo,number,body(required). - close-issue —
POST close-issue(write). Close an issue. Input:repo,number(required);reason(completed/not_planned/duplicate). - reopen-issue —
POST reopen-issue(write). Reopen a closed issue. Input:repo,number(required).
Pull Requests
- list-prs —
POST list-prs(read). List pull requests on a repo. Input:repo(required),state(open/closed/merged/all, defaultopen),base,limit. - fetch-pr —
POST fetch-pr(read). Fetch one pull request by number. Input:repo,number(required). - draft-pr —
POST draft-pr(write). Draft a new pull request (requires approval to publish). Input:repo,title,head,base(required);body,draft. - publish-pr —
POST publish-pr(write). Create an approved pull request on GitHub. Input:draft_id(required, uuid). - publish-pr-comment —
POST publish-pr-comment(write). Post a comment on a pull request. Input:repo,number,body(required). - merge-pr —
POST merge-pr(write). Merge a pull request (requires PR approval + repo write). Input:repo,number(required);merge_method(merge/squash/rebase, defaultmerge),commit_title,commit_message. - review-pr —
POST review-pr(write). Submit a review (approve / request-changes / comment). Input:repo,number,event(APPROVE/REQUEST_CHANGES/COMMENT) required;body.
Workflows / Actions
- list-workflows —
POST list-workflows(read). List workflows defined in a repo. Input:repo(required). - list-workflow-runs —
POST list-workflow-runs(read). List recent runs of a workflow. Input:repo,workflow_id(required);limit(default 20, max 100). - trigger-workflow —
POST trigger-workflow(write). Dispatch aworkflow_dispatchrun. Input:repo,workflow_id,ref(required);inputs. - fetch-workflow-run —
POST fetch-workflow-run(read). Fetch details of one workflow run (status, conclusion, logs URL). Input:repo,run_id(required).
Releases / Commits / Search
- list-releases —
POST list-releases(read). List releases of a repo. Input:repo(required);limit(default 10, max 100). - fetch-commit —
POST fetch-commit(read). Fetch commit metadata + file changes by SHA. Input:repo,sha(required). - search-code —
POST search-code(read). Search code across accessible repos. Input:query(required, maxLength 512);limit. - search-issues —
POST search-issues(read). Search issues and pull requests across accessible repos. Input:query(required, maxLength 512);limit.
Drafts & Account
- approve-draft —
POST approve-draft(write). Flip a draft fromstatus=drafttostatus=approved(authorizes send). Input:draft_id(required, uuid). Output:draft_id,status. - list-drafts —
POST list-drafts(read). List drafts for this element. Input:status(draft/approved/sent/failed),limit(default 50, max 500). Output:draftsarray. - capture-cookies —
POST capture-cookies(write). Persist a captured cookie jar as amodifiers/variablefor this account. Input (all optional):cookie_jar,variable_slug. Output:variable_slug,env_var_name,value_bytes,next_step. - get-activity-stats —
POST get-activity-stats(read). Usage + rate-limit counters for this account (powers the activity dashboard); does not consume rate budget. Output:limits,usage_now,history(by_hour,by_day). - health —
GET health(read). Probe executor reachability + PAT validity + scope coverage. Drives the connection badge via thehealthlifecycle check op (polled every 300s).
Quick Start
- Create a Personal Access Token at github.com/settings/tokens with the scopes your ops need (
repofor read/write,workflowfor Actions,read:orgfor org visibility). - Store the token as a
modifiers/variableand reference it viaspec.mcp.env_refs, mappingGITHUB_PERSONAL_ACCESS_TOKENto the variable’s slug. The default executor ismcp(run thegithub/github-mcp-serverGo binary). - List your repos:
triform_ops(action: "call", slug: "<slug>", operation: "list-repos", input: { affiliation: "owner" })
- Open an issue via draft → approve → publish:
triform_ops(action: "call", slug: "<slug>", operation: "draft-issue",
input: { repo: "owner/repo", title: "...", body: "..." })
triform_ops(action: "call", slug: "<slug>", operation: "approve-draft",
input: { draft_id: "<uuid>" })
triform_ops(action: "call", slug: "<slug>", operation: "publish-issue",
input: { draft_id: "<uuid>" })
Common Mistakes
- Missing identity.
account_handleandowner_user_idare both required (identity_requiredrule) —account_handleis the GitHub username owning the PAT. - MCP default without transport. If
executor_policy.defaultismcp,mcp.transportmust be set (mcp_config_when_mcp_defaultrule), or the element fails validation. - Choosing the
apiexecutor. Theapiexecutor is not implemented in the MVP — ops will returnGITHUB_OP_NOT_ON_EXECUTOR(validation warning onexecutor_policy.default: api). - Publishing an unapproved draft.
publish-issue/publish-prconsume an approved draft; an un-approveddraft_idyieldsGITHUB_DRAFT_NOT_APPROVED. Callapprove-draftfirst. - Insufficient PAT scopes. Write ops need
repo; workflow dispatch needsworkflow; org visibility needsread:org. A token short on scopes returnsGITHUB_TOKEN_INSUFFICIENT_SCOPES.
Relationships
- Attaches to: rate-limit, auth-policy, evaluator
- Uses: variable, user-browser
Capabilities
- github-repo-read: List and fetch repository metadata
- github-issues: List, fetch, open, comment on, close, reopen issues
- github-pull-requests: List, fetch, open, comment on, review, merge PRs
- github-workflows: List workflows, trigger runs, inspect run history
- github-search: Search code and issues across repos
- executor-pluggable: Operations transported via mcp, browser, or api
Properties
| Property | Type | Default | Description |
|---|---|---|---|
account_handle | string | — | GitHub username (the owner of the PAT), e.g. ‘iggy-lapalme’ |
display_name | string | — | |
owner_user_id | string | — | |
executor_policy | object | — | |
mcp | object | — | MCP server transport config. Upstream: github/github-mcp-server (Go binary). |
browser | object | — | |
default_org | string | — | Default GitHub organization for list-repos / search-code / search-issues when not specified |
request_jitter_ms | array | [0,500] | GitHub’s rate limits are generous; less jitter needed than for social platforms |
rate_limits | object | — | Caps on outbound GitHub activity per account, per rolling period |
Operations
activity
Get /ops/activity | Auth: Read
Get activity events for this element
Scope depends on element capabilities: individual elements query by element_id, project-form elements with activity-scope-members include member activities, circle-level elements with activity-scope-all query the entire circle. Gracefully returns empty list if activities table is missing (old circles).
approve-draft
Post /ops/approve-draft | Auth: Write
Flip a draft from status=draft to status=approved (authorizes send)
attachments
Get /ops/attachments | Auth: Read
List all modifiers and resources attached to this element
Returns both modifiers (policy enforcement) and resources (data injection) with is_modifier flag to distinguish. Items in the generated MODIFIER_TYPES list are modifiers; everything else is a resource. Includes cascade_policy and version pin info.
batch_stats
Get /ops/batch_stats | Auth: Read
Get per-element statistics for all children of this element
Returns per-child stats plus an aggregate. Most meaningful on compound or manifest form elements (repositories, circles, projects); atoms have no children so the result is an empty children array with a zeroed aggregate. Uses efficient GROUP BY SQL. Weighted averages for eval scores.
capture-cookies
Post /ops/capture-cookies | Auth: Write
Persist a captured cookie jar as a modifiers/variable for this account
Default flow (no input needed): reads the live cookie jar the Triform Connect extension already syncs into physics, filters to this platform’s domain, serializes as a JSON array, upserts a modifiers/variable named {element_slug}-cookies, and returns the variable_slug + env_var_name pair for wiring into spec.mcp.env_refs. ONE CLICK — no client-side extraction required. Optional overrides: cookie_jar (caller-supplied pre-extracted jar — JSON dict / array / Netscape / ‘k=v; k=v’ string) and variable_slug (override the default name). Returns value_bytes, cookie_count, and source (bridge_registry | caller_supplied).
close-issue
Post /ops/close-issue | Auth: Write
Close an issue
compose
Post /ops/compose | Auth: Execute
Batch add and remove modifiers on this element in a single call
Declarative composition: add modifiers by ref path (slug or path@version) and remove by attachment ID, all in one atomic call on the target element. Each ‘add’ entry resolves the source element, validates topology, attaches with optional priority and cascade policy. Each ‘remove’ entry deletes the attachment row. Returns a summary of what was added and removed. Example: compose({ add: [{ref: “my-prompt”}, {ref: “rate-limit/api@v2”, priority: 50}], remove: [{attachment_id: “uuid”}] })
context
Get /ops/context | Auth: Read
Get connected elements (graph traversal)
Graph traversal showing all connected elements with their relationship type (contains, contained_by, references, referenced_by, attaches, etc.). Use ?depth=N to control traversal depth (default 1) and ?types=actor,data to filter by element types.
create
Post /ops/create | Auth: Write
Create child element
POST to the parent path — element_type goes in the request body, NOT the URL. Both element_type and slug are required and must be non-empty. Name is derived from slug if omitted. Writes to both Git and PostgreSQL. All elements are stored flat under the circle — no intermediate library wrapper rows.
delete
Delete /ops/delete | Auth: Admin
Delete element (soft delete)
Soft delete — sets state to ‘deleted’ but retains the record. Cannot delete elements that have children (has_no_bond precondition) or active runs. Requires admin auth and confirmation.
disable
Post /ops/disable | Auth: Admin
Disable element (hides and prevents use)
Idempotent — safe to call on already-disabled elements. Optionally pass a reason string. Disabled elements cannot be invoked or executed. Inverse of enable.
draft-issue
Post /ops/draft-issue | Auth: Write
Draft a new issue (requires approval to publish)
draft-pr
Post /ops/draft-pr | Auth: Write
Draft a new pull request (requires approval to publish)
enable
Post /ops/enable | Auth: Admin
Enable element (makes usable and visible)
Idempotent — safe to call on already-enabled elements. Transitions element to ready/enabled state. Cannot enable deleted elements. Inverse of disable.
export_bundle
Get /ops/export/bundle | Auth: Read
Export element as downloadable git bundle
On non-root-namespace elements, returns a binary git bundle. On root-namespace (circle) elements, dispatch hands off to the circle’s own export_bundle op, which returns a multi-element JSON envelope with one base64 bundle per child element — this is intentional, not an error.
fetch-commit
Post /ops/fetch-commit | Auth: Read
Fetch commit metadata + file changes by SHA
fetch-issue
Post /ops/fetch-issue | Auth: Read
Fetch one issue by number
fetch-pr
Post /ops/fetch-pr | Auth: Read
Fetch one pull request by number
fetch-repo
Post /ops/fetch-repo | Auth: Read
Fetch a repository’s metadata by full_name (owner/repo)
fetch-workflow-run
Post /ops/fetch-workflow-run | Auth: Read
Fetch details of one workflow run (status, conclusion, logs URL)
get
Get /ops/get | Auth: Read
Get element details
Element is already resolved by the routing layer — this returns the cached element, not a fresh DB query. Use the path /api/{circle}/{slug} to address elements.
get-activity-stats
Post /ops/get-activity-stats | Auth: Read
Usage + rate-limit counters for this Github account — powers the activity dashboard
Pure read op over the per-circle
social_call_logtable — does NOT consume any rate budget. Returns the current-period counters (calls_last_hour, calls_today, profile_visits_today, follows_today, messages_today, posts_today), the configuredspec.rate_limitscaps, and two history series: hourly over the last 24 hours and daily over the last 30 days. The portal charts these as stacked-area activity graphs per element.
health
Get /ops/health | Auth: Read
Probe executor reachability + PAT validity + scope coverage
import_bundle
Post /ops/import/bundle | Auth: Write
Import git bundle into element
Accepts a base64-encoded git bundle in the JSON bundle_base64 field. Use overwrite=true to replace existing elements with same slug (default skips duplicates). Imported elements get new UUIDs. Returns counts of imported/skipped elements and any errors.
intention
Get /ops/intention | Auth: Read
Get element intention with full inheritance chain
Returns three levels: direct (this element’s intention), inherited (from category and root), and resolved (final merged intention). Useful for understanding an element’s purpose in context of its hierarchy.
list-drafts
Post /ops/list-drafts | Auth: Read
List drafts for this element (optionally filter by status)
list-issues
Post /ops/list-issues | Auth: Read
List issues on a repo
list-prs
Post /ops/list-prs | Auth: Read
List pull requests on a repo
list-releases
Post /ops/list-releases | Auth: Read
List releases of a repo
list-repos
Post /ops/list-repos | Auth: Read
List repositories accessible to the authenticated user (or an org)
list-workflow-runs
Post /ops/list-workflow-runs | Auth: Read
List recent runs of a workflow
list-workflows
Post /ops/list-workflows | Auth: Read
List workflows defined in a repo
merge-pr
Post /ops/merge-pr | Auth: Write
Merge a pull request (requires PR approval + repo write)
promote
Post /ops/promote | Auth: Admin
Promote element configuration to a target environment
Only for manifest-form elements (projects). Environments advance: dev → demo → live. dev→demo requires member+ role, demo→live requires admin. Freezes member versions at promotion time (creates snapshot). Persists environment config to spec.environments.
publish-issue
Post /ops/publish-issue | Auth: Write
Create an approved issue on GitHub
publish-issue-comment
Post /ops/publish-issue-comment | Auth: Write
Post a comment on an issue (no draft step — comments are small)
publish-pr
Post /ops/publish-pr | Auth: Write
Create an approved pull request on GitHub
publish-pr-comment
Post /ops/publish-pr-comment | Auth: Write
Post a comment on a pull request
readme
Get /ops/readme | Auth: Read
Get element README.md content
Reads README.md from the element’s git repository. Returns empty content (not an error) if no README exists. Always returns markdown format.
readme_update
Post /ops/readme_update | Auth: Write
Update element README.md content
Creates or overwrites README.md in the element’s git repo. Commits to the draft branch. Content must be provided as a markdown string.
receive
Post /ops/receive | Auth: None
Receive incoming external traffic
Entry point for external traffic reaching this IO element. Declared auth: none to bypass platform auth — element-level auth is enforced by IoReceiveExecutor before dispatching into the flow graph. The flow/app that wires this element as an entry point determines what happens next.
remove-modifier
Post /ops/remove-modifier | Auth: Execute
Remove an attached modifier from this element by attachment ID
Removes a modifier/resource attachment by its row ID. The ID comes from the attachments or context API. This is the reverse of attach — called on the target element, not the source.
reopen-issue
Post /ops/reopen-issue | Auth: Write
Reopen a closed issue
restore
Post /ops/restore | Auth: Admin
Restore element to a specific version
Automatically snapshots the current state before restoring (creates a ‘Before restore to vN’ version entry). Writes restored spec to git as .triform/spec.yaml. Git failures warn but don’t fail the operation — DB state is authoritative. Cannot restore deleted elements.
review-pr
Post /ops/review-pr | Auth: Write
Submit a review on a pull request (approve / request-changes / comment)
schema
Get /ops/schema | Auth: Read
Get element input/output schema (MCP tools/list compatible)
Returns type-level port schemas from the TypeRegistry — not instance-specific overrides. Includes direction (input/output), required flag, and JSON schema per port. Useful for understanding what data an element accepts and produces.
search-code
Post /ops/search-code | Auth: Read
Search code across accessible repos
search-issues
Post /ops/search-issues | Auth: Read
Search issues and pull requests across accessible repos
send
Post /ops/send | Auth: Execute
Send a message/request to external system
Explicitly sends payload to the configured external target. For HTTP elements, POSTs to the target URL. For chat platforms, sends via the platform API. Put data in the payload field. Returns send status and response details.
source
Get /ops/source | Auth: Read
Get any file’s content from the element’s git repository
Reads an arbitrary file from the element’s CAS-backed git tree by its relative path. Same store as
readme, just generalized. Path safety: rejects..traversal, leading/, and null bytes. Use this to viewmain.pyfor action elements, asset files for SPAs, etc. Returns empty content (not an error) if the file doesn’t exist.
source_branches
Get /ops/source/branches | Auth: Read
List Source branches for this element
Returns the standard draft/demo/live Source branches, their current commits, and promotion relationships. Use GET /api/{element_path}/ops/source/branches.
source_promote
Post /ops/source/promote | Auth: Write
Promote Source branch forward
Promotes draft to demo or demo to live through the generated element op path. Direct Git pushes to demo/live are blocked by Source policy.
source_repair
Post /ops/source/repair | Auth: Write
Inspect or repair the element Source index
Runs Source repair through the element operation path. Defaults to dry_run=true; set dry_run=false only after reviewing a dry-run report.
source_status
Get /ops/source/status | Auth: Read
Get Source control status for this element
Returns the branch-aware clone URL, checkout commands, current draft commit, child source-link count, portable export summary, Source health, warnings, and auth hints for the addressed element. Use the element-first path: GET /api/{element_path}/ops/source/status.
source_validate
Post /ops/source/validate | Auth: Read
Validate Source branch contents
Validates a Source branch before accepting local Git workflow changes or promotion. Defaults to branch=draft and rejects runtime data, generated output, secret material, and unreadable CAS refs.
stats
Get /ops/stats | Auth: Read
Get aggregate statistics for this element
Health status is computed: error if errors_per_day > 5 or success_rate < 0.8, warning if errors_per_day > 0 or success_rate < 0.95. Firing alerts escalate health to error/warning. Default period is ‘day’. Returns runs_per_day, success_rate, avg_duration_ms, and more.
test_connection
Post /ops/test-connection | Auth: Execute
Test connection configuration
Validates the element’s configuration locally without making an actual external connection. Checks that required credentials are set, URLs are valid, etc. Returns success boolean and error details. Safe to call repeatedly.
tree
Get /ops/tree | Auth: Read
Get the element’s position in the graph — ancestors, children, references, and subtree statistics
Uses per-circle ElementGraph cache for O(1) lookups. Returns ancestors (containment chain), children (direct), members (references), referenced_by (reverse refs), attachments, and subtree stats. Default depth is 3, max is 10. Pass ?include_metadata=true for name/state on each node.
trigger-workflow
Post /ops/trigger-workflow | Auth: Write
Dispatch a workflow_dispatch run
update
Patch /ops/update | Auth: Write
Update element
Partial update — send only the fields you want to change.
spec,name, andintentionare all independently optional.specMUST be a JSON object when present; deep-merged into the existing spec by default. Empty{"spec":{}}preserves existing spec content but still records a new version (no-op for content, not for version state). To clear/replace the entire spec wholesale send{"spec":{...},"deep":false}. List-typed spec fields use replace semantics (the patch list replaces the existing list, no array merging). Coordinates Git + DB writes. Slug cannot be changed after creation.
update_meta
Patch /ops/update_meta | Auth: Write
Update element metadata (lightweight merge — does NOT bump version or snapshot spec)
Shallow JSONB merge into element.meta. Top-level keys in the provided value replace existing meta values; other keys are preserved. Used for UI metadata like canvas positions, panel state, viewer preferences. Wire-shape op_name is
update_meta(distinct fromupdate) so SSE subscribers + the cache auto-invalidator can distinguish lightweight metadata changes from spec edits without inspecting the payload. The MutatingElementStore wrapper stamps this op_name on the lifecycle event emitted byupdate_element_metastorage calls.
version
Get /ops/version | Auth: Read
Get current version or full history
Returns current version by default. Pass ?history=true for full version history (up to ?limit=N, default 50). Versions are backed by the element_versions table. Every spec update creates a new version entry.
Error Codes
| Code | Class | Retryable | Description |
|---|---|---|---|
GITHUB_AUTH_FAILED | auth | no | |
GITHUB_TOKEN_INSUFFICIENT_SCOPES | auth | no | |
GITHUB_RATE_LIMITED | internal | yes | |
GITHUB_OP_NOT_ON_EXECUTOR | validation | no | |
GITHUB_DRAFT_NOT_APPROVED | validation | no | |
GITHUB_MCP_UNREACHABLE | internal | yes | |
GITHUB_REPO_NOT_FOUND | validation | no | |
GITHUB_PR_NOT_MERGEABLE | validation | no |
Lifecycle / runtime
Inherited from io
Before request
- validate_auth
- check_rate_limit
After request
- record_metrics
On error
- log_error
- retry_if_transient
Execution model: async
Observability
Defined for this element
Metrics
- github_op_count
- github_op_latency_ms
- github_issue_created_count
- github_pr_action_count
- github_workflow_trigger_count
- github_auth_failure_count
Events
- github.op.succeeded
- github.op.failed
- github.issue.created
- github.pr.opened
- github.pr.merged
- github.workflow.triggered
- github.auth.failed
Pricing / cost
Platform default
Operation costs
- create: free
- update: free
- delete: free
- get: free
- list: free
- invoke: 10000 micro-AU
- tool_use: free
Set it up
- GitHub Usernamestring
- The username that owns the Personal Access Token
- Display Namestring
- Ownerstring
- Default Executorstring
- Default Organizationstring
- Org used when list-repos / search-code don't specify one