@botbuddy/cli 1.123.6 → 1.123.7
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.
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.123.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.123.7",
|
|
3
|
+
"source_commit": "6facb2c1345d29afdeb7e01dc7b48c6f3a22b7c1",
|
|
4
|
+
"source_sha256": "32da3f0dde227064c68fbd924594ee0a6315340f74acdc3acf18d7dca7b9fd57",
|
|
5
5
|
"target": "darwin-arm64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "a7c335c6d6fc11340f6a4cb7422471d68f7b2ede49585c43a1e6f34673ed959e"
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"release_version": "1.123.
|
|
3
|
-
"source_commit": "
|
|
4
|
-
"source_sha256": "
|
|
2
|
+
"release_version": "1.123.7",
|
|
3
|
+
"source_commit": "6facb2c1345d29afdeb7e01dc7b48c6f3a22b7c1",
|
|
4
|
+
"source_sha256": "32da3f0dde227064c68fbd924594ee0a6315340f74acdc3acf18d7dca7b9fd57",
|
|
5
5
|
"target": "linux-x64",
|
|
6
|
-
"sha256": "
|
|
6
|
+
"sha256": "5827dad83423d04732a0176e05395d5d8b2ff98c867f738b180acf63a26e7a11"
|
|
7
7
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
|
-
"release_version": "1.123.
|
|
4
|
-
"source_commit": "
|
|
5
|
-
"source_sha256": "
|
|
3
|
+
"release_version": "1.123.7",
|
|
4
|
+
"source_commit": "6facb2c1345d29afdeb7e01dc7b48c6f3a22b7c1",
|
|
5
|
+
"source_sha256": "32da3f0dde227064c68fbd924594ee0a6315340f74acdc3acf18d7dca7b9fd57",
|
|
6
6
|
"targets": {
|
|
7
7
|
"darwin-arm64": {
|
|
8
8
|
"goos": "darwin",
|
|
9
9
|
"goarch": "arm64",
|
|
10
10
|
"binary": "daemon/bin/darwin-arm64/botbuddy-daemon",
|
|
11
|
-
"sha256": "
|
|
11
|
+
"sha256": "a7c335c6d6fc11340f6a4cb7422471d68f7b2ede49585c43a1e6f34673ed959e",
|
|
12
12
|
"mode": "0755"
|
|
13
13
|
},
|
|
14
14
|
"linux-x64": {
|
|
15
15
|
"goos": "linux",
|
|
16
16
|
"goarch": "amd64",
|
|
17
17
|
"binary": "daemon/bin/linux-x64/botbuddy-daemon",
|
|
18
|
-
"sha256": "
|
|
18
|
+
"sha256": "5827dad83423d04732a0176e05395d5d8b2ff98c867f738b180acf63a26e7a11",
|
|
19
19
|
"mode": "0755"
|
|
20
20
|
}
|
|
21
21
|
}
|
package/package.json
CHANGED
package/src/feedback.mjs
CHANGED
|
@@ -12,6 +12,8 @@ import { hasPendingFeedback, queueFeedback, withFeedbackOutbox } from "./feedbac
|
|
|
12
12
|
import { CONDITION_TYPES } from "./wait-core.mjs";
|
|
13
13
|
|
|
14
14
|
const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
15
|
+
// BOT-3665: `recorded` is an automatic failure capture an agent may still enrich.
|
|
16
|
+
const FEEDBACK_CAPTURE_STATES = ["complete", "needs_context", "recorded"];
|
|
15
17
|
const RUN_ID = /^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/;
|
|
16
18
|
const OPTIONAL_TEXT = new Set(["goal", "steps", "expected", "actual", "blocked_reason", "blocking_step", "safe_next_action", "environment", "operation", "component_version", "error_code", "correlation_id", "workaround", "cause_confidence", "ticket_ref"]);
|
|
17
19
|
const USAGE = `Usage: bb feedback init --file <report.json>
|
|
@@ -97,7 +99,7 @@ export async function cmdFeedback(args, { call = callToolJson, resolveAuth = res
|
|
|
97
99
|
enrich_command: argv.map((value) => `'${value.replaceAll("'", "'\\''")}'`).join(" ") };
|
|
98
100
|
}
|
|
99
101
|
if (!response?.ok || response.isError || (response.status != null && (response.status < 200 || response.status >= 300)) || data?.ok !== true ||
|
|
100
|
-
typeof data.feedback_id !== "string" || !UUID.test(data.feedback_id) || typeof data.occurrence_id !== "string" || !UUID.test(data.occurrence_id) || !
|
|
102
|
+
typeof data.feedback_id !== "string" || !UUID.test(data.feedback_id) || typeof data.occurrence_id !== "string" || !UUID.test(data.occurrence_id) || !FEEDBACK_CAPTURE_STATES.includes(data.capture_state)) {
|
|
101
103
|
return { ok: false, error: "delivery_unconfirmed", delivered, receipts, remaining: true,
|
|
102
104
|
...(typeof data?.feedback_id === "string" && UUID.test(data.feedback_id) ? { feedback_id: data.feedback_id, status_command: `bb feedback status --feedback-id ${data.feedback_id}` } : {}) };
|
|
103
105
|
}
|
|
@@ -252,7 +254,7 @@ export async function cmdFeedback(args, { call = callToolJson, resolveAuth = res
|
|
|
252
254
|
}
|
|
253
255
|
catch { result = { ok: false, status: null, error: "transport_unavailable" }; }
|
|
254
256
|
if (!result?.ok || (result.status != null && (result.status < 200 || result.status >= 300)) || result.isError || result.data?.ok !== true || typeof result.data.feedback_id !== "string" || !UUID.test(result.data.feedback_id) ||
|
|
255
|
-
typeof result.data.occurrence_id !== "string" || !UUID.test(result.data.occurrence_id) || !
|
|
257
|
+
typeof result.data.occurrence_id !== "string" || !UUID.test(result.data.occurrence_id) || !FEEDBACK_CAPTURE_STATES.includes(result.data.capture_state)) {
|
|
256
258
|
const reported = result?.auth ? "authentication_failed" : result?.data?.error ?? result?.code ?? result?.error;
|
|
257
259
|
const code = typeof reported === "string" && /^[A-Za-z0-9_.:-]{1,80}$/.test(reported) ? reported : "feedback_receipt_unavailable";
|
|
258
260
|
const retryArgv = enrich ? null : ["bb", "feedback", "submit", "--file", filename];
|
|
@@ -273,7 +275,7 @@ export async function cmdFeedback(args, { call = callToolJson, resolveAuth = res
|
|
|
273
275
|
return result?.auth ? CALL_EXIT.AUTH : !result?.ok && result?.status == null ? CALL_EXIT.TRANSPORT : CALL_EXIT.ERROR;
|
|
274
276
|
}
|
|
275
277
|
const sourceDuplicate = result.data.source_duplicate === true && result.data.submitted_context_saved === false;
|
|
276
|
-
const enrichArgv = result.data.capture_state
|
|
278
|
+
const enrichArgv = result.data.capture_state !== "complete" || sourceDuplicate ? ["bb", "feedback", "enrich", "--feedback-id", result.data.feedback_id, "--file", filename] : null;
|
|
277
279
|
const statusArgv = ["bb", "feedback", "status", "--feedback-id", result.data.feedback_id];
|
|
278
280
|
const updatesArgv = ["bb", "feedback", "updates", "--feedback-id", result.data.feedback_id];
|
|
279
281
|
log(JSON.stringify({ ...result.data, ...(sourceDuplicate ? { ok: false, error: "source_already_reported" } : {}), status_argv: statusArgv, status_command: statusArgv.join(" "), updates_argv: updatesArgv, updates_command: updatesArgv.join(" "), ...(enrichArgv ? { enrich_argv: enrichArgv, enrich_command: enrichArgv.map((value) => `'${value.replaceAll("'", "'\\''")}'`).join(" ") } : {}) }));
|