M5(完成): @activity-sdk 与首个活动包 quote-intake

@activity-sdk(§8.2 / ADR-004):
- 基座六件接口(契约 / 交互 / 记忆 / 数据 / 工具 / LLM)—— 活动看到的全部世界
- defineActivity() 的 ABI;本地开发宿主(mock 工具表 + 模拟工位 + 录制夹具),
  宿主自身就守三规矩:裸调用拒发、视图含脚本拒推、监听无时限拒登记

activities/quote-intake —— 统一报价 A1 · RFQ 需求分析(flow):
- 契约七件 / 步序声明五步(LLM 抽取 → 条件跳步补全 → 查历史价 → DMN 打标 → 验收放行)
- 三分类规则 P-03 落 DMN 决策表(C 优先于 A,命中行留痕)
- 台账声明两对象、监听时限必配、SLA 落 Harness

depcruise 实测拦下活动包越界 import(activities → apps 双向隔离),
测试遂按边界拆分:活动侧只用 @sdk/@contracts/@sfeel

358 个测试通过,门禁五道全绿

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
JCAI Main Agent
2026-07-27 02:09:43 +08:00
co-authored by Claude Opus 5
parent 4ad901c452
commit c6cdb4c310
11 changed files with 867 additions and 20 deletions
+11 -3
View File
@@ -1,5 +1,13 @@
/**
* @sdk —— 活动开发面(编码规范 §8.2):基座六件接口 + defineActivity() + 本地开发宿主 + 回放夹具。
* 活动包 ABI 见 ADR-004。
* @sdk —— 活动开发面(编码规范 §8.2)。
*
* 活动包只准 import `@sdk` / `@contracts` 与白名单纯库;
* **不得触任何环境能力**(`process.env` / `fs` / `fetch`…)—— 静态审扫描产物(ADR-004)。
*/
export declare const SDK_VERSION = "0.0.0-m0";
export type { ActivityBase, ContractSpec, InteractionHandle, LedgerHandle, LlmHandle, MemoryHandle, ToolInvokerHandle, } from './base.ts';
export type { ActivityDefinition, ActivityOutcome } from './define.ts';
export { defineActivity } from './define.ts';
export type { ActivityMemoryLayer, ChatCardDraft, FormFieldDraft, LedgerKey, LedgerRow, ViewBlockLike, WorkOrderDraft, } from './types.ts';
export type { HostOptions, HostRecording, MockHost } from './host.ts';
export { createMockHost } from './host.ts';
export declare const SDK_VERSION = "0.1.0-m5";