@antprofuse/saddle-skill 0.3.1 → 0.3.2
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/SKILL.md +4 -4
- package/agents/openai.yaml +1 -1
- package/package.json +2 -2
- package/references/consumer-start.md +2 -2
- package/references/external-function-contracts.md +2 -2
- package/references/local-integration.md +2 -2
- package/references/programming-model.md +1 -1
- package/references/validation.md +4 -4
- package/scripts/saddle-03-gate.js +6 -6
package/SKILL.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: saddle-service-0-3
|
|
3
|
-
description: 使用 Saddle 0.3.
|
|
3
|
+
description: 使用 Saddle 0.3.2 Skill 开发或审查带 profusegw 固定入口和 profusecontract 强类型外部函数调用的 Rust 业务应用。用于定义 protobuf 契约、声明强类型业务配置、编写固定 ProfuseGwContext 四参数 handler、以框架响应映射业务拒绝和技术失败,或运行正式业务门禁。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Saddle 0.3.
|
|
6
|
+
# Saddle 0.3.2 业务研发契约
|
|
7
7
|
|
|
8
8
|
业务 Agent 的直接输入只有业务 spec 与本 Skill。不要要求用户阅读 Saddle 仓库、审计报告、组件提交或内部实现。
|
|
9
9
|
|
|
@@ -29,7 +29,7 @@ description: 使用 Saddle 0.3.1 Skill 开发或审查带 profusegw 固定入口
|
|
|
29
29
|
|
|
30
30
|
```toml
|
|
31
31
|
[dependencies]
|
|
32
|
-
saddle-framework = "=0.3.
|
|
32
|
+
saddle-framework = "=0.3.2"
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
`saddle-framework` 是唯一业务 facade。业务不得直接依赖 `saddle-core`、`saddle-admission`、`saddle-boundary`、`saddle-db`、`saddle-macros`、`saddle-observability`、`saddle-runtime` 或 `saddle-service`。
|
|
@@ -68,6 +68,6 @@ saddle-framework = "=0.3.1"
|
|
|
68
68
|
- handler 返回 Rust `Result`/`Err`、空成功、任意 JSON,或业务自建第二响应结构;
|
|
69
69
|
- 业务拒绝或任一技术失败组合没有显式映射,机器码不稳定,或 `FailureMessage` 超过 256 bytes;
|
|
70
70
|
- 出现旧响应字段、顶层 code/message 或任何旧协议兼容叙述;
|
|
71
|
-
- Cargo 不是精确 `=0.3.
|
|
71
|
+
- Cargo 不是精确 `=0.3.2` Rust facade、缺 lock,或正式 Gate 不通过。
|
|
72
72
|
|
|
73
73
|
停止时只交最小复现和期望业务表达,由 Saddle 修复公共能力缺口。
|
package/agents/openai.yaml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Saddle 0.3 业务应用"
|
|
3
3
|
short_description: "使用 Saddle 0.3 开发受控边界的 Rust 业务应用"
|
|
4
|
-
default_prompt: "请安装 Saddle 0.3.
|
|
4
|
+
default_prompt: "请安装 Saddle 0.3.2 Skill(npm install --save-exact --ignore-scripts --no-audit --no-fund @antprofuse/saddle-skill@0.3.2),结合业务 spec 开始研发。"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antprofuse/saddle-skill",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Saddle 0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "Saddle 0.3.2 中文 AI Coding 研发契约与业务门禁。",
|
|
5
5
|
"license": "MIT OR Apache-2.0",
|
|
6
6
|
"files": ["SKILL.md", "agents", "references", "scripts", "assets"],
|
|
7
7
|
"bin": {"saddle-03-gate": "scripts/saddle-03-gate.js"},
|
|
@@ -46,7 +46,7 @@ Saddle 在编译期从 `contract_dir` 确定性递归收集 `.proto`,闭合 im
|
|
|
46
46
|
|
|
47
47
|
## 阶段 3:Rust 实现
|
|
48
48
|
|
|
49
|
-
业务 crate 精确使用 `saddle-framework = "=0.3.
|
|
49
|
+
业务 crate 精确使用 `saddle-framework = "=0.3.2"`,然后按 [最小编程模型](programming-model.md) 编写固定 `deployment_app`、显式 `business_config`、静态 operation 声明和四参数 handler。不得直接依赖任何 Saddle 中间件 crate。
|
|
50
50
|
|
|
51
51
|
实现通过 Gate 后,按 [本地联调](local-integration.md) 由外部 harness 注入唯一 plaintext profusecontract authority,并以固定 profusegw body 验证真实 typed call。endpoint、request/call identity 和 deadline 都是框架或部署输入,不写入业务 spec。
|
|
52
52
|
|
|
@@ -63,6 +63,6 @@ Saddle 在编译期从 `contract_dir` 确定性递归收集 `.proto`,闭合 im
|
|
|
63
63
|
- 缺少固定 `deployment_app`,或 app/interfaceId/endpoint 被做成动态业务输入;
|
|
64
64
|
- 技术失败码或执行确定性存在 catch-all/default;
|
|
65
65
|
- 需要裸 gRPC/channel/bytes、第二入口、动态 descriptor 或未声明外部 I/O;
|
|
66
|
-
- `saddle-framework` 不是精确 `=0.3.
|
|
66
|
+
- `saddle-framework` 不是精确 `=0.3.2`,或 [正式 Gate](validation.md) 失败。
|
|
67
67
|
|
|
68
68
|
停止产物只包含最小复现、缺失身份和期望业务表达,不包含中间件替代实现。
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
- `puc` 是业务单元,例如 `puc`。
|
|
16
16
|
- `function` 是契约原始函数名,允许中文,例如 `查询用户绑定户号`。
|
|
17
17
|
- protobuf method、Rust 方法和 Java 方法使用各语言合法的本地标识符;它们不是跨系统身份。
|
|
18
|
-
- 0.3.
|
|
18
|
+
- 0.3.2 不定义 contract version、多版本路由、翻译表、alias 或 fallback。
|
|
19
19
|
|
|
20
20
|
## 定义步骤
|
|
21
21
|
|
|
@@ -82,4 +82,4 @@ message BoundAccount {
|
|
|
82
82
|
|
|
83
83
|
## 变更规则
|
|
84
84
|
|
|
85
|
-
先修改共同契约目录并重新通过双方 conformance,再修改两侧实现。禁止两侧各自维护近似定义后人工对齐;0.3.
|
|
85
|
+
先修改共同契约目录并重新通过双方 conformance,再修改两侧实现。禁止两侧各自维护近似定义后人工对齐;0.3.2 遇到不兼容变化时停止并共同升级,不在运行时并存或猜测版本。
|
|
@@ -29,7 +29,7 @@ profusegw 只向固定路径发送通用 JSON body;业务接口不新增 URL
|
|
|
29
29
|
|
|
30
30
|
## 唯一 plaintext endpoint
|
|
31
31
|
|
|
32
|
-
0.3.
|
|
32
|
+
0.3.2 部署配置只接受 `saddle.toml` 的正式键 `[framework].profusecontractAuthorityTemplate`。有业务配置的完整最小文件是 [saddle-configured.toml](../assets/saddle-configured.toml),`business_config ();` 应用使用不含 `[business]` 的 [saddle-unit.toml](../assets/saddle-unit.toml)。例如:
|
|
33
33
|
|
|
34
34
|
```toml
|
|
35
35
|
[framework]
|
|
@@ -45,7 +45,7 @@ dataPath = "fixtures/data"
|
|
|
45
45
|
|
|
46
46
|
键值必须是 `http` plaintext 的 `host:port`,可选且只能出现受控 `{zone}` 模板;模板用同一请求的 LDC zone 在连接前解析。不得包含其他模板、path、query、fragment、userinfo、凭据或动态函数信息。键缺失、近似键、缺失或非法 zone 都必须 fail-fast,禁止普通环境变量 fallback。所有强类型函数共享这一部署级连接目标;线上 gRPC method 固定为 `ProfuseContractBoundary/Invoke`,应用不得按函数配置 endpoint。
|
|
47
47
|
|
|
48
|
-
此 endpoint 是部署输入,不进入业务 spec、request 或 handler。TLS、鉴权、服务发现、负载均衡和生产凭据不属于 0.3.
|
|
48
|
+
此 endpoint 是部署输入,不进入业务 spec、request 或 handler。TLS、鉴权、服务发现、负载均衡和生产凭据不属于 0.3.2;需要其中任一能力时立即停止,不得在业务 crate 自建 client。
|
|
49
49
|
|
|
50
50
|
## 联调完成条件
|
|
51
51
|
|
package/references/validation.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Saddle 0.3.
|
|
1
|
+
# Saddle 0.3.2 Skill 正式业务 Gate
|
|
2
2
|
|
|
3
3
|
## 依赖与锁
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ edition = "2024"
|
|
|
12
12
|
rust-version = "1.95"
|
|
13
13
|
|
|
14
14
|
[dependencies]
|
|
15
|
-
saddle-framework = "=0.3.
|
|
15
|
+
saddle-framework = "=0.3.2"
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
在允许访问正式 registry 的依赖准备阶段生成并提交 `Cargo.lock`。禁止 `path`、`git`、`[patch]`、source replacement 或宽松 Saddle 版本。
|
|
@@ -25,10 +25,10 @@ saddle-framework = "=0.3.1"
|
|
|
25
25
|
npx --no-install saddle-03-gate --manifest-path Cargo.toml
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
命令由已安装的 `@antprofuse/saddle-skill@0.3.
|
|
28
|
+
命令由已安装的 `@antprofuse/saddle-skill@0.3.2` 提供,不需要 Saddle 源码仓库。它会检查:
|
|
29
29
|
|
|
30
30
|
- facade 精确版本、禁止直接中间件依赖和 Cargo source 旁路;
|
|
31
|
-
- `Cargo.lock` 中 boundary、db、framework、macros、observability、runtime、service 七包统一精确映射 `0.3.
|
|
31
|
+
- `Cargo.lock` 中 boundary、db、framework、macros、observability、runtime、service 七包统一精确映射 `0.3.2`;
|
|
32
32
|
- 唯一 `contract_dir`、目录存在、禁止旧单文件 contract 声明;
|
|
33
33
|
- 目录根部 `saddle_external_function.proto` 与 Skill 权威模板逐字一致且仅出现一次,使用 option 的业务 proto 必须 direct import 根文件;
|
|
34
34
|
- 编译期递归扫描/import 闭包、option-only 索引、身份唯一、请求结果类型匹配,以及所有 function 均有实际 `uses`;
|
|
@@ -30,8 +30,8 @@ if (/^\s*\[(patch|replace)\b/m.test(cargo) || /\b(path|git|branch|tag)\s*=/.test
|
|
|
30
30
|
stop("DEPENDENCY_SOURCE", "禁止 path/git/patch/replace 依赖旁路");
|
|
31
31
|
}
|
|
32
32
|
const facade = cargo.match(/^\s*saddle-framework\s*=\s*(.+)$/m);
|
|
33
|
-
if (!facade || !/^"=0\.3\.
|
|
34
|
-
stop("SADDLE_VERSION", '必须直接且精确依赖 saddle-framework = "=0.3.
|
|
33
|
+
if (!facade || !/^"=0\.3\.2"\s*(?:#.*)?$/.test(facade[1].trim())) {
|
|
34
|
+
stop("SADDLE_VERSION", '必须直接且精确依赖 saddle-framework = "=0.3.2"');
|
|
35
35
|
}
|
|
36
36
|
const internals = ["saddle-core","saddle-admission","saddle-boundary","saddle-db","saddle-macros","saddle-observability","saddle-runtime","saddle-service"];
|
|
37
37
|
for (const name of internals) {
|
|
@@ -41,11 +41,11 @@ if (!fs.existsSync(lockPath)) {
|
|
|
41
41
|
stop("LOCK", "缺少 Cargo.lock");
|
|
42
42
|
} else {
|
|
43
43
|
const lock = fs.readFileSync(lockPath, "utf8");
|
|
44
|
-
const publicClosure = ["saddle-boundary", "saddle-db", "saddle-framework", "saddle-macros", "saddle-observability", "saddle-runtime", "saddle-service"];
|
|
44
|
+
const publicClosure = ["saddle-admission", "saddle-boundary", "saddle-core", "saddle-db", "saddle-framework", "saddle-macros", "saddle-observability", "saddle-runtime", "saddle-service"];
|
|
45
45
|
for (const name of publicClosure) {
|
|
46
46
|
const escaped = name.replaceAll("-", "\\-");
|
|
47
|
-
if (!new RegExp(`name = "${escaped}"\\nversion = "0\\.3\\.
|
|
48
|
-
stop("LOCK", `Cargo.lock 未绑定 ${name} 0.3.
|
|
47
|
+
if (!new RegExp(`name = "${escaped}"\\nversion = "0\\.3\\.2"`).test(lock)) {
|
|
48
|
+
stop("LOCK", `Cargo.lock 未绑定 ${name} 0.3.2`);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -174,4 +174,4 @@ try {
|
|
|
174
174
|
fs.rmSync(target, {recursive: true, force: true});
|
|
175
175
|
}
|
|
176
176
|
if (process.exitCode) process.exit(process.exitCode);
|
|
177
|
-
process.stdout.write("SADDLE_03_GATE PASS; SKILL=0.3.
|
|
177
|
+
process.stdout.write("SADDLE_03_GATE PASS; SKILL=0.3.2; RUST=0.3.2; CLOSED_RESPONSE; CLOSED_CODES; FAILURE_MESSAGE_256; FAILURE_8X3; LOCKED_OFFLINE\n");
|