@hcmai/cli 0.34.3 → 0.34.4
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/dist/index.js +15 -4
- package/dist/index.js.map +1 -1
- package/dist/skills/manifest.json +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -22043,11 +22043,21 @@ var configAdmin = async (ctx, env2, execution) => {
|
|
|
22043
22043
|
if (out.error === "ok") return pass(`\u79DF\u6237 meta \u6E05\u5355\u53EF\u8BFB${obj(out.body) && typeof out.body.total === "number" ? `\uFF0C\u5171 ${out.body.total} \u6761\uFF080 \u6761\u4E5F\u662F\u5408\u6CD5\u72B6\u6001\uFF09` : "\uFF08\u672A\u63D0\u4F9B\u603B\u6570\uFF09"}`);
|
|
22044
22044
|
return out.status === 403 ? found("CONFIG_ADMIN_DENIED") : unknown("CONFIG_ADMIN_UNVERIFIED");
|
|
22045
22045
|
};
|
|
22046
|
+
var LAYER_BUDGET_MS = 8e3;
|
|
22047
|
+
var LAYER_RERUN_ONLY = "connect.layer,connect.connectivity,connect.identity";
|
|
22048
|
+
function layerObservation(layer2, rerun) {
|
|
22049
|
+
const detail = layerDetail(layer2, true, LAYER_BUDGET_MS);
|
|
22050
|
+
if (layer2.sourceKey) return pass(detail);
|
|
22051
|
+
if (layer2.stopped && layer2.answered === 0) {
|
|
22052
|
+
return unknown("LAYER_PROBE_CUT", detail, { reason: "TRUNCATED", nextStep: { owner: "FDE", command: rerun } });
|
|
22053
|
+
}
|
|
22054
|
+
return found("LAYER_UNKNOWN", detail, layer2.stopped ? { reason: "TRUNCATED" } : {});
|
|
22055
|
+
}
|
|
22046
22056
|
var layer = async (ctx, env2, execution) => {
|
|
22047
|
-
const bounded = { ...execution, signal: AbortSignal.any([execution.signal, AbortSignal.timeout(
|
|
22048
|
-
const out = await probeDoctorLayer(probe2(ctx, env2, bounded));
|
|
22057
|
+
const bounded = { ...execution, signal: AbortSignal.any([execution.signal, AbortSignal.timeout(LAYER_BUDGET_MS)]) };
|
|
22058
|
+
const out = await probeDoctorLayer(probe2(ctx, env2, bounded), { signal: bounded.signal });
|
|
22049
22059
|
if (!out.layer) return unknown("LAYER_UNVERIFIED");
|
|
22050
|
-
return
|
|
22060
|
+
return layerObservation(out.layer, doctorRerun(ctx, env2.name, `--only ${LAYER_RERUN_ONLY}`));
|
|
22051
22061
|
};
|
|
22052
22062
|
var websocket = async (ctx, env2) => {
|
|
22053
22063
|
try {
|
|
@@ -22180,6 +22190,7 @@ var CODE_TABLE = {
|
|
|
22180
22190
|
CONFIG_ADMIN_UNVERIFIED: c("\u914D\u7F6E\u6743\u9650\u672A\u80FD\u6838\u5B9E\uFF1B\u68C0\u67E5\u670D\u52A1\u548C\u7F51\u7EDC"),
|
|
22181
22191
|
LAYER_UNVERIFIED: c("\u6A21\u578B\u6E05\u5355\u4E0D\u53EF\u8BFB\uFF1B\u68C0\u67E5\u6743\u9650\u548C\u7F51\u7EDC"),
|
|
22182
22192
|
LAYER_UNKNOWN: c("\u65E0\u6CD5\u5224\u51FA workspace \u5C42\uFF1B\u68C0\u67E5\u6A21\u578B meta \u548C\u54CD\u5E94\u5934"),
|
|
22193
|
+
LAYER_PROBE_CUT: c("\u6765\u6E90\u5C42\u63A2\u6D4B\u5728\u9884\u7B97\u5185\u6CA1\u7B49\u5230\u4EFB\u4F55 meta \u7B54\u5B8C\uFF0C\u6CA1\u5224\u6210\uFF08\u4E0D\u662F\u6CA1\u4EBA\u7B54\uFF09\uFF1B\u8FC7\u4E00\u4F1A\u513F\u5355\u9879\u91CD\u8DD1\uFF0C\u4ECD\u622A\u505C\u5C31\u5E26 durationMs \u4E0E\u660E\u7EC6\u62A5\u7814\u53D1"),
|
|
22183
22194
|
WS_HANDSHAKE_FAILED: c("\u5BF9\u8BDD WebSocket \u63E1\u624B\u5931\u8D25\uFF1B\u68C0\u67E5\u7F51\u5173\u4E0E\u4F1A\u8BDD", "WARN", "CUSTOMER_OPS"),
|
|
22184
22195
|
ACTUATOR_DETAILS_EXPOSED: c("\u533F\u540D\u5065\u5EB7\u7AEF\u70B9\u66B4\u9732\u7EC4\u4EF6\u8BE6\u60C5\uFF1B\u6536\u7D27 actuator \u914D\u7F6E", "WARN", "CUSTOMER_OPS"),
|
|
22185
22196
|
EXPOSURE_UNCHECKED: c("\u672A\u80FD\u6838\u5B9E\u533F\u540D\u5065\u5EB7\u7AEF\u70B9\uFF1B\u68C0\u67E5\u5165\u53E3\u4E0E\u670D\u52A1", "WARN", "CUSTOMER_OPS"),
|
|
@@ -22234,7 +22245,7 @@ var CHECKS = [
|
|
|
22234
22245
|
descriptor("connect.connectivity", "\u540E\u7AEF\u8FDE\u901A", [], ["BACKEND_UNREACHABLE", "BACKEND_SERVER_ERROR", "BACKEND_NOT_JSON", "BACKEND_NOT_FOUND", "BACKEND_REJECTED", "BACKEND_BAD_RESPONSE"], 1e4, connectChecks.connectivity),
|
|
22235
22246
|
descriptor("connect.identity", "\u8EAB\u4EFD", ["connect.connectivity"], ["IDENTITY_META_INVALID", "IDENTITY_USER_MISMATCH", "TOKEN_REJECTED", "TENANT_MISMATCH", "IDENTITY_NOT_LOGGED_IN", "IDENTITY_UNVERIFIED", "AS_PROXY_DENIED"], 1e4, connectChecks.identity),
|
|
22236
22247
|
descriptor("connect.config-admin", "\u914D\u7F6E\u7BA1\u7406\u5458", ["connect.connectivity", "connect.identity"], ["CONFIG_ADMIN_DENIED", "CONFIG_ADMIN_UNVERIFIED"], 1e4, connectChecks.configAdmin, false, "CUSTOMER_ADMIN"),
|
|
22237
|
-
descriptor("connect.layer", "workspace \u5C42", ["connect.connectivity", "connect.identity"], ["LAYER_UNVERIFIED", "LAYER_UNKNOWN"], 1e4, connectChecks.layer),
|
|
22248
|
+
descriptor("connect.layer", "workspace \u5C42", ["connect.connectivity", "connect.identity"], ["LAYER_UNVERIFIED", "LAYER_UNKNOWN", "LAYER_PROBE_CUT"], 1e4, connectChecks.layer),
|
|
22238
22249
|
descriptor("connect.websocket", "\u5BF9\u8BDD\u63E1\u624B", ["connect.connectivity", "connect.identity"], ["WS_HANDSHAKE_FAILED"], 1e4, connectChecks.websocket, false, "CUSTOMER_OPS"),
|
|
22239
22250
|
descriptor("connect.health-api", "\u4F53\u68C0 API", ["connect.connectivity", "connect.identity"], ["BACKEND_UNSUPPORTED", "HEALTH_API_ROUTE_MISSING", "REPORT_THROTTLED", "REPORT_UNAUTHORIZED", "REPORT_UNAVAILABLE", "REPORT_MALFORMED"], 1e4, connectChecks.healthApi),
|
|
22240
22251
|
descriptor("connect.exposure", "\u533F\u540D\u66B4\u9732", ["connect.connectivity"], ["ACTUATOR_DETAILS_EXPOSED", "EXPOSURE_UNCHECKED"], 1e4, connectChecks.exposure, false, "CUSTOMER_OPS")
|