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.
- package/LICENSE +1 -1
- package/NOTICE +8 -0
- package/README.md +12 -1
- 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
- package/docs/ActiveRoadmaps//345/217/214user/346/226/275/345/267/245/346/270/205/345/215/225.md +326 -0
- 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
- package/femo2host/AGENTS.md +1 -1
- package/femo2host/femoGenConnector/engine-client.mjs +7 -2
- package/femo2host/femoGenConnector/file-dialogs.mjs +108 -2
- package/femo2host/femoToolcall/chronica.py +99 -19
- package/femo2host/femo_api.py +14 -1
- package/femo2host/host/actor-core.d.mts +25 -0
- package/femo2host/host/actor-core.mjs +72 -0
- package/femo2host/host/cast-core.d.mts +3 -0
- package/femo2host/host/cast-core.mjs +14 -0
- package/femo2host/host/daemon-client.mjs +59 -10
- package/femo2host/host/hub-render-core.d.mts +2 -0
- package/femo2host/host/hub-render-core.mjs +6 -2
- package/femo2host/host/run-state-core.d.mts +4 -0
- package/femo2host/host/run-state-core.mjs +4 -0
- package/femo2host/host/speech-core.mjs +11 -4
- package/femo2host/host/tools-core.d.mts +11 -0
- package/femo2host/host/tools-core.mjs +39 -0
- package/femo2host/mailbox.py +630 -545
- package/femo2host/projectionCenter/app.css +61 -0
- package/femo2host/projectionCenter/composer.mjs +233 -20
- package/femo2host/projectionCenter/identity.mjs +131 -0
- package/femo2host/projectionCenter/index.html +55 -1
- package/femo2host/projectionCenter/main.mjs +231 -35
- package/femo2host/projectionCenter/panels.mjs +108 -16
- package/femo2host/projectionCenter/render.mjs +813 -695
- package/femo2host/projectionCenter/state.mjs +30 -0
- package/femo2host/projectionCenter/util.mjs +28 -0
- package/femo2host/projection_hub.py +1796 -230
- package/femo2host/python/femo_bridge.py +303 -33
- package/femo2host/python/femo_daemon.py +1528 -1209
- package/femo2host/python/mirror_window.py +237 -0
- package/femoBridges/ContextExample.py +113 -71
- package/femoCompiler/AGENTS.md +1 -0
- package/femoCompiler/FEMO_parser.py +2641 -2567
- package/femoCompiler/FEMO_runtime.py +217 -44
- package/femoCompiler/FEMO_scope_resolver.py +26 -12
- package/femoCompiler/block_collector.py +24 -27
- package/femoCompiler/db_utils.py +560 -503
- package/femoCompiler/femoAsync.py +466 -436
- package/femoCompiler/func_registry.py +74 -0
- package/femoCompiler/protocol.py +127 -127
- package/femoCompiler/save_dialog.py +497 -446
- 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
- package/femoExamples/AI/350/201/212/345/244/251/345/256/244/random_wait_time.py +91 -2
- package/femoExamples/LuxFiat/luxfiat-loop.femo +0 -1
- package/femoExamples/LuxFiat/luxfiat-simple.femo +23 -24
- package/femoExamples/debug/347/245/236/345/231/250/debug/347/245/236/345/231/250.femo +221 -222
- package/femoExamples/discussion.femo +72 -72
- 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
- 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
- package/femoExamples//347/213/274/344/272/272/346/235/200//347/213/274/344/272/272/346/235/200.femo +1 -2
- 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
- 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
- package/femoGen/document_ch.html +1 -0
- package/femoGen/document_en.html +1 -0
- package/femoGen/index.html +1 -0
- package/femoGen/intro_ch.html +1 -0
- package/femoGen/intro_en.html +1 -0
- package/femoGen/package.json +7 -0
- package/femoGen/public/femo-logo-slogan.svg +5 -0
- package/femoGen/public/femo-logo.svg +6 -1
- package/femoGen/src/femoParser.jsx +14 -0
- package/hostAdapter/dshAdapter/host/femo-skill.ts +23 -10
- package/hostAdapter/dshAdapter/host/routes/projection-input.ts +3 -0
- package/hostAdapter/dshAdapter/lib/client.js +20 -2
- package/hostAdapter/dshAdapter/lib/client.js.map +2 -2
- package/hostAdapter/dshAdapter/lib/main.js +161 -18
- package/hostAdapter/dshAdapter/lib/main.js.map +3 -3
- package/hostAdapter/dshAdapter/package.json +11 -1
- package/hostAdapter/webAdapter/console/index.html +13 -4
- package/hostAdapter/webAdapter/extension/background.js +16 -5
- package/hostAdapter/webAdapter/extension/seat-agent-core.js +836 -791
- package/hostAdapter/webAdapter/extension/sidepanel/actors.mjs +101 -0
- package/hostAdapter/webAdapter/extension/sidepanel/main.mjs +81 -20
- package/hostAdapter/webAdapter/extension/sidepanel/reconnect.mjs +33 -0
- package/hostAdapter/webAdapter/extension/sidepanel/run-control.mjs +22 -11
- package/hostAdapter/webAdapter/extension/sidepanel/seats.mjs +6 -20
- package/hostAdapter/webAdapter/extension/sidepanel.html +31 -8
- package/hostAdapter/webAdapter/native/install-native-host.mjs +1 -0
- package/hostAdapter/webAdapter/native/register-core.mjs +69 -28
- package/hostAdapter/webAdapter/native/web-launcher.sh +37 -0
- package/hostAdapter/webAdapter/package.json +7 -0
- package/hostAdapter/webAdapter/readme.md +51 -10
- package/hostAdapter/webAdapter/server/bridge.mjs +1 -1
- package/hostAdapter/webAdapter/server/runtime.mjs +51 -5
- package/hostAdapter/webAdapter/server/seats.mjs +11 -6
- package/hostAdapter/webAdapter/server/service.mjs +108 -15
- package/hostAdapter/webAdapter/shared/seats-core.mjs +31 -6
- package/hostAdapter/webAdapter/sites/chat.deepseek.com/SITE.md +7 -0
- package/hostAdapter/webAdapter/sites/chat.deepseek.com/content.js +83 -68
- package/hostAdapter/webAdapter/sites/chatglm.cn/inject.js +76 -4
- package/hostAdapter/webAdapter/sites/chatgpt.com/SITE.md +7 -1
- package/hostAdapter/webAdapter/sites/chatgpt.com/content.js +37 -5
- package/hostAdapter/webAdapter/sites/chatgpt.com/inject.js +40 -4
- package/hostAdapter/webAdapter/start-service.command +16 -0
- package/hostAdapter/webAdapter/tests/chatgpt-input.test.mjs +58 -0
- package/hostAdapter/webAdapter/tests/chatgpt-parser.test.mjs +37 -0
- package/hostAdapter/webAdapter/tests/deepseek-sanitize.test.mjs +68 -0
- package/hostAdapter/webAdapter/tests/runtime.test.mjs +42 -0
- package/hostAdapter/webAdapter/tests/seats-core.test.mjs +37 -1
- package/hostAdapter/webAdapter/tests/smoke-service.mjs +261 -232
- package/hostAdapter/zcodeAdapter/runtime/speech-collect.mjs +6 -0
- package/hostAdapter/zcodeAdapter/skills/femo/SKILL.md +3 -0
- package/hostAdapter/zcodeAdapter/tests/unbound-actors.test.mjs +51 -0
- package/package.json +7 -1
- package//350/257/255/346/263/225/346/226/207/346/241/243.md +1224 -1202
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "femo-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Femo (FlowEngineforMinds) 多智能体脚本引擎的 dsh 插件版 — 无主模型 Femo 会话、聊天窗口角色气泡、FEMO脚本控制(含完整引擎,自包含,整个文件夹搬走即用)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -20,6 +20,16 @@
|
|
|
20
20
|
"./package.json": "./package.json"
|
|
21
21
|
},
|
|
22
22
|
"license": "Apache-2.0",
|
|
23
|
+
"author": {
|
|
24
|
+
"name": "Phant0Meow (jovielher)",
|
|
25
|
+
"url": "https://github.com/Phant0Meow"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/Phant0Meow/femo-plugin#readme",
|
|
28
|
+
"bugs": "https://github.com/Phant0Meow/femo-plugin/issues",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/Phant0Meow/femo-plugin.git"
|
|
32
|
+
},
|
|
23
33
|
"dsh": {
|
|
24
34
|
"client": {
|
|
25
35
|
"platform": "web",
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<html lang="zh-CN">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
|
+
<meta name="author" content="Phant0Meow (jovielher)">
|
|
5
6
|
<title>FEMO · 网页版操作台</title>
|
|
6
7
|
<style>
|
|
7
8
|
/* ───────── 设计基调:与侧栏同宗 —— 深色 · 玻璃 · 绿主紫辅 ───────── */
|
|
@@ -399,7 +400,7 @@
|
|
|
399
400
|
// 运行回执取 job id。画法(这里表格、侧栏卡片)留各页。
|
|
400
401
|
import { $, escapeHtml as esc, createToast } from '/console/shared/dom.mjs';
|
|
401
402
|
import { createRepaintGuard } from '/console/shared/guard.mjs';
|
|
402
|
-
import { seatState, bindRefusal, offlineRollCall, attendanceRefusal } from '/console/shared/seats-core.mjs';
|
|
403
|
+
import { seatState, bindRefusal, offlineRollCall, attendanceRefusal, actorWarningNotice } from '/console/shared/seats-core.mjs';
|
|
403
404
|
import { humanWaitKey, composeHumanSubmission, collectNonEmptyVars, answerOutcome } from '/console/shared/human-seat-core.mjs';
|
|
404
405
|
import { jobIdFromRunResult } from '/console/shared/run-core.mjs';
|
|
405
406
|
import { femoLogoSvg } from '/console/shared/femo-logo.mjs';
|
|
@@ -611,14 +612,22 @@ $('#run').addEventListener('click', async () => {
|
|
|
611
612
|
$('#toolOut').textContent = '执行中…';
|
|
612
613
|
// 运行/续跑前点名(暂停不用):全在线直接放行;缺席行行自带凑齐指导。
|
|
613
614
|
// 续跑带 job_id——按该场冻结选角账对账(与派工 resolveSeat 同款优先级)。
|
|
615
|
+
// 2026-10-10 起带演员绑定账对账(actorCheck):多绑=报错行(拦),少绑=
|
|
616
|
+
// warning 不拦——拼在执行结果前面让作者看见。
|
|
617
|
+
let actorWarn = '';
|
|
614
618
|
if (action === 'fresh_start' || action === 'resume') {
|
|
615
619
|
try {
|
|
616
620
|
const at = await j('/seats/attendance', action === 'resume' && $('#jobId').value.trim() ? { job_id: Number($('#jobId').value.trim()) } : {});
|
|
617
|
-
const absent = offlineRollCall(at?.seats, at?.needed);
|
|
621
|
+
const absent = offlineRollCall(at?.seats, at?.needed, at?.actorCheck);
|
|
618
622
|
if (absent.length) { $('#toolOut').textContent = attendanceRefusal(absent, '运行'); return; }
|
|
623
|
+
actorWarn = actorWarningNotice(at?.actorCheck?.warnings);
|
|
619
624
|
} catch { /* 点名通道失败不拦运行——femo_run 自己会报 */ }
|
|
620
625
|
}
|
|
621
|
-
try {
|
|
626
|
+
try {
|
|
627
|
+
const r = await j('/tools/femo_run', body);
|
|
628
|
+
$('#toolOut').textContent = (actorWarn ? actorWarn + '\n\n' : '') + JSON.stringify(r, null, 2);
|
|
629
|
+
const jid = jobIdFromRunResult(r); if (jid) $('#jobId').value = jid;
|
|
630
|
+
}
|
|
622
631
|
catch (e) { $('#toolOut').textContent = String(e); }
|
|
623
632
|
refresh();
|
|
624
633
|
});
|
|
@@ -699,7 +708,7 @@ mirrorBtn.addEventListener('click', async () => {
|
|
|
699
708
|
|
|
700
709
|
async function launchViaExt(extIds) {
|
|
701
710
|
if (typeof chrome === 'undefined' || !chrome.runtime?.sendMessage || !extIds.length) {
|
|
702
|
-
svcNote('
|
|
711
|
+
svcNote('拉不起服务:本页发不了扩展消息——请手动跑启动脚本(Windows start-service.cmd / macOS start-service.command)', true);
|
|
703
712
|
return;
|
|
704
713
|
}
|
|
705
714
|
for (const id of extIds) {
|
|
@@ -472,6 +472,16 @@ if (!globalThis.__webPolling) {
|
|
|
472
472
|
pollLoop();
|
|
473
473
|
}
|
|
474
474
|
|
|
475
|
+
// 首次指引按平台指路:macOS=双击 start-service.command(Finder 双击即开
|
|
476
|
+
// Terminal),Windows=start-service.cmd。指 Windows 时反斜杠必须写成 \\ ——
|
|
477
|
+
// 单反斜杠会被模板字面量当转义吃掉(旧版显示 bug,顺手修掉)。
|
|
478
|
+
function firstRunLauncherPath() {
|
|
479
|
+
const ua = (typeof navigator !== 'undefined' && navigator.userAgent) || '';
|
|
480
|
+
return /Macintosh|Mac OS X/i.test(ua)
|
|
481
|
+
? 'femo-plugin/hostAdapter/webAdapter/start-service.command'
|
|
482
|
+
: 'femo-plugin\\hostAdapter\\webAdapter\\start-service.cmd';
|
|
483
|
+
}
|
|
484
|
+
|
|
475
485
|
// ── 一键拉起本地服务(侧栏/操作台共用,2026-09-30 抽单份)──────────────────
|
|
476
486
|
// 先探 /health(活着就不惊动原生宿主),没活才走 Native Messaging。宿主侧
|
|
477
487
|
// 幂等(已在跑直接回),这里再挡一道是为了省一次进程拉起的开销。
|
|
@@ -495,11 +505,12 @@ function launchLocalService(sendResponse) {
|
|
|
495
505
|
// 扩展沙箱拿不到插件在磁盘上的位置,写死本机盘符就是假地址;锚定
|
|
496
506
|
// femo-plugin 文件夹(下载/克隆仓库得到的那一层)才是对所有用户
|
|
497
507
|
// 都成立的真话——盘符随各人安装位置变,从 femo-plugin 往下的每一
|
|
498
|
-
//
|
|
499
|
-
//
|
|
500
|
-
//
|
|
501
|
-
//
|
|
502
|
-
|
|
508
|
+
// 级对谁都一样。系统限制:原生宿主登记(Windows 写注册表+
|
|
509
|
+
// host manifest,macOS 写 NativeMessagingHosts 目录)浏览器与扩展
|
|
510
|
+
// 都做不到,只有本地服务自己能做——所以第一次必须由人亲手双击
|
|
511
|
+
// 启动脚本把服务拉起来(顺手完成登记),此后一键启动才能靠
|
|
512
|
+
// Native Messaging 把服务叫醒。指路按平台分流(firstRunLauncherPath)。
|
|
513
|
+
sendResponse({ ok: false, error: `${err.message}(原生宿主还没登记:由于系统限制,第一次必须由人亲手双击 ${firstRunLauncherPath()} 启动一次本地服务(顺手自动登记);之后就可以直接一键启动了)` });
|
|
503
514
|
return;
|
|
504
515
|
}
|
|
505
516
|
sendResponse(reply ?? { ok: false, error: '原生宿主无回帧' });
|