@wayai/cli 0.3.93 → 0.3.94
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 +20 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5484,10 +5484,11 @@ var init_dist = __esm({
|
|
|
5484
5484
|
};
|
|
5485
5485
|
LLM_PROVIDER_HTTP_BRAND = /* @__PURE__ */ Symbol.for("wayai.LlmProviderHttpError");
|
|
5486
5486
|
LlmProviderHttpError = class extends Error {
|
|
5487
|
-
constructor(message, status, provider) {
|
|
5487
|
+
constructor(message, status, provider, providerError) {
|
|
5488
5488
|
super(message);
|
|
5489
5489
|
this.status = status;
|
|
5490
5490
|
this.provider = provider;
|
|
5491
|
+
this.providerError = providerError;
|
|
5491
5492
|
this.name = "LlmProviderHttpError";
|
|
5492
5493
|
}
|
|
5493
5494
|
[LLM_PROVIDER_HTTP_BRAND] = true;
|
|
@@ -7915,6 +7916,10 @@ var init_dist = __esm({
|
|
|
7915
7916
|
category: external_exports.string(),
|
|
7916
7917
|
provider: external_exports.string().nullable(),
|
|
7917
7918
|
status_code: external_exports.number().nullable(),
|
|
7919
|
+
// Credential-safe structured reason (type/code/param, e.g. "invalid_request_error ·
|
|
7920
|
+
// response_format") — NEVER the provider error body. Null when the producer had no
|
|
7921
|
+
// structured detail. gh #3164.
|
|
7922
|
+
detail: external_exports.string().nullable(),
|
|
7918
7923
|
severity: hubAlertSeverity,
|
|
7919
7924
|
status: external_exports.enum(["active", "resolved"]),
|
|
7920
7925
|
count: external_exports.number(),
|
|
@@ -14807,6 +14812,10 @@ var init_contracts = __esm({
|
|
|
14807
14812
|
category: external_exports.string(),
|
|
14808
14813
|
provider: external_exports.string().nullable(),
|
|
14809
14814
|
status_code: external_exports.number().nullable(),
|
|
14815
|
+
// Credential-safe structured reason (type/code/param, e.g. "invalid_request_error ·
|
|
14816
|
+
// response_format") — NEVER the provider error body. Null when the producer had no
|
|
14817
|
+
// structured detail. gh #3164.
|
|
14818
|
+
detail: external_exports.string().nullable(),
|
|
14810
14819
|
severity: hubAlertSeverity2,
|
|
14811
14820
|
status: external_exports.enum(["active", "resolved"]),
|
|
14812
14821
|
count: external_exports.number(),
|
|
@@ -16041,6 +16050,13 @@ function describeCategory(category) {
|
|
|
16041
16050
|
label: "Quota / rate limit",
|
|
16042
16051
|
hint: "The provider returned a quota or rate-limit error. Check the provider account's usage/billing."
|
|
16043
16052
|
};
|
|
16053
|
+
// gh #3164 — a 400 is a request/config rejection, NOT a bad credential. Labeling
|
|
16054
|
+
// it "Credential rejected" points admins at rotating a healthy key.
|
|
16055
|
+
case "connection_config":
|
|
16056
|
+
return {
|
|
16057
|
+
label: "Request config rejected",
|
|
16058
|
+
hint: "The provider rejected the request configuration (400). Check the connection's model or settings (e.g. an unsupported response_format) \u2014 the credential is fine."
|
|
16059
|
+
};
|
|
16044
16060
|
case "channel_token":
|
|
16045
16061
|
return {
|
|
16046
16062
|
label: "Channel token invalid",
|
|
@@ -16076,7 +16092,8 @@ function summarizeActiveAlertsForReport(alerts) {
|
|
|
16076
16092
|
const { label } = describeCategory(a.category);
|
|
16077
16093
|
const target = formatAlertTarget(a);
|
|
16078
16094
|
const providerBits = formatProviderBits(a);
|
|
16079
|
-
|
|
16095
|
+
const detailBit = a.detail ? ` \xB7 ${a.detail}` : "";
|
|
16096
|
+
return `- [${a.severity}] ${a.category} (${label}) \xB7 ${target}${providerBits ? ` \xB7 ${providerBits}` : ""}${detailBit} \xB7 seen ${a.count}\xD7`;
|
|
16080
16097
|
});
|
|
16081
16098
|
return `Active hub alerts at report time (${active.length}):
|
|
16082
16099
|
${lines.join("\n")}`;
|
|
@@ -16165,7 +16182,7 @@ async function alertsCommand(args2) {
|
|
|
16165
16182
|
const target = formatAlertTarget(a, (id) => connLabels.get(id));
|
|
16166
16183
|
const providerBits = formatProviderBits(a);
|
|
16167
16184
|
console.log(`${severityGlyph(a.severity)} ${a.severity} ${a.category} \u2014 ${label}`);
|
|
16168
|
-
console.log(` ${target}${providerBits ? ` \xB7 ${providerBits}` : ""}`);
|
|
16185
|
+
console.log(` ${target}${providerBits ? ` \xB7 ${providerBits}` : ""}${a.detail ? ` \xB7 ${a.detail}` : ""}`);
|
|
16169
16186
|
console.log(` ${hint}`);
|
|
16170
16187
|
if (a.org_credential_id) {
|
|
16171
16188
|
console.log(` Shared org credential \u2014 fix it once at the org credential (\`wayai update-credential\`); it fans out to every hub linking it.`);
|