@agent-native/core 0.164.17 → 0.164.20

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.
@@ -26,8 +26,8 @@ export declare const getCollabState: import("h3").EventHandlerWithFetch<import("
26
26
  * Body: { update: string (base64), requestSource?: string }
27
27
  */
28
28
  export declare const postCollabUpdate: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
29
- ok?: undefined;
30
29
  error: string;
30
+ ok?: undefined;
31
31
  } | {
32
32
  error?: undefined;
33
33
  ok: boolean;
@@ -2704,7 +2704,24 @@ export function createIntegrationsPlugin(options) {
2704
2704
  secret_token: webhookSecret,
2705
2705
  }),
2706
2706
  });
2707
- const data = await res.json();
2707
+ const body = await res.text();
2708
+ let data = null;
2709
+ try {
2710
+ const parsed = JSON.parse(body);
2711
+ if (parsed && typeof parsed === "object") {
2712
+ data = parsed;
2713
+ }
2714
+ }
2715
+ catch {
2716
+ // Keep provider and proxy failures distinguishable from a successful setup.
2717
+ data = null;
2718
+ }
2719
+ if (!res.ok || data?.ok !== true) {
2720
+ setResponseStatus(event, 502);
2721
+ return {
2722
+ error: `Telegram setWebhook failed: ${data?.description ?? `HTTP ${res.status}`}`,
2723
+ };
2724
+ }
2708
2725
  return { ok: true, platform, webhookUrl, result: data };
2709
2726
  }
2710
2727
  catch (err) {
@@ -41,16 +41,16 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
41
41
  thumbsUpRate: number;
42
42
  avgEvalScore: number;
43
43
  } | {
44
+ error?: undefined;
44
45
  summary: import("./types.js").TraceSummary;
45
46
  spans: import("./types.js").TraceSpan[];
46
47
  id?: undefined;
47
- error?: undefined;
48
48
  ok?: undefined;
49
49
  } | {
50
+ error?: undefined;
50
51
  summary?: undefined;
51
52
  spans?: undefined;
52
53
  id: string;
53
- error?: undefined;
54
54
  ok?: undefined;
55
55
  } | {
56
56
  summary?: undefined;
@@ -59,9 +59,9 @@ export declare function createObservabilityHandler(): import("h3").EventHandlerW
59
59
  error: any;
60
60
  ok?: undefined;
61
61
  } | {
62
+ error?: undefined;
62
63
  summary?: undefined;
63
64
  spans?: undefined;
64
65
  id?: undefined;
65
- error?: undefined;
66
66
  ok: boolean;
67
67
  }>>;
@@ -165,4 +165,20 @@ export const ORG_MIGRATIONS = [
165
165
  sql: `CREATE INDEX IF NOT EXISTS workspace_apps_org_visibility_idx
166
166
  ON workspace_apps (org_id, visibility)`,
167
167
  },
168
+ {
169
+ // Legacy manifest discovery has no trusted creator and no explicit share
170
+ // provenance. Restore organization visibility only for that population;
171
+ // owned or explicitly shared private apps remain private.
172
+ version: 1018,
173
+ name: "workspace-apps-restore-ownerless-legacy-visibility",
174
+ sql: `UPDATE workspace_apps
175
+ SET visibility = 'org'
176
+ WHERE visibility = 'private'
177
+ AND TRIM(owner_email) = ''
178
+ AND NOT EXISTS (
179
+ SELECT 1
180
+ FROM workspace_app_shares
181
+ WHERE workspace_app_shares.resource_id = workspace_apps.id
182
+ )`,
183
+ },
168
184
  ];
@@ -51,8 +51,8 @@ export declare function handleDeleteResource(event: any): Promise<{
51
51
  error: string;
52
52
  ok?: undefined;
53
53
  } | {
54
- error?: undefined;
55
54
  ok: boolean;
55
+ error?: undefined;
56
56
  }>;
57
57
  /** POST /_agent-native/resources/upload — upload a file as a resource */
58
58
  export declare function handleUploadResource(event: any): Promise<import("./store.js").Resource | {
@@ -73,10 +73,10 @@ export declare function handleUploadResource(event: any): Promise<import("./stor
73
73
  runId: string | null;
74
74
  expiresAt: number | null;
75
75
  metadata: string | null;
76
- error?: undefined;
77
76
  url: string;
78
77
  provider: string;
79
78
  storageSetupRequired?: undefined;
79
+ error?: undefined;
80
80
  } | {
81
81
  error: string;
82
82
  storageSetupRequired: boolean;
@@ -27,10 +27,10 @@ export declare function resolveAgentEngineApiKeyWriteTarget(event: H3Event, scop
27
27
  export declare function createAgentEngineApiKeyHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
28
28
  error: any;
29
29
  } | {
30
- error?: undefined;
31
30
  ok: boolean;
32
31
  key: string;
33
32
  baseUrlKey?: string;
34
33
  scope: AgentEngineApiKeyScope;
34
+ error?: undefined;
35
35
  }>>;
36
36
  export {};
@@ -20,6 +20,6 @@ export declare function createTranscribeVoiceHandler(): import("h3").EventHandle
20
20
  error: string;
21
21
  text?: undefined;
22
22
  } | {
23
- text: string;
24
23
  error?: undefined;
24
+ text: string;
25
25
  }>>;
@@ -1,4 +1,4 @@
1
- export { getSetting, putSetting, deleteSetting, getAllSettings, getSettingsEmitter, type StoreWriteOptions, } from "./store.js";
1
+ export { getSetting, mutateSetting, putSetting, deleteSetting, getAllSettings, getSettingsEmitter, type StoreWriteOptions, } from "./store.js";
2
2
  export { getSettingHandler, putSettingHandler, deleteSettingHandler, } from "./handlers.js";
3
3
  export { readSetting, writeSetting, removeSetting } from "./script-helpers.js";
4
4
  export { getUserSetting, putUserSetting, deleteUserSetting, } from "./user-settings.js";
@@ -1,5 +1,5 @@
1
1
  // Store
2
- export { getSetting, putSetting, deleteSetting, getAllSettings, getSettingsEmitter, } from "./store.js";
2
+ export { getSetting, mutateSetting, putSetting, deleteSetting, getAllSettings, getSettingsEmitter, } from "./store.js";
3
3
  // H3 route handlers
4
4
  export { getSettingHandler, putSettingHandler, deleteSettingHandler, } from "./handlers.js";
5
5
  // Script helpers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.164.17",
3
+ "version": "0.164.20",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {