metame-cli 1.5.9 → 1.5.10

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/index.js CHANGED
@@ -305,7 +305,7 @@ function requestDaemonRestart({
305
305
  const scriptsDir = path.join(__dirname, 'scripts');
306
306
  // Auto-detect ALL runtime scripts: daemon-*.js + all other non-test, non-utility .js/.yaml/.sh files.
307
307
  // This prevents "missing module" crashes when new files are added without updating a manual list.
308
- const EXCLUDED_SCRIPTS = new Set(['sync-readme.js', 'test_daemon.js']);
308
+ const EXCLUDED_SCRIPTS = new Set(['sync-readme.js', 'test_daemon.js', 'daemon.yaml']);
309
309
  const BUNDLED_SCRIPTS = (() => {
310
310
  try {
311
311
  return fs.readdirSync(scriptsDir).filter((f) => {
@@ -330,6 +330,19 @@ try {
330
330
  }
331
331
  } catch { /* non-fatal */ }
332
332
 
333
+ // Worktree guard: team members running in worktrees must NEVER deploy to ~/.metame/
334
+ // Their worktree is an isolated sandbox — deploying would overwrite production symlinks.
335
+ // Detect any .worktrees/ parent in the path (covers both ~/.metame/worktrees/ and repo-local .worktrees/).
336
+ const _isInWorktree = __dirname.split(path.sep).includes('.worktrees') ||
337
+ __dirname.startsWith(path.join(HOME_DIR, '.metame', 'worktrees'));
338
+ if (_isInWorktree) {
339
+ console.error(`\n${icon("stop")} ACTION BLOCKED: Worktree Deploy Prevented`);
340
+ console.error(` You are running from a worktree (${path.basename(__dirname)}).`);
341
+ console.error(' Deploying from a worktree would overwrite production daemon code.');
342
+ console.error(' Use \x1b[36mtouch ~/.metame/daemon.js\x1b[0m to hot-reload instead.\n');
343
+ process.exit(1);
344
+ }
345
+
333
346
  // Pre-deploy syntax validation: check all .js files before syncing to ~/.metame/
334
347
  // Catches bad merges and careless agent edits BEFORE they can crash the daemon.
335
348
  const { execSync: _execSync } = require('child_process');
@@ -1929,6 +1942,8 @@ if (isDaemon) {
1929
1942
  <string>${currentPath}</string>
1930
1943
  <key>HOME</key>
1931
1944
  <string>${HOME_DIR}</string>
1945
+ <key>LAUNCHED_BY_LAUNCHD</key>
1946
+ <string>1</string>
1932
1947
  </dict>
1933
1948
  </dict>
1934
1949
  </plist>`;
@@ -2046,10 +2061,11 @@ WantedBy=default.target
2046
2061
  sleepSync(1000);
2047
2062
  }
2048
2063
  } catch { /* ignore */ }
2049
- // Check if already running
2064
+ // Clean stale PID and lock files before spawning new daemon
2050
2065
  if (fs.existsSync(DAEMON_PID)) {
2051
2066
  try { fs.unlinkSync(DAEMON_PID); } catch { /* */ }
2052
2067
  }
2068
+ try { fs.unlinkSync(DAEMON_LOCK); } catch { /* */ }
2053
2069
  if (!fs.existsSync(DAEMON_CONFIG)) {
2054
2070
  console.error(`${icon("fail")} No config found. Run: metame daemon init`);
2055
2071
  process.exit(1);
@@ -2097,6 +2113,7 @@ WantedBy=default.target
2097
2113
  console.log(`${icon("warn")} Process ${pid} not found (may have already exited).`);
2098
2114
  }
2099
2115
  try { fs.unlinkSync(DAEMON_PID); } catch { /* ignore */ }
2116
+ try { fs.unlinkSync(DAEMON_LOCK); } catch { /* ignore */ }
2100
2117
  process.exit(0);
2101
2118
  }
2102
2119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "metame-cli",
3
- "version": "1.5.9",
3
+ "version": "1.5.10",
4
4
  "description": "The Cognitive Profile Layer for Claude Code. Knows how you think, not just what you said.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -0,0 +1,55 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * daemon-utils.js
5
+ *
6
+ * Shared normalization helpers used across daemon modules.
7
+ * Single source of truth — no other module should redefine these.
8
+ */
9
+
10
+ function normalizeEngineName(name, defaultEngine = 'claude') {
11
+ const n = String(name || '').trim().toLowerCase();
12
+ return n === 'codex' ? 'codex' : (typeof defaultEngine === 'function' ? defaultEngine() : defaultEngine);
13
+ }
14
+
15
+ function normalizeCodexSandboxMode(value, fallback = null) {
16
+ const text = String(value || '').trim().toLowerCase();
17
+ if (!text) return fallback;
18
+ if (text === 'read-only' || text === 'readonly') return 'read-only';
19
+ if (text === 'workspace-write' || text === 'workspace') return 'workspace-write';
20
+ if (
21
+ text === 'danger-full-access'
22
+ || text === 'dangerous'
23
+ || text === 'full-access'
24
+ || text === 'full'
25
+ || text === 'bypass'
26
+ || text === 'writable'
27
+ ) return 'danger-full-access';
28
+ return fallback;
29
+ }
30
+
31
+ function normalizeCodexApprovalPolicy(value, fallback = null) {
32
+ const text = String(value || '').trim().toLowerCase();
33
+ if (!text) return fallback;
34
+ if (text === 'never' || text === 'no' || text === 'none') return 'never';
35
+ if (text === 'on-failure' || text === 'on_failure' || text === 'failure') return 'on-failure';
36
+ if (text === 'on-request' || text === 'on_request' || text === 'request') return 'on-request';
37
+ if (text === 'untrusted') return 'untrusted';
38
+ return fallback;
39
+ }
40
+
41
+ function mergeAgentMaps(cfg) {
42
+ return {
43
+ ...(cfg.telegram ? cfg.telegram.chat_agent_map : {}),
44
+ ...(cfg.feishu ? cfg.feishu.chat_agent_map : {}),
45
+ ...(cfg.imessage ? cfg.imessage.chat_agent_map : {}),
46
+ ...(cfg.siri_bridge ? cfg.siri_bridge.chat_agent_map : {}),
47
+ };
48
+ }
49
+
50
+ module.exports = {
51
+ normalizeEngineName,
52
+ normalizeCodexSandboxMode,
53
+ normalizeCodexApprovalPolicy,
54
+ mergeAgentMaps,
55
+ };
@@ -0,0 +1,72 @@
1
+ # 未被 daemon.js 直接引用的脚本文件审查
2
+
3
+ > 审查日期: 2026-03-17
4
+ > 目的: 确认哪些文件是活跃的、哪些可以安全删除
5
+
6
+ ---
7
+
8
+ ## 分类结果
9
+
10
+ ### ACTIVE — 被其他活跃模块间接引用(无需处理)
11
+
12
+ | 文件 | 引用方 | 说明 |
13
+ |------|--------|------|
14
+ | `session-analytics.js` | daemon-claude-engine, distill, memory-extract, session-summarize | 会话分析核心库 |
15
+ | `mentor-engine.js` | daemon-claude-engine, daemon-admin-commands | AI 导师引擎 |
16
+ | `intent-registry.js` | daemon-claude-engine, hooks/intent-engine | 意图识别注册表 |
17
+ | `daemon-command-session-route.js` | daemon-exec-commands, daemon-ops-commands | 会话路由解析 |
18
+ | `daemon-siri-bridge.js` | daemon-bridges.js | Siri HTTP 桥接 |
19
+ | `daemon-siri-imessage.js` | daemon-siri-bridge.js | iMessage 数据库读取 |
20
+ | `telegram-adapter.js` | daemon-bridges.js | Telegram 适配器 |
21
+ | `feishu-adapter.js` | daemon-bridges.js | 飞书适配器 |
22
+ | `session-summarize.js` | daemon.js (spawn) | 会话总结,由 daemon.js 第1158行 spawn 调用 |
23
+
24
+ ### HEARTBEAT — daemon.yaml 心跳任务调用(无需处理)
25
+
26
+ | 文件 | daemon.yaml 任务名 | 说明 |
27
+ |------|-------------------|------|
28
+ | `distill.js` (1447行) | `cognitive-distill` | 认知蒸馏引擎 |
29
+ | `memory-extract.js` (428行) | `memory-extract` | 记忆提取 |
30
+ | `memory-nightly-reflect.js` (607行) | (nightly task) | 夜间反思 |
31
+ | `self-reflect.js` (378行) | `self-reflect` | 自我反思 |
32
+
33
+ ### DEPENDENCY — 被心跳任务间接依赖(无需处理)
34
+
35
+ | 文件 | 被谁引用 | 说明 |
36
+ |------|----------|------|
37
+ | `signal-capture.js` | distill.js + Claude Code UserPromptSubmit hook | 信号捕获(hook + 数据源) |
38
+ | `pending-traits.js` (147行) | distill.js | 待处理特征 |
39
+ | `skill-changelog.js` | skill-evolution.js | 技能变更日志 |
40
+
41
+ ---
42
+
43
+ ### ORPHAN — 疑似孤儿文件,需要王总决策
44
+
45
+ | 文件 | 行数 | 分析 | 建议 |
46
+ |------|------|------|------|
47
+ | `daemon-reactive-lifecycle.js` | ~500 | 未被任何生产模块 require,仅被 test 和 verify 脚本引用。**但仍会被部署到 ~/.metame/**(不在 EXCLUDED_SCRIPTS 中)。是计划中的"反应式生命周期"功能,尚未集成 | **删除或归档**?如果不再计划实现。至少应加入 EXCLUDED_SCRIPTS 避免无用部署 |
48
+ | `verify-reactive-claude-md.js` | ~100 | 仅引用 daemon-reactive-lifecycle,单独的验证脚本 | 随 reactive-lifecycle 一起处理 |
49
+ | `sync-readme.js` | ~50 | 未被任何模块引用,是独立 README 翻译工具。已在 EXCLUDED_SCRIPTS 中,不会被部署到 ~/.metame/ | **保留为 CLI 工具**(无害)还是 **删除**? |
50
+
51
+ ---
52
+
53
+ ### plugin/scripts/ 孤儿文件(无对应源文件)
54
+
55
+ 这些文件只存在于 `plugin/scripts/`,在 `scripts/` 中没有源文件:
56
+
57
+ | 文件 | 说明 | 建议 |
58
+ |------|------|------|
59
+ | `auto-start-daemon.js` | SessionStart hook 自启动 daemon | 迁移到 `scripts/` 还是删除? |
60
+ | `distill-on-start.js` | 启动时 spawn 蒸馏 | 同上 |
61
+ | `inject-profile.js` | 注入 SYSTEM KERNEL 协议头 | 同上 |
62
+ | `setup.js` | 创建 ~/.claude_profile.yaml | 同上 |
63
+
64
+ > 风险:下次 `npm run sync:plugin` 会用 `scripts/` 覆盖 `plugin/scripts/`,这 4 个文件可能丢失。
65
+
66
+ ---
67
+
68
+ ## 需要王总确认的决策
69
+
70
+ 1. **daemon-reactive-lifecycle.js** — 这个反应式生命周期功能还计划集成吗?如果不做了就可以删掉。
71
+ 2. **sync-readme.js** — 是否还在用?
72
+ 3. **plugin/scripts/ 的 4 个孤儿** — 应该迁移到 `scripts/` 作为源文件,还是已经不需要了?
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Auto-Rules Intent Module
5
+ *
6
+ * Injects auto-promoted defensive rules distilled by memory-nightly-reflect.
7
+ * Rules live in ~/.metame/auto-rules.md — one-liners promoted from recurring
8
+ * hot-fact patterns (3+ occurrences in memory.db).
9
+ *
10
+ * Always fires when rules exist — no pattern detection needed.
11
+ * Overhead: ~10–15 one-liners ≈ 200 tokens per turn.
12
+ *
13
+ * File is cached for CACHE_TTL_MS to avoid per-prompt disk I/O.
14
+ * Cache refreshes automatically after nightly-reflect writes new rules.
15
+ */
16
+
17
+ const fs = require('fs');
18
+ const path = require('path');
19
+ const os = require('os');
20
+
21
+ const RULES_FILE = path.join(os.homedir(), '.metame', 'auto-rules.md');
22
+ const CACHE_TTL_MS = 60 * 1000; // 1 minute — nightly-reflect runs once/day
23
+
24
+ let _cached = null;
25
+ let _cacheTs = 0;
26
+
27
+ function loadRules() {
28
+ const now = Date.now();
29
+ if (_cached !== null && now - _cacheTs < CACHE_TTL_MS) return _cached;
30
+
31
+ try {
32
+ const content = fs.readFileSync(RULES_FILE, 'utf8');
33
+ const rules = content
34
+ .split('\n')
35
+ .map(l => l.trim())
36
+ .filter(l => l && !l.startsWith('<!--'));
37
+ _cached = rules.length > 0 ? rules : [];
38
+ } catch {
39
+ _cached = [];
40
+ }
41
+
42
+ _cacheTs = now;
43
+ return _cached;
44
+ }
45
+
46
+ module.exports = function detectAutoRules() {
47
+ const rules = loadRules();
48
+ if (rules.length === 0) return null;
49
+ return ['[自动晋升规则 — 夜间蒸馏高频模式]', ...rules.map(r => `- ${r}`)].join('\n');
50
+ };
@@ -1,444 +0,0 @@
1
- telegram:
2
- enabled: true
3
- bot_token: 8403757601:AAEouYu9BFDzg70EDjPlsHXbGJ2guNuH9Tg
4
- allowed_chat_ids:
5
- - 8572284648
6
- permissions:
7
- defaultMode: bypassPermissions
8
- chat_agent_map: {}
9
- feishu:
10
- enabled: true
11
- app_id: cli_a90a073b2ba1dbb4
12
- app_secret: Om2sn22xfMaM0Jfv4IGLNh0CftikG8mU
13
- operator_ids:
14
- - ou_f873edab380d4836f93cc9e9b9104f5a
15
- allowed_chat_ids:
16
- - oc_84be4bf1a1dabc6c1f0c22d0b6feaf8d
17
- - oc_2693fc5ca63064f144eca78264bcea48
18
- - oc_280f2c243f348d8f688580f882996bcd
19
- - oc_942de23c38ff876f73f163052fbdb68f
20
- - oc_987e0d01804ab9459272006416a935a8
21
- - oc_9dc62f6011b337b413eef81b4738883b
22
- - oc_8902c34a0fc52b28ada1a7c4e25aa22a
23
- - oc_e777c7e7a24335ecbf25ed129402af54
24
- - oc_5d76f02c21203c5ae1c19fd83c790ba4
25
- - oc_9cbeb5cfcef80ddffcf0419507391189
26
- - oc_bd0b81e62ff3576dc9b4c6670bb788d2
27
- - oc_e33569664c1c1224d44a864a4fb40dd2
28
- chat_agent_map:
29
- oc_84be4bf1a1dabc6c1f0c22d0b6feaf8d: metame
30
- oc_2693fc5ca63064f144eca78264bcea48: personal
31
- oc_280f2c243f348d8f688580f882996bcd: metame
32
- oc_942de23c38ff876f73f163052fbdb68f: digital_me
33
- oc_987e0d01804ab9459272006416a935a8: desktop
34
- oc_9dc62f6011b337b413eef81b4738883b: ___
35
- oc_8902c34a0fc52b28ada1a7c4e25aa22a: business
36
- oc_e777c7e7a24335ecbf25ed129402af54: personal
37
- oc_5d76f02c21203c5ae1c19fd83c790ba4: munger
38
- oc_9cbeb5cfcef80ddffcf0419507391189: achat_pm
39
- oc_bd0b81e62ff3576dc9b4c6670bb788d2: xianyu
40
- oc_e33569664c1c1224d44a864a4fb40dd2: drama_manager
41
- permissions:
42
- defaultMode: bypassPermissions
43
- projects:
44
- business:
45
- name: CEO · 商业决策
46
- icon: 💼
47
- color: orange
48
- cwd: ~/AGI/Business
49
- nicknames:
50
- - 艾布
51
- - CEO
52
- - 商业
53
- heartbeat_tasks: []
54
- team:
55
- - key: hunter
56
- name: 猎手 · 市场情报
57
- icon: 🔍
58
- color: green
59
- cwd: ~/AGI/Business/team/hunter
60
- nicknames:
61
- - 猎手
62
- - Hunter
63
- - key: builder
64
- name: 工匠 · MVP拼装
65
- icon: 🔧
66
- color: yellow
67
- cwd: ~/AGI/Business/team/builder
68
- nicknames:
69
- - 工匠
70
- - Builder
71
- - key: trojan
72
- name: 特洛伊 · 获客专家
73
- icon: 🎯
74
- color: red
75
- cwd: ~/AGI/Business/team/trojan
76
- nicknames:
77
- - 特洛伊
78
- - Trojan
79
- - key: closer
80
- name: 终结者 · 成交专家
81
- icon: 💰
82
- color: purple
83
- cwd: ~/AGI/Business/team/closer
84
- nicknames:
85
- - 终结者
86
- - Closer
87
- - key: xianyu
88
- name: 小鱼 · 咸鱼客服
89
- icon: 🐟
90
- color: cyan
91
- cwd: ~/AGI/Business/team/xianyu
92
- nicknames:
93
- - 小鱼
94
- - 咸鱼客服
95
- achat_pm:
96
- name: A哥 · AChat Protocol PM
97
- icon: 🔗
98
- color: blue
99
- cwd: ~/AGI/AChat
100
- nicknames:
101
- - A哥
102
- - 老A
103
- - 大A
104
- - achat
105
- heartbeat_tasks: []
106
- munger:
107
- name: 芒格 · 格栅思维顾问
108
- icon: 🧠
109
- color: teal
110
- cwd: ~/AGI/Munger
111
- nicknames:
112
- - 芒格
113
- - 查理
114
- - 私人顾问
115
- - munger
116
- heartbeat_tasks: []
117
- team:
118
- - key: buffett
119
- name: 巴菲特 · 价值投资
120
- icon: 🏦
121
- color: blue
122
- cwd: ~/AGI/Munger/team/buffett
123
- nicknames:
124
- - 巴菲特
125
- - 老巴
126
- - key: lynch
127
- name: 林奇 · 成长股猎手
128
- icon: 📈
129
- color: green
130
- cwd: ~/AGI/Munger/team/lynch
131
- nicknames:
132
- - 林奇
133
- - 彼得
134
- - key: howard
135
- name: 马克斯 · 风险管理
136
- icon: ⚖️
137
- color: orange
138
- cwd: ~/AGI/Munger/team/howard
139
- nicknames:
140
- - 马克斯
141
- - 霍华德
142
- - key: quant
143
- name: 量化官 · 数据执行
144
- icon: 📊
145
- color: purple
146
- cwd: ~/AGI/Munger/team/quant
147
- nicknames:
148
- - 量化官
149
- personal:
150
- name: personal
151
- icon: 💅
152
- color: carmine
153
- cwd: /Users/yaron
154
- engine: claude
155
- model: sonnet
156
- guard: user-only
157
- nicknames:
158
- - 小美
159
- - 助理
160
- - personal
161
- heartbeat_tasks: []
162
- digital_me:
163
- name: Digital Me
164
- icon: 📊
165
- color: grey
166
- cwd: ~/AGI/Digital_Me
167
- nicknames:
168
- - 小D
169
- - 3D
170
- - 自媒体
171
- heartbeat_tasks:
172
- - name: daily-topic-radar
173
- type: script
174
- command: bash /Users/yaron/AGI/TrendRadar/run-crawl.sh
175
- at: '09:00'
176
- require_idle: false
177
- notify: true
178
- enabled: true
179
- - name: weekend-review
180
- cwd: ~/AGI/Digital_Me
181
- model: haiku
182
- interval: 5m
183
- timeout: 120000
184
- notify: true
185
- enabled: true
186
- precondition: node -e "const fs=require('fs');const p=process.env.HOME+'/.metame/daemon_state.json';const key='weekend-review';const pad=n=>String(n).padStart(2,'0');const weekKey=d=>{const x=new Date(d);const day=(x.getDay()+6)%7;x.setHours(0,0,0,0);x.setDate(x.getDate()-day);return x.getFullYear()+'-'+pad(x.getMonth()+1)+'-'+pad(x.getDate());};const now=new Date();const dow=now.getDay();if(!(dow===0||dow===6))process.exit(1);if(now.getHours()!==22)process.exit(1);let s={};try{s=JSON.parse(fs.readFileSync(p,'utf8'));}catch{}const t=(s.tasks||{})[key];if(t&&t.status==='success'&&t.last_run&&weekKey(t.last_run)===weekKey(now))process.exit(1);console.log('run');"
187
- prompt: |-
188
- 你是周末复盘助手。现在执行周末总结:先向用户索取本周关键数据,再给出下周选题方案提示词。
189
- 硬性要求:不臆测数据,不直接给结论。
190
- 输出结构(严格三段):
191
- 1) 【请补充本周数据】列出 6 项:发布篇数、总阅读、平均阅读、最高阅读文章(标题+阅读量)、最低阅读文章(标题+阅读量)、净增粉丝。
192
- 2) 【回填模板】给可直接复制填写的模板。
193
- 3) 【下周选题方案提示词(待数据版)】给一段可直接发给 AI 的提示词:收到上述数据后,输出下周 7 天选题计划(每天 1 个选题,含优先级、标题、核心观点、目标读者、验证指标)。
194
- 风格:简洁、可执行,全文不超过 18 行。
195
- allowedTools:
196
- - Read
197
- metame:
198
- name: 超级总管 Jarvis
199
- icon: 🤖
200
- color: blue
201
- cwd: ~/AGI/MetaMe
202
- nicknames:
203
- - 贾维斯
204
- - 老贾
205
- - 贾
206
- - Jarvis
207
- - jarvis
208
- heartbeat_tasks: null
209
- broadcast: true
210
- team:
211
- - key: jia
212
- name: Jarvis · 甲
213
- icon: 🤖
214
- color: green
215
- cwd: ~/AGI/MetaMe
216
- nicknames:
217
- - 甲
218
- auto_dispatch: true
219
- - key: yi
220
- name: Jarvis · 乙
221
- icon: 🤖
222
- color: yellow
223
- cwd: ~/AGI/MetaMe
224
- nicknames:
225
- - 乙
226
- auto_dispatch: true
227
- - key: bing
228
- name: Jarvis · 丙
229
- icon: 🤖
230
- color: red
231
- cwd: ~/AGI/MetaMe
232
- nicknames:
233
- - 丙
234
- auto_dispatch: true
235
- desktop:
236
- name: Desktop PM
237
- icon: 🚀
238
- color: indigo
239
- cwd: ~/AGI/metame-desktop
240
- nicknames:
241
- - 马经理
242
- - 老马
243
- - 桌面
244
- - Desktop
245
- heartbeat_tasks: []
246
- ___:
247
- name: 因斯坦
248
- cwd: /Users/yaron/Desktop/项目计划书/国自然青年
249
- nicknames:
250
- - 因斯坦
251
- scientist:
252
- name: 科研总监
253
- icon: 🔬
254
- color: teal
255
- cwd: ~/AGI/AgentScientist
256
- reactive: true
257
- nicknames:
258
- - 科研
259
- - 科学家
260
- - scientist
261
- - 研究员
262
- heartbeat_tasks: []
263
- team:
264
- - key: sci_scout
265
- name: 文献侦察兵
266
- icon: 📚
267
- color: green
268
- cwd: ~/AGI/AgentScientist/team/scout
269
- nicknames:
270
- - 侦察兵
271
- - scout
272
- - 文献
273
- - key: sci_thinker
274
- name: 思想家
275
- icon: 💡
276
- color: yellow
277
- cwd: ~/AGI/AgentScientist/team/thinker
278
- nicknames:
279
- - 思想家
280
- - thinker
281
- - key: sci_critic
282
- name: 批判者
283
- icon: 🔍
284
- color: red
285
- cwd: ~/AGI/AgentScientist/team/critic
286
- nicknames:
287
- - 批判者
288
- - critic
289
- - 审稿人
290
- - key: sci_lab
291
- name: 实验室
292
- icon: 🧪
293
- color: purple
294
- cwd: ~/AGI/AgentScientist/team/lab
295
- nicknames:
296
- - 实验室
297
- - lab
298
- - key: sci_writer
299
- name: 论文写手
300
- icon: ✍️
301
- color: cyan
302
- cwd: ~/AGI/AgentScientist/team/writer
303
- nicknames:
304
- - 写手
305
- - writer
306
- - 论文
307
- drama_manager:
308
- name: 🎬 短剧总管
309
- icon: 🎬
310
- color: red
311
- cwd: ~/AGI/DramaFactory
312
- nicknames:
313
- - 短剧总管
314
- - 总管
315
- - drama
316
- heartbeat_tasks: []
317
- team:
318
- - key: drama_screenwriter
319
- name: ✍️ 编剧
320
- icon: ✍️
321
- color: orange
322
- cwd: ~/AGI/DramaFactory/team/screenwriter
323
- nicknames:
324
- - 编剧
325
- - key: drama_writer
326
- name: 📝 写手
327
- icon: 📝
328
- color: yellow
329
- cwd: ~/AGI/DramaFactory/team/writer
330
- nicknames:
331
- - 写手
332
- - key: drama_hook_rev
333
- name: 🪝 钩子审核
334
- icon: 🪝
335
- color: pink
336
- cwd: ~/AGI/DramaFactory/team/hook_rev
337
- nicknames:
338
- - 钩子审核员
339
- - 钩子审核
340
- - key: drama_drama_rev
341
- name: 🌶 狗血审核
342
- icon: 🌶
343
- color: magenta
344
- cwd: ~/AGI/DramaFactory/team/drama_rev
345
- nicknames:
346
- - 狗血审核员
347
- - 狗血审核
348
- - key: drama_format_rev
349
- name: 📐 格式审核
350
- icon: 📐
351
- color: grey
352
- cwd: ~/AGI/DramaFactory/team/format_rev
353
- nicknames:
354
- - 格式审核员
355
- - 格式审核
356
- heartbeat:
357
- tasks:
358
- - name: cognitive-distill
359
- type: script
360
- command: node ~/.metame/distill.js
361
- interval: 2h
362
- precondition: test -s ~/.metame/raw_signals.jsonl
363
- require_idle: true
364
- notify: false
365
- enabled: true
366
- - name: memory-extract
367
- type: script
368
- command: node ~/.metame/memory-extract.js
369
- interval: 12h
370
- timeout: 1800
371
- require_idle: true
372
- notify: false
373
- enabled: true
374
- - name: memory-gc
375
- type: script
376
- command: node ~/.metame/memory-gc.js
377
- at: '02:00'
378
- require_idle: true
379
- notify: false
380
- enabled: true
381
- - name: skill-evolve
382
- type: script
383
- command: node ~/.metame/skill-evolution.js
384
- interval: 24h
385
- precondition: test -s ~/.metame/skill_signals.jsonl
386
- require_idle: true
387
- notify: false
388
- enabled: true
389
- - name: self-reflect
390
- type: script
391
- command: node ~/.metame/self-reflect.js
392
- at: '23:00'
393
- require_idle: true
394
- notify: false
395
- enabled: true
396
- - name: nightly-reflect
397
- type: script
398
- command: node ~/.metame/memory-nightly-reflect.js
399
- at: '01:00'
400
- require_idle: true
401
- notify: false
402
- enabled: true
403
- - name: memory-index
404
- type: script
405
- command: node ~/.metame/memory-index.js
406
- at: '01:30'
407
- require_idle: true
408
- notify: false
409
- enabled: true
410
- budget:
411
- daily_limit: 100000
412
- warning_threshold: 0.8
413
- daemon:
414
- model: sonnet
415
- log_max_size: 1048576
416
- heartbeat_check_interval: 60
417
- skill_evolution_notify: false
418
- dangerously_skip_permissions: true
419
- session_allowed_tools:
420
- - Edit
421
- - Write
422
- - Read
423
- - Bash
424
- - Glob
425
- - Grep
426
- - WebFetch
427
- - WebSearch
428
- - Task
429
- - Skill
430
- - TodoRead
431
- - TodoWrite
432
- - NotebookEdit
433
- - mcp__playwright__*
434
- - mcp__trendradar__*
435
- - mcp__notionApi__*
436
- models:
437
- claude: sonnet
438
-
439
- # Intent Engine — UserPromptSubmit hook modules
440
- # Set any key to false to disable that intent module.
441
- hooks:
442
- team_dispatch: true # team member dispatch hints
443
- ops_assist: true # /undo /restart /logs /gc hints
444
- task_create: true # task scheduling hints