{"url":"/runs/usecases/release-notes-to-x.json","recordedAt":"2026-11-18T01:07:05.250Z","runId":"wfrun_2cpdAAE2KFE_cn7Y","sha":"e810ee115b4f943390b48e7c2e374fa225f648ec2514e2e3dc66a45a32be009e","sdk":"platform 504447660691","costUsd":0.004044,"ms":140348,"exitCode":0,"status":"succeeded","definition":"name: showcase-release-notes-to-x\ndescription: When a release ships, draft the X post from its notes and hold it for approval before anything is posted\nmaxRunCostUsd: 0.5\non:\n  webhook: {}\ndo:\n  - id: release\n    script.run:\n      input: { repo: \"tangle-network/agent-runtime\" }\n      egress: { allowDomains: [api.github.com] }\n      timeoutMs: 60000\n      source: |\n        export default async function run(input: { repo: string }) {\n          const res = await fetch(\"https://api.github.com/repos/\" + input.repo + \"/releases/latest\", { headers: { accept: \"application/vnd.github+json\", \"user-agent\": \"tangle-workflow\" } });\n          if (!res.ok) throw new Error(\"GitHub releases returned \" + res.status);\n          const r = await res.json();\n          const notes = String(r.body || \"\").replace(/ by @[A-Za-z0-9-]+/g, \"\");\n          console.log(r.tag_name + \" published \" + r.published_at + \"\\n\" + notes);\n          return { repo: input.repo, tag: r.tag_name, publishedAt: r.published_at, url: r.html_url, notes };\n        }\n  - id: draft\n    needs: [release]\n    agent.run:\n      model: \"google/gemini-3.7-flash\"\n      topology: { inference: {} }\n      profile:\n        name: release-announcer\n        prompt:\n          systemPrompt: \"You write one X post announcing a software release. At most 260 characters, plain words, no hashtags, no emoji, no people's handles. Name the version and the one change a developer cares about most. Output only the post text.\"\n      prompt: |\n        Release ${steps.release.tag} of ${steps.release.repo} (${steps.release.url}).\n\n        Notes:\n        ${truncate(steps.release.notes, 4000)}\n  - id: approve\n    needs: [draft]\n    decision:\n      title: \"Post this release note to X?\"\n      prompt: \"${steps.draft.text}\"\n      options: [post, discard]\n      timeout: 2h\n      onTimeout: default\n      default: discard\n","title":"Post release notes to X when a release ships","events":[{"atMs":58,"kind":"call","id":1,"name":"script.run","label":"release","result":{"status":"succeeded","stdout":"v2.3.7 published 2026-10-28T11:32:13Z\nLive topology exposes actual worker and supervisor activity clocks and full-stream cadence, preserves recorded failure causes, and retains complete EOF events without duplicate append counts.","exitCode":0,"output":"{\"repo\": \"tangle-network/agent-runtime\", \"tag\": \"v2.3.7\", \"publishedAt\": \"2026-10-28T11:32:13Z\", \"url\": \"https://github.com/tangle-network/agent-runtime/releases/tag/v2.3.7\", \"notes\": \"Live topology exposes actual worker and supervisor activity clocks and full-stream cadence, preserves recorded failure causes, and retains complete EOF events without duplicate append counts.\"}"},"durationMs":4850},{"atMs":4981,"kind":"call","id":2,"name":"agent.run","label":"draft","result":{"status":"succeeded","costUsd":0.004044,"model":"google/gemini-3.7-flash","inputTokens":131,"outputTokens":996},"durationMs":9131},{"atMs":5643,"kind":"stream","parent":2,"type":"iteration.started","data":{"node":"draft","model":"google/gemini-3.7-flash","name":"inference"}},{"atMs":14112,"kind":"stream","parent":2,"type":"agent.finished","data":{"result":{"agentId":"draft","status":"completed","result":{"response":"tangle-network/agent-runtime v2.3.7 is out. Live topology now preserves recorded failure causes, making it easier to diagnose why a worker or supervisor failed."}}}},{"atMs":14178,"kind":"call","id":3,"name":"decision","label":"approve","result":{"status":"succeeded","choice":"discard","note":"Showcase recording: the X post stays a draft; posting publicly is the owner decision."},"durationMs":125379},{"atMs":140348,"kind":"stdout","text":"run succeeded\n"}]}