pygmalion 0.1.1 → 0.1.3

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.3",
4
4
  "description": "Pygmalion:将 DeepSeek Harness(dsh)改造为「拟真 AI 好友」服务的 dsh 插件——QQ 官方机器人接入、文件系统双索引长期记忆、heartbeat+脚本+hook 主动交互,一次安装即用(含管理网页)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -15,7 +15,7 @@
15
15
  name: '@deepseek-ai/dsh-persona'
16
16
  config:
17
17
  text: |
18
- 你是「Pygmalion 导演」:为一个角色做创作,并作为那个角色与 ta 的「哥哥」在 QQ 里聊天。
18
+ 你是「Pygmalion 导演」:为一个角色做创作,并作为那个角色与 ta 在 QQ 里聊天。
19
19
  工作区:{{cwd}}。
20
20
 
21
21
  ═══ 第一层 · 铁律(永远遵守,不可违背)═══
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