@zhuoyuezs/ml-platform 0.2.3-alpha → 0.2.3-alpha.1

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/DEVELOPMENT.md CHANGED
@@ -10,7 +10,7 @@
10
10
  - Skill 直接调用正式命令 `ml-platform`,不嵌入 CLI runtime。
11
11
  - 正式 npm 包只有 `@zhuoyuezs/ml-platform`,正式 bin 只有 `ml-platform`。
12
12
  - `business-client-js/src-ts/` 是 business CLI 的唯一 TypeScript 源码,`src/` 是供 Node.js 和
13
- release payload 使用的编译输出;仓库 `skills/` 下四个受支持 Skill 是各自唯一源码。
13
+ release payload 使用的编译输出;仓库 `skills/` 下五个受支持 Skill 是各自唯一源码。
14
14
  - `npx @zhuoyuezs/ml-platform@<version> install` 是面向用户的统一安装入口;默认目标是 Codex
15
15
  用户级 Skill,不要求额外安装参数。
16
16
  - 管理命令默认输出简洁结果;Agent 和 CI 显式使用 `--json` 获取稳定结构化输出。
@@ -34,6 +34,7 @@ skills/feature-management/
34
34
  skills/data-source-exploration/
35
35
  skills/model-lifecycle-management/
36
36
  skills/model-deployment-management/
37
+ skills/prediction-report-management/
37
38
  npm/ml-platform/
38
39
  npm/scripts/build_ml_platform_release.py
39
40
  agent_poc/codex-host/
package/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # ML Platform
2
2
 
3
3
  ML Platform 的 TypeScript CLI(编译为 Node.js JavaScript runtime)、`feature-management`、
4
- `data-source-exploration`、`model-lifecycle-management` 与 `model-deployment-management`
4
+ `data-source-exploration`、`model-lifecycle-management`、`model-deployment-management` 与
5
+ `prediction-report-management`
5
6
  Agent Skill。CLI 与 Skill 由同一个 npm
6
7
  release 安装和升级,运行时不需要 Python 或 `uv`。
7
8
 
@@ -19,7 +20,7 @@ release 安装和升级,运行时不需要 Python 或 `uv`。
19
20
  npx @zhuoyuezs/ml-platform@latest install
