buckyos 0.7.193 → 0.7.195
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/cli/dist/cli.mjs +1 -1
- package/cli/dist/cli.mjs.map +1 -1
- package/cli/version.ts +1 -1
- package/dist/aiws_write-07562abc.mjs.map +1 -1
- package/dist/aiws_write-1f179e1c.js.map +1 -1
- package/dist/hybrid_sso.d.ts +37 -2
- package/dist/hybrid_sso.d.ts.map +1 -1
- package/dist/site_manager-716a2cf5.js +2 -0
- package/dist/site_manager-716a2cf5.js.map +1 -0
- package/dist/{site_manager-8adb478e.mjs → site_manager-91b4d899.mjs} +29 -14
- package/dist/site_manager-91b4d899.mjs.map +1 -0
- package/dist/xllm/core/action_parser.d.ts.map +1 -1
- package/dist/xllm/core/behavior_result.d.ts.map +1 -1
- package/dist/xllm/core/loop.d.ts.map +1 -1
- package/dist/xllm/core/protocol.d.ts.map +1 -1
- package/dist/xllm/core/types.d.ts +2 -0
- package/dist/xllm/core/types.d.ts.map +1 -1
- package/dist/xllm.cjs +1 -1
- package/dist/xllm.mjs +2 -2
- package/dist/xllm_deno.cjs +1 -1
- package/dist/xllm_deno.mjs +1 -1
- package/package.json +1 -1
- package/dist/site_manager-8adb478e.mjs.map +0 -1
- package/dist/site_manager-c832463b.js +0 -2
- package/dist/site_manager-c832463b.js.map +0 -1
|
@@ -211,6 +211,12 @@ function validateBehaviorResult(r) {
|
|
|
211
211
|
}
|
|
212
212
|
if (r.self_report === void 0 && r.report_result !== void 0)
|
|
213
213
|
return "a report result requires a report in the same response";
|
|
214
|
+
if (r.report_outcome !== void 0) {
|
|
215
|
+
if (!r.report_end)
|
|
216
|
+
return "report outcome requires a final report";
|
|
217
|
+
if (!["succeeded", "failed", "blocked"].includes(r.report_outcome))
|
|
218
|
+
return "report outcome must be succeeded, failed or blocked";
|
|
219
|
+
}
|
|
214
220
|
if (r.report_end) {
|
|
215
221
|
if (!rustTrim(r.self_report ?? ""))
|
|
216
222
|
return "an ending report must contain non-empty text";
|
|
@@ -245,6 +251,8 @@ function stepFromResult(r) {
|
|
|
245
251
|
step.next_behavior = r.next_behavior;
|
|
246
252
|
if (r.self_report !== void 0)
|
|
247
253
|
step.self_report = r.self_report;
|
|
254
|
+
if (r.report_outcome !== void 0)
|
|
255
|
+
step.report_outcome = r.report_outcome;
|
|
248
256
|
if (r.report_result !== void 0)
|
|
249
257
|
step.report_result = r.report_result;
|
|
250
258
|
return step;
|
|
@@ -262,6 +270,8 @@ function resultFromStep(step) {
|
|
|
262
270
|
r.thought = step.thought;
|
|
263
271
|
if (step.self_report !== void 0)
|
|
264
272
|
r.self_report = step.self_report;
|
|
273
|
+
if (step.report_outcome !== void 0)
|
|
274
|
+
r.report_outcome = step.report_outcome;
|
|
265
275
|
if (step.report_result !== void 0)
|
|
266
276
|
r.report_result = step.report_result;
|
|
267
277
|
return r;
|
|
@@ -1365,6 +1375,7 @@ class LLMContext {
|
|
|
1365
1375
|
thought: result.thought,
|
|
1366
1376
|
self_report: result.self_report,
|
|
1367
1377
|
report_end: result.report_end,
|
|
1378
|
+
report_outcome: result.report_outcome,
|
|
1368
1379
|
report_result: result.report_result
|
|
1369
1380
|
};
|
|
1370
1381
|
const parent = this.innerParent.parent;
|
|
@@ -1949,6 +1960,7 @@ function buildRuntimeProtocolFor(flavor, loopModel, tools, json) {
|
|
|
1949
1960
|
s += "- A reply without actions, native tool calls, next_behavior or a final report (a progress report alone, or nothing) yields: this context stops and waits for new input, such as the result of work it started that is still running or a new message. Never yield while there is work you can do now.\n";
|
|
1950
1961
|
s += '- next_behavior is reserved for host scheduling, including WAIT_USER_MSG; END and done are invalid. A report without end="true" never implies completion.\n';
|
|
1951
1962
|
if (flavor.kind === "session") {
|
|
1963
|
+
s += '- When the session requires a work outcome, include outcome="succeeded", outcome="failed" or outcome="blocked" on the final <report end="true">. Only a final report can carry an outcome.\n';
|
|
1952
1964
|
s += "- A report may include sibling <artifacts> containing a JSON array of relative file paths and <result> containing any JSON value. These require a report in the same response. The host validates and persists the submission; completion applies to the current context, with child reports returned to their caller.\n";
|
|
1953
1965
|
s += "- Yielding is how you wait for work this session started (tasks, sub sessions): the session wakes you with its result. When nothing it started is running, the session ends the Turn instead.\n";
|
|
1954
1966
|
}
|
|
@@ -3476,7 +3488,6 @@ class XllmActionParser {
|
|
|
3476
3488
|
return { name: el.name, args, call_id: callId ?? `action-${autoId.n}` };
|
|
3477
3489
|
}
|
|
3478
3490
|
parse(response) {
|
|
3479
|
-
var _a;
|
|
3480
3491
|
const rawText = textContent(response.message);
|
|
3481
3492
|
const providerCalls = toolCalls(response.message);
|
|
3482
3493
|
if (!rustTrim(rawText) && providerCalls.length === 0)
|
|
@@ -3498,17 +3509,18 @@ class XllmActionParser {
|
|
|
3498
3509
|
if (reports.length > 1)
|
|
3499
3510
|
throw new Error("a decision must contain at most one report");
|
|
3500
3511
|
const selfReport = reports[0] ? xmlText(reports[0]) : void 0;
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
const
|
|
3504
|
-
if (
|
|
3505
|
-
throw new Error(
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
+
const reportAttr = (name) => {
|
|
3513
|
+
var _a, _b;
|
|
3514
|
+
const attrs = ((_a = reports[0]) == null ? void 0 : _a.attrs.filter(([k]) => k === name)) ?? [];
|
|
3515
|
+
if (attrs.length > 1)
|
|
3516
|
+
throw new Error(`report has duplicate ${name} attributes`);
|
|
3517
|
+
return (_b = attrs[0]) == null ? void 0 : _b[1];
|
|
3518
|
+
};
|
|
3519
|
+
const end = reportAttr("end");
|
|
3520
|
+
if (end !== void 0 && end !== "true" && end !== "false")
|
|
3521
|
+
throw new Error("report end must be true or false");
|
|
3522
|
+
const reportEnd = end === "true";
|
|
3523
|
+
const reportOutcome = reportAttr("outcome");
|
|
3512
3524
|
const payload = (name) => {
|
|
3513
3525
|
const els = children.filter((e) => e.name === name);
|
|
3514
3526
|
if (els.length > 1)
|
|
@@ -3551,6 +3563,8 @@ class XllmActionParser {
|
|
|
3551
3563
|
result.thought = thought;
|
|
3552
3564
|
if (selfReport !== void 0)
|
|
3553
3565
|
result.self_report = selfReport;
|
|
3566
|
+
if (reportOutcome !== void 0)
|
|
3567
|
+
result.report_outcome = reportOutcome;
|
|
3554
3568
|
if (reportResult !== void 0)
|
|
3555
3569
|
result.report_result = reportResult;
|
|
3556
3570
|
const invalid2 = validateBehaviorResult(result);
|
|
@@ -4528,7 +4542,8 @@ function renderInheritedStepRecord(step, timestamps) {
|
|
|
4528
4542
|
const observation = step.observation === void 0 ? "" : rustTrim(step.observation);
|
|
4529
4543
|
const actions = renderHistoryActionsCompact(step, 512);
|
|
4530
4544
|
const reportText = step.self_report === void 0 ? "" : rustTrim(step.self_report);
|
|
4531
|
-
const
|
|
4545
|
+
const outcome = step.report_outcome === void 0 ? "" : ` outcome="${escapeXmlText(step.report_outcome).replace(/"/g, """)}"`;
|
|
4546
|
+
const report = reportText === "" ? "" : `<report end="${step.report_end}"${outcome}>${escapeXmlText(reportText)}</report>
|
|
4532
4547
|
`;
|
|
4533
4548
|
const times = timestamps ? ` started_at_ms="${step.meta.started_at_ms}" ended_at_ms="${step.meta.ended_at_ms ?? ""}"` : "";
|
|
4534
4549
|
return `<step_record behavior="${step.meta.behavior_name ?? ""}" index="${step.meta.step_index}"${times} compression="${step.meta.compression_level}">
|
|
@@ -6417,4 +6432,4 @@ export {
|
|
|
6417
6432
|
assemblePrompt as y,
|
|
6418
6433
|
RUNTIME_PROTOCOL_VERSION as z
|
|
6419
6434
|
};
|
|
6420
|
-
//# sourceMappingURL=site_manager-
|
|
6435
|
+
//# sourceMappingURL=site_manager-91b4d899.mjs.map
|