-
Notifications
You must be signed in to change notification settings - Fork 0
Deploy-to-Agent-Relay button + restore intended agent resilience #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b9d9964
1d5a69f
5189a67
2ad8ee8
37d95bb
5ba0e80
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| Granola Agent | ||
| ================== | ||
|
|
||
| [](https://agentrelay.com/cloud/deploy?agent=granola) | ||
|
|
||
| A proactive agent that responds when a new meeting recording is created, if it is a prospect | ||
| creates a Linear issue with what the prospect wanted and then opens up a PR implementing | ||
| what the prospect wanted in Github. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| Hacker News Monitor | ||
| ================== | ||
|
|
||
| [](https://agentrelay.com/cloud/deploy?agent=hn-monitor) | ||
|
|
||
| A proactive agent that scans hacker news posts for relevant topics that we decide | ||
| and posts to Slack a summary of them. | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| Linear Agent | ||
| ================== | ||
|
|
||
| [](https://agentrelay.com/cloud/deploy?agent=linear) | ||
|
|
||
| A proactive agent that when an issue on Linear with a certain label is opened up, | ||
| opes up a PR with the implementation. Also when commented in the Linear issue | ||
| will open up a PR. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| Spotify Releases | ||
| ================== | ||
|
|
||
| [](https://agentrelay.com/cloud/deploy?agent=spotify-releases) | ||
|
|
||
| A proactive agent that checks for new releases from your favorite artists | ||
| and sends you a DM about them. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,12 +25,14 @@ export default handler(async (ctx, event) => { | |
| if (!token) throw new Error('SPOTIFY_TOKEN is required'); | ||
|
|
||
| const since = await loadLastCheck(ctx); | ||
| const releases: Release[] = []; | ||
| for (const artist of await followedArtists(token)) { | ||
| for (const r of await latestReleases(token, artist)) { | ||
| if (r.date > since) releases.push(r); | ||
| } | ||
| } | ||
| const artists = await followedArtists(token); | ||
|
|
||
| // Fetch every artist's releases in parallel; one failing artist shouldn't | ||
| // sink the whole check. | ||
| const perArtist = await Promise.allSettled( | ||
| artists.map((artist) => latestReleases(token, artist)) | ||
| ); | ||
| const releases = perArtist.flatMap((r) => (r.status === 'fulfilled' ? r.value : [])).filter((rel) => rel.date > since); | ||
|
Comment on lines
+30
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Executing up to 50 concurrent requests to the Spotify API in parallel via // Fetch every artist's releases sequentially with try/catch to prevent rate limiting
// and ensure one failing artist doesn't sink the whole check.
const releases: Release[] = [];
for (const artist of artists) {
try {
const artistReleases = await latestReleases(token, artist);
releases.push(...artistReleases.filter((rel) => rel.date > since));
} catch {
// Skip failing artist
}
} |
||
|
|
||
| if (releases.length > 0) await ctx.slack.dm(user, render(releases)); | ||
| await saveLastCheck(ctx, today()); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| Vendor Monitor | ||
| ================== | ||
|
|
||
| [](https://agentrelay.com/cloud/deploy?agent=vendor-monitor) | ||
|
|
||
| A proactive agent that checks for changes in vendors you use in your stack and | ||
| sends the team a Slack about it. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,11 +35,16 @@ export default handler(async (ctx, event) => { | |
| await saveVersions(ctx, { ...lastSeen, ...current }); | ||
| }); | ||
|
|
||
| /** Latest published version from the npm registry. */ | ||
| /** Latest published version from the npm registry. Returns undefined on any | ||
| * failure so one bad/unreachable package doesn't abort the whole sweep. */ | ||
| async function latestVersion(pkg: string): Promise<string | undefined> { | ||
| const res = await fetch(`https://registry.npmjs.org/${encodeURIComponent(pkg)}/latest`); | ||
| if (!res.ok) return undefined; | ||
| return ((await res.json()) as { version?: string }).version; | ||
| try { | ||
| const res = await fetch(`https://registry.npmjs.org/${encodeURIComponent(pkg)}/latest`); | ||
| if (!res.ok) return undefined; | ||
| return ((await res.json()) as { version?: string }).version; | ||
| } catch { | ||
| return undefined; | ||
| } | ||
|
Comment on lines
+45
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Swallowing all network and parsing errors silently makes troubleshooting and debugging extremely difficult when the API is down or its response structure changes. Logging the errors to } catch (error) {
console.error(`Error fetching latest version for ${pkg}:`, error);
return undefined;
} |
||
| } | ||
|
|
||
| // ββ tiny helpers ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swallowing all network and parsing errors silently makes troubleshooting and debugging extremely difficult when the API is down or its response structure changes. Logging the errors to
console.errorprovides visibility into failures without crashing the run.