@antprofuse/saddle-islands-design 0.1.15 → 0.1.16
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.
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
3. 用具体具名request/result及必要嵌套message表达已确定的输入输出。proto需要合法标识符,中文业务名称与实体字段通过注释保留关联;同类型不是同实例,不扩展成整实体快照。
|
|
17
17
|
4. 核对字段presence、空串/零、空集合、无对象、业务失败和技术异常。proto3默认值不是业务默认,不能让缺失悄悄成为0或空字符串。按目标runtime支持的presence能力表达;输入没有决定的对象整体可空或联合结构先退回讨论。
|
|
18
18
|
5. 保留金额精度、日期与时刻语义、枚举及合法范围。不得默认double、按DB分存储反推外部金额单位、按前端JSON格式推断外部编码。协议编码存在多个可行选择而影响跨端正确性时,提供具体候选让用户确认再固化。
|
|
19
|
-
6.
|
|
19
|
+
6. 按实际选定版本的method option绑定身份,核对puc+function规则,puc值由业务确定。deadline、trace/LDC及技术异常走框架边界,下游所需用户ID是明确的业务request字段,不是通用context。字段由adapt确定,不照搬SOFA模型、类名、重试或容量默认值。
|
|
20
20
|
7. 编译同一份proto及权威imports,检查descriptor中函数身份、request/result、字段号和presence。对已有契约比较descriptor及bytes hash;不得复用已删字段号、改变既有字段含义或让两端各自演化。
|
|
21
21
|
|
|
22
22
|
## 交付门槛
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 运行时协议依据
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
默认使用npm官方registry的 `@antprofuse/saddle-skill@latest`,不在本Skill写死Saddle版本。执行时查询latest并安装,记录实际解析版本及摘要,本轮统一消费该版本,不在执行途中漂移。用户明确指定版本时遵从用户;既有项目运行时与最新版不一致时报告迁移差异,不擅自改Cargo依赖。完整阅读实包的SKILL.md、references/external-function-contracts.md、references/consumer-start.md、references/validation.md和两个固定模板;实包与本地旧资料冲突以选定实包为准,协议变化先反馈。包不可取得时不手写替代。安装位置不要求在业务目录。
|
|
4
4
|
|
|
5
5
|
## 固定模板和共享目录
|
|
6
6
|
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
默认目录为 code/external-contract-proto,与backend、backend-contract、db并列。目录树是双方共同输入,包含固定根模板和业务proto;不建聚合proto、手工proto清单、protocol子目录或版本副本。只有带正式method option的RPC进入外部函数索引。
|
|
10
10
|
|
|
11
|
+
对支持同级目录的Saddle版本,backend可声明 `contract_dir "../external-contract-proto";`,相对应用Cargo.toml所在目录而非shell。构建与CI必须取得固定revision的完整契约树;根目录定位允许上行不代表proto import允许逃逸,目录不得经symlink。具体限制核对选定版本。目录外引用支持与研发Skill停止生成proto是两项独立检查,不能因前者成立就宣称后者完成。
|
|
12
|
+
|
|
11
13
|
业务proto精确 import "saddle_external_function.proto";,使用 (saddle.profusecontract.external_function),字段为 puc 与 function。
|
|
12
14
|
|
|
13
15
|
- puc是固定字段名,其值是项目确认的业务单元,不固定为字符串puc;例如bill可以按确认填bill。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antprofuse/saddle-islands-design",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"description": "消费自洽 adapt 与 Islands Spec,设计后端契约、数据库表和 external-contract-proto。",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"files": ["SKILL.md", "agents", "modules", "references"],
|