Skip to content

feat(scheduler): pull back non-jsonl run artifacts (images, generated files) - #1058

Merged
edenreich merged 3 commits into
mainfrom
fix/issue-1057
Aug 12, 2026
Merged

edenreich merged 3 commits into
mainfrom
fix/issue-1057

Conversation

@inference-gateway-maintainer

@inference-gateway-maintainer inference-gateway-maintainer Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #1057

Summary

The GitHub scheduling backend's artifact poller previously extracted only *.jsonl conversation files from run artifacts, discarding images, reports, and other output files produced during scheduled jobs. This PR broadens the workflow upload and poller extraction to include those files - and introduces a dedicated .infer/artifacts/<session-id>/ directory so that only intended agent deliverables are packaged, instead of everything that happens to sit in the .infer/tmp scratch dir.

Changes

Dedicated artifacts directory

.infer/tmp is a mixed scratch dir (chunk staging, skill downloads, screenshots, clipboard pastes), so treating its contents as run artifacts pulled in unintended files. Deliverables now land in .infer/artifacts/<session-id>/, grouped by the conversation that produced them:

  • config.go: ArtifactsDirName constant, ArtifactsDir() / SessionArtifactsDir(sessionID) helpers (session IDs sanitized so they cannot escape the artifacts root), and the sandbox carve-out extended so tools can write there.
  • image_service.go: generated/edited/varied images save to the session artifacts dir (also fixes the hardcoded project-relative .infer - it now respects the resolved config dir).
  • web_fetch.go: downloads and binary fetches save to the session artifacts dir.
  • a2a_task.go: auto-downloaded A2A task artifacts save to the session artifacts dir (ctx threaded through handleTaskState for the session ID).
  • prompts.go: tool descriptions updated to reference .infer/artifacts/.
  • file.go: project file listing includes .infer/artifacts/ alongside .infer/tmp/.

Scheduler workflow + poller

  • workflow.go: the collect step copies $GITHUB_WORKSPACE/.infer/artifacts and ~/.infer/artifacts (workspace wins on collisions) into .infer-conversations/.artifacts/ - no more blanket ~/.infer/tmp upload. Upload path broadened from *.jsonl to the whole directory.
  • artifacts.go: ArtifactsDir option on the poller (defaults to ~/.infer/artifacts). extract() routes *.jsonl to ConversationsDir (unchanged) and everything else to ArtifactsDir, preserving the path below the workflow's .artifacts/ staging dir so per-session grouping survives the round trip. Retry cap, rate-limit backoff, zip-slip containment, and idempotency unchanged.
  • daemon.go: plumbs ~/.infer/artifacts into the poller.

Cross-repo impact

… files)

Broaden the workflow upload step to collect .infer/tmp outputs alongside conversation jsonl. Add ArtifactsDir option to the artifact poller to extract non-jsonl files into ~/.infer/tmp/artifacts, keeping the existing retry, rate-limit, and zip-slip containment behavior. Conversation jsonl handling is unchanged.
…s, grouped by session

Separate intended agent outputs (generated images, WebFetch downloads, A2A
task artifacts) from the .infer/tmp scratch dir. Deliverables now land in
.infer/artifacts/<session-id>/, the scheduler workflow uploads only that
dir instead of all of tmp, and the poller preserves the per-session
structure when pulling run artifacts back to ~/.infer/artifacts.
@edenreich
edenreich merged commit c816a3d into main Aug 12, 2026
1 check passed
@edenreich
edenreich deleted the fix/issue-1057 branch August 12, 2026 20:35
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.169.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Aug 12, 2026
edenreich added a commit to inference-gateway/desktop that referenced this pull request Aug 12, 2026
#113)

The CLI moved agent deliverables from the .infer/tmp scratch dir to
.infer/artifacts/<session-id>/ (inference-gateway/cli#1058). Extend the
asset-protocol scope, the save_image guard, and the frontend image-path
allowlist to accept the new location while keeping .infer/tmp so existing
conversations still render.

Closes #112
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Artifact poller: pull back non-jsonl run artifacts (images, generated files)

1 participant