20
21
  ```
21
22
 
22
- 这条命令不需要额外参数。默认安装持久化的 `ml-platform` 命令,并将四个 Skill 安装到
23
+ 这条命令不需要额外参数。默认安装持久化的 `ml-platform` 命令,并将五个 Skill 安装到
23
24
  `~/.codex/skills/`,供当前用户的 Codex 使用。安装后重启终端和 Agent 会话。
24
25
 
25
26
  只在当前项目使用 Skill 时,在项目根目录运行:
@@ -131,8 +132,9 @@ npx --yes --registry=https://registry.npmjs.org/ \
131
132
  ## 包内容
132
133
 
133
134
  - 一份由 TypeScript 编译的 business CLI;
134
- - 四份纯 Skill:`feature-management`、`data-source-exploration`、
135
- `model-lifecycle-management` 与 `model-deployment-management`;
135
+ - 五份纯 Skill:`feature-management`、`data-source-exploration`、
136
+ `model-lifecycle-management`、`model-deployment-management` 与
137
+ `prediction-report-management`;
136
138
  - 显式安装、升级、状态、校验和回滚逻辑。
137
139
 
138
140
  不包含 Codex CLI、Python business-client wheel、Agent Host、平台服务端、模型训练或 Kubernetes
package/checksums.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "files": [
3
3
  {
4
4
  "path": "runtime/business-client/README.md",
5
- "sha256": "sha256:c263ebe1591d38d90fb68227f42c6de43014a05e98b736d2e3363e19545676d9",
6
- "size_bytes": 8779
5
+ "sha256": "sha256:f03d10f0de78e4ff456a6718b5b74b7fd001598f5a5963985d97d0b99403c0a5",
6
+ "size_bytes": 12756
7
7
  },
8
8
  {
9
9
  "path": "runtime/business-client/package-lock.json",
@@ -22,8 +22,8 @@
22
22
  },
23
23
  {
24
24
  "path": "runtime/business-client/src/cli.js",
25
- "sha256": "sha256:739be8665f611802d9196ba84566578fbfc6544c6907af165edbaf115d9d1998",
26
- "size_bytes": 62651
25
+ "sha256": "sha256:ecdc7d2e93323a4dd04514573219061f54db6583d955dfa82afc482abcd3335a",
26
+ "size_bytes": 66532
27
27
  },
28
28
  {
29
29
  "path": "runtime/business-client/src/config.js",
@@ -32,13 +32,13 @@
32
32
  },
33
33
  {
34
34
  "path": "runtime/business-client/src/http.js",
35
- "sha256": "sha256:3c8b40b0da0bb87c95f1367f540cd08a7ec28e0d5fe8e52a0367fecb5ae4094c",
36
- "size_bytes": 18763
35
+ "sha256": "sha256:517ad46944f3a4068a00a570dc09975c5b59de61b730e0acf8e009ee1f18c89d",
36
+ "size_bytes": 18865
37
37
  },
38
38
  {
39
39
  "path": "skills/data-source-exploration/SKILL.md",
40
- "sha256": "sha256:3b609d61f3c73da3657ce2e6bb4d1eff95a90e4ac5e5445b8513536438b26b0b",
41
- "size_bytes": 3853
40
+ "sha256": "sha256:11b20671ad81b42cd2ddb1cb146196b9f5ab15e962249e7e07cfa148c601e881",
41
+ "size_bytes": 4172
42
42
  },
43
43
  {
44
44
  "path": "skills/data-source-exploration/agents/openai.yaml",
@@ -47,8 +47,8 @@
47
47
  },
48
48
  {
49
49
  "path": "skills/feature-management/SKILL.md",
50
- "sha256": "sha256:309d2ae292113f99bd17b6865b87bbe793809c88005458f477fa1e80c41b1523",
51
- "size_bytes": 33334
50
+ "sha256": "sha256:1118aef3734fe14fd8f7d1074ff730340663e42565155bde984ab5b397c2da77",
51
+ "size_bytes": 33777
52
52
  },
53
53
  {
54
54
  "path": "skills/feature-management/agents/openai.yaml",
@@ -127,8 +127,8 @@
127
127
  },
128
128
  {
129
129
  "path": "skills/model-deployment-management/SKILL.md",
130
- "sha256": "sha256:d50f64fa709c8ff36da97c60ce0d20b1217d1d9f78f602048f49c0c4bbab7ea2",
131
- "size_bytes": 3927
130
+ "sha256": "sha256:e8419e4d83031248b40783674813bf3f5a98544f05ea3fbe056547ae47632016",
131
+ "size_bytes": 4397
132
132
  },
133
133
  {
134
134
  "path": "skills/model-deployment-management/agents/openai.yaml",
@@ -152,8 +152,8 @@
152
152
  },
153
153
  {
154
154
  "path": "skills/model-lifecycle-management/SKILL.md",
155
- "sha256": "sha256:1f2174fac7f82e7539c781b1c7bc4164a8adc393acb33b3b2165408b25600135",
156
- "size_bytes": 4888
155
+ "sha256": "sha256:9ad2428621b52a15a83dce34a2a95606d7d979017a227c0aeb8fe5c8acd5faa3",
156
+ "size_bytes": 5442
157
157
  },
158
158
  {
159
159
  "path": "skills/model-lifecycle-management/agents/openai.yaml",
@@ -189,6 +189,16 @@
189
189
  "path": "skills/model-lifecycle-management/references/zero-shot-inference.md",
190
190
  "sha256": "sha256:4ea224be54a7b0fc7754bdaa41df0f3b14c56f5134afc3951e91e59844108f90",
191
191
  "size_bytes": 2350
192
+ },
193
+ {
194
+ "path": "skills/prediction-report-management/SKILL.md",
195
+ "sha256": "sha256:32abad9d9a152680d126cf1fa3df921a367a9ad9eb0aaaf3ce48b05538b4fbd5",
196
+ "size_bytes": 4365
197
+ },
198
+ {
199
+ "path": "skills/prediction-report-management/agents/openai.yaml",
200
+ "sha256": "sha256:fd86629700aa9a4f1ab985d87883162ab260f469d5059a516abcd1e3273d89fa",
201
+ "size_bytes": 241
192
202
  }
193
203
  ],
194
204
  "schema_version": "data_platform.ml_platform_checksums/v1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhuoyuezs/ml-platform",
3
- "version": "0.2.3-alpha",
3
+ "version": "0.2.3-alpha.1",
4
4
  "description": "ML 数据平台 business CLI 与 Agent Skills 管理工具",
5
5
  "bin": {
6
6
  "ml-platform": "scripts/main.js"
package/release.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "entrypoint": "src/cli.js",
14
14
  "name": "ml-platform",
15
15
  "path": "runtime/business-client",
16
- "sha256": "sha256:ff1b5f6de8111ac9dea00701afadbb6e47cc14937fa78b958ec8a3b777a4ecb9",
16
+ "sha256": "sha256:eaa88929b414e386294287009b4ecb25e26d1eb39403469ef649af145b2208de",
17
17
  "version": "0.8.3"
18
18
  },
19
19
  "policy_sha256": "sha256:02fbde0134696b78c0c365d6e0b76c9814227208da5b2b3d4e5dbd82dc4a3606",
@@ -25,7 +25,7 @@
25
25
  "ml_data_platform.feature_set/v1",
26
26
  "ml_data_platform.dataset_manifest/v1"
27
27
  ],
28
- "release_version": "0.2.3-alpha",
28
+ "release_version": "0.2.3-alpha.1",
29
29
  "runtime_requirements": {
30
30
  "node": ">=18",
31
31
  "os": [
@@ -38,27 +38,33 @@
38
38
  "data-source-exploration": {
39
39
  "path": "skills/data-source-exploration",
40
40
  "requires_cli": ">=0.8.3 <0.9.0",
41
- "revision": "0.2.3-alpha",
42
- "sha256": "sha256:ae3cfc88f8f3f46a5b7e0179d850b2216bc37275f34679dbea1ff2ba99875a96"
41
+ "revision": "0.2.3-alpha.1",
42
+ "sha256": "sha256:2fa1e1802d799ee0c47b10263f2fde57b604e505fea5c98bfa23f51f382bbf69"
43
43
  },
44
44
  "feature-management": {
45
45
  "path": "skills/feature-management",
46
46
  "requires_cli": ">=0.8.3 <0.9.0",
47
- "revision": "0.2.3-alpha",
48
- "sha256": "sha256:63e3bc337bc4cc4cdd38bfdd99ff9d8fd6c7d57d24aec1b7f70101ce38b1f599"
47
+ "revision": "0.2.3-alpha.1",
48
+ "sha256": "sha256:6dfa708172c3b5b23af75997c82a6d43bc2eb8ca67cc2275c8b95022455b0c42"
49
49
  },
50
50
  "model-deployment-management": {
51
51
  "path": "skills/model-deployment-management",
52
52
  "requires_cli": ">=0.8.3 <0.9.0",
53
- "revision": "0.2.3-alpha",
54
- "sha256": "sha256:e7d87c272a0dcc028ea628d5e36f5b7e52ed27cb9c1bc17ea76527478e28b46d"
53
+ "revision": "0.2.3-alpha.1",
54
+ "sha256": "sha256:d3f3fe0e4a11b93d8f6f57758164aa236b84a49c1b9f0d0b700fd9d6d615a8d7"
55
55
  },
56
56
  "model-lifecycle-management": {
57
57
  "path": "skills/model-lifecycle-management",
58
58
  "requires_cli": ">=0.8.3 <0.9.0",
59
- "revision": "0.2.3-alpha",
60
- "sha256": "sha256:13f94cb0928d15a83b8bb10195dc3a83c28c4bb7723bc8a35e262b6c1ba46b0d"
59
+ "revision": "0.2.3-alpha.1",
60
+ "sha256": "sha256:8822fbec7037c2312d18b1d18648b60757fc569e6bf5f2856ea41592f3ba987d"
61
+ },
62
+ "prediction-report-management": {
63
+ "path": "skills/prediction-report-management",
64
+ "requires_cli": ">=0.8.3 <0.9.0",
65
+ "revision": "0.2.3-alpha.1",
66
+ "sha256": "sha256:a0210cd93244bce41e5b71f8dc70c6c4a79973968cd22af7e0e0102eae3efaa3"
61
67
  }
62
68
  },
63
- "source_commit": "42714d93a4fdcc29fce8d98bc8e17823535cb56f"
69
+ "source_commit": "07c13464f3ed2c10644ba6707d329b54f48e725d"
64
70
  }
@@ -73,6 +73,91 @@ ml-platform get-deployment-events <deployment-id> --limit 100 --offset 0
73
73
  `list-deployments` 也支持按 `service`、`environment`、`state` 和自由文本 `q` 过滤,返回平台
74
74
  Deployment Controller 管理的部署,不把模型中心回写的 delivery 状态当作平台部署。
75
75
 
76
+ ## Prediction reporting
77
+
78
+ 定时预测上报通过业务 CLI 管理版本化推送目标、计划与运行记录。下面的 JSON 是字段示例,
79
+ 不是现网配置;替换目标地址、响应字段和占位凭据后,把实际配置文件放在仓库外并限制读取权限。
80
+ 不要把认证信息写入 Kubernetes Secret、命令行参数或 Git。`validate-destination-profile`
81
+ 仅做服务端合同校验,不会访问 Token 或推送接口。
82
+
83
+ `PROFILE_JSON` 示例:
84
+
85
+ ```json
86
+ {
87
+ "schema_version": "ml_data_platform.destination_profile/v1",
88
+ "name": "forecast_sink",
89
+ "version": "v1",
90
+ "environment": "test",
91
+ "base_url": "https://integration.example.invalid/api",
92
+ "path": "/forecast/report",
93
+ "payload_mapping": "forecast-report-v1",
94
+ "authentication": {
95
+ "kind": "token_endpoint",
96
+ "token_request": {
97
+ "method": "GET",
98
+ "path": "/auth/getToken",
99
+ "parameters": [
100
+ {"name": "appKey", "value": "<app-key>", "location": "query"},
101
+ {"name": "appSecurity", "value": "<app-secret>", "location": "query"}
102
+ ]
103
+ },
104
+ "success": {"http_status": [200], "body_code_path": "code", "body_code_values": [200]},
105
+ "token_path": "data.token",
106
+ "header_name": "Authorization",
107
+ "header_scheme": "Bearer"
108
+ },
109
+ "response_success": {"http_status": [200], "body_code_path": "code", "body_code_values": [200]},
110
+ "max_token_refreshes_per_day": 20
111
+ }
112
+ ```
113
+
114
+ `token_path`、业务成功码和 `/forecast/report` 只是示例,必须按目标接口的真实响应和路径配置。
115
+ 若响应提供有效期,可设置 `expires_in_path` 与 `expires_in_unit`;否则服务端默认按 7200 秒缓存,
116
+ 并在 `refresh_skew_seconds` 前刷新。不同环境应使用不同 Profile 版本或名称;修改目标地址、
117
+ 认证规则或凭据时创建新版本。`get`/`list` 只返回凭据已配置的脱敏标记,无法取回明文。
118
+
119
+ ```bash
120
+ ml-platform --profile server validate-destination-profile /absolute/path/to/profile.json
121
+ ml-platform --profile server create-destination-profile /absolute/path/to/profile.json
122
+ ml-platform --profile server list-destination-profiles --limit 50 --offset 0
123
+ ml-platform --profile server get-destination-profile forecast_sink v1
124
+ ```
125
+
126
+ 计划引用已有 Profile,不复制凭据。`SCHEDULE_JSON` 示例:
127
+
128
+ ```json
129
+ {
130
+ "schema_version": "ml_data_platform.prediction_report_schedule/v1",
131
+ "schedule_id": "forecast_hourly",
132
+ "name": "Hourly forecast report",
133
+ "deployment_id": "<deployment-id>",
134
+ "enabled": false,
135
+ "cron": "0 * * * *",
136
+ "timezone": "Asia/Shanghai",
137
+ "request": {"entity": {"site": "site-1"}, "horizon": "1h"},
138
+ "destination": {"name": "forecast_sink", "version": "v1"}
139
+ }
140
+ ```
141
+
142
+ 计划要求部署的模型支持 `feature_lookup`;部署必须有可用推理策略,或在计划请求中提供
143
+ `horizon`。五段 cron 至少间隔五分钟。`enabled: false` 用于先创建但不发送的计划;
144
+ 确认目标接口可用且部署 READY 后再恢复。计划创建或 Profile 校验成功均不等于已推送成功。
145
+
146
+ ```bash
147
+ ml-platform --profile server create-prediction-report-schedule /absolute/path/to/schedule.json
148
+ ml-platform --profile server list-prediction-report-schedules --limit 50 --offset 0
149
+ ml-platform --profile server get-prediction-report-schedule forecast_hourly
150
+ ml-platform --profile server update-prediction-report-schedule forecast_hourly /absolute/path/to/changes.json
151
+ ml-platform --profile server pause-prediction-report-schedule forecast_hourly
152
+ ml-platform --profile server resume-prediction-report-schedule forecast_hourly
153
+ ml-platform --profile server list-prediction-report-runs forecast_hourly --limit 50 --offset 0
154
+ ml-platform --profile server get-prediction-report-run <run-id>
155
+ ```
156
+
157
+ `CHANGES_JSON` 是仅含变更字段的对象,例如
158
+ `{"destination":{"name":"forecast_sink","version":"v2"}}`。更新不会改写历史运行;
159
+ 是否已投递成功以 Run 的 `status`、`destination_status_code` 和错误码为准。
160
+
76
161
  `READY` 必须同时包含 `ReplicasReady=true`、`ArtifactsVerified=true` 和
77
162
  `SmokePredictionPassed=true`。`get-deployment` 返回控制器实际观察到的 endpoint 元数据;
78
163
  本地 CLI 不推测 Kubernetes Service 名称。部署后验证优先使用控制面代理:
@@ -40,6 +40,10 @@ const BUSINESS_COMMANDS = new Set([
40
40
  "get-deployment", "wait-deployment", "reconcile-deployment", "approve-deployment",
41
41
  "promote-deployment", "rollback-deployment", "suspend-deployment", "resume-deployment",
42
42
  "undeploy-deployment", "get-deployment-events", "predict-deployment",
43
+ "validate-destination-profile", "create-destination-profile", "list-destination-profiles", "get-destination-profile",
44
+ "create-prediction-report-schedule", "list-prediction-report-schedules", "get-prediction-report-schedule",
45
+ "update-prediction-report-schedule", "pause-prediction-report-schedule", "resume-prediction-report-schedule",
46
+ "list-prediction-report-runs", "get-prediction-report-run",
43
47
  ]);
44
48
  const COMMAND_USAGE = {
45
49
  ...Object.fromEntries([...LIFECYCLE_COLLECTIONS].map((name) => [`list-${name}`, `list-${name} [--limit N] [--offset N] [-q QUERY]`])),
@@ -166,6 +170,18 @@ const COMMAND_USAGE = {
166
170
  "undeploy-deployment": "undeploy-deployment DEPLOYMENT_ID --actor NAME --reason TEXT",
167
171
  "get-deployment-events": "get-deployment-events DEPLOYMENT_ID [--limit N] [--offset N]",
168
172
  "predict-deployment": "predict-deployment DEPLOYMENT_ID REQUEST_JSON",
173
+ "create-destination-profile": "create-destination-profile PROFILE_JSON",
174
+ "validate-destination-profile": "validate-destination-profile PROFILE_JSON",
175
+ "list-destination-profiles": "list-destination-profiles [--limit N] [--offset N]",
176
+ "get-destination-profile": "get-destination-profile NAME VERSION",
177
+ "create-prediction-report-schedule": "create-prediction-report-schedule SCHEDULE_JSON",
178
+ "list-prediction-report-schedules": "list-prediction-report-schedules [--limit N] [--offset N]",
179
+ "get-prediction-report-schedule": "get-prediction-report-schedule SCHEDULE_ID",
180
+ "update-prediction-report-schedule": "update-prediction-report-schedule SCHEDULE_ID CHANGES_JSON",
181
+ "pause-prediction-report-schedule": "pause-prediction-report-schedule SCHEDULE_ID",
182
+ "resume-prediction-report-schedule": "resume-prediction-report-schedule SCHEDULE_ID",
183
+ "list-prediction-report-runs": "list-prediction-report-runs SCHEDULE_ID [--limit N] [--offset N]",
184
+ "get-prediction-report-run": "get-prediction-report-run RUN_ID",
169
185
  apply: "apply CATALOG_DIRECTORY [--dry-run] [--project PROJECT]",
170
186
  };
171
187
  function usage(command) {
@@ -858,6 +874,40 @@ async function runBusinessCli(argv) {
858
874
  const request = readSpec(positional(rest, "request JSON"));
859
875
  result = await client(options).post(`/deployments/${encodeURIComponent(deploymentId)}/predict`, request);
860
876
  }
877
+ else if (["create-destination-profile", "validate-destination-profile"].includes(options.command)) {
878
+ result = await client(options).post(options.command === "create-destination-profile" ? "/destination-profiles" : "/destination-profiles/validate", readSpec(positional(rest, "profile JSON")));
879
+ }
880
+ else if (options.command === "list-destination-profiles") {
881
+ result = await listCollection(client(options), "/destination-profiles", {}, rest);
882
+ }
883
+ else if (options.command === "get-destination-profile") {
884
+ const name = positional(rest, "profile name");
885
+ const version = positional(rest, "profile version");
886
+ result = await client(options).get(`/destination-profiles/${encodeURIComponent(name)}/versions/${encodeURIComponent(version)}`);
887
+ }
888
+ else if (options.command === "create-prediction-report-schedule") {
889
+ result = await client(options).post("/prediction-report-schedules", readSpec(positional(rest, "schedule JSON")));
890
+ }
891
+ else if (options.command === "list-prediction-report-schedules") {
892
+ result = await listCollection(client(options), "/prediction-report-schedules", {}, rest);
893
+ }
894
+ else if (["get-prediction-report-schedule", "update-prediction-report-schedule", "pause-prediction-report-schedule", "resume-prediction-report-schedule", "list-prediction-report-runs"].includes(options.command)) {
895
+ const scheduleId = positional(rest, "schedule id");
896
+ const endpoint = `/prediction-report-schedules/${encodeURIComponent(scheduleId)}`;
897
+ if (options.command === "update-prediction-report-schedule")
898
+ result = await client(options).patch(endpoint, readSpec(positional(rest, "changes JSON")));
899
+ else if (options.command === "pause-prediction-report-schedule")
900
+ result = await client(options).post(`${endpoint}/pause`);
901
+ else if (options.command === "resume-prediction-report-schedule")
902
+ result = await client(options).post(`${endpoint}/resume`);
903
+ else if (options.command === "list-prediction-report-runs")
904
+ result = await listCollection(client(options), `${endpoint}/runs`, {}, rest);
905
+ else
906
+ result = await client(options).get(endpoint);
907
+ }
908
+ else if (options.command === "get-prediction-report-run") {
909
+ result = await client(options).get(`/prediction-report-runs/${encodeURIComponent(positional(rest, "run id"))}`);
910
+ }
861
911
  else if (options.command === "get-model-runtime-release") {
862
912
  result = await client(options).get("/model-runtime-release");
863
913
  }
@@ -62,6 +62,7 @@ class PlatformApiClient {
62
62
  post(endpoint, payload, params) { return this.request("POST", endpoint, { payload, params }); }
63
63
  postWithHeaders(endpoint, payload, requestHeaders) { return this.request("POST", endpoint, { payload, requestHeaders }); }
64
64
  put(endpoint, payload, params) { return this.request("PUT", endpoint, { payload, params }); }
65
+ patch(endpoint, payload, params) { return this.request("PATCH", endpoint, { payload, params }); }
65
66
  delete(endpoint, params) { return this.request("DELETE", endpoint, { params }); }
66
67
  uploadFoundationCsv(endpoint, schema, forecast, filePath, requestHeaders = {}) {
67
68
  const resolved = path.resolve(expandHome(filePath));
@@ -88,3 +88,8 @@ After a human confirms source mapping, event time, entity keys, units, availabil
88
88
  horizon, and feature formulas, use `$feature-management` to create governed assets and build a
89
89
  DatasetArtifact. Use `$model-lifecycle-management` only after that artifact exists. Exploration does not
90
90
  authorize publishing assets, building datasets, or submitting training jobs.
91
+
92
+ At the end of an exploration task, offer the next relevant option: confirm the
93
+ unresolved business semantics with an owner, or, when they are already confirmed,
94
+ define governed assets with `$feature-management`. Name the evidence that makes
95
+ the option available; do not present exploratory rows as a finished dataset.
@@ -503,3 +503,10 @@ actual compute backend
503
503
  ```
