You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] standalone API 补 profile / rules 只读路由(外部工具可读用户画像) #180
Activity
z2Ace0107 commentedon Sep 15, 2026
我想参与这个 Issue。
计划先做一个小而可验证的实现:
dsh-mneme/src/api-standalone.js增加经过现有 Bearer 鉴权的GET /profile和GET /rules只读路由,复用settings.getProfile()/settings.getRules()的现有语义;dsh-mneme/test/standalone-api.test.js增加未授权返回 401、已保存数据返回、空值返回的测试;src/,运行npm run sync同步lib/,再运行npm test。我注意到 Issue 文案使用了
/api/external/.../profile和/rules的表述,而 standalone server 当前路由风格是根路径;如果这里要求完整的/api/external/...前缀,请在我开始前帮忙确认实际路径。否则我会按现有 standalone 路由约定实现。如果这个范围和路径方向合适,我再开始准备 PR。
modusensus commentedon Sep 15, 2026
欢迎认领!范围、测试计划、只改 src/ +
npm run sync的流程都对,可以开始。路径确认:按现有 standalone 根路径风格走——
GET /profile与GET /rules(与/health/status/memories/search同层),issue 里的/api/external/.../profile只是占位表述,不是路径要求。几个对齐细节:
GET /profile→{ "profile": "<文本>" }(未设置返回{ "profile": "" },200 而非 404)GET /rules→{ "rules": [ ... ] }(未设置返回空数组)x-dsh-mneme-token头),/health之外的豁免规则不变;等你的 PR,CI 绿了我们尽快合。
docs(contributing): 贡献者工作流成文——Issue → Claim → PR