@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.
Files changed (33) hide show
  1. package/dist/built-in-routes.js +96 -5
  2. package/dist/built-in-routes.js.map +1 -1
  3. package/dist/client/{ApiKeysView-Pk5oljVU.js → ApiKeysView-L85eJb6G.js} +1 -1
  4. package/dist/client/{CenteredContentView-HGpMGAQj.js → CenteredContentView-D9jkWoLc.js} +1 -1
  5. package/dist/client/{CompositionView-DN8dTOCO.js → CompositionView-BGp0EJCk.js} +1 -1
  6. 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
  7. 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
  8. 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
  9. package/dist/client/{JsonViewer-BYj_yrGB.js → JsonViewer-DkHnIfq3.js} +1 -1
  10. package/dist/client/{LoginView-CfVqItZV.js → LoginView-BXD9Odc-.js} +1 -1
  11. package/dist/client/{MarketplaceView-Cidt0nLf.js → MarketplaceView-DEnujUBs.js} +1 -1
  12. 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
  13. 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
  14. package/dist/client/{ModelsView-DH6wNe38.js → ModelsView-BkCLr8sp.js} +1 -1
  15. package/dist/client/{PromptEditView-D_VjoAa-.js → PromptEditView-BjCfsJQE.js} +1 -1
  16. package/dist/client/{PromptModal-a9LTOWNt.js → PromptModal-nxu_LIv6.js} +1 -1
  17. package/dist/client/{PromptsView-BCCCryKR.js → PromptsView-1yXGCmEZ.js} +1 -1
  18. package/dist/client/{ProvidersView-CF4x5F6G.js → ProvidersView-DxF6gafk.js} +1 -1
  19. 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
  20. package/dist/client/{ThreadsView-BzscU1l2.js → ThreadsView-CBup_w8u.js} +1 -1
  21. package/dist/client/{ToolsView-CeEtxDZV.js → ToolsView-B30TfXU9.js} +1 -1
  22. package/dist/client/{UsersView-Di5cmUYL.js → UsersView-kE7Xr4f3.js} +1 -1
  23. package/dist/client/{VariablesView-CXUr05jD.js → VariablesView-yYuynG0M.js} +1 -1
  24. package/dist/client/assets/{ThreadInspectorPane-D9ZMzSTn.css → ThreadInspectorPane-BRGO_P0_.css} +1 -1
  25. package/dist/client/{index-BMqXblce.js → index-AUGwDdSH.js} +2 -2
  26. package/dist/client/index.html +1 -1
  27. package/dist/index.js +31 -4
  28. package/dist/index.js.map +1 -1
  29. package/dist/plugin.js.map +1 -1
  30. package/dist/runtime.d.ts +0 -1
  31. package/dist/runtime.js +31 -4
  32. package/dist/runtime.js.map +1 -1
  33. package/package.json +5 -5
@@ -26,7 +26,7 @@
26
26
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
27
27
  <link rel="icon" type="image/svg+xml" href="/agents/assets/img/favicon-9uH1rb2F.svg">
28
28
  <title>AgentBuilder Admin</title>
29
- <script type="module" crossorigin src="/agents/index-BMqXblce.js"></script>
29
+ <script type="module" crossorigin src="/agents/index-AUGwDdSH.js"></script>
30
30
  <link rel="modulepreload" crossorigin href="/agents/formkit-CE26dtFp.js">
31
31
  <link rel="modulepreload" crossorigin href="/agents/vendor-TPZjEwCU.js">
32
32
  <link rel="modulepreload" crossorigin href="/agents/syntax-D-ZcovVx.js">
package/dist/index.js CHANGED
@@ -14095,7 +14095,7 @@ var init_ThreadStateImpl = __esm({
14095
14095
  return bytes.buffer;
14096
14096
  }
14097
14097
  async readFileStream(path21, options) {
14098
- const fileInfo = await this._threadInstance.statFile(path21);
14098
+ const fileInfo = this._unwrapStatRecord(await this._threadInstance.statFile(path21));
14099
14099
  if (!fileInfo) {
14100
14100
  return null;
14101
14101
  }
@@ -14150,12 +14150,32 @@ var init_ThreadStateImpl = __esm({
14150
14150
  }
14151
14151
  };
14152
14152
  }
14153
+ /**
14154
+ * Unwrap the thread DO's `{ success, file }` stat envelope (older shapes
14155
+ * returned the record directly). A failed or absent lookup is NULL — the
14156
+ * old code mapped the envelope itself, producing a truthy record with
14157
+ * every field defaulted (size 0, application/octet-stream) even for
14158
+ * NONEXISTENT paths, which let a phantom asset pass an existence check and
14159
+ * a real 1.2MB image read as "0 bytes" (2026-08-11).
14160
+ */
14161
+ _unwrapStatRecord(result) {
14162
+ const record = result?.file ?? result;
14163
+ if (!record || typeof record !== "object") return null;
14164
+ if (!("path" in record) && !("name" in record)) return null;
14165
+ return record;
14166
+ }
14153
14167
  async statFile(path21) {
14154
- const result = await this._threadInstance.statFile(path21);
14155
- return result ? this._mapFileRecord(result) : null;
14168
+ const record = this._unwrapStatRecord(await this._threadInstance.statFile(path21));
14169
+ return record ? this._mapFileRecord(record) : null;
14156
14170
  }
14157
14171
  async readdirFile(path21) {
14158
- const entries = await this._threadInstance.readdirFile(path21);
14172
+ const result = await this._threadInstance.readdirFile(path21);
14173
+ const entries = Array.isArray(result) ? result : result?.files;
14174
+ if (!Array.isArray(entries)) {
14175
+ throw new Error(
14176
+ result?.error || `Could not list directory: ${path21}`
14177
+ );
14178
+ }
14159
14179
  return {
14160
14180
  entries: entries.map((e) => this._mapFileRecord(e))
14161
14181
  };
@@ -21350,6 +21370,10 @@ var PUBLIC_ROUTES = /* @__PURE__ */ new Set([
21350
21370
  function isProviderIconRoute(routePath) {
21351
21371
  return /^\/api\/providers\/[^/]+\/icon$/.test(routePath);
21352
21372
  }
21373
+ function isPublicThreadFileRoute(routePath, method) {
21374
+ if (method !== "GET" && method !== "HEAD") return false;
21375
+ return /^\/api\/threads\/[^/]+\/public\/.+/.test(routePath);
21376
+ }
21353
21377
  function isHostedInstance(env) {
21354
21378
  const value = env?.STANDARD_AGENTS_HOSTED;
21355
21379
  if (typeof value === "string") {
@@ -21376,6 +21400,9 @@ function isPublicApiRoute(routePath, request, env) {
21376
21400
  if (isProviderIconRoute(routePath)) {
21377
21401
  return true;
21378
21402
  }
21403
+ if (isPublicThreadFileRoute(routePath, request.method.toUpperCase())) {
21404
+ return true;
21405
+ }
21379
21406
  if (!isTrustedLocalDevelopmentRequest(request, env)) return false;
21380
21407
  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/");
21381
21408
  }