504
504
 
505
505
  If the work stops before publication, distinguish generated files, locally validated files, dry-run validation, and remotely published assets.
506
+
507
+ Close with at most two optional next steps tied to the actual checkpoint. For
508
+ example, after a dry-run, offer publication only with separate approval; after
509
+ a verified DatasetArtifact, offer training or evaluation through
510
+ `$model-lifecycle-management`. If the artifact is missing or validation failed,
511
+ name that blocker instead of suggesting model training. A suggested step does
512
+ not authorize publishing, building, or submitting a workload.
@@ -63,3 +63,10 @@ deployment does not reach `READY` or an operation is rejected.
63
63
  Report the deployment ID, revision, immutable image digest, desired and
64
64
  observed state, failed conditions, endpoint reachability, and event evidence.
65
65
  Do not claim a deployment is usable merely because its Pod is running.
66
+
67
+ Close with an optional next step based on observed state: resolve failed READY
68
+ conditions before prediction; once READY, offer `predict-deployment` to verify
69
+ the model. After a successful deployment-bound prediction, offer scheduled
70
+ delivery through `$prediction-report-management` only when recurring reporting
71
+ is relevant and the package supports `feature_lookup`. Do not create a report
72
+ schedule or imply that READY alone proves delivery to an external destination.
@@ -54,3 +54,12 @@ Report immutable input identities, returned run/job/package IDs, status, validat
54
54
  Route deployment validation, creation, rollout state, approval, promotion,
55
55
  rollback, offline operations, and deployment-bound prediction to the separate
56
56
  `model-deployment-management` Skill.
57
+
58
+ At task completion, suggest only the next gate supported by the observed
59
+ evidence: a valid DatasetArtifact can lead to training, a valid ModelArtifact
60
+ to evaluation, a PASS evaluation to registration and packaging, and a READY
61
+ package with immutable digest to `$model-deployment-management`. If a gate
62
+ failed, suggest inspection or correction of that gate instead. A zero-shot
63
+ prediction is complete on its own; do not imply it produced an artifact or
64
+ requires training. These are optional next actions, not authorization to
65
+ submit or mutate resources.
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: prediction-report-management
3
+ description: Manage versioned business-owned prediction report destinations, schedules, and run diagnostics through the ITSMP ml-platform CLI. Use for configuring HTTP delivery and token acquisition, creating or changing scheduled reports, pausing or resuming them, or inspecting report runs. Do not use for model deployment, direct prediction, Kubernetes administration, or image releases.
4
+ ---
5
+
6
+ # Prediction Report Management
7
+
8
+ Use the `ml-platform` CLI installed with this Skill's npm release. Reporting is a
9
+ control-plane workflow: the API runs schedules and sends predictions from a
10
+ READY deployment; model Serving does not receive destination credentials.
11
+
12
+ ## Read-only checks
13
+
14
+ ```bash
15
+ ml-platform --profile server health
16
+ ml-platform --profile server list-destination-profiles
17
+ ml-platform --profile server get-destination-profile NAME v1
18
+ ml-platform --profile server list-prediction-report-schedules
19
+ ml-platform --profile server get-prediction-report-schedule SCHEDULE_ID
20
+ ml-platform --profile server list-prediction-report-runs SCHEDULE_ID
21
+ ml-platform --profile server get-prediction-report-run RUN_ID
22
+ ```
23
+
24
+ Check the deployment with `get-deployment DEPLOYMENT_ID` before creating a
25
+ schedule. The deployment must support `feature_lookup` and have a usable
26
+ inference horizon, supplied by either the schedule request or deployment
27
+ policy. A report run may be `SKIPPED` when the selected revision is not READY.
28
+
29
+ ## Configure a destination
30
+
31
+ The `PROFILE_JSON` argument is a local JSON file, not inline JSON. Include
32
+ `schema_version`, `name`, `version`, `base_url`, `path`, authentication, and
33
+ response success rules as required by the target. For token-based auth, set
34
+ `authentication.token_request` parameters and `token_path`; configure both
35
+ token and report business success rules when HTTP 2xx alone is insufficient.
36
+
37
+ ```bash
38
+ ml-platform --profile server validate-destination-profile PROFILE_JSON
39
+ ml-platform --profile server create-destination-profile PROFILE_JSON
40
+ ml-platform --profile server get-destination-profile NAME v1
41
+ ```
42
+
43
+ Validation checks schema and local policy; it does **not** call the token or
44
+ report endpoint. Versions are immutable. Changes to URL, auth, token extraction,
45
+ or success rules require a new profile version and a schedule update to point
46
+ to it. `get` and `list` redact credential values; they cannot reconstruct the
47
+ original file. Keep credential-bearing JSON outside the repository, restrict
48
+ file access, and do not print its contents or put secrets in shell arguments,
49
+ logs, examples, or Agent answers. Destination URL and token credentials are
50
+ business configuration submitted through this API, not Kubernetes Secrets.
51
+
52
+ ## Manage a schedule
53
+
54
+ Creating a schedule starts reporting when `enabled` is true. Obtain explicit
55
+ authorization for the exact destination and deployment before creation, update,
56
+ pause, or resume. Use `enabled: false` for a staged schedule that should not
57
+ run yet. `SCHEDULE_JSON` contains `deployment_id`, five-field `cron`, IANA
58
+ `timezone`, `request.entity`, and `destination: {"name":"...","version":"v1"}`.
59
+ Do not assume that an existing destination profile is bound to any schedule.
60
+
61
+ ```bash
62
+ ml-platform --profile server create-prediction-report-schedule SCHEDULE_JSON
63
+ ml-platform --profile server update-prediction-report-schedule SCHEDULE_ID CHANGES_JSON
64
+ ml-platform --profile server pause-prediction-report-schedule SCHEDULE_ID
65
+ ml-platform --profile server resume-prediction-report-schedule SCHEDULE_ID
66
+ ```
67
+
68
+ Updates accept only `name`, `cron`, `timezone`, `request`, `destination`,
69
+ `max_attempts`, and `timeout_seconds`; pause/resume control `enabled`.
70
+ After mutation, fetch the schedule and its runs. Report the schedule ID,
71
+ revision, destination name/version, next run time, latest run status, and
72
+ redacted error code. Do not claim delivery succeeded based only on validation
73
+ or schedule creation.
74
+
75
+ At completion, offer a next step only when it fits the observed state: after a
76
+ profile is created, optionally bind it to a schedule for a suitable deployment;
77
+ after a disabled schedule is verified, optionally resume it with explicit
78
+ authorization; after a run, inspect failure evidence or confirm `SUCCEEDED`.
79
+ Do not suggest another configuration step merely to keep the workflow going,
80
+ and do not treat a suggestion as permission to enable external delivery.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "定时预测上报管理"
3
+ short_description: "管理预测上报目标、计划及运行记录"
4
+ default_prompt: "使用 $prediction-report-management 管理定时预测上报配置、计划和运行记录。"