AGENTS.md@apps/desktop/src/main/ipcA
AGENTS.md@apps/desktop/src/main/ipc from maomaochong-ai/open-astravia is an AGENTS.md file: the standing instructions coding agents read in that repo.
mdr add maomaochong-ai/open-astravia/apps/desktop/src/main/ipc/AGENTS.md@git:20260818.4f19511Pins git:20260818.4f19511 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 14 of 14 checks passed
- Kind
- AGENTS.md file
- Repository
- maomaochong-ai/open-astravia
- Path
apps/desktop/src/main/ipc/AGENTS.md- Versions recorded
- 1
- Latest version
- git:20260818.4f19511, committed Aug 18, 2026
- Size
- 2,027 bytes
- Repository stars
- 39
- License
- Apache-2.0
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# IPC Directory Rules 本目录只负责 Electron IPC 桥接层。这里的代码应保持薄、可审计,不能承载业务能力。 ## 职责边界 - 允许:注册/移除 `ipcMain.handle`、接收 renderer 参数、做最小输入校验、调用 main 侧业务服务、返回结果。 - 允许:定义仅服务于 IPC 注册的 channel 常量和很小的参数 guard。 - 不允许:在本目录实现业务策略、状态机、事件映射、资源扫描、配置迁移、配置持久化、窗口生命周期编排或复杂数据转换。 - 不允许:为了复用 IPC handler 内部逻辑,从其他业务模块反向 import `main/ipc/*`。 ## 放置规则 - 业务服务放到对应领域目录,例如 `src/main/pet/*`、`src/main/notifications/*`、`src/main/plugins/*`。 - 纯策略/映射逻辑放到领域目录中的独立模块,并优先设计为纯函数,方便测试。 - IPC 文件只依赖业务服务,不让业务服务依赖 IPC 文件。 - 如果某个 IPC 文件开始同时处理注册、持久化、窗口控制、策略判断等多类职责,先拆分再继续新增功能。 ## 设计要求 - 使用声明式表、策略对象或小型 resolver 管理可增长的分支逻辑;避免在 IPC handler 中堆叠长 `if`/`switch`。 - 对外行为保持在 preload/shared 类型中定义;IPC 层不要私自扩展隐式协议。 - 同一类 channel 的校验逻辑可以留在 IPC 层,但校验通过后的动作应交给业务服务。 - 新增业务能力时先确认模块边界:IPC 是入口,业务模块才是能力所有者。 ## 示例 - 好:`ipc/pet.ts` 校验 `actionId` 后调用 `setDesktopPetActionFromUser(actionId)`。 - 差:`ipc/pet.ts` 自己读取配置、拼媒体路径、决定动作策略并直接操作窗口。 - 好:`ipc/session.ts` 收到 runtime event 后调用 `main/pet/session-event-action-policy.ts` 的映射函数。 - 差:在 `ipc/session.ts` 或 `ipc/pet-event-mapper.ts` 内维护 session 事件到桌宠动作的业务规则。
Read the whole file at its exact version.
How to install
mdr add maomaochong-ai/open-astravia/apps/desktop/src/main/ipc/AGENTS.md@sha256:03811a7f5df3562bThe line at the top of this page pins the label git:20260818.4f19511, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_pinnlyrldtjmgbam)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 1 version of this file, committed on Aug 18, 2026.
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (2027 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
maomaochong-ai/open-astravia · 39 stars · license Apache-2.0 · pushed 2026-11-01 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_pinnlyrldtjmgbam GET https://markdownregistry.com/api/v1/resolve?ref=maomaochong-ai/open-astravia/apps/desktop/src/main/ipc/AGENTS.md GET https://markdownregistry.com/api/v1/blob/03811a7f5df3562b7f9d8d2f9d38d6bbb40b8e1cbefbb6aa0135616400c44a39
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: how to write a good AGENTS.md · AGENTS.md vs CLAUDE.md · which agent file does what.