femo-plugin 1.0.4 → 1.0.6

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.
Files changed (112) hide show
  1. package/LICENSE +1 -1
  2. package/NOTICE +8 -0
  3. package/README.md +12 -1
  4. package/docs/ActiveRoadmaps/Func/345/201/234/346/255/242/350/257/255/344/271/211-/351/201/227/345/274/203/346/216/245/347/273/255-/346/226/275/345/267/245/346/270/205/345/215/225.md +91 -0
  5. package/docs/ActiveRoadmaps//345/217/214user/346/226/275/345/267/245/346/270/205/345/215/225.md +326 -0
  6. package/docs/Specs//346/212/225/345/275/261/344/270/255/345/277/203/350/241/214/345/215/217/350/256/256.md +616 -569
  7. package/femo2host/AGENTS.md +1 -1
  8. package/femo2host/femoGenConnector/engine-client.mjs +7 -2
  9. package/femo2host/femoGenConnector/file-dialogs.mjs +108 -2
  10. package/femo2host/femoToolcall/chronica.py +99 -19
  11. package/femo2host/femo_api.py +14 -1
  12. package/femo2host/host/actor-core.d.mts +25 -0
  13. package/femo2host/host/actor-core.mjs +72 -0
  14. package/femo2host/host/cast-core.d.mts +3 -0
  15. package/femo2host/host/cast-core.mjs +14 -0
  16. package/femo2host/host/daemon-client.mjs +59 -10
  17. package/femo2host/host/hub-render-core.d.mts +2 -0
  18. package/femo2host/host/hub-render-core.mjs +6 -2
  19. package/femo2host/host/run-state-core.d.mts +4 -0
  20. package/femo2host/host/run-state-core.mjs +4 -0
  21. package/femo2host/host/speech-core.mjs +11 -4
  22. package/femo2host/host/tools-core.d.mts +11 -0
  23. package/femo2host/host/tools-core.mjs +39 -0
  24. package/femo2host/mailbox.py +630 -545
  25. package/femo2host/projectionCenter/app.css +61 -0
  26. package/femo2host/projectionCenter/composer.mjs +233 -20
  27. package/femo2host/projectionCenter/identity.mjs +131 -0
  28. package/femo2host/projectionCenter/index.html +55 -1
  29. package/femo2host/projectionCenter/main.mjs +231 -35
  30. package/femo2host/projectionCenter/panels.mjs +108 -16
  31. package/femo2host/projectionCenter/render.mjs +813 -695
  32. package/femo2host/projectionCenter/state.mjs +30 -0
  33. package/femo2host/projectionCenter/util.mjs +28 -0
  34. package/femo2host/projection_hub.py +1796 -230
  35. package/femo2host/python/femo_bridge.py +303 -33
  36. package/femo2host/python/femo_daemon.py +1528 -1209
  37. package/femo2host/python/mirror_window.py +237 -0
  38. package/femoBridges/ContextExample.py +113 -71
  39. package/femoCompiler/AGENTS.md +1 -0
  40. package/femoCompiler/FEMO_parser.py +2641 -2567
  41. package/femoCompiler/FEMO_runtime.py +217 -44
  42. package/femoCompiler/FEMO_scope_resolver.py +26 -12
  43. package/femoCompiler/block_collector.py +24 -27
  44. package/femoCompiler/db_utils.py +560 -503
  45. package/femoCompiler/femoAsync.py +466 -436
  46. package/femoCompiler/func_registry.py +74 -0
  47. package/femoCompiler/protocol.py +127 -127
  48. package/femoCompiler/save_dialog.py +497 -446
  49. package/femoExamples/AI/350/201/212/345/244/251/345/256/244/AI/350/201/212/345/244/251/345/256/244-/345/270/246agent/347/211/210.femo +229 -142
  50. package/femoExamples/AI/350/201/212/345/244/251/345/256/244/random_wait_time.py +91 -2
  51. package/femoExamples/LuxFiat/luxfiat-loop.femo +0 -1
  52. package/femoExamples/LuxFiat/luxfiat-simple.femo +23 -24
  53. package/femoExamples/debug/347/245/236/345/231/250/debug/347/245/236/345/231/250.femo +221 -222
  54. package/femoExamples/discussion.femo +72 -72
  55. package/femoExamples//347/213/274/344/272/272/346/235/200//347/213/274/344/272/272/346/235/200-/350/255/246/351/225/277/347/211/210-9/344/272/272/351/242/204/345/245/263/347/214/216.femo +1 -2
  56. package/femoExamples//347/213/274/344/272/272/346/235/200//347/213/274/344/272/272/346/235/200-/350/255/246/351/225/277/347/211/210.femo +1 -2
  57. package/femoExamples//347/213/274/344/272/272/346/235/200//347/213/274/344/272/272/346/235/200.femo +1 -2
  58. package/femoExamples//350/260/201/346/230/257/345/215/247/345/272/225//350/260/201/346/230/257/345/215/247/345/272/225-/350/217/234/345/270/202/345/234/272/345/261/200.femo +1 -1
  59. package/femoExamples//350/260/201/346/230/257/345/215/247/345/272/225//350/260/201/346/230/257/345/215/247/345/272/225.femo +1 -1
  60. package/femoGen/document_ch.html +1 -0
  61. package/femoGen/document_en.html +1 -0
  62. package/femoGen/index.html +1 -0
  63. package/femoGen/intro_ch.html +1 -0
  64. package/femoGen/intro_en.html +1 -0
  65. package/femoGen/package.json +7 -0
  66. package/femoGen/public/femo-logo-slogan.svg +5 -0
  67. package/femoGen/public/femo-logo.svg +6 -1
  68. package/femoGen/src/femoParser.jsx +14 -0
  69. package/hostAdapter/dshAdapter/host/femo-skill.ts +23 -10
  70. package/hostAdapter/dshAdapter/host/routes/projection-input.ts +3 -0
  71. package/hostAdapter/dshAdapter/lib/client.js +20 -2
  72. package/hostAdapter/dshAdapter/lib/client.js.map +2 -2
  73. package/hostAdapter/dshAdapter/lib/main.js +161 -18
  74. package/hostAdapter/dshAdapter/lib/main.js.map +3 -3
  75. package/hostAdapter/dshAdapter/package.json +11 -1
  76. package/hostAdapter/webAdapter/console/index.html +13 -4
  77. package/hostAdapter/webAdapter/extension/background.js +16 -5
  78. package/hostAdapter/webAdapter/extension/seat-agent-core.js +836 -791
  79. package/hostAdapter/webAdapter/extension/sidepanel/actors.mjs +101 -0
  80. package/hostAdapter/webAdapter/extension/sidepanel/main.mjs +81 -20
  81. package/hostAdapter/webAdapter/extension/sidepanel/reconnect.mjs +33 -0
  82. package/hostAdapter/webAdapter/extension/sidepanel/run-control.mjs +22 -11
  83. package/hostAdapter/webAdapter/extension/sidepanel/seats.mjs +6 -20
  84. package/hostAdapter/webAdapter/extension/sidepanel.html +31 -8
  85. package/hostAdapter/webAdapter/native/install-native-host.mjs +1 -0
  86. package/hostAdapter/webAdapter/native/register-core.mjs +69 -28
  87. package/hostAdapter/webAdapter/native/web-launcher.sh +37 -0
  88. package/hostAdapter/webAdapter/package.json +7 -0
  89. package/hostAdapter/webAdapter/readme.md +51 -10
  90. package/hostAdapter/webAdapter/server/bridge.mjs +1 -1
  91. package/hostAdapter/webAdapter/server/runtime.mjs +51 -5
  92. package/hostAdapter/webAdapter/server/seats.mjs +11 -6
  93. package/hostAdapter/webAdapter/server/service.mjs +108 -15
  94. package/hostAdapter/webAdapter/shared/seats-core.mjs +31 -6
  95. package/hostAdapter/webAdapter/sites/chat.deepseek.com/SITE.md +7 -0
  96. package/hostAdapter/webAdapter/sites/chat.deepseek.com/content.js +83 -68
  97. package/hostAdapter/webAdapter/sites/chatglm.cn/inject.js +76 -4
  98. package/hostAdapter/webAdapter/sites/chatgpt.com/SITE.md +7 -1
  99. package/hostAdapter/webAdapter/sites/chatgpt.com/content.js +37 -5
  100. package/hostAdapter/webAdapter/sites/chatgpt.com/inject.js +40 -4
  101. package/hostAdapter/webAdapter/start-service.command +16 -0
  102. package/hostAdapter/webAdapter/tests/chatgpt-input.test.mjs +58 -0
  103. package/hostAdapter/webAdapter/tests/chatgpt-parser.test.mjs +37 -0
  104. package/hostAdapter/webAdapter/tests/deepseek-sanitize.test.mjs +68 -0
  105. package/hostAdapter/webAdapter/tests/runtime.test.mjs +42 -0
  106. package/hostAdapter/webAdapter/tests/seats-core.test.mjs +37 -1
  107. package/hostAdapter/webAdapter/tests/smoke-service.mjs +261 -232
  108. package/hostAdapter/zcodeAdapter/runtime/speech-collect.mjs +6 -0
  109. package/hostAdapter/zcodeAdapter/skills/femo/SKILL.md +3 -0
  110. package/hostAdapter/zcodeAdapter/tests/unbound-actors.test.mjs +51 -0
  111. package/package.json +7 -1
  112. package//350/257/255/346/263/225/346/226/207/346/241/243.md +1224 -1202
@@ -18,6 +18,11 @@ Commands(Job 模型协议,运行状态链路重构 §7.2——每个命令
18
18
  rejects before any Job file is created).
19
19
  job_resume Resume a suspended Job (six gates adjudicated by JobManager;
20
20
  resume_state comes from runs/<job_id>.json, not from host).
21
+ base_dir optional: 剧本目录锚点(相对 file: 引用据此解析)。
22
+ 不传时从档案 script_path 派生(2026-10-11,锚点权威在档案
23
+ 不在调用方;job_restart 同款)——宿主传不传都必须能续跑;
24
+ 显式传的优先(dsh 从画布编辑域传)。纯文本场(档案无
25
+ script_path)落 femo_root,相对引用照旧报错不假装能解。
21
26
  job_pause Pause a Job (idempotent; suspended persist happens on the
22
27
  Runtime on_state_change callback, not here).
23
28
  actor_failed Host executor ultimately failed (B5) — engine adjudicates:
@@ -74,6 +79,35 @@ import urllib.error
74
79
  import urllib.parse
75
80
  import urllib.request
76
81
 
82
+
83
+ class _StepTimer:
84
+ """命令分步计时仪表(2026-10-13 开演慢诊断):job_start/job_restart/
85
+ job_resume/job_pause 每步耗时响亮落日志。来历:投影页「开始」的
86
+ rx→done 之间实测有 20~30s 停顿,而同一路径空闲时只要 ~0.5s,且发作
87
+ 时长呈 ~5s 整数倍(形状指向台账库 SQLite 忙等 / 引擎收场排空)。加此
88
+ 仪表后,慢步在日志里直接点名。总行恒打;≥200ms 的步逐行加打;纯只读
89
+ 不改任何行为。"""
90
+
91
+ SLOW_MS = 200
92
+
93
+ def __init__(self, label, req_id):
94
+ self.label = label
95
+ self.req_id = req_id
96
+ self.t0 = time.perf_counter()
97
+ self.last = self.t0
98
+
99
+ def mark(self, name):
100
+ now = time.perf_counter()
101
+ ms = (now - self.last) * 1000
102
+ self.last = now
103
+ if ms >= self.SLOW_MS:
104
+ print(f"[cmd-step] {self.label} id={self.req_id} {name} "
105
+ f"+{ms:.0f}ms(累计 {(now - self.t0) * 1000:.0f}ms)", flush=True)
106
+
107
+ def done(self):
108
+ print(f"[cmd-step] {self.label} id={self.req_id} 总计 "
109
+ f"{(time.perf_counter() - self.t0) * 1000:.0f}ms", flush=True)
110
+
77
111
  # ── resolve the Femo project root ────────────────────────────────────────
78
112
  def resolve_femo_root():
79
113
  root = os.environ.get("FEMO_ROOT", "")
@@ -131,6 +165,21 @@ def settle_jobs(jm, workers, job_ids, *, log_tag='停场', host_of=None, host_fi
131
165
  return stopped
132
166
 
133
167
 
168
+ def _face_to_base_name(face: str) -> str:
169
+ """actor 随行格取值(2026-10-10):从引擎事件的 actor_name 显示形态
170
+ 拆出裸角色名(@ 原样保留、不去也不加)。显示形态两样:'@名(soul名)'
171
+ 双名制(09-12 定
172
+ 稿)、'@名'、裸名;灵魂名里也容得下括号,所以只在「以全角右括号结尾且
173
+ 含全角左括号」时才从最后一个左括号截断,防误伤。空入参返空串;'main'/
174
+ 'human' 这类非角色形态原样返回(调用方已按 to!=main 过滤)。"""
175
+ f = str(face or "").strip()
176
+ if not f:
177
+ return ""
178
+ if f.endswith(")") and "(" in f:
179
+ f = f[:f.rfind("(")].strip()
180
+ return f
181
+
182
+
134
183
  def dispatch_local_queries(cmd, req_id, args_obj, *, femo_api, femo_root,
135
184
  jm, send_response):
136
185
  """七条本地命令的正身(2026-09-29 收编:装配段 dispatch_inner 与回滚壳
@@ -357,7 +406,26 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
357
406
  # 的校验面。驿站模块一并注入(hub 不 import 兄弟件,依赖倒置);
358
407
  # 复用模式下这三笔注入在 HubClient 里是记录在案的无操作(寄信走共享
359
408
  # 信柜,远端 hub 用养桥注入的那一半)。
360
- projector.set_waiting_sink(hub.set_waiting)
409
+ # 【事件流台账 2026-10-20】等待镜像变更过一道记录再进 hub:keys 增减
410
+ # 一拍一记(谁上新席/谁收麦),与引擎/桥/hub 三段台账对时序。
411
+ def _waiting_sink_logged(state):
412
+ try:
413
+ import os as _os
414
+ import datetime as _dt
415
+ if isinstance(state, list):
416
+ _shape, _keys = 'list', [str(s.get('wait_key') or '') for s in state if isinstance(s, dict)]
417
+ elif isinstance(state, dict):
418
+ _shape, _keys = 'dict', [str(state.get('wait_key') or '')]
419
+ else:
420
+ _shape, _keys = 'clear', []
421
+ with open(_os.path.join(_os.environ.get('FEMO_DATA_DIR') or 'user_data',
422
+ 'debug-event-flow.log'), 'a', encoding='utf-8') as _f:
423
+ _f.write(f"[{_dt.datetime.now().isoformat()}] [bridge] waiting-sink"
424
+ f" shape={_shape} keys={_keys}\n")
425
+ except Exception:
426
+ pass
427
+ hub.set_waiting(state)
428
+ projector.set_waiting_sink(_waiting_sink_logged)
361
429
  hub.set_mailbox(mailbox)
362
430
  # 信箱宿主 id(2026-09-24 多实例并存):hub 寄人类信的 target_host
363
431
  # 必须与本桥 drain_outgoing 的过滤词同源(args.host)——以前 hub 拿
@@ -366,6 +434,13 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
366
434
  # (2026-09-25 hub 唯一化后寄信优先级再反转:等待态自带 host 优先、
367
435
  # 这里的注入降为兜底——见 projection_hub.human_input。)
368
436
  hub.set_mailbox_host(args.host)
437
+ # user 账读写口(2026-10-11 双user 刀H,用户拍板):认领本机身份
438
+ # 这一拍在 Chronica users 表建/改条目,人类席与人类发言行的括号
439
+ # 显示名读 user_name——两件都经 femo_api 门面注入(hub 不 import
440
+ # 引擎内部,依赖倒置与上面驿站/门铃同款;remote 复用模式下
441
+ # HubClient 同款无操作,本地这套引擎件归养桥那半边)。
442
+ hub.set_user_writer(femo_api.upsert_user)
443
+ hub.set_user_name_of(femo_api.get_user_name)
369
444
  # 横幅走 stdout(信息非错误):面板把 stderr 标红,启动横幅顶着
370
445
  # 红色像报错(2026-09-21 用户实锤);此时 stdio 旁路已装好(自起
371
446
  # 模式),会以 stdout 名义进镜像环。on=自起、reuse=复用别家的 hub。
@@ -401,28 +476,49 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
401
476
  """启动运行花名册(FEMO脚本 actors 定义区)进 hub:/views 启动运行即有全部角色。
402
477
  随后照抄引擎「演员显示名双名制」(FEMO_runtime.py 拍板定稿逻辑)预登记
403
478
  显示名:有 soul → '@角色名(soul_name)';无 soul 的人类席位 →
404
- '@角色名(user_name)'(FEMO脚本 owner 的用户名,缺省回落宿主清单默认用户)。
405
- ——菜单启动运行即全带括号,不用等各角色首次派工(2026-09-19 用户需求)。"""
479
+ '@角色名(user_name)'(user 登记账查名,见下)。
480
+ ——菜单启动运行即全带括号,不用等各角色首次派工(2026-09-19 用户需求)。
481
+
482
+ 人类演员清单随花名册捎带(2026-10-11 双user 刀I,用户拍板「对于当前
483
+ 剧本,如果里面有人类 actor,就显示这个按钮」):投影中心「认领角色」钮
484
+ 的下拉数据源——只列 human 型。解析权在引擎(script.actors 的 type 格,
485
+ 桥只捎带,不另起第二份剧本解析,同 _hub_display 的裁决);hub 存进
486
+ cast.json、views 载荷带给页面。"""
406
487
  if hub is None:
407
488
  return
489
+ runner = runners.get(job_id)
490
+ script = getattr(runner, 'script', None) if runner is not None else None
491
+ actors_def = getattr(script, 'actors', None)
492
+ if not isinstance(actors_def, dict):
493
+ actors_def = {}
494
+ # humans:@ 全名照抄(@ 纪律)、按剧本声明序;None=取不到剧本(理论死角)
495
+ # 就保持 hub 库里原值不动;给了空表=这剧本没有人类角色(显式清)。
496
+ humans = None
497
+ if actors_def:
498
+ humans = []
499
+ for ref, adef in actors_def.items():
500
+ try:
501
+ if getattr(adef, 'type', None) is None or adef.type.value != 'human':
502
+ continue
503
+ nm = str(getattr(adef, 'name', '') or ref).strip()
504
+ if nm and nm not in humans:
505
+ humans.append(nm if nm.startswith('@') else f'@{nm}')
506
+ except Exception:
507
+ continue
408
508
  try:
409
- hub.set_cast(job_id, payload.get('actors'))
509
+ hub.set_cast(job_id, payload.get('actors'), humans=humans)
410
510
  except Exception as exc:
411
511
  sys.stderr.write(f"femo_bridge: hub cast failed: {exc}\n")
412
512
  try:
413
- runner = runners.get(job_id)
414
- script = getattr(runner, 'script', None) if runner is not None else None
415
- actors_def = getattr(script, 'actors', None)
416
- if not isinstance(actors_def, dict) or not actors_def:
513
+ if not actors_def:
417
514
  return
418
- owners = (getattr(script, 'meta', {}) or {}).get('owner', []) or []
419
- user_name = ''
420
- for uid in owners:
421
- user_name = femo_api.get_user_name(str(uid))
422
- if user_name:
423
- break
424
- if not user_name:
425
- user_name = femo_api.get_user_name(femo_api.default_user_id())
515
+ # 人类席位括号名从 user 登记账取(2026-10-11 双user 刀B):owner
516
+ # 已退役——@actor 的 user 在演员定格账 human 型条目里(开演收养的
517
+ # 同一本账),没登记的人类席不硬凑名字(原样裸 @ 名)。
518
+ try:
519
+ _frozen = (hub.actor_job_view(job_id).get('cast') or {}) if hub is not None else {}
520
+ except Exception:
521
+ _frozen = {}
426
522
  for ref, adef in actors_def.items():
427
523
  try:
428
524
  nm = str(getattr(adef, 'name', '') or ref)
@@ -437,10 +533,14 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
437
533
  soul_display = 'main' # source:main 裸天使伪 soul(引擎同款)
438
534
  if soul_display:
439
535
  hub.remember_display(job_id, f'{role}({soul_display})')
440
- elif user_name and src != 'main':
441
- # 人类席位(无 soul)→ user name;source:main 伪 soul
442
- # 由引擎 actor_name 显示 'main',此处不得覆盖。
443
- hub.remember_display(job_id, f'{role}({user_name})')
536
+ elif src != 'main':
537
+ # 人类席位(无 soul)→ 登记账 user name;source:main 伪
538
+ # soul 由引擎 actor_name 显示 'main',此处不得覆盖。
539
+ _e = _frozen.get(role)
540
+ _uid = str(_e.get('user_id') or '') if isinstance(_e, dict) else ''
541
+ _uname = femo_api.get_user_name(_uid) if _uid else ''
542
+ if _uname:
543
+ hub.remember_display(job_id, f'{role}({_uname})')
444
544
  except Exception:
445
545
  continue
446
546
  except Exception as exc:
@@ -650,8 +750,24 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
650
750
  # 事件现场兜底(先投后发互斥)。
651
751
  _hw_url = _deliver_url(_job_host(job_id))
652
752
  if _hw_url and mail_courier:
653
- scope = d.get('scope') if isinstance(d.get('scope'), list) else []
654
- soul = str(scope[0]) if scope else 'human'
753
+ # soul 格翻正(2026-10-11 双user 刀C,作者拍板「mailbox 都是
754
+ # 找 actor 的」):执行者 @ 名是正身——旧法装 scope 排序第一
755
+ # 人(scope: all 就瞎指别人,2026-09-19 显示层同案)。老引擎
756
+ # 报不出执行者才落 'human'。
757
+ _hw_actor = _face_to_base_name(str(d.get('actor_name') or ''))
758
+ soul = _hw_actor or 'human'
759
+ # user 查账(刀C,作者拍板「Mailbox 自己查账,去找正确的
760
+ # User 投递」):引擎只报 actor——驿站这层查演员定格账把
761
+ # user 填进信(投递终点=投影中心等待席按 user 点亮)。
762
+ _hw_user = ''
763
+ if hub is not None and _hw_actor:
764
+ try:
765
+ _e = ((hub.actor_job_view(job_id).get('cast') or {})
766
+ .get(_hw_actor) or {})
767
+ if isinstance(_e, dict) and _e.get('type') == 'human':
768
+ _hw_user = str(_e.get('user_id') or '')
769
+ except Exception as exc:
770
+ sys.stderr.write(f"femo_bridge: actor user lookup failed: {exc}\n")
655
771
  letter = mailbox.post(
656
772
  job_id=job_id, soul=soul, kind='context',
657
773
  payload=str(d.get('prompt', '') or ''),
@@ -661,6 +777,8 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
661
777
  target_host=_job_host(job_id), target_sid=_director_sid(job_id),
662
778
  node=d.get('node_name'),
663
779
  ref=str(d.get('wait_key') or ''),
780
+ actor=_hw_actor or None,
781
+ user=_hw_user or None,
664
782
  push_extra={'brief': dict(d)})
665
783
  # 面单随信入库(2026-09-24):deliver 缺省读信上 push_extra,
666
784
  # 首投与重投同形(旧版裸信重投=宿主丢弃却记送达)。
@@ -710,6 +828,9 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
710
828
  who_require='system_require', target_host=_job_host(job_id),
711
829
  target_sid=_director_sid(job_id) if to == 'main' else None,
712
830
  node=d.get('node_name'), ref=retry['wait_key'] or None,
831
+ # actor 随行格(2026-10-10):重试牌 soul 格装的是显示
832
+ # 形态(既有混用原样保留),裸角色名落 actor。
833
+ actor=_face_to_base_name(to) if to != 'main' else None,
713
834
  subkind='node_retry', push_extra={'retry': retry})
714
835
  _url = _deliver_url(letter.get('target_host'))
715
836
  if _url and mail_courier:
@@ -739,9 +860,24 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
739
860
  foreign_pickup = False
740
861
  if hub is not None and to != 'main':
741
862
  try:
742
- _cast_seen = hub.cast_job(job_id).get('cast') or {}
743
- entry = _cast_seen.get(to) or {}
744
- sys.stderr.write(f"femo_bridge[trace]: cast probe job={job_id} to={to} seen={sorted(_cast_seen.keys())} entry_host={entry.get('host')}\n")
863
+ _actor_base = _face_to_base_name(str(d.get('actor_name') or ''))
864
+ # 【演员账优先(2026-10-10 用户拍板「mailbox 认演员」)】
865
+ # 改寄查账双读:本场开演定格演员账(cast/actor-<job>.json,
866
+ # 演出中冻结——改绑下次 job 才生效)按 @actor 查得到,信就
867
+ # 寄绑定的格、贴绑定的会话号;查不到(没绑/旧 hub)回落
868
+ # cast 老路。键恒 @ 全名(@ 纪律:不去也不加)。
869
+ _actor_entry = ((hub.actor_job_view(job_id).get('cast') or {})
870
+ .get(_actor_base) or {}) if _actor_base else {}
871
+ # human 型条目不吃改寄(2026-10-11 刀C 护栏):human 条目
872
+ # 的 sid 格装的是 user id 不是会话号,AI 料包永不按它路由
873
+ # (改寄只服务 AI 席位)。
874
+ if _actor_entry.get('sid') and _actor_entry.get('type') != 'human':
875
+ entry = _actor_entry
876
+ else:
877
+ _cast_seen = hub.cast_job(job_id).get('cast') or {}
878
+ entry = _cast_seen.get(to) or {}
879
+ sys.stderr.write(f"femo_bridge[trace]: cast probe job={job_id} to={to} actor={_actor_base} "
880
+ f"entry_host={entry.get('host')} actor_bound={bool(_actor_entry.get('sid'))}\n")
745
881
  bound_host = str(entry.get('host') or '')
746
882
  # 【刀2 双词】角色信的会话号=选角账座位的 sid(信寄到哪格,
747
883
  # 就贴哪格的会话号——自取户按号对领)
@@ -769,6 +905,12 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
769
905
  target_sid=target_sid,
770
906
  node=d.get('node_name'),
771
907
  ref=str(d.get('wait_key') or ''),
908
+ # actor 随行格(2026-10-10):soul 格
909
+ # 已是正身(不动),actor 随行裸角色
910
+ # 名(与面单 brief 同源)。
911
+ actor=_face_to_base_name(
912
+ str(d.get('actor_name') or ''))
913
+ if to != 'main' else None,
772
914
  # 面单随信入库(2026-09-24):首投与重投
773
915
  # 同形,宿主不再收裸信。
774
916
  push_extra=(
@@ -914,7 +1056,11 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
914
1056
  # 到顶才记死信。非 OSError(真 bug)维持一步死信响亮留痕。
915
1057
  _HANDIN_RETRY_MAX = 8
916
1058
  while True:
917
- _time.sleep(0.5)
1059
+ # 0.5s 兜底拍保留(跨进程老桥/时钟兜底);同进程寄信(mailbox.post
1060
+ # 的 poke,2026-10-14)会立刻 set 事件——人类交卷信毫秒级出站,
1061
+ # 不再平均白等 0.25s。捞完清账(下一封信再醒)。
1062
+ mailbox._WAKE.wait(0.5)
1063
+ mailbox._WAKE.clear()
918
1064
  try:
919
1065
  # 【2026-09-23 修邮差】每 ~5s 重投一次没送到的 urgent 收件信
920
1066
  # (mailbox.pending_urgent 年龄门槛 5s 防产信投递毫秒窗口的双投
@@ -1048,6 +1194,19 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1048
1194
  # 【观测】引擎→桥的每一次事件都留痕:卡死时用它回答
1049
1195
  # 「引擎到底有没有 emit ai_done / node_settled」。
1050
1196
  _trace(f"engine→bridge event={event_type} job={job_id}")
1197
+ # 【事件流台账 2026-10-20】引擎→桥每一拍落盘(独立文件,不依赖
1198
+ # FEMO_BRIDGE_TRACE 开关):human_wait/human_done 带不带 wait_key
1199
+ # 在这行见分晓。文件=user_data/debug-event-flow.log。
1200
+ try:
1201
+ import os as _os
1202
+ import datetime as _dt
1203
+ _wk = data.get('wait_key') if isinstance(data, dict) else None
1204
+ with open(_os.path.join(_os.environ.get('FEMO_DATA_DIR') or 'user_data',
1205
+ 'debug-event-flow.log'), 'a', encoding='utf-8') as _f:
1206
+ _f.write(f"[{_dt.datetime.now().isoformat()}] [bridge] cb event={event_type}"
1207
+ f" job={job_id} wk={_wk}\n")
1208
+ except Exception:
1209
+ pass
1051
1210
  payload = {**(data if isinstance(data, dict) else {}), 'job_id': job_id}
1052
1211
  jm.observe_event(job_id, event_type, payload) # 状态机旁挂(§7.5)
1053
1212
  # 先投递后发事件(2026-09-16 上门投递):_mailbox_post 内含产信+投递员
@@ -1085,6 +1244,66 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1085
1244
  threading.Thread(target=_mailbox_poll_forever, daemon=True,
1086
1245
  name='mailbox-outgoing').start()
1087
1246
 
1247
+ def _user_registry_for(job_id, script):
1248
+ """开演收养 user 登记账(2026-10-11 双user 刀B,{@actor 全名: user_id}):
1249
+ 先定格(hub.actor_job_snapshot 自带只补空位,flow_start 的重入是 no-op),
1250
+ 再从演员定格账把 human 型条目的 user_id 誊成登记表传给引擎——user 是
1251
+ 运行时事实,剧本不写(human source / meta.owner 已退役),类比 AI 席的
1252
+ actor↔session 绑定(把 User 当 Session 用)。hub 缺席=空账(干跑替身/
1253
+ 裸跑)。缺员警告在 _warn_unbound_humans。"""
1254
+ if hub is None:
1255
+ return {}
1256
+ try:
1257
+ hub.actor_job_snapshot(job_id)
1258
+ except Exception as exc:
1259
+ sys.stderr.write(f"femo_bridge: actor snapshot failed: {exc}\n")
1260
+ registry = {}
1261
+ try:
1262
+ frozen = (hub.actor_job_view(job_id).get('cast') or {})
1263
+ except Exception as exc:
1264
+ sys.stderr.write(f"femo_bridge: actor view failed: {exc}\n")
1265
+ frozen = {}
1266
+ for actor, entry in frozen.items():
1267
+ if isinstance(entry, dict) and entry.get('type') == 'human' \
1268
+ and str(entry.get('user_id') or '').strip():
1269
+ registry[str(actor)] = str(entry['user_id'])
1270
+ return registry
1271
+
1272
+ def _warn_unbound_humans(job_id, script, registry):
1273
+ """开演缺员警告(2026-10-11 双user 刀B):剧本里没登记 user 的人类
1274
+ actor 点名上浮——web 绑定对账既有拍板「少绑=warning 不拦运行」,但
1275
+ 未绑席位的等待信没人能接(投影中心无 user 可点亮),戏实际走不动。
1276
+ 响亮 stderr + 滞留件给 main(随终局急件一起到),教怎么绑。"""
1277
+ actors_def = getattr(script, 'actors', None) if script is not None else None
1278
+ if not isinstance(actors_def, dict):
1279
+ return
1280
+ missing = []
1281
+ for name, adef in actors_def.items():
1282
+ try:
1283
+ if getattr(adef, 'type', None) is None or adef.type.value != 'human':
1284
+ continue
1285
+ nm = str(name).strip()
1286
+ if nm and nm not in registry:
1287
+ missing.append(nm if nm.startswith('@') else f'@{nm}')
1288
+ except Exception:
1289
+ continue
1290
+ if not missing:
1291
+ return
1292
+ msg = (f"人类演员未绑定 user:{', '.join(missing)}。"
1293
+ f"他们没有 user 就没人能接他们的输入席(类比 AI 没绑 session)——"
1294
+ f"请在投影中心登录后认领角色(绑定随下一场开演定格)。")
1295
+ sys.stderr.write(f"femo_bridge[warn]: job={job_id} {msg}\n")
1296
+ try:
1297
+ mailbox.post(job_id=job_id, soul='main', kind='notice',
1298
+ payload=msg, action='receive', delivery='held',
1299
+ who_move=_who_move(_job_host(job_id)),
1300
+ who_require='system_require',
1301
+ target_host=_job_host(job_id),
1302
+ target_sid=_director_sid(job_id),
1303
+ subkind='warning')
1304
+ except Exception as exc:
1305
+ sys.stderr.write(f"femo_bridge: unbound-human warning post failed: {exc}\n")
1306
+
1088
1307
  def spawn_job_worker(job_id, script, base_dir, user_api_key, user_api_provider,
1089
1308
  user_api_url, user_api_model, host_ai_backend=False,
1090
1309
  resume_state=None):
@@ -1103,6 +1322,10 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1103
1322
  def worker():
1104
1323
  runner = None
1105
1324
  try:
1325
+ # user 登记账收养(2026-10-11 双user 刀B):开演/续跑同路——
1326
+ # 定格账随档案持久,续跑重读=收养不换人。
1327
+ _user_registry = _user_registry_for(job_id, script)
1328
+ _warn_unbound_humans(job_id, script, _user_registry)
1106
1329
  if resume_state:
1107
1330
  # resume:裁决已过、构造即将开始——先确认 running(见上注)。
1108
1331
  jm.mark_running(job_id)
@@ -1130,6 +1353,7 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1130
1353
  # 增量」上下文模式由门面装配(_host_ai_backend/
1131
1354
  # _context_mode 私有面已收口进 create_runner)。
1132
1355
  host_ai_backend=host_ai_backend,
1356
+ user_registry=_user_registry,
1133
1357
  )
1134
1358
  if resume_state:
1135
1359
  print(f"[bridge] resume state keys: {sorted(resume_state.keys())}")
@@ -1209,6 +1433,7 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1209
1433
  femo_root=femo_root, jm=jm,
1210
1434
  send_response=send_response):
1211
1435
  return
1436
+ _step = None # 分步计时仪表:job_restart 归一成 job_start 时沿用同一只
1212
1437
  if cmd == "job_restart":
1213
1438
  # 从档案/挂载路径重开(2026-10-04 投影页「开始」钮——投影中心超然
1214
1439
  # 于各 Host,从 mounts.json 里选哪家挂的剧本都能开跑)。两种入参:
@@ -1223,18 +1448,21 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1223
1448
  # job_start 参数落回正身——编译/建档/派工只此一份,不造第二套。
1224
1449
  job_id = args_obj.get("job_id")
1225
1450
  sp_arg = str(args_obj.get('script_path') or '')
1451
+ _step = _StepTimer("job_restart", req_id)
1226
1452
  if not isinstance(job_id, int) and not sp_arg:
1227
1453
  rows = jm.list_jobs()
1228
1454
  if not rows:
1229
1455
  send_response(req_id, False, error="job_restart: 没有任何历史场(runs/ 为空),无从重开")
1230
1456
  return
1231
1457
  job_id = max(int(r.get('job_id') or 0) for r in rows)
1458
+ _step.mark("list_jobs 找最新场(全扫 runs/)")
1232
1459
  if isinstance(job_id, int):
1233
1460
  rec = jm.get_job_state(job_id)
1234
1461
  if not isinstance(rec, dict) or rec.get('error') or not str(rec.get('script_path') or ''):
1235
1462
  send_response(req_id, False, error="job_restart: 档案不存在或缺 script_path(job %s)" % job_id)
1236
1463
  return
1237
1464
  sp = str(rec['script_path'])
1465
+ _step.mark("get_job_state 读档案")
1238
1466
  else:
1239
1467
  sp = os.path.abspath(sp_arg)
1240
1468
  if not os.path.isfile(sp):
@@ -1249,6 +1477,7 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1249
1477
  if not femo_text.strip():
1250
1478
  send_response(req_id, False, error="job_restart: 盘上剧本是空的:%s" % sp)
1251
1479
  return
1480
+ _step.mark("读盘上剧本")
1252
1481
  args_obj = dict(args_obj)
1253
1482
  args_obj['femo'] = femo_text
1254
1483
  args_obj['script_path'] = sp
@@ -1269,18 +1498,24 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1269
1498
  except Exception:
1270
1499
  inherit = {} # 沿袭是优化不是依赖:查不到就空着起步
1271
1500
  args_obj['host_refs'] = inherit
1501
+ _step.mark("沿袭班底(list_jobs 全扫+读前任档案)")
1272
1502
  if not str(args_obj.get('host_ref') or ''):
1273
1503
  args_obj['host_ref'] = str(rec.get('host_ref') or '') if isinstance(job_id, int) else ''
1274
1504
  args_obj.setdefault('host_ai_backend', True)
1505
+ _step.label = "job_restart→job_start"
1275
1506
  cmd = "job_start"
1276
1507
  if cmd == "job_start":
1277
1508
  femo_text = args_obj.get("femo", "")
1278
1509
  if not femo_text.strip():
1279
1510
  send_response(req_id, False, error="femo is empty")
1280
1511
  return
1512
+ if _step is None:
1513
+ _step = _StepTimer("job_start", req_id)
1281
1514
  ensure_default_data()
1515
+ _step.mark("ensure_default_data(建库/种子)")
1282
1516
  # 同步编译先行:编译失败的脚本连 Job 文件都不产生(脏 Job 号零残留)
1283
1517
  res = run_compile(femo_text, args_obj.get("base_dir"), args_obj.get("models"))
1518
+ _step.mark("编译 run_compile")
1284
1519
  rec = jm.create_job(
1285
1520
  femo_api.fingerprint_script(femo_text),
1286
1521
  # host_ref 旧协议名 owner_tag 兼容(旧宿主不断);host_refs
@@ -1293,9 +1528,11 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1293
1528
  script_path=str(args_obj.get("script_path", "") or ""),
1294
1529
  script_text=femo_text,
1295
1530
  )
1531
+ _step.mark("create_job 建档")
1296
1532
  # 编译警告产信(滞留件):随本 Job 终局急件打包送达主模型。
1297
1533
  _post_compile_warnings(rec.job_id, res.warnings)
1298
1534
  _hub_owner(rec.job_id) # 幕布:本次主会话(FEMO外行的过滤判据,启动运行即登记)
1535
+ _step.mark("警告产信+hub 主会话登记(跟随重对家)")
1299
1536
  spawn_job_worker(
1300
1537
  rec.job_id, res.script,
1301
1538
  # base_dir:有FEMO脚本地址=FEMO脚本目录;未保存=空串(引擎对相对路径报错)。
@@ -1307,6 +1544,8 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1307
1544
  bool(args_obj.get("host_ai_backend", args_obj.get("dsh_ai_backend", False))),
1308
1545
  resume_state=None,
1309
1546
  )
1547
+ _step.mark("spawn worker")
1548
+ _step.done()
1310
1549
  send_response(req_id, True, {"job_id": rec.job_id, "state": rec.state,
1311
1550
  "warnings": res.warnings})
1312
1551
  elif cmd == "job_resume":
@@ -1318,25 +1557,45 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1318
1557
  if not isinstance(job_id, int):
1319
1558
  send_response(req_id, False, error="job_id is required")
1320
1559
  return
1560
+ _step = _StepTimer("job_resume", req_id)
1321
1561
  # 摸到才对账(2026-09-07):续跑动手前先把目标档案状态裁决诚实
1322
1562
  # ——僵死 running(上一代 bridge 暴毙残留)在此落成 crash,六关
1323
1563
  # 第②关才能放行。_bound 主人检查在 helper 内:自己正跑着的 Job
1324
1564
  # 不会被对账动,会在第②关以 already_running 原话拒绝。
1325
1565
  jm.reconcile_stale(job_id)
1566
+ _step.mark("reconcile_stale 摸到对账")
1326
1567
  ensure_default_data()
1568
+ _step.mark("ensure_default_data(建库/种子)")
1569
+ # 锚点(2026-10-11 续跑锚点刀,j2731 实案):调用方没传 base_dir
1570
+ # 时从档案 script_path 取剧本所在目录。续跑用的是冻结文本(六关④
1571
+ # 比对的也是它),地址不该指望调用方——锚点从未进过成文宿主契约
1572
+ # (接入清单不要求传),绝对路径时代此缺口被掩护,示例剧本相对
1573
+ # 路径化(16289d1)后每次续跑必在 Runner 构造期炸「文件不存在」。
1574
+ # job_restart 同款先例(读档案 script_path 取 dirname);调用方
1575
+ # 显式传的优先(dsh 从画布编辑域传);纯文本场(档案无
1576
+ # script_path)维持 femo_root 兜底,相对引用照旧报错不假装能解。
1577
+ base_dir = args_obj.get("base_dir")
1578
+ if base_dir is None:
1579
+ _rec0 = jm.get_job_state(job_id) or {}
1580
+ _sp = str(_rec0.get('script_path') or '')
1581
+ if _sp:
1582
+ base_dir = os.path.dirname(_sp) or None
1327
1583
  # 同步编译先行(同 job_start)
1328
- res = run_compile(femo_text, args_obj.get("base_dir"), args_obj.get("models"))
1584
+ res = run_compile(femo_text, base_dir, args_obj.get("models"))
1585
+ _step.mark("编译 run_compile(含锚点 get_job_state)")
1329
1586
  # 六关裁决(JobManager.resume_job,JobError 带原话上浮宿主——B2/C2)
1330
1587
  rec = jm.resume_job(job_id, femo_api.fingerprint_script(femo_text),
1331
1588
  host_ref=str(args_obj.get("host_ref", args_obj.get("owner_tag", "")) or ""),
1332
1589
  new_text=femo_text,
1333
1590
  host_refs=_norm_host_refs(args_obj))
1591
+ _step.mark("resume_job 六关裁决")
1334
1592
  # resume_state 由引擎档案提供(build_resume_state),宿主不再传——
1335
1593
  # 断点权威在 runs/<job_id>.json,指纹/场次/断点六关已裁决。
1336
1594
  resume_state = jm.build_resume_state(rec)
1337
1595
  # 编译警告产信(滞留件,同 job_start——续跑改了FEMO脚本同样该知情)。
1338
1596
  _post_compile_warnings(job_id, res.warnings)
1339
1597
  _hub_owner(job_id) # 幕布:续跑同样登记本次主会话(host_ref 已更新为本次发起方)
1598
+ _step.mark("build_resume_state+警告产信+hub 登记")
1340
1599
  # 【刀2 续跑收养】导演格已随本次登记换成新会话号——在柜待领信重贴号。
1341
1600
  # 收养的唯一合法凭证=续跑登记(清单 §四从严裁决):平时号不符=不领
1342
1601
  # 不记、信留柜,只有续跑这一刻把旧号整体过户给新窗口。
@@ -1352,9 +1611,10 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1352
1611
  f"{_n} letter(s) → {_new_sid}\n")
1353
1612
  except Exception as _exc:
1354
1613
  sys.stderr.write(f"femo_bridge: readdress failed: {_exc}\n")
1614
+ _step.mark("信箱过户 readdress")
1355
1615
  spawn_job_worker(
1356
1616
  job_id, res.script,
1357
- args_obj.get("base_dir") if args_obj.get("base_dir") is not None else femo_root,
1617
+ base_dir if base_dir is not None else femo_root,
1358
1618
  args_obj.get("user_api_key"),
1359
1619
  args_obj.get("user_api_provider"),
1360
1620
  args_obj.get("user_api_url"),
@@ -1362,6 +1622,8 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1362
1622
  bool(args_obj.get("host_ai_backend", args_obj.get("dsh_ai_backend", False))),
1363
1623
  resume_state=resume_state,
1364
1624
  )
1625
+ _step.mark("spawn worker")
1626
+ _step.done()
1365
1627
  send_response(req_id, True, {"resumed": True, "job_id": job_id,
1366
1628
  "femo_session_id": rec.femo_session_id,
1367
1629
  "warnings": res.warnings})
@@ -1381,7 +1643,9 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1381
1643
  if not isinstance(job_id, int):
1382
1644
  send_response(req_id, False, error="job_id is required")
1383
1645
  return
1646
+ _step = _StepTimer("job_pause", req_id)
1384
1647
  out = jm.pause_job(job_id)
1648
+ _step.mark("pause_job 引擎收场(取消协程+wait_empty)")
1385
1649
  # 幂等:suspended/finished/failed 照样 {paused:true, state:<现态>},
1386
1650
  # 不假成功也不报错(B5 死于结构)
1387
1651
  # 【强停兜底(2026-09-07 214 事故)】stop() 的取消令牌已按
@@ -1397,10 +1661,12 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1397
1661
  t = workers.get(job_id)
1398
1662
  if t is not None:
1399
1663
  t.join(timeout=10)
1664
+ _step.mark("worker join(上限10s)")
1400
1665
  if t.is_alive():
1401
1666
  st = jm.get_job_state(job_id)
1402
1667
  if st.get("state") == "running":
1403
1668
  jm.suspend(job_id, "user_pause")
1669
+ _step.done()
1404
1670
  send_response(req_id, True, {**out, "state": "suspended", "forced": True})
1405
1671
  threading.Timer(0.2, os._exit, args=(1,)).start()
1406
1672
  return
@@ -1412,6 +1678,7 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1412
1678
  # 运行中的 Job,非幂等无操作),前端据此当场确认不再等。
1413
1679
  out = {**out, "state": jm.get_job_state(job_id).get("state", out.get("state")),
1414
1680
  "confirmed": True}
1681
+ _step.done()
1415
1682
  send_response(req_id, True, out)
1416
1683
  elif cmd == "post_speech":
1417
1684
  # 代寄(2026-09-16 节点发言第二阶段统一):宿主执行体(main/角色/
@@ -1463,7 +1730,10 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1463
1730
  delivery='urgent', who_move='customer_hook',
1464
1731
  who_require='system_require', target_host=target_host,
1465
1732
  node=str(args_obj.get("node", "") or "") or None,
1466
- ref=wait_key, body=body)
1733
+ ref=wait_key, body=body,
1734
+ # actor 随行格(2026-10-10):交卷方可选自报剧本角色名;不带
1735
+ # (老宿主)照旧落 None。只随信入账,不参与路由。
1736
+ actor=(str(args_obj.get("actor") or '').strip() or None))
1467
1737
  # 幕布投影已收口到出站轮询路径(2026-09-20):信被引擎真吃了才上墙
1468
1738
  # (受理≠入账),此处不再预投影——见 _mailbox_poll_forever。
1469
1739
  send_response(req_id, True, {"posted": True, "letter_id": letter['id']})
@@ -1589,10 +1859,10 @@ def build_stage(args, femo_root, mailbox, mail_courier, projection_hub,
1589
1859
  return
1590
1860
  try:
1591
1861
  from femoBridges.ContextExample import build_session_context, MODE_INCREMENTAL
1592
- owners = runner.script.meta.get("owner", []) or []
1593
- actor_info = {"soul": "main"}
1594
- if owners:
1595
- actor_info["user"] = str(owners[0])
1862
+ # main 的提问者身份(2026-10-11 双user 刀B):soul='main'+@正身,
1863
+ # 可见性走 actor/soul 通道——owner 兜底已退役(user 是运行时
1864
+ # 登记事实,main 不再冒充 owner 的 user 身份看别人的行)。
1865
+ actor_info = runner.main_actor_info()
1596
1866
  text = build_session_context(
1597
1867
  getattr(runner, "_current_session_id", 0),
1598
1868
  actor_info, MODE_INCREMENTAL,