forked from ChaiHao/BPOS-MVP
六个活动的汇报界面与技能补齐;skill-engine 接上装配面
汇报界面(AM 07):
· 视图外壳与卡片件提到 `@sdk`(viewShell / kvCard / tableCard / stagesCard / noteCard)——
六个活动共用一套面貌,不各自发明;样式内联自带(沙箱页面不继承工作台 CSS)。
· flow 四活动按**步序位置**挂模版:
A1 事态全景 / 打标判据 / 成果预览;A4 取价基准 / 定价与门禁 / 草案待放行;
A6 正式报价单 / 放行即发出;A7 结果登记 / 闭环待放行。
· loop 两活动按**阶段与里程碑**组织:案例全景一屏,画阶段生命周期态、当下可为、目标缺口 ——
素材全部来自语义引擎,零 LLM 即可成屏;模型只决定下一步做什么,不负责画面。
为此给 loop-engine 补了视图端口,与 flow 共用同一个网关。
· 每张模版都把「这一屏在说什么 / 放行意味着什么」写在数据旁边 ——
人要在数据上作判断,判据就得摆在手边。
技能(AM 08):
· 六个活动各写了 1–2 条真技能:适用描述 + 方法正文 + 结晶片段脚本。
正文写的是**方法经验**而非流程复述(如「原文没写的不要补」「该等还是该问」
「无基准不是异常,是一种基准」)。
· 资源声明放**技能 ID**(权力面),资产放**定义本体**(方法面),两处分清。
· **skill-engine 从来没有被构造过** —— 模块实现完整却无人调用,这是它一直没被用上的原因。
容器里补上:目录与白名单都取自活动清单,装配前查扩权。
· loop 的叙事面接入**技能目录**(渐进披露:常驻上下文只给「有哪些方法、何时适用」,
正文等 AI 说要才加载),装配随即**盖戳入任务记忆** —— 回放与归因依赖之。
gates: tsc / eslint / depcruise(334 模块)/ 423 测试 全绿
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
@@ -47,6 +47,7 @@ import { createCardStore, createHumanToolService } from '@modules/human-tool';
|
||||
import type { InteractionService } from '@modules/interaction';
|
||||
import { createInteractionService, createInteractionStore, templateIsSafe } from '@modules/interaction';
|
||||
import type { ActivityRegistryService } from '@modules/activity-registry';
|
||||
import { createSkillEngineService } from '@modules/skill-engine';
|
||||
import { createRegistryService, createRegistryStore } from '@modules/activity-registry';
|
||||
import type { ReleaseService } from '@modules/release';
|
||||
import { createIntentStore, createReleaseService } from '@modules/release';
|
||||
@@ -364,6 +365,30 @@ export async function createContainer(config: AppConfig): Promise<Container> {
|
||||
sdkVersion: '0.1.0-m5',
|
||||
});
|
||||
|
||||
/*
|
||||
* skill-engine(L4)—— 技能是活动内部的构件格式,由两个范式引擎装配。
|
||||
* 目录与白名单都取自**活动清单**:技能提及的工具不在本活动白名单者不可调,
|
||||
* 装配前查扩权 —— 载方法,不载权力(AM 08)。
|
||||
*/
|
||||
const skills = createSkillEngineService({
|
||||
catalog: {
|
||||
skillsOf: async (activityId) => [...(await registry.manifestOf(activityId)).assets.skills],
|
||||
allowlistOf: async (activityId) =>
|
||||
(await registry.manifestOf(activityId)).declarations.tools.map((t) => t.name),
|
||||
},
|
||||
tools: {
|
||||
invoke: (input) => toolInvoker.invoke(input),
|
||||
},
|
||||
memory: {
|
||||
append: async (input) =>
|
||||
void (await memory.append({
|
||||
...input,
|
||||
stamp: { contractVersion: '1', businessModelVersion: '1', skillVersions: [] },
|
||||
})),
|
||||
},
|
||||
clock: systemClock,
|
||||
});
|
||||
|
||||
const release = createReleaseService({
|
||||
intents: createIntentStore(db),
|
||||
ledger: {
|
||||
@@ -489,6 +514,7 @@ export async function createContainer(config: AppConfig): Promise<Container> {
|
||||
modelGateway,
|
||||
registry,
|
||||
release,
|
||||
skills,
|
||||
schemas,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user