@antprofuse/saddle-skill 0.1.3 → 0.2.0-rc.19
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 +62 -23
- package/agents/openai.yaml +3 -3
- package/assets/{v1-business → registry-consumer}/Cargo.lock +117 -235
- package/assets/registry-consumer/Cargo.toml +20 -0
- package/assets/registry-consumer/src/generated_artifact.rs +858 -0
- package/assets/registry-consumer/src/lib.rs +12 -0
- package/assets/registry-consumer/tests/provider_consumer.rs +20 -0
- package/package-files.txt +24 -0
- package/package-manifest.json +111 -0
- package/package.json +6 -6
- package/references/api-boundary.md +71 -0
- package/references/declaration-schema.md +115 -0
- package/references/identity-closure.json +48 -0
- package/references/machine-schema.md +47 -0
- package/references/migration.md +24 -0
- package/references/public-api.snapshot +16 -0
- package/scripts/parameterized-capacity-facts.py +254 -0
- package/scripts/sync-identity-closure.py +123 -0
- package/scripts/validate-contract.sh +62 -0
- package/scripts/validate-generated-preflight.sh +120 -0
- package/scripts/validate-generated-project.sh +86 -0
- package/scripts/validate-identity-closure.py +137 -0
- package/scripts/validate-machine-input.sh +48 -0
- package/scripts/validate-managed-objects-peak.py +147 -0
- package/LICENSE-APACHE +0 -203
- package/LICENSE-MIT +0 -22
- package/assets/v1-business/Cargo.toml +0 -12
- package/assets/v1-business/schema.sql +0 -18
- package/assets/v1-business/src/main.rs +0 -42
- package/assets/v1-business/src/order.rs +0 -118
- package/assets/v1-business/src/user.rs +0 -54
- package/references/db-0.1.1.md +0 -96
- package/references/gates-0.1.1.md +0 -77
- package/references/observability-0.1.1.md +0 -69
- package/references/overview-0.1.1.md +0 -73
- package/references/runtime-0.1.1.md +0 -54
- package/references/service-0.1.1.md +0 -124
- package/references/validation-0.1.1.md +0 -50
- package/scripts/check-business-boundaries.sh +0 -5
- package/scripts/check_business_boundaries.py +0 -356
package/SKILL.md
CHANGED
|
@@ -1,30 +1,69 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: saddle-service
|
|
3
|
-
description:
|
|
2
|
+
name: saddle-service-0-2
|
|
3
|
+
description: 使用 Saddle 0.2 冻结候选声明生成和审查受管 Rust 业务应用。仅在任务明确针对已发布且身份匹配的 Saddle 0.2 Rust 制品时使用,覆盖唯一 application bootstrap、静态 Service/route/内部调用图、query_optional、standalone write、单层 transaction commit/业务 rollback,以及禁止 V1、裸 I/O、普通容器和第二执行面的 Gate。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Saddle
|
|
6
|
+
# Saddle 0.2 真实 Facade 研发契约候选
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
先核对 Rust Facade、Skill package、[公开 API snapshot](references/public-api.snapshot)
|
|
9
|
+
与 machine schema 的版本身份。开发候选必须精确匹配 manifest 中的 source commit;
|
|
10
|
+
正式使用必须匹配已发布 Rust 制品。任一身份不一致时停止生成,不用其他 workspace
|
|
11
|
+
path、设计目标或相邻版本替代。
|
|
9
12
|
|
|
10
13
|
## 执行顺序
|
|
11
14
|
|
|
12
|
-
1. 阅读 [
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
1. 阅读 [声明语法](references/declaration-schema.md),只编写一个
|
|
16
|
+
`saddle::application!` 声明。
|
|
17
|
+
2. 阅读 [公开 API 边界](references/api-boundary.md),区分稳定源码契约与
|
|
18
|
+
build-internal 类型。
|
|
19
|
+
3. 涉及旧应用升级时阅读 [迁移规则](references/migration.md)。
|
|
20
|
+
4. 交付前按 [machine schema](references/machine-schema.md) 生成并核对构建输入。
|
|
21
|
+
5. 以 `assets/registry-consumer` 为可编译基准生成私有
|
|
22
|
+
`GeneratedApplicationOwner`。application marker 必须公开一个 provider-generic、
|
|
23
|
+
consuming 的 `run<B: ApprovedExternalBundle>(bundle, config)`;函数体只能在私有
|
|
24
|
+
generated module 内移动一次 owner 到
|
|
25
|
+
`ProductionLauncher::verify(bundle)?.run(config, GeneratedOwner)`。不得生成 bundle、
|
|
26
|
+
credential、raw constructor,也不得公开 owner。
|
|
27
|
+
6. 运行 `scripts/validate-contract.sh <application.rs>` 与
|
|
28
|
+
`scripts/validate-generated-project.sh <project-root>`;核对 public API snapshot、
|
|
29
|
+
approved locks、package allowlist、同源 managed-object peak 与 machine
|
|
30
|
+
fingerprint,再运行正式 Rust package 提供的 Gate,不自行实现替代 Gate。
|
|
31
|
+
|
|
32
|
+
## 生成约束
|
|
33
|
+
|
|
34
|
+
- 生成唯一 bootstrap、registry seal、dispatcher、classified adapter 和 startup
|
|
35
|
+
assembly。
|
|
36
|
+
- generated module 和 owner 必须保持私有;业务声明只能命名 application marker,
|
|
37
|
+
不能命名、构造、Clone、提取或重放 owner/token/proof。
|
|
38
|
+
- Test/部署控制面从外部注入合法 `ApprovedExternalBundle` 与 `SaddleConfig`;Skill 只生成
|
|
39
|
+
可被该控制面调用的 business consumer,不生成或保存生产凭据与部署实例。
|
|
40
|
+
- route、Service、内部调用边、DB operation 与 transaction decision 必须全部来自
|
|
41
|
+
同一声明。
|
|
42
|
+
- query、write、transaction 只使用静态 SQL 与固定受管参数/结果 shape。
|
|
43
|
+
- transaction 仅允许一个 write step,显式 `commit` 或 `business_rollback`。
|
|
44
|
+
- handler 保持 async 源码体验,但不得出现 boxed/dyn Future 或业务自建 executor。
|
|
45
|
+
- generated artifact 只携 route/framing、DB work、具体静态 layout、每 route
|
|
46
|
+
commitment/managed-object/DB credit 与 build/artifact/route-set identity。
|
|
47
|
+
- capacity、deadline、task bytes、StartupPlan 与 deployment calibration 由 Gate/Runtime
|
|
48
|
+
从已验证资源产生;generated/业务不得填写、枚举、观察或依赖这些值。
|
|
49
|
+
- Service capacity、termination、continuation 与 runtime layout proof 必须由同一次
|
|
50
|
+
registry freeze 的整包进入 Facade 后在组件内部签发并消费。generated crate 不得实现
|
|
51
|
+
proof trait、声明 proof associated type、拆分 capacity leaf,或复制任何 identity。
|
|
52
|
+
- 私有 generated owner 只能把同次 freeze 的不可 `Clone` 整包移动进
|
|
53
|
+
`generated_bootstrap`,再把得到的 opaque bootstrap 作为 `seal.bind(bootstrap)` 的唯一
|
|
54
|
+
输入;业务/provider 不得观察、构造或传入 layout、size、route identity 或 proof。
|
|
55
|
+
|
|
56
|
+
## 停止条件
|
|
57
|
+
|
|
58
|
+
- Rust/Skill/schema 版本或摘要不匹配;
|
|
59
|
+
- 只有源码候选、没有身份匹配的已发布 Rust Facade,却要求按正式制品使用;
|
|
60
|
+
- 需要动态 SQL、多 step/嵌套事务、后台任务、第三方 I/O 或未交付能力;
|
|
61
|
+
- 需要 V1 `ServiceHandler`、`Statement`、普通 serde、`String`、`Vec`、raw sqlx、
|
|
62
|
+
第二 Runtime/task/dispatcher/assembly;
|
|
63
|
+
- signed production bundle、final calibration 或 release profile 尚未由正式制品冻结。
|
|
64
|
+
|
|
65
|
+
上述最后一项只禁止 Skill 伪造具体部署实例,不阻止生成 provider-generic consumer。
|
|
66
|
+
若任务要求由 Skill 自造 bundle/credential,必须停止;若外部 Test provider 可用,则继续
|
|
67
|
+
生成并验证 consumer。
|
|
68
|
+
|
|
69
|
+
停止时提交最小可复现案例,不读取或复制中间件实现。
|
package/agents/openai.yaml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
|
-
display_name: "Saddle
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "使用 $saddle-service
|
|
2
|
+
display_name: "Saddle 0.2 研发契约"
|
|
3
|
+
short_description: "生成并验证受管 Service、数据库与单层事务应用"
|
|
4
|
+
default_prompt: "使用 $saddle-service-0-2 按真实 Facade 契约生成并验证 Saddle 0.2 应用。"
|