syntaqxAn agent can put an image in a pull request, an issue or a comment without committing it: on flagon-io/session-lab #2 a cloud session asked to show a screenshot of its preview in the pull request's description found no way to upload one (not in g1t --help, g1t api --list or the docs), so it committed the PNG, linked it at that commit and removed it in a second commit. The site has no comment-image upload either; images only ever came from repository files. Now upload_attachment (POST /repos/{owner}/{repo}/attachments, issues:write, the issue tool's attach action over MCP) takes name, data (the file base64-encoded, as upload_sarif takes its file) and an optional content_type, and answers in snake_case with id, name, url, markdown (, ready to paste), content_type and size. The work service decides, as add_comment does: a confirmed account that can read the repository, which is not archived. The type is read from the bytes (PNG, JPEG, GIF or WebP; a content_type that says otherwise is refused), at most 10 MB; too large is the new FailureCode too_large (413), another type the new unsupported_type (415), in Rust and TS contracts and the OpenAPI error codes. The bytes go in the usercontent namespace (AVATARS, now bound to work) under attachments/<id>, where the id is 256 random bits so the address is its permission, as Docs files' is; a row in the new attachments table (migration 0048) names the repository, and repo.purged deletes the bytes, then the rows. The usercontent origin serves /attachments/<id> as it serves avatars (stored type, nosniff, sandboxed). The API forms url from USERCONTENT_URL as the site does (g1tusercontent.com for g1t.sh, SITE_URL/-/usercontent elsewhere; the self-host config now passes it to the API). The CLI has g1t attach FILE... (prints each image's Markdown; --json the fields, a list for several) and --attach FILE (repeatable) on g1t issue create, issue comment, pr create, pr comment and pr ready, which uploads and appends the Markdown after the text. A session's run credential gets upload_attachment through issues:write, bound to its own repository (tested), and the cloud session's system prompt says to upload screenshots with g1t attach and never commit images just to link them. Docs: the CLI guide (Images in descriptions and comments), pull requests (Images), sessions, the MCP reference, self-hosting's USERCONTENT_URL row, reference.json and the regenerated openapi.json, CLI ops table and CLI reference. Deploy order: apply work migration 0048 and deploy work (new AVATARS binding), then the site (usercontent serves /attachments), then api, then integrations (prompt) and the docs; g1t attach and --attach ship with the next CLI release, which cloud sessions need before the prompt's advice works. Checked: cargo test -p g1t-contracts (319), -p g1t-work (209), -p g1t-api (211; openapi regenerated with G1T_WRITE_OPENAPI), -p g1t (112 + 51; ops_table and cli_reference regenerated with G1T_WRITE_OPS and G1T_WRITE_DOCS), -p g1t-integrations (76); cargo check -p g1t-api, -p g1t-work and -p g1t-integrations --target wasm32-unknown-unknown; node --test apps/web/app/lib/token-scopes.test.ts.5011621History
- ..
- 0001_init.sql
- 0002_lifecycle.sql
- 0003_repo_settings.sql
- 0004_up_to_date.sql
- 0005_assignees.sql
- 0006_merge_rules.sql
- 0007_timeline.sql
- 0008_plans.sql
- 0009_lifecycle_snapshot.sql
- 0010_merge_queue.sql
- 0011_agent_messages.sql
- 0012_exchanges.sql
- 0013_commit_statuses.sql
- 0014_mergeability.sql
- 0015_agent_runs_and_memory.sql
- 0016_by_author.sql
- 0017_agent_mentions.sql
- 0018_guardrails.sql
- 0019_memory_capture.sql
- 0020_agent_waits.sql
- 0021_confidence.sql
- 0022_required_checks.sql
- 0023_read_paths.sql
- 0024_g1t_name.sql
- 0025_requested_by.sql
- 0026_code_owners.sql
- 0027_labels_milestones_bases.sql
- 0028_rulesets.sql
- 0029_commit_checks.sql
- 0030_comment_edits.sql
- 0031_mention_revisions.sql
- 0032_contributions.sql
- 0033_agent_comments.sql
- 0034_sessions_and_claims.sql
- 0035_integration_and_decisions.sql
- 0036_subagents_and_links.sql
- 0037_queue_attempts.sql
- 0038_session_updates.sql
- 0039_queue_bypass.sql
- 0040_queue_evidence.sql
- 0041_pull_head_repo.sql
- 0042_merge_settings.sql
- 0043_commit_comments.sql
- 0044_queue_methods.sql
- 0045_pull_message_commits.sql
- 0046_reactions.sql
- 0047_commit_closes.sql
- 0048_attachments.sql