bazilion 0.16.0 → 0.18.0
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/cli.js +672 -87
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +3759 -432
- package/dist/daemon.js.map +1 -1
- package/dist/migrations/0001_init.sql +169 -0
- package/dist/web/client/assets/ChatPane-CAYS_fIQ.js +76 -0
- package/dist/web/client/assets/ConfirmDialog-BzIiABOP.js +1 -0
- package/dist/web/client/assets/{FieldRow-DJ2Gx4Du.js → FieldRow-W_54rw5c.js} +1 -1
- package/dist/web/client/assets/ProductionTeamPolicyEditor-DNXVX8Lz.js +7 -0
- package/dist/web/client/assets/ProfileCommunicationEditor-DN0fOzqn.js +1 -0
- package/dist/web/client/assets/{ResultSourceConversation-CtzJ8QA-.js → ResultSourceConversation-DoU4tOWc.js} +1 -1
- package/dist/web/client/assets/TeamTabs-BmTZRI4T.js +1 -0
- package/dist/web/client/assets/TemplatesTabs-Bs_OXKwx.js +1 -0
- package/dist/web/client/assets/{UnsavedChangesGuard-BCsLw-mU.js → UnsavedChangesGuard-CPRtFReU.js} +1 -1
- package/dist/web/client/assets/{_id-DxopIW-y.js → _id-CxAB4TDr.js} +1 -1
- package/dist/web/client/assets/_id-DL4tJFQB.js +1 -0
- package/dist/web/client/assets/{_id-BEDmIXVf.js → _id-DR9eFC17.js} +1 -1
- package/dist/web/client/assets/{_id-BFM_tn_s.js → _id-Dbmei5tg.js} +1 -1
- package/dist/web/client/assets/{_id-B5Ov7cdO.js → _id-ybF-pqmr.js} +1 -1
- package/dist/web/client/assets/activity-oUyy77jD.js +1 -0
- package/dist/web/client/assets/{agents-CMPOFcs-.js → agents-D_TrEqAg.js} +1 -1
- package/dist/web/client/assets/{agents-O4soKZND.js → agents-DkjJp7JP.js} +1 -1
- package/dist/web/client/assets/{approvals-CwDu_lrA.js → approvals-DhOerWdt.js} +1 -1
- package/dist/web/client/assets/{attention-BY8MMuM_.js → attention-DGwiF-Jy.js} +1 -1
- package/dist/web/client/assets/chevron-right-DSa4xPTs.js +1 -0
- package/dist/web/client/assets/config-BJ2ZzHPR.js +3 -0
- package/dist/web/client/assets/createServerFn-Dzfjt7mA.js +3 -0
- package/dist/web/client/assets/git-review-presentation-CzHQulDk.js +1 -0
- package/dist/web/client/assets/{inbox-CWXql0K3.js → inbox-BUElnGep.js} +1 -1
- package/dist/web/client/assets/index-Bi-HxcPG.js +50 -0
- package/dist/web/client/assets/{learning-DAm4dyyc.js → learning-BiTHNwB3.js} +1 -1
- package/dist/web/client/assets/login-BmcZvAH2.js +1 -0
- package/dist/web/client/assets/{mcp-loLB0wuh.js → mcp-Cwk9V82W.js} +1 -1
- package/dist/web/client/assets/{members-BJ0ikkTl.js → members-CHDNabFh.js} +1 -1
- package/dist/web/client/assets/{memory-Drn9Gv53.js → memory-Cx_Fpd4e.js} +1 -1
- package/dist/web/client/assets/policy-C0nMdwcG.js +1 -0
- package/dist/web/client/assets/{results-9exU6f7m.js → results-Bz3jASs-.js} +1 -1
- package/dist/web/client/assets/review-AK9WGmpv.js +1 -0
- package/dist/web/client/assets/routes-DsMY_6oy.js +1 -0
- package/dist/web/client/assets/{services-BLso1BhA.js → services-DItA6fJ7.js} +1 -1
- package/dist/web/client/assets/{skills-BodqX3OI.js → skills-DbNV2vgL.js} +1 -1
- package/dist/web/client/assets/{styles-d1yjBpud.css → styles-C6br2xxl.css} +1 -1
- package/dist/web/client/assets/{teams-ByQedXZi.js → teams-D83scDxw.js} +1 -1
- package/dist/web/client/assets/{teams-SYsF1bOR.js → teams-DAny1ypN.js} +1 -1
- package/dist/web/client/assets/{telegram-DC9PLFbB.js → telegram-BOmf9vUh.js} +1 -1
- package/dist/web/client/assets/{tokens-DGy8Ijpo.js → tokens-DBGH6Bw5.js} +1 -1
- package/dist/web/client/assets/{triggers-BXpVmHDG.js → triggers-D1_pseI3.js} +1 -1
- package/dist/web/client/assets/verifications-CBTo-FyV.js +2 -0
- package/dist/web/client/assets/welcome-DAfPOm15.js +1 -0
- package/dist/web/client/assets/x-CWY-gUaM.js +1 -0
- package/dist/web/server/assets/{ChatPane-CS5oI7ef.js → ChatPane-DybH39WK.js} +301 -14
- package/dist/web/server/assets/{ResultSourceConversation-BpVWBRYq.js → ResultSourceConversation-BmXTcEOA.js} +1 -1
- package/dist/web/server/assets/{TeamTabs-TCKjCvMA.js → TeamTabs-Dg4v6x0-.js} +8 -0
- package/dist/web/server/assets/{_id-DtIYuJJX.js → _id--onriuvj.js} +1 -1
- package/dist/web/server/assets/{_id-DOnInzLb.js → _id--zoh1vv7.js} +1 -1
- package/dist/web/server/assets/{_id-CeyHEsCZ.js → _id-6p-mDmI8.js} +1 -1
- package/dist/web/server/assets/{_id-5pgKoid8.js → _id-BN1BPEDI.js} +1 -1
- package/dist/web/server/assets/{_id-DFHB9JFQ.js → _id-BYKpT2Tu.js} +1 -1
- package/dist/web/server/assets/{_id-B_-CDHOi2.js → _id-BqWTB8Wl.js} +1 -1
- package/dist/web/server/assets/{_id-BnqodC1c2.js → _id-C_2er0_G.js} +3 -3
- package/dist/web/server/assets/{_id-BG2nkGxa.js → _id-DptBl3X8.js} +1 -1
- package/dist/web/server/assets/{_id-DwZXhLlL.js → _id-EAjRXNbD.js} +2 -2
- package/dist/web/server/assets/{_id-DrB9uR1b.js → _id-dUnXL-My2.js} +1 -1
- package/dist/web/server/assets/{_tanstack-start-manifest_v-D7gKv6m6.js → _tanstack-start-manifest_v-B3M-dfRO.js} +108 -84
- package/dist/web/server/assets/{activity-0VUkStOu.js → activity-C5jpoEQI.js} +1 -1
- package/dist/web/server/assets/{activity-C88qrNqv.js → activity-Cu7zKPGD.js} +1 -1
- package/dist/web/server/assets/{activity-5fWKPDxj.js → activity-Dn50vkQP.js} +2 -2
- package/dist/web/server/assets/{agents-CSXLaM2W.js → agents-RE6aYOb-.js} +1 -1
- package/dist/web/server/assets/{agents-C86K6HvS.js → agents-nAOx_H7s.js} +1 -1
- package/dist/web/server/assets/{approvals-C3MysI6l.js → approvals-DhHxIDrL.js} +1 -1
- package/dist/web/server/assets/{attention-DLeLCKah.js → attention-CBWzWRni.js} +1 -1
- package/dist/web/server/assets/{auth-CDZp9aEk.js → auth-tB3i6cFd.js} +1 -1
- package/dist/web/server/assets/{config-BVTHvljR.js → config-D1k_tTAw.js} +1 -1
- package/dist/web/server/assets/{daemon-client-xWyYKAcx.js → daemon-client-C7qjQ2iO.js} +45 -0
- package/dist/web/server/assets/git-review-BB3M9nYg.js +26 -0
- package/dist/web/server/assets/git-review-Bf5ABFJg.js +179 -0
- package/dist/web/server/assets/git-review-presentation-TJiHJhen.js +81 -0
- package/dist/web/server/assets/{inbox-PQTrjtOw.js → inbox-Dw4pTevh.js} +1 -1
- package/dist/web/server/assets/{learning-K0cmDsZR.js → learning-CF8ZzFVD.js} +1 -1
- package/dist/web/server/assets/{mcp-Rtraochg.js → mcp-D5dmBT82.js} +1 -1
- package/dist/web/server/assets/{members-CD3GiTfF.js → members-Bd0OtiTr.js} +1 -1
- package/dist/web/server/assets/{members-grAKFWgv.js → members-CvwEN9pm.js} +1 -1
- package/dist/web/server/assets/{members-cc5SeEaW.js → members-xSXoYUOd.js} +2 -2
- package/dist/web/server/assets/{memory-egFpBD1g.js → memory-CcPK7um7.js} +1 -1
- package/dist/web/server/assets/{memory-C5i_GxlY.js → memory-UP6AsRkO.js} +2 -2
- package/dist/web/server/assets/{memory-CVqnyUaM.js → memory-lo2vHRNw.js} +1 -1
- package/dist/web/server/assets/{policy-bLKwvnja.js → policy-B62WXIFo.js} +1 -1
- package/dist/web/server/assets/{policy-Dgjb0_gK.js → policy-Bze9Krhg.js} +2 -2
- package/dist/web/server/assets/{policy-ooSBgiDS.js → policy-Dh6wd2wN.js} +1 -1
- package/dist/web/server/assets/{results-N-kP4iFT.js → results-BFqs2iOu.js} +1 -1
- package/dist/web/server/assets/{results-DXdYtHaq.js → results-BWnu3gXP.js} +1 -1
- package/dist/web/server/assets/{results-CfNsFncJ.js → results-CzZk50Fu.js} +3 -3
- package/dist/web/server/assets/review-DUe3vHPU.js +393 -0
- package/dist/web/server/assets/review-c_-cFi7H.js +14 -0
- package/dist/web/server/assets/{router-B6g_s7W3.js → router-Deq94UJQ.js} +41 -27
- package/dist/web/server/assets/{routes-pcRy_Sf8.js → routes-B6x3pEW8.js} +1 -1
- package/dist/web/server/assets/{routes-BqSaZvlu.js → routes-CVKkvFVv.js} +1 -1
- package/dist/web/server/assets/{routes-Dsh8F_7i.js → routes-DsUzzxk4.js} +2 -2
- package/dist/web/server/assets/{services-DlZA8fRL.js → services-CEr61xb5.js} +1 -1
- package/dist/web/server/assets/{skills-i2duvgW-.js → skills-BImC3LTO.js} +1 -1
- package/dist/web/server/assets/{teams-6RYIj1Xm.js → teams-8zEIo08E.js} +1 -1
- package/dist/web/server/assets/{teams-B1AI3NfN.js → teams-D-yaAWLV.js} +1 -1
- package/dist/web/server/assets/{telegram-C4q0YTVn.js → telegram-CGl_LFtJ.js} +1 -1
- package/dist/web/server/assets/{tokens-RFquA2Bx.js → tokens-cB-uf7qm.js} +1 -1
- package/dist/web/server/assets/{triggers-DVD-iE-N.js → triggers-CtSj79L0.js} +1 -1
- package/dist/web/server/assets/verification-B5QjcpIo.js +97 -0
- package/dist/web/server/assets/verifications-BfQsfwSE.js +268 -0
- package/dist/web/server/assets/verifications-CUq_6ZqL.js +26 -0
- package/dist/web/server/server.js +72 -28
- package/dist/worker.js +470 -79
- package/dist/worker.js.map +1 -1
- package/package.json +3 -3
- package/dist/web/client/assets/ChatPane-CQZzxOir.js +0 -76
- package/dist/web/client/assets/ConfirmDialog-MicTTwdy.js +0 -1
- package/dist/web/client/assets/ProductionTeamPolicyEditor-DqUnN_ce.js +0 -7
- package/dist/web/client/assets/ProfileCommunicationEditor-DArXub0b.js +0 -1
- package/dist/web/client/assets/TeamTabs-DbIk5vvT.js +0 -1
- package/dist/web/client/assets/TemplatesTabs-CatJIjGi.js +0 -1
- package/dist/web/client/assets/_id-CrnEVcw8.js +0 -1
- package/dist/web/client/assets/activity-CrG8Bg60.js +0 -1
- package/dist/web/client/assets/chevron-right-Cf6vKeLq.js +0 -1
- package/dist/web/client/assets/config-Cn4iBJFz.js +0 -3
- package/dist/web/client/assets/index-Bq2zrG2_.js +0 -52
- package/dist/web/client/assets/login-BsABI8Ux.js +0 -1
- package/dist/web/client/assets/policy-pQadZyk0.js +0 -1
- package/dist/web/client/assets/routes-jw1PuqiR.js +0 -1
- package/dist/web/client/assets/welcome-BKsnsCxJ.js +0 -1
- package/dist/web/client/assets/x-BK4xNCzS.js +0 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { r as fetchSnapshotApplicability } from "./git-review-BB3M9nYg.js";
|
|
1
2
|
import { t as Button } from "./Button-Dsnw22OF.js";
|
|
3
|
+
import { n as applicabilityWarns, t as applicabilityLabel } from "./git-review-presentation-TJiHJhen.js";
|
|
2
4
|
import { t as ResultCard } from "./ResultCard-B3zD9N0t.js";
|
|
3
5
|
import { forwardRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
|
|
4
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -21,19 +23,92 @@ function inboxUpdateLabel(body) {
|
|
|
21
23
|
return `Update from ${name.slice(0, 100)}`;
|
|
22
24
|
}
|
|
23
25
|
//#endregion
|
|
26
|
+
//#region src/lib/coding-log.ts
|
|
27
|
+
/** Bounded first page. Larger reads and search are a later iteration. */
|
|
28
|
+
var CODING_LOG_PAGE_BYTES = 65536;
|
|
29
|
+
/**
|
|
30
|
+
* Read a retained coding log through the same-origin `/api` proxy.
|
|
31
|
+
*
|
|
32
|
+
* The daemon stays the authority: it re-checks Team membership and disclosure
|
|
33
|
+
* state on every call, so holding an opaque reference in history grants nothing
|
|
34
|
+
* on its own. `fetchImpl` is injectable for tests.
|
|
35
|
+
*/
|
|
36
|
+
async function fetchRetainedCodingLog(reference, fetchImpl = fetch) {
|
|
37
|
+
const base = `/api/teams/${encodeURIComponent(reference.teamId)}/coding-commands/${encodeURIComponent(reference.commandId)}/log`;
|
|
38
|
+
try {
|
|
39
|
+
const response = await fetchImpl(`${base}?limit=${CODING_LOG_PAGE_BYTES}`, { headers: { accept: "application/json" } });
|
|
40
|
+
if (response.status === 403) return { status: "not-shared" };
|
|
41
|
+
if (response.status === 404) return { status: "missing" };
|
|
42
|
+
if (!response.ok) return {
|
|
43
|
+
status: "unavailable",
|
|
44
|
+
message: `Request failed (${response.status}).`
|
|
45
|
+
};
|
|
46
|
+
const body = await response.json();
|
|
47
|
+
const view = readView(body);
|
|
48
|
+
if (!view) return {
|
|
49
|
+
status: "unavailable",
|
|
50
|
+
message: "Unexpected response from the daemon."
|
|
51
|
+
};
|
|
52
|
+
if (field(body, "page") === null) return { status: "not-shared" };
|
|
53
|
+
const page = readPage(field(body, "page"));
|
|
54
|
+
if (!page) return {
|
|
55
|
+
status: "unavailable",
|
|
56
|
+
message: "Unexpected response from the daemon."
|
|
57
|
+
};
|
|
58
|
+
return {
|
|
59
|
+
status: "available",
|
|
60
|
+
page,
|
|
61
|
+
view
|
|
62
|
+
};
|
|
63
|
+
} catch {
|
|
64
|
+
return {
|
|
65
|
+
status: "unavailable",
|
|
66
|
+
message: "The daemon could not be reached."
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function readView(body) {
|
|
71
|
+
const view = field(body, "view");
|
|
72
|
+
if (!isRecord(view)) return null;
|
|
73
|
+
if (typeof view.commandId !== "string" || typeof view.availability !== "string") return null;
|
|
74
|
+
if (typeof view.byteLength !== "number") return null;
|
|
75
|
+
return view;
|
|
76
|
+
}
|
|
77
|
+
function readPage(page) {
|
|
78
|
+
if (!isRecord(page)) return null;
|
|
79
|
+
if (typeof page.text !== "string" || typeof page.availability !== "string") return null;
|
|
80
|
+
if (typeof page.offset !== "number" || typeof page.hasMore !== "boolean") return null;
|
|
81
|
+
if (typeof page.byteLength !== "number") return null;
|
|
82
|
+
return page;
|
|
83
|
+
}
|
|
84
|
+
function field(body, key) {
|
|
85
|
+
return isRecord(body) ? body[key] : void 0;
|
|
86
|
+
}
|
|
87
|
+
function isRecord(value) {
|
|
88
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
24
91
|
//#region src/components/CodingToolResult.tsx
|
|
25
|
-
/**
|
|
26
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Presents already-authorized chat text. A masked history card may additionally
|
|
94
|
+
* offer retained output, but that read is an explicit operator action through
|
|
95
|
+
* the daemon's releasing route — nothing is disclosed by rendering the card.
|
|
96
|
+
*/
|
|
97
|
+
function CodingToolResult({ name, body, pending = false, log }) {
|
|
27
98
|
if (!pending && body === "Coding context or command evidence retained privately. Captured transport output follows its communication approval; ask the Agent for the relevant result.") return /* @__PURE__ */ jsxs("details", {
|
|
28
99
|
className: "py-1 text-xs font-sans",
|
|
29
100
|
"aria-label": "Private command details",
|
|
30
|
-
children: [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ jsx("summary", {
|
|
103
|
+
className: "cursor-pointer",
|
|
104
|
+
children: "Detailed output isn’t included in this history view"
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsx("p", {
|
|
107
|
+
className: "mt-1",
|
|
108
|
+
children: "The Agent’s summary is shown in the conversation. Ask the Agent to summarize its retained command result if you need more detail."
|
|
109
|
+
}),
|
|
110
|
+
log && /* @__PURE__ */ jsx(RetainedLogControl, { reference: log })
|
|
111
|
+
]
|
|
37
112
|
});
|
|
38
113
|
let parsed;
|
|
39
114
|
try {
|
|
@@ -84,6 +159,40 @@ function CodingToolResult({ name, body, pending = false }) {
|
|
|
84
159
|
]
|
|
85
160
|
});
|
|
86
161
|
}
|
|
162
|
+
if (name === "coding_log") {
|
|
163
|
+
const page = parsed;
|
|
164
|
+
if (typeof page.text !== "string" || typeof page.availability !== "string") return /* @__PURE__ */ jsx("span", { children: body });
|
|
165
|
+
return /* @__PURE__ */ jsxs("details", {
|
|
166
|
+
className: "py-1",
|
|
167
|
+
"aria-label": "Retained command output",
|
|
168
|
+
children: [
|
|
169
|
+
/* @__PURE__ */ jsxs("summary", {
|
|
170
|
+
className: "cursor-pointer",
|
|
171
|
+
children: [
|
|
172
|
+
"Retained output: ",
|
|
173
|
+
page.availability,
|
|
174
|
+
page.hasMore ? " · more available" : ""
|
|
175
|
+
]
|
|
176
|
+
}),
|
|
177
|
+
/* @__PURE__ */ jsx("pre", {
|
|
178
|
+
className: "max-h-64 overflow-auto whitespace-pre-wrap break-words",
|
|
179
|
+
children: page.text
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ jsxs("p", {
|
|
182
|
+
className: "text-xs",
|
|
183
|
+
children: [
|
|
184
|
+
"bytes ",
|
|
185
|
+
typeof page.offset === "number" ? page.offset : 0,
|
|
186
|
+
"–",
|
|
187
|
+
(typeof page.offset === "number" ? page.offset : 0) + page.text.length,
|
|
188
|
+
" of",
|
|
189
|
+
" ",
|
|
190
|
+
typeof page.byteLength === "number" ? page.byteLength : 0
|
|
191
|
+
]
|
|
192
|
+
})
|
|
193
|
+
]
|
|
194
|
+
});
|
|
195
|
+
}
|
|
87
196
|
if (name === "coding_environment") {
|
|
88
197
|
const value = parsed;
|
|
89
198
|
if (typeof value.posture !== "string") return /* @__PURE__ */ jsx("span", { children: body });
|
|
@@ -162,6 +271,11 @@ function CodingToolResult({ name, body, pending = false }) {
|
|
|
162
271
|
className: "break-all",
|
|
163
272
|
children: ["coding-receipt:", receipt.id]
|
|
164
273
|
}),
|
|
274
|
+
/* @__PURE__ */ jsx(SourceApplicability, {
|
|
275
|
+
teamId: receipt.teamId,
|
|
276
|
+
after: receipt.sourceAfter ?? null,
|
|
277
|
+
before: receipt.sourceBefore ?? null
|
|
278
|
+
}),
|
|
165
279
|
receipt.environment?.imageId && /* @__PURE__ */ jsx("p", {
|
|
166
280
|
className: "break-all",
|
|
167
281
|
children: receipt.environment.imageId
|
|
@@ -170,6 +284,111 @@ function CodingToolResult({ name, body, pending = false }) {
|
|
|
170
284
|
]
|
|
171
285
|
});
|
|
172
286
|
}
|
|
287
|
+
/**
|
|
288
|
+
* Whether this result's tested source still matches the current source (BAZ-042 criterion 4).
|
|
289
|
+
*
|
|
290
|
+
* Nothing is assumed from the fact that a result exists: a receipt with no captured source reads as
|
|
291
|
+
* **Not checked**, and the verdict is loaded only when the operator asks for it.
|
|
292
|
+
*/
|
|
293
|
+
function SourceApplicability({ teamId, after, before }) {
|
|
294
|
+
const [state, setState] = useState(null);
|
|
295
|
+
const [loading, setLoading] = useState(false);
|
|
296
|
+
async function check() {
|
|
297
|
+
if (!after) return;
|
|
298
|
+
setLoading(true);
|
|
299
|
+
try {
|
|
300
|
+
setState(await fetchSnapshotApplicability({ data: {
|
|
301
|
+
teamId,
|
|
302
|
+
snapshotId: after.id
|
|
303
|
+
} }));
|
|
304
|
+
} finally {
|
|
305
|
+
setLoading(false);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
const verdict = state?.status === "ok" ? state : null;
|
|
309
|
+
const label = applicabilityLabel(verdict);
|
|
310
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
311
|
+
className: applicabilityWarns(verdict) ? "text-rose-baziu" : void 0,
|
|
312
|
+
children: [
|
|
313
|
+
label,
|
|
314
|
+
after ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
315
|
+
" · tested version ",
|
|
316
|
+
/* @__PURE__ */ jsx("span", {
|
|
317
|
+
className: "break-all font-mono",
|
|
318
|
+
children: after.id.slice(0, 12)
|
|
319
|
+
}),
|
|
320
|
+
after.complete ? "" : " (incomplete)",
|
|
321
|
+
verdict === null && /* @__PURE__ */ jsxs(Fragment, { children: [" ", /* @__PURE__ */ jsx(Button, {
|
|
322
|
+
variant: "ghost",
|
|
323
|
+
disabled: loading,
|
|
324
|
+
onClick: () => void check(),
|
|
325
|
+
children: loading ? "Checking…" : "Check applicability"
|
|
326
|
+
})] }),
|
|
327
|
+
state?.status === "unavailable" && /* @__PURE__ */ jsxs("span", { children: [" · ", state.message] })
|
|
328
|
+
] }) : " · no source snapshot was captured for this result",
|
|
329
|
+
before && /* @__PURE__ */ jsxs(Fragment, { children: [" · started from ", /* @__PURE__ */ jsx("span", {
|
|
330
|
+
className: "break-all font-mono",
|
|
331
|
+
children: before.id.slice(0, 12)
|
|
332
|
+
})] })
|
|
333
|
+
]
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Explicit operator read of a retained log. Loads a single bounded first page
|
|
338
|
+
* on demand; the daemon re-authorizes every call and reports a held log as
|
|
339
|
+
* `not-shared` so it can never be mistaken for an empty result.
|
|
340
|
+
*/
|
|
341
|
+
function RetainedLogControl({ reference }) {
|
|
342
|
+
const [result, setResult] = useState(null);
|
|
343
|
+
const [loading, setLoading] = useState(false);
|
|
344
|
+
async function load() {
|
|
345
|
+
setLoading(true);
|
|
346
|
+
try {
|
|
347
|
+
setResult(await fetchRetainedCodingLog(reference));
|
|
348
|
+
} finally {
|
|
349
|
+
setLoading(false);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
if (result === null) return /* @__PURE__ */ jsx("p", {
|
|
353
|
+
className: "mt-2",
|
|
354
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
355
|
+
variant: "ghost",
|
|
356
|
+
disabled: loading,
|
|
357
|
+
onClick: () => void load(),
|
|
358
|
+
children: loading ? "Loading…" : "Show retained output"
|
|
359
|
+
})
|
|
360
|
+
});
|
|
361
|
+
if (result.status === "not-shared") return /* @__PURE__ */ jsx("p", {
|
|
362
|
+
className: "mt-2",
|
|
363
|
+
children: "This command’s output hasn’t been shared with the conversation yet."
|
|
364
|
+
});
|
|
365
|
+
if (result.status === "missing") return /* @__PURE__ */ jsx("p", {
|
|
366
|
+
className: "mt-2",
|
|
367
|
+
children: "This retained output is no longer available."
|
|
368
|
+
});
|
|
369
|
+
if (result.status === "unavailable") return /* @__PURE__ */ jsx("p", {
|
|
370
|
+
className: "mt-2",
|
|
371
|
+
role: "alert",
|
|
372
|
+
children: result.message
|
|
373
|
+
});
|
|
374
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
375
|
+
className: "mt-2",
|
|
376
|
+
children: [/* @__PURE__ */ jsx("pre", {
|
|
377
|
+
className: "max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-sm bg-[rgba(42,31,22,0.04)] p-2",
|
|
378
|
+
children: result.page.text
|
|
379
|
+
}), /* @__PURE__ */ jsxs("p", { children: [
|
|
380
|
+
"Retained output: ",
|
|
381
|
+
result.page.availability,
|
|
382
|
+
result.page.hasMore ? " · earlier output omitted" : "",
|
|
383
|
+
" · bytes ",
|
|
384
|
+
result.page.offset,
|
|
385
|
+
"–",
|
|
386
|
+
result.page.offset + result.page.text.length,
|
|
387
|
+
" of ",
|
|
388
|
+
result.page.byteLength
|
|
389
|
+
] })]
|
|
390
|
+
});
|
|
391
|
+
}
|
|
173
392
|
//#endregion
|
|
174
393
|
//#region src/lib/md.ts
|
|
175
394
|
var installed = false;
|
|
@@ -1261,7 +1480,8 @@ function projectMessages(msgs) {
|
|
|
1261
1480
|
kind: isError ? "error" : "result",
|
|
1262
1481
|
id: m.toolCallId ?? "",
|
|
1263
1482
|
name: m.toolName ?? "",
|
|
1264
|
-
body: m.content
|
|
1483
|
+
body: m.content,
|
|
1484
|
+
...m.codingLog ? { codingLog: m.codingLog } : {}
|
|
1265
1485
|
});
|
|
1266
1486
|
if (m.result) {
|
|
1267
1487
|
entries.push({
|
|
@@ -1842,6 +2062,10 @@ function ChatPane({ agentId, agentName, initialMessages, initialSessionHead }) {
|
|
|
1842
2062
|
setLiveEntries((entries) => upsertCommandApprovalEntry(entries, ev.approval));
|
|
1843
2063
|
return;
|
|
1844
2064
|
}
|
|
2065
|
+
if (ev.type === "coding_progress") {
|
|
2066
|
+
setLiveEntries((prev) => upsertCodingProgress(prev, ev));
|
|
2067
|
+
return;
|
|
2068
|
+
}
|
|
1845
2069
|
if (ev.type === "tool_call" || ev.type === "tool_result" || ev.type === "tool_error") {
|
|
1846
2070
|
setThinking(ev.type !== "tool_call");
|
|
1847
2071
|
const item = ev.type === "tool_call" ? {
|
|
@@ -1864,14 +2088,19 @@ function ChatPane({ agentId, agentName, initialMessages, initialSessionHead }) {
|
|
|
1864
2088
|
"repository_context",
|
|
1865
2089
|
"coding_environment",
|
|
1866
2090
|
"coding_command",
|
|
1867
|
-
"coding_receipt"
|
|
2091
|
+
"coding_receipt",
|
|
2092
|
+
"coding_log",
|
|
2093
|
+
"source_snapshot"
|
|
1868
2094
|
].includes(ev.name)) {
|
|
1869
2095
|
deliveredCoding.current.set(`${ev.name}:${ev.id}`, ev.result);
|
|
1870
2096
|
while (deliveredCoding.current.size > 20) deliveredCoding.current.delete(deliveredCoding.current.keys().next().value);
|
|
1871
2097
|
}
|
|
1872
2098
|
const images = ev.type === "tool_result" ? ev.images : void 0;
|
|
1873
2099
|
setLiveEntries((prev) => {
|
|
1874
|
-
const next = [...prev
|
|
2100
|
+
const next = [...prev.map((entry) => entry.type === "tool" ? {
|
|
2101
|
+
...entry,
|
|
2102
|
+
items: entry.items.filter((i) => !(i.kind === "progress" && i.id === ev.id))
|
|
2103
|
+
} : entry)];
|
|
1875
2104
|
const last = next[next.length - 1];
|
|
1876
2105
|
if (last?.type === "tool") next[next.length - 1] = {
|
|
1877
2106
|
type: "tool",
|
|
@@ -2547,12 +2776,48 @@ function commandApprovalStatusFromConflict(message) {
|
|
|
2547
2776
|
default: return null;
|
|
2548
2777
|
}
|
|
2549
2778
|
}
|
|
2779
|
+
/** Insert or replace the live progress tail for one coding tool call. */
|
|
2780
|
+
function upsertCodingProgress(entries, ev) {
|
|
2781
|
+
const progress = {
|
|
2782
|
+
kind: "progress",
|
|
2783
|
+
id: ev.id,
|
|
2784
|
+
name: "coding_command",
|
|
2785
|
+
body: ev.output,
|
|
2786
|
+
elapsedMs: ev.elapsedMs,
|
|
2787
|
+
truncated: ev.truncated
|
|
2788
|
+
};
|
|
2789
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
2790
|
+
const entry = entries[i];
|
|
2791
|
+
if (entry?.type !== "tool") continue;
|
|
2792
|
+
const at = entry.items.findIndex((item) => item.id === ev.id);
|
|
2793
|
+
if (at < 0) continue;
|
|
2794
|
+
const items = [...entry.items];
|
|
2795
|
+
items[at] = progress;
|
|
2796
|
+
const next = [...entries];
|
|
2797
|
+
next[i] = {
|
|
2798
|
+
type: "tool",
|
|
2799
|
+
items
|
|
2800
|
+
};
|
|
2801
|
+
return next;
|
|
2802
|
+
}
|
|
2803
|
+
const last = entries[entries.length - 1];
|
|
2804
|
+
if (last?.type === "tool") return [...entries.slice(0, -1), {
|
|
2805
|
+
type: "tool",
|
|
2806
|
+
items: [...last.items, progress]
|
|
2807
|
+
}];
|
|
2808
|
+
return [...entries, {
|
|
2809
|
+
type: "tool",
|
|
2810
|
+
items: [progress]
|
|
2811
|
+
}];
|
|
2812
|
+
}
|
|
2550
2813
|
function ToolGroup({ items, dropCls }) {
|
|
2551
2814
|
const codingNames = [
|
|
2552
2815
|
"repository_context",
|
|
2553
2816
|
"coding_command",
|
|
2554
2817
|
"coding_environment",
|
|
2555
2818
|
"coding_receipt",
|
|
2819
|
+
"coding_log",
|
|
2820
|
+
"source_snapshot",
|
|
2556
2821
|
"send_message"
|
|
2557
2822
|
];
|
|
2558
2823
|
const hasCoding = items.some((item) => codingNames.includes(item.name));
|
|
@@ -2594,15 +2859,37 @@ function ToolLine({ item }) {
|
|
|
2594
2859
|
children: item.body
|
|
2595
2860
|
})]
|
|
2596
2861
|
});
|
|
2862
|
+
if (item.kind === "progress") return /* @__PURE__ */ jsxs("div", {
|
|
2863
|
+
className: "py-1",
|
|
2864
|
+
"aria-label": "Live coding progress",
|
|
2865
|
+
children: [
|
|
2866
|
+
/* @__PURE__ */ jsxs("p", {
|
|
2867
|
+
className: "font-sans",
|
|
2868
|
+
children: [
|
|
2869
|
+
"Running coding command · ",
|
|
2870
|
+
Math.max(0, Math.round((item.elapsedMs ?? 0) / 1e3)),
|
|
2871
|
+
"s"
|
|
2872
|
+
]
|
|
2873
|
+
}),
|
|
2874
|
+
/* @__PURE__ */ jsx("pre", {
|
|
2875
|
+
className: "max-h-64 overflow-auto whitespace-pre-wrap break-words",
|
|
2876
|
+
children: item.body
|
|
2877
|
+
}),
|
|
2878
|
+
item.truncated && /* @__PURE__ */ jsx("p", { children: "Earlier output omitted; the retained log holds more." })
|
|
2879
|
+
]
|
|
2880
|
+
});
|
|
2597
2881
|
if (item.kind !== "error" && [
|
|
2598
2882
|
"repository_context",
|
|
2599
2883
|
"coding_command",
|
|
2600
2884
|
"coding_environment",
|
|
2601
|
-
"coding_receipt"
|
|
2885
|
+
"coding_receipt",
|
|
2886
|
+
"coding_log",
|
|
2887
|
+
"source_snapshot"
|
|
2602
2888
|
].includes(item.name)) return /* @__PURE__ */ jsx(CodingToolResult, {
|
|
2603
2889
|
name: item.name,
|
|
2604
2890
|
body: item.body,
|
|
2605
|
-
pending: item.kind === "call"
|
|
2891
|
+
pending: item.kind === "call",
|
|
2892
|
+
log: item.codingLog
|
|
2606
2893
|
});
|
|
2607
2894
|
if (item.kind === "call") {
|
|
2608
2895
|
const args = prettyArgs(item.body);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as Button } from "./Button-Dsnw22OF.js";
|
|
2
|
-
import { n as ResultTranscript } from "./ChatPane-
|
|
2
|
+
import { n as ResultTranscript } from "./ChatPane-DybH39WK.js";
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/ResultSourceConversation.tsx
|
|
@@ -2,7 +2,7 @@ import { n as createServerFn } from "../server.js";
|
|
|
2
2
|
import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
|
|
3
3
|
import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
|
|
4
4
|
//#region src/routes/teams/$id/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./_id-
|
|
5
|
+
var $$splitComponentImporter = () => import("./_id-EAjRXNbD.js");
|
|
6
6
|
var fetchGroup = createServerFn({ method: "POST" }).validator((d) => d).handler(createSsrRpc("4773184b3ddd3656fb80ec74375a6d304e25acb56b79f1d349dcabf9f0914359"));
|
|
7
7
|
var Route = createFileRoute("/teams/$id/")({
|
|
8
8
|
loader: async ({ params }) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
2
|
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
3
|
-
import { n as daemonClient, r as ApiClientError } from "./daemon-client-
|
|
3
|
+
import { n as daemonClient, r as ApiClientError } from "./daemon-client-C7qjQ2iO.js";
|
|
4
4
|
//#region src/routes/templates/agents/$id/index.tsx?tss-serverfn-split
|
|
5
5
|
var fetchProfile_createServerFn_handler = createServerRpc({
|
|
6
6
|
id: "032d74b7d41c718191dbdde6b06ba44993340ce1154af1fa6723a6d4f7a7236e",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
2
|
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
3
|
-
import { n as daemonClient, r as ApiClientError } from "./daemon-client-
|
|
3
|
+
import { n as daemonClient, r as ApiClientError } from "./daemon-client-C7qjQ2iO.js";
|
|
4
4
|
//#region src/routes/teams/$id/index.tsx?tss-serverfn-split
|
|
5
5
|
var fetchGroup_createServerFn_handler = createServerRpc({
|
|
6
6
|
id: "4773184b3ddd3656fb80ec74375a6d304e25acb56b79f1d349dcabf9f0914359",
|
|
@@ -2,7 +2,7 @@ import { n as createServerFn } from "../server.js";
|
|
|
2
2
|
import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
|
|
3
3
|
import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
|
|
4
4
|
//#region src/routes/agents/$id/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./_id-
|
|
5
|
+
var $$splitComponentImporter = () => import("./_id-C_2er0_G.js");
|
|
6
6
|
var fetchAgent = createServerFn({ method: "POST" }).validator((d) => d).handler(createSsrRpc("846c9081aed17057351730985f133b0aab67a5dabfca9562552829a90ff30849"));
|
|
7
7
|
var Route = createFileRoute("/agents/$id/")({
|
|
8
8
|
validateSearch: (search) => ({
|
|
@@ -2,7 +2,7 @@ import { n as createServerFn } from "../server.js";
|
|
|
2
2
|
import { t as createSsrRpc } from "./createSsrRpc-6LHNEsSK.js";
|
|
3
3
|
import { createFileRoute, lazyRouteComponent, redirect } from "@tanstack/react-router";
|
|
4
4
|
//#region src/routes/templates/agents/$id/index.tsx
|
|
5
|
-
var $$splitComponentImporter = () => import("./_id-
|
|
5
|
+
var $$splitComponentImporter = () => import("./_id-BqWTB8Wl.js");
|
|
6
6
|
var fetchProfile = createServerFn({ method: "POST" }).validator((d) => d).handler(createSsrRpc("032d74b7d41c718191dbdde6b06ba44993340ce1154af1fa6723a6d4f7a7236e"));
|
|
7
7
|
var Route = createFileRoute("/templates/agents/$id/")({
|
|
8
8
|
loader: async ({ params }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Route } from "./_id-
|
|
1
|
+
import { t as Route } from "./_id-BYKpT2Tu.js";
|
|
2
2
|
import { r as PageShell } from "./Page-Bz-ydB8j.js";
|
|
3
3
|
import { t as UnsavedChangesGuard } from "./UnsavedChangesGuard-CiStXyBI.js";
|
|
4
4
|
import { t as DEFAULT_PROFILE_COMMUNICATION } from "./team-policy-vPG01onj.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as Route } from "./_id-
|
|
1
|
+
import { t as Route } from "./_id-BN1BPEDI.js";
|
|
2
2
|
import { i as SectionCard, r as PageShell } from "./Page-Bz-ydB8j.js";
|
|
3
3
|
import { t as AgentTabs } from "./AgentTabs-Dq8hDM2Q.js";
|
|
4
4
|
import { t as AgentAvatar } from "./AgentAvatar-8gTAy_tP.js";
|
|
5
5
|
import { t as Button } from "./Button-Dsnw22OF.js";
|
|
6
|
-
import { t as ChatPane } from "./ChatPane-
|
|
7
|
-
import { t as ResultSourceConversation } from "./ResultSourceConversation-
|
|
6
|
+
import { t as ChatPane } from "./ChatPane-DybH39WK.js";
|
|
7
|
+
import { t as ResultSourceConversation } from "./ResultSourceConversation-BmXTcEOA.js";
|
|
8
8
|
import { t as ConfirmDialog } from "./ConfirmDialog-C-MPYYSU.js";
|
|
9
9
|
import { r as REASONING_LEVELS } from "./wire-constants-C8nBJcU3.js";
|
|
10
10
|
import { useState } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
2
|
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
3
|
-
import { n as daemonClient, r as ApiClientError } from "./daemon-client-
|
|
3
|
+
import { n as daemonClient, r as ApiClientError } from "./daemon-client-C7qjQ2iO.js";
|
|
4
4
|
//#region src/routes/agents/$id/index.tsx?tss-serverfn-split
|
|
5
5
|
var fetchAgent_createServerFn_handler = createServerRpc({
|
|
6
6
|
id: "846c9081aed17057351730985f133b0aab67a5dabfca9562552829a90ff30849",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as Route } from "./_id
|
|
1
|
+
import { t as Route } from "./_id--onriuvj.js";
|
|
2
2
|
import { a as StatusBadge, i as SectionCard, r as PageShell } from "./Page-Bz-ydB8j.js";
|
|
3
3
|
import { t as Button } from "./Button-Dsnw22OF.js";
|
|
4
|
-
import { t as TeamTabs } from "./TeamTabs-
|
|
4
|
+
import { t as TeamTabs } from "./TeamTabs-Dg4v6x0-.js";
|
|
5
5
|
import { t as UnsavedChangesGuard } from "./UnsavedChangesGuard-CiStXyBI.js";
|
|
6
6
|
import { useEffect, useRef, useState } from "react";
|
|
7
7
|
import { useRouter } from "@tanstack/react-router";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as createServerFn } from "../server.js";
|
|
2
2
|
import { t as createServerRpc } from "./createServerRpc-B7Yr1K8i.js";
|
|
3
|
-
import { n as daemonClient } from "./daemon-client-
|
|
3
|
+
import { n as daemonClient } from "./daemon-client-C7qjQ2iO.js";
|
|
4
4
|
//#region src/routes/templates/teams/$id/index.tsx?tss-serverfn-split
|
|
5
5
|
var fetchTeam_createServerFn_handler = createServerRpc({
|
|
6
6
|
id: "a0bbbee5d0c1240a05e35c04d56a0e95ec78f05265e4e937eec48c8ac2041e58",
|