@agent-native/core 0.165.2 → 0.165.3

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 (30) hide show
  1. package/corpus/templates/analytics/changelog/2026-08-20-staged-data-limit-recovery.md +1 -0
  2. package/corpus/templates/clips/app/i18n/en-US.ts +6 -2
  3. package/corpus/templates/clips/app/routes/download.tsx +111 -17
  4. package/corpus/templates/clips/changelog/2026-08-20-cross-tab-recording-controls.md +1 -0
  5. package/corpus/templates/clips/changelog/2026-08-20-overlay-follow-review-fixes.md +1 -0
  6. package/corpus/templates/clips/changelog/2026-08-20-provider-key-recovery.md +1 -0
  7. package/corpus/templates/clips/server/routes/api/clips-latest.json.get.ts +109 -46
  8. package/dist/client/blocks/library/diagram.js +1 -1
  9. package/dist/collab/routes.d.ts +1 -1
  10. package/dist/deploy/workspace-deploy.js +7 -0
  11. package/dist/mcp/screen-memory-stdio.d.ts +7 -7
  12. package/dist/mcp-client/oauth-routes.d.ts +1 -0
  13. package/dist/mcp-client/oauth-routes.js +15 -2
  14. package/dist/mcp-client/remote-store.js +83 -43
  15. package/dist/notifications/routes.d.ts +3 -3
  16. package/dist/observability/routes.d.ts +5 -5
  17. package/dist/progress/routes.d.ts +1 -1
  18. package/dist/resources/handlers.d.ts +2 -2
  19. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  20. package/dist/server/google-oauth-credentials.js +14 -1
  21. package/dist/server/realtime-token.d.ts +1 -1
  22. package/dist/server/transcribe-voice.d.ts +1 -1
  23. package/dist/settings/index.d.ts +1 -1
  24. package/dist/settings/index.js +1 -1
  25. package/dist/settings/store.d.ts +7 -1
  26. package/dist/settings/store.js +25 -3
  27. package/dist/settings/user-settings.d.ts +2 -0
  28. package/dist/settings/user-settings.js +65 -2
  29. package/docs/content/deployment.mdx +89 -14
  30. package/package.json +1 -1
@@ -7,7 +7,7 @@
7
7
  * No global fallback — each user starts with a clean slate. This
8
8
  * prevents one user's private data from leaking to other users.
9
9
  */
10
- import { getSetting, putSetting, deleteSetting, } from "./store.js";
10
+ import { getSetting, mutateSetting, putSetting, deleteSettingIfValue, } from "./store.js";
11
11
  function userKey(email, key) {
12
12
  return `u:${email.trim().toLowerCase()}:${key}`;
13
13
  }
