Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .agents/services/communications/discord.md
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,10 @@ Map Discord roles to aidevops runners. Users with specific roles get routed to t

### Configuration

`~/.config/aidevops/discord-bot.json` (600 permissions):

> **Security**: Store `botToken` in gopass (`aidevops secret set DISCORD_BOT_TOKEN`), not in this JSON file. Reference it via environment variables or `credentials.sh`. The value below is a placeholder only.

```json
{
"guildId": "YOUR_GUILD_ID",
Expand Down
2 changes: 2 additions & 0 deletions .agents/services/communications/msteams.md
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,8 @@ Same pattern as Matrix room mappings:

Matterbridge has native Microsoft Teams support via the Graph API. This is the simplest way to bridge Teams to other platforms without building a custom bot.

> **Security**: Store `ClientSecret` in gopass (`aidevops secret set MSTEAMS_CLIENT_SECRET`) and inject it via environment variable substitution or a templating step. Never commit the actual secret value to `matterbridge.toml`. The value below is a placeholder only.

```toml
# matterbridge.toml — Teams bridge configuration
[msteams]
Expand Down
17 changes: 10 additions & 7 deletions .agents/services/communications/urbit.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,16 +445,19 @@ sse.listen({
if (data.json?.["add-nodes"]) {
const nodes = data.json["add-nodes"].nodes
for (const [index, node] of Object.entries(nodes)) {
// Runtime type check instead of unsafe type assertion
// Runtime type guard — validate structure before accessing properties
const nodeObj = node as Record<string, unknown>
if (!nodeObj?.post || typeof nodeObj.post !== "object") continue
const post = nodeObj.post as { author: string; contents: { text?: string }[] }
if (post.author !== SHIP_NAME) {
const textContent = post.contents
.filter((c: { text?: string }) => c.text)
.map((c: { text?: string }) => c.text)
const rawPost = nodeObj.post as Record<string, unknown>
if (typeof rawPost.author !== "string" || !Array.isArray(rawPost.contents)) continue
const author = rawPost.author
const contents = rawPost.contents as Array<Record<string, unknown>>
if (author !== SHIP_NAME) {
const textContent = contents
.filter((c) => c != null && typeof c === "object" && typeof c.text === "string")
.map((c) => c.text as string)
.join(" ")
console.log(`Message from ~${post.author}: ${textContent}`)
console.log(`Message from ~${author}: ${textContent}`)
// Handle command and send response...
}
}
Expand Down
Loading