@standardagents/builder 0.37.5 → 0.37.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.
- package/dist/built-in-routes.js +96 -5
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/{ApiKeysView-Pk5oljVU.js → ApiKeysView-L85eJb6G.js} +1 -1
- package/dist/client/{CenteredContentView-HGpMGAQj.js → CenteredContentView-D9jkWoLc.js} +1 -1
- package/dist/client/{CompositionView-DN8dTOCO.js → CompositionView-BGp0EJCk.js} +1 -1
- package/dist/client/{ConfirmDialog.vue_vue_type_script_setup_true_lang--j_hnMZ0.js → ConfirmDialog.vue_vue_type_script_setup_true_lang-DgwqZrLV.js} +1 -1
- package/dist/client/{CopyButton.vue_vue_type_script_setup_true_lang-CpJDcbZx.js → CopyButton.vue_vue_type_script_setup_true_lang-B8cGgU2J.js} +1 -1
- package/dist/client/{DataTable.vue_vue_type_script_setup_true_lang-unLrY-PY.js → DataTable.vue_vue_type_script_setup_true_lang-CRBXym9D.js} +1 -1
- package/dist/client/{JsonViewer-BYj_yrGB.js → JsonViewer-DkHnIfq3.js} +1 -1
- package/dist/client/{LoginView-CfVqItZV.js → LoginView-BXD9Odc-.js} +1 -1
- package/dist/client/{MarketplaceView-Cidt0nLf.js → MarketplaceView-DEnujUBs.js} +1 -1
- package/dist/client/{Modal.vue_vue_type_script_setup_true_lang-C1dmm1HX.js → Modal.vue_vue_type_script_setup_true_lang-keKEwm3K.js} +1 -1
- package/dist/client/{ModelModal.vue_vue_type_script_setup_true_lang-DIKLuPXT.js → ModelModal.vue_vue_type_script_setup_true_lang-t1n0bbJe.js} +1 -1
- package/dist/client/{ModelsView-DH6wNe38.js → ModelsView-BkCLr8sp.js} +1 -1
- package/dist/client/{PromptEditView-D_VjoAa-.js → PromptEditView-BjCfsJQE.js} +1 -1
- package/dist/client/{PromptModal-a9LTOWNt.js → PromptModal-nxu_LIv6.js} +1 -1
- package/dist/client/{PromptsView-BCCCryKR.js → PromptsView-1yXGCmEZ.js} +1 -1
- package/dist/client/{ProvidersView-CF4x5F6G.js → ProvidersView-DxF6gafk.js} +1 -1
- package/dist/client/{ThreadInspectorPane.vue_vue_type_script_setup_true_lang-D5VDoQiK.js → ThreadInspectorPane.vue_vue_type_script_setup_true_lang-CjwWJ3uw.js} +14 -14
- package/dist/client/{ThreadsView-BzscU1l2.js → ThreadsView-CBup_w8u.js} +1 -1
- package/dist/client/{ToolsView-CeEtxDZV.js → ToolsView-B30TfXU9.js} +1 -1
- package/dist/client/{UsersView-Di5cmUYL.js → UsersView-kE7Xr4f3.js} +1 -1
- package/dist/client/{VariablesView-CXUr05jD.js → VariablesView-yYuynG0M.js} +1 -1
- package/dist/client/assets/{ThreadInspectorPane-D9ZMzSTn.css → ThreadInspectorPane-BRGO_P0_.css} +1 -1
- package/dist/client/{index-BMqXblce.js → index-AUGwDdSH.js} +2 -2
- package/dist/client/index.html +1 -1
- package/dist/index.js +31 -4
- package/dist/index.js.map +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/runtime.d.ts +0 -1
- package/dist/runtime.js +31 -4
- package/dist/runtime.js.map +1 -1
- package/package.json +5 -5
package/dist/runtime.d.ts
CHANGED
|
@@ -116,7 +116,6 @@ declare function canAccessThread(auth: AuthContext, thread: {
|
|
|
116
116
|
user_id: string | null;
|
|
117
117
|
}): boolean;
|
|
118
118
|
|
|
119
|
-
/** Central API exposure policy shared by the generated Worker router and tests. */
|
|
120
119
|
declare function isHostedInstance(env: Record<string, unknown> | undefined): boolean;
|
|
121
120
|
/**
|
|
122
121
|
* Local-only conveniences are enabled by the request destination, not merely
|
package/dist/runtime.js
CHANGED
|
@@ -14086,7 +14086,7 @@ var init_ThreadStateImpl = __esm({
|
|
|
14086
14086
|
return bytes.buffer;
|
|
14087
14087
|
}
|
|
14088
14088
|
async readFileStream(path, options) {
|
|
14089
|
-
const fileInfo = await this._threadInstance.statFile(path);
|
|
14089
|
+
const fileInfo = this._unwrapStatRecord(await this._threadInstance.statFile(path));
|
|
14090
14090
|
if (!fileInfo) {
|
|
14091
14091
|
return null;
|
|
14092
14092
|
}
|
|
@@ -14141,12 +14141,32 @@ var init_ThreadStateImpl = __esm({
|
|
|
14141
14141
|
}
|
|
14142
14142
|
};
|
|
14143
14143
|
}
|
|
14144
|
+
/**
|
|
14145
|
+
* Unwrap the thread DO's `{ success, file }` stat envelope (older shapes
|
|
14146
|
+
* returned the record directly). A failed or absent lookup is NULL — the
|
|
14147
|
+
* old code mapped the envelope itself, producing a truthy record with
|
|
14148
|
+
* every field defaulted (size 0, application/octet-stream) even for
|
|
14149
|
+
* NONEXISTENT paths, which let a phantom asset pass an existence check and
|
|
14150
|
+
* a real 1.2MB image read as "0 bytes" (2026-08-11).
|
|
14151
|
+
*/
|
|
14152
|
+
_unwrapStatRecord(result) {
|
|
14153
|
+
const record = result?.file ?? result;
|
|
14154
|
+
if (!record || typeof record !== "object") return null;
|
|
14155
|
+
if (!("path" in record) && !("name" in record)) return null;
|
|
14156
|
+
return record;
|
|
14157
|
+
}
|
|
14144
14158
|
async statFile(path) {
|
|
14145
|
-
const
|
|
14146
|
-
return
|
|
14159
|
+
const record = this._unwrapStatRecord(await this._threadInstance.statFile(path));
|
|
14160
|
+
return record ? this._mapFileRecord(record) : null;
|
|
14147
14161
|
}
|
|
14148
14162
|
async readdirFile(path) {
|
|
14149
|
-
const
|
|
14163
|
+
const result = await this._threadInstance.readdirFile(path);
|
|
14164
|
+
const entries = Array.isArray(result) ? result : result?.files;
|
|
14165
|
+
if (!Array.isArray(entries)) {
|
|
14166
|
+
throw new Error(
|
|
14167
|
+
result?.error || `Could not list directory: ${path}`
|
|
14168
|
+
);
|
|
14169
|
+
}
|
|
14150
14170
|
return {
|
|
14151
14171
|
entries: entries.map((e) => this._mapFileRecord(e))
|
|
14152
14172
|
};
|
|
@@ -14943,6 +14963,10 @@ var PUBLIC_ROUTES = /* @__PURE__ */ new Set([
|
|
|
14943
14963
|
function isProviderIconRoute(routePath) {
|
|
14944
14964
|
return /^\/api\/providers\/[^/]+\/icon$/.test(routePath);
|
|
14945
14965
|
}
|
|
14966
|
+
function isPublicThreadFileRoute(routePath, method) {
|
|
14967
|
+
if (method !== "GET" && method !== "HEAD") return false;
|
|
14968
|
+
return /^\/api\/threads\/[^/]+\/public\/.+/.test(routePath);
|
|
14969
|
+
}
|
|
14946
14970
|
function isHostedInstance(env) {
|
|
14947
14971
|
const value = env?.STANDARD_AGENTS_HOSTED;
|
|
14948
14972
|
if (typeof value === "string") {
|
|
@@ -14969,6 +14993,9 @@ function isPublicApiRoute(routePath, request, env) {
|
|
|
14969
14993
|
if (isProviderIconRoute(routePath)) {
|
|
14970
14994
|
return true;
|
|
14971
14995
|
}
|
|
14996
|
+
if (isPublicThreadFileRoute(routePath, request.method.toUpperCase())) {
|
|
14997
|
+
return true;
|
|
14998
|
+
}
|
|
14972
14999
|
if (!isTrustedLocalDevelopmentRequest(request, env)) return false;
|
|
14973
15000
|
return routePath === "/api/threads" || routePath.startsWith("/api/threads/") || routePath === "/api/platform" || routePath.startsWith("/api/platform/") || routePath === "/api/platform-session" || routePath.startsWith("/api/platform-session/") || routePath === "/api/platform-auth" || routePath.startsWith("/api/platform-auth/");
|
|
14974
15001
|
}
|