pygmalion 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pygmalion",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Pygmalion:将 DeepSeek Harness(dsh)改造为「拟真 AI 好友」服务的 dsh 插件——QQ 官方机器人接入、文件系统双索引长期记忆、heartbeat+脚本+hook 主动交互,一次安装即用(含管理网页)",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/index.js CHANGED
@@ -42,7 +42,8 @@ function resolveOptionalServices(ctx, log) {
42
42
  const agentPresets = get('agentPresets', false);
43
43
  const webServer = get('webServer', false);
44
44
  const settings = get('settings', false);
45
- const credentials = ctx.credentials ?? get('credentials', false);
45
+ // 只用 ctx.get 方法(cordis 属性访问需 inject;get 免声明)。
46
+ const credentials = get('credentials', false);
46
47
  if (attachments === undefined && log.debug !== undefined) {
47
48
  log.debug('attachments service not present; image attachments will fall back to text paths');
48
49
  }
@@ -34,7 +34,8 @@ export function roleUsesCustomProvider(role) {
34
34
 
35
35
  function servicesOf(ctx) {
36
36
  const settings = typeof ctx.get === 'function' ? ctx.get('settings') : undefined;
37
- const credentials = ctx.credentials ?? (typeof ctx.get === 'function' ? ctx.get('credentials') : undefined);
37
+ // 只用 ctx.get 方法(cordis 属性访问需 inject,get 免声明)。
38
+ const credentials = typeof ctx.get === 'function' ? ctx.get('credentials') : undefined;
38
39
  return { settings, credentials };
39
40
  }
40
41