@@ -31,7 +31,70 @@ export async function getUserSetting(email, key) {
31
31
  export async function putUserSetting(email, key, value, options) {
32
32
  return putSetting(userKey(email, key), value, options);
33
33
  }
34
+ /** Atomically derive and persist one user-scoped setting. */
35
+ export async function mutateUserSetting(email, key, updater, options) {
36
+ const normalized = userKey(email, key);
37
+ const legacy = legacyUserKey(email, key);
38
+ let migratedLegacy = false;
39
+ let migratedLegacyValue = null;
40
+ const result = await mutateSetting(normalized, async (current) => {
41
+ if (current !== null) {
42
+ migratedLegacy = false;
43
+ migratedLegacyValue = null;
44
+ return updater(current);
45
+ }
46
+ const legacyCurrent = legacy === normalized
47
+ ? null
48
+ : await getSetting(legacy, { bypassCache: true });
49
+ migratedLegacy = legacyCurrent !== null;
50
+ migratedLegacyValue = legacyCurrent;
51
+ return updater(legacyCurrent);
52
+ }, options);
53
+ if (!migratedLegacy)
54
+ return result;
55
+ // If the legacy row disappeared after the updater read it, a concurrent
56
+ // delete won the race. Remove only our exact canonical write; never delete
57
+ // a newer canonical value from another writer.
58
+ if (!migratedLegacyValue ||
59
+ !(await deleteSettingIfValue(legacy, migratedLegacyValue, options))) {
60
+ if (await getSetting(legacy, { bypassCache: true }))
61
+ return result;
62
+ const removed = await deleteSettingIfValue(normalized, result, options);
63
+ if (!removed) {
64
+ // The canonical write committed successfully. A concurrent canonical
65
+ // writer may have replaced it after the legacy row disappeared; keep
66
+ // the committed value visible instead of making callers revoke side
67
+ // effects for a write that is already persisted.
68
+ return result;
69
+ }
70
+ throw new Error("User setting was deleted while migrating its legacy key");
71
+ }
72
+ return result;
73
+ }
34
74
  /** Delete a user-scoped setting. */
35
75
  export async function deleteUserSetting(email, key, options) {
36
- return deleteSetting(userKey(email, key), options);
76
+ const normalized = userKey(email, key);
77
+ const legacy = legacyUserKey(email, key);
78
+ const normalizedCurrent = await getSetting(normalized, {
79
+ bypassCache: true,
80
+ });
81
+ if (legacy === normalized) {
82
+ return normalizedCurrent === null
83
+ ? false
84
+ : deleteSettingIfValue(normalized, normalizedCurrent, options);
85
+ }
86
+ const legacyCurrent = await getSetting(legacy, { bypassCache: true });
87
+ // Retire the fallback row first. If the canonical delete fails, the
88
+ // remaining canonical value still wins reads instead of resurrecting legacy
89
+ // data after a partial delete; a retry can safely finish the operation.
90
+ const deletedLegacy = legacyCurrent === null
91
+ ? false
92
+ : await deleteSettingIfValue(legacy, legacyCurrent, options);
93
+ const normalizedAfterLegacyCleanup = normalizedCurrent === null && deletedLegacy
94
+ ? await getSetting(normalized, { bypassCache: true })
95
+ : normalizedCurrent;
96
+ const deletedNormalized = normalizedAfterLegacyCleanup === null
97
+ ? false
98
+ : await deleteSettingIfValue(normalized, normalizedAfterLegacyCleanup, options);
99
+ return deletedNormalized || deletedLegacy;
37
100
  }
@@ -68,18 +68,41 @@ contract stay the same.
68
68
  <Diagram id="doc-block-deployment-targets" title="Supported deployment targets" summary="Agent-Native apps can deploy to Node.js, Docker, Vercel, Netlify, Cloudflare Pages, Cloudflare Workers, AWS Lambda, Deno Deploy, Azure Static Web Apps, Koyeb, and Render.">
69
69
 
70
70
  ```html
71
+ <!-- i18n-copy-ignore: deployment target logo markup is visual-only; labels are unchanged. -->
71
72
  <div class="deployment-target-grid">
72
73
  <a class="deployment-target" href="/docs/node-js">
73
- <span class="deployment-target-mark text-mark">N</span>
74
+ <span class="deployment-target-mark">
75
+ <img
76
+ class="deployment-target-logo"
77
+ src="/integration-logos/nodejs.svg"
78
+ alt=""
79
+ />
80
+ </span>
74
81
  <strong>Node.js</strong>
75
82
  </a>
76
83
  <a class="deployment-target" href="/docs/docker">
77
- <span class="deployment-target-mark text-mark">D</span>
84
+ <span class="deployment-target-mark">
85
+ <img
86
+ class="deployment-target-logo"
87
+ src="/integration-logos/docker.svg"
88
+ alt=""
89
+ />
90
+ </span>
78
91
  <strong>Docker</strong>
79
92
  </a>
80
93
  <a class="deployment-target" href="/docs/vercel">
81
94
  <span class="deployment-target-mark">
82
- <img src="/integration-logos/vercel.svg" alt="" />
95
+ <img
96
+ class="deployment-target-logo deployment-target-logo-light"
97
+ src="/integration-logos/vercel.svg"
98
+ alt=""
99
+ />
100
+ <img
101
+ class="deployment-target-logo deployment-target-logo-dark"
102
+ src="/integration-logos/vercel-white.svg"
103
+ alt=""
104
+ aria-hidden="true"
105
+ />
83
106
  </span>
84
107
  <strong>Vercel</strong>
85
108
  </a>
@@ -102,23 +125,71 @@ contract stay the same.
102
125
  <strong>Cloudflare Workers</strong>
103
126
  </a>
104
127
  <a class="deployment-target" href="/docs/aws-lambda">
105
- <span class="deployment-target-mark text-mark">AWS</span>
128
+ <span class="deployment-target-mark">
129
+ <img
130
+ class="deployment-target-logo"
131
+ src="/integration-logos/aws-lambda.svg"
132
+ alt=""
133
+ />
134
+ </span>
106
135
  <strong>AWS Lambda</strong>
107
136
  </a>
108
137
  <a class="deployment-target" href="/docs/deno-deploy">
109
- <span class="deployment-target-mark text-mark">D</span>
138
+ <span class="deployment-target-mark">
139
+ <img
140
+ class="deployment-target-logo deployment-target-logo-light"
141
+ src="/integration-logos/deno.svg"
142
+ alt=""
143
+ />
144
+ <img
145
+ class="deployment-target-logo deployment-target-logo-dark"
146
+ src="/integration-logos/deno-white.svg"
147
+ alt=""
148
+ aria-hidden="true"
149
+ />
150
+ </span>
110
151
  <strong>Deno Deploy</strong>
111
152
  </a>
112
153
  <a class="deployment-target" href="/docs/azure-static-web-apps">
113
- <span class="deployment-target-mark text-mark">A</span>
154
+ <span class="deployment-target-mark">
155
+ <img
156
+ class="deployment-target-logo"
157
+ src="/integration-logos/azure.svg"
158
+ alt=""
159
+ />
160
+ </span>
114
161
  <strong>Azure Static Web Apps</strong>
115
162
  </a>
116
163
  <a class="deployment-target" href="/docs/koyeb">
117
- <span class="deployment-target-mark text-mark">K</span>
164
+ <span class="deployment-target-mark">
165
+ <img
166
+ class="deployment-target-logo deployment-target-logo-light"
167
+ src="/integration-logos/koyeb.svg"
168
+ alt=""
169
+ />
170
+ <img
171
+ class="deployment-target-logo deployment-target-logo-dark"
172
+ src="/integration-logos/koyeb-white.svg"
173
+ alt=""
174
+ aria-hidden="true"
175
+ />
176
+ </span>
118
177
  <strong>Koyeb</strong>
119
178
  </a>
120
179
  <a class="deployment-target" href="/docs/render">
121
- <span class="deployment-target-mark text-mark">R</span>
180
+ <span class="deployment-target-mark">
181
+ <img
182
+ class="deployment-target-logo deployment-target-logo-light"
183
+ src="/integration-logos/render.svg"
184
+ alt=""
185
+ />
186
+ <img
187
+ class="deployment-target-logo deployment-target-logo-dark"
188
+ src="/integration-logos/render-white.svg"
189
+ alt=""
190
+ aria-hidden="true"
191
+ />
192
+ </span>
122
193
  <strong>Render</strong>
123
194
  </a>
124
195
  </div>
@@ -151,16 +222,20 @@ contract stay the same.
151
222
  place-items: center;
152
223
  flex: 0 0 auto;
153
224
  }
154
- .deployment-target-mark img {
225
+ .deployment-target-logo {
226
+ display: block;
155
227
  width: 26px;
156
228
  height: 26px;
157
229
  object-fit: contain;
158
230
  }
159
- .deployment-target-mark.text-mark {
160
- border-radius: 7px;
161
- background: hsl(var(--muted));
162
- font-size: 12px;
163
- font-weight: 700;
231
+ .deployment-target-logo-dark {
232
+ display: none;
233
+ }
234
+ [data-theme="dark"] .deployment-target-logo-light {
235
+ display: none;
236
+ }
237
+ [data-theme="dark"] .deployment-target-logo-dark {
238
+ display: block;
164
239
  }
165
240
  @media (max-width: 640px) {
166
241
  .deployment-target-grid {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.165.2",
3
+ "version": "0.165.3",
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": {