@standardagents/builder 0.18.2 → 0.19.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/built-in-routes.js +79 -19
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/CompositionView.js +1 -1
- package/dist/client/ConfirmDialog.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/client/JsonViewer.js +1 -1
- package/dist/client/LoginView.js +1 -1
- package/dist/client/Modal.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/client/ModelModal.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/client/ModelsView.js +1 -1
- package/dist/client/PromptsView.js +1 -1
- package/dist/client/ProvidersView.js +1 -1
- package/dist/client/ThreadInspectorPane.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/client/ToolsView.js +1 -1
- package/dist/client/assets/index.css +1 -1
- package/dist/client/index.js +2 -2
- package/dist/index.js +19 -5
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +12 -5
- package/dist/plugin.js.map +1 -1
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +7 -0
- package/dist/runtime.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -19824,15 +19824,22 @@ function addCorsHeaders(response) {
|
|
|
19824
19824
|
return response;
|
|
19825
19825
|
}
|
|
19826
19826
|
|
|
19827
|
-
//
|
|
19828
|
-
|
|
19829
|
-
if (response.headers.has("Set-Cookie")) {
|
|
19827
|
+
// Skip if already has CORS headers
|
|
19828
|
+
if (response.headers.has("Access-Control-Allow-Origin")) {
|
|
19830
19829
|
return response;
|
|
19831
19830
|
}
|
|
19832
19831
|
|
|
19833
|
-
//
|
|
19834
|
-
|
|
19832
|
+
// Prefer mutating the original Response headers. Rebuilding a Response from
|
|
19833
|
+
// response.headers can drop special headers such as Set-Cookie in Worker
|
|
19834
|
+
// runtimes, even when the header is not visible through Headers.has().
|
|
19835
|
+
try {
|
|
19836
|
+
for (const [key, value] of Object.entries(CORS_HEADERS)) {
|
|
19837
|
+
response.headers.set(key, value);
|
|
19838
|
+
}
|
|
19835
19839
|
return response;
|
|
19840
|
+
} catch {
|
|
19841
|
+
// Some Responses, especially fetched upstream responses, have immutable
|
|
19842
|
+
// headers. Fall back to wrapping those responses.
|
|
19836
19843
|
}
|
|
19837
19844
|
|
|
19838
19845
|
// Create new headers with CORS added
|
|
@@ -29044,6 +29051,13 @@ ${result ?? error ?? "No result content."}${attachmentSummary}`;
|
|
|
29044
29051
|
for (const replicaUser of snapshot.users) {
|
|
29045
29052
|
const user = await this.upsertPlatformReplicaUser(replicaUser);
|
|
29046
29053
|
activeUserIds.add(user.id);
|
|
29054
|
+
if (typeof replicaUser.session_revoked_at === "number" && Number.isFinite(replicaUser.session_revoked_at)) {
|
|
29055
|
+
await this.ctx.storage.sql.exec(
|
|
29056
|
+
`DELETE FROM sessions WHERE user_id = ? AND created_at <= ?`,
|
|
29057
|
+
user.id,
|
|
29058
|
+
Math.floor(replicaUser.session_revoked_at)
|
|
29059
|
+
);
|
|
29060
|
+
}
|
|
29047
29061
|
}
|
|
29048
29062
|
const activeList = Array.from(activeUserIds);
|
|
29049
29063
|
if (activeList.length > 0) {
|