@agent-native/core 0.149.4 → 0.149.5

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/README.md +1 -1
  2. package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +23 -4
  3. package/corpus/templates/slides/actions/get-deck.ts +25 -9
  4. package/corpus/templates/slides/actions/patch-deck.ts +51 -0
  5. package/corpus/templates/slides/actions/update-slide.ts +144 -14
  6. package/corpus/templates/slides/app/lib/create-deck-generation.ts +12 -4
  7. package/corpus/templates/slides/changelog/2026-08-11-pdf-requests-to-restyle-and-preserve-a-source-deck-now-impor.md +6 -0
  8. package/corpus/templates/slides/changelog/2026-08-11-slide-edits-preserve-their-layout-without-introducing-hidden.md +6 -0
  9. package/corpus/templates/slides/changelog/2026-08-11-slides-reliably-imports-uploaded-pdfs-and-presentations.md +6 -0
  10. package/corpus/templates/slides/changelog/2026-08-11-slides-support-atomic-code-style-html-patches-without-regene.md +6 -0
  11. package/corpus/templates/slides/package.json +1 -0
  12. package/corpus/templates/slides/server/lib/slide-content-patch.ts +355 -0
  13. package/corpus/templates/slides/server/lib/uploaded-reference-storage.ts +28 -9
  14. package/corpus/templates/slides/server/plugins/agent-chat.ts +12 -3
  15. package/dist/cli/create.js +49 -0
  16. package/dist/client/chat-first/index.d.ts +1 -1
  17. package/dist/client/chat-first/index.js +1 -1
  18. package/dist/client/chat-first/primary-nav.d.ts +3 -1
  19. package/dist/client/chat-first/primary-nav.js +8 -2
  20. package/dist/collab/awareness.d.ts +2 -2
  21. package/dist/collab/struct-routes.d.ts +1 -1
  22. package/dist/notifications/routes.d.ts +3 -3
  23. package/dist/private-blob/registry.js +67 -4
  24. package/dist/secrets/routes.d.ts +9 -9
  25. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  26. package/dist/templates/default/pnpm-workspace.yaml +44 -0
  27. package/dist/templates/workspace-root/pnpm-workspace.yaml +44 -0
  28. package/package.json +1 -1
  29. package/src/templates/default/pnpm-workspace.yaml +44 -0
  30. package/src/templates/workspace-root/pnpm-workspace.yaml +44 -0
@@ -2,6 +2,7 @@ import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
2
2
  import { uploadFile } from "../file-upload/index.js";
3
3
  import { decryptSecretValue, encryptSecretValue, getSecretEncryptionKey, } from "../secrets/crypto.js";
4
4
  const PUBLIC_UPLOAD_HANDLE_PREFIX = "public-upload:v1:";
5
+ const PUBLIC_UPLOAD_READ_RETRY_DELAYS_MS = [100, 250, 500];
5
6
  const globals = globalThis;
6
7
  const providers = (globals.__agentNativePrivateBlobProviders ??= new Map());
7
8
  const publicUploadFallbackRef = (globals.__agentNativePrivateBlobPublicUploadFallback ??= {
@@ -47,6 +48,16 @@ function decodePublicUploadDescriptor(id) {
47
48
  function isPublicUploadFallbackHandle(handle) {
48
49
  return handle.id.startsWith(PUBLIC_UPLOAD_HANDLE_PREFIX);
49
50
  }
51
+ function isRetryablePublicUploadStatus(status) {
52
+ return (status === 404 ||
53
+ status === 408 ||
54
+ status === 425 ||
55
+ status === 429 ||
56
+ (status >= 500 && status <= 599));
57
+ }
58
+ function waitForPublicUploadRetry(delayMs) {
59
+ return new Promise((resolve) => setTimeout(resolve, delayMs));
60
+ }
50
61
  async function putViaEncryptedPublicUpload(input) {
51
62
  const bytes = toBytes(input.data);
52
63
  const encrypted = encryptBytes(bytes);
@@ -71,7 +82,7 @@ async function putViaEncryptedPublicUpload(input) {
71
82
  size: bytes.byteLength,
72
83
  createdAt: new Date().toISOString(),
73
84
  };
74
- return {
85
+ const handle = {
75
86
  id: encodePublicUploadDescriptor(descriptor),
76
87
  provider: `public-upload:${uploaded.provider}`,
77
88
  opaque: true,
@@ -81,12 +92,64 @@ async function putViaEncryptedPublicUpload(input) {
81
92
  createdAt: descriptor.createdAt,
82
93
  metadata: input.metadata,
83
94
  };
95
+ // Do not hand callers a reference that the next request cannot read yet.
96
+ // The public-upload fallback is eventually consistent at the URL boundary,
97
+ // so readiness belongs to the write path as well as the later read path.
98
+ await readViaEncryptedPublicUpload(handle);
99
+ return handle;
84
100
  }
85
101
  async function readViaEncryptedPublicUpload(handle) {
86
102
  const descriptor = decodePublicUploadDescriptor(handle.id);
87
- const response = await fetch(descriptor.url);
88
- if (!response.ok) {
89
- throw new Error(`Private blob public-upload read failed (${response.status}): ${response.statusText}`);
103
+ const startedAt = Date.now();
104
+ let response;
105
+ let attempts = 0;
106
+ for (let attempt = 0; attempt <= PUBLIC_UPLOAD_READ_RETRY_DELAYS_MS.length; attempt++) {
107
+ attempts = attempt + 1;
108
+ try {
109
+ response = await fetch(descriptor.url);
110
+ }
111
+ catch (error) {
112
+ if (attempt === PUBLIC_UPLOAD_READ_RETRY_DELAYS_MS.length) {
113
+ console.warn("[private-blob] public-upload read failed", {
114
+ attempts: attempt + 1,
115
+ elapsedMs: Date.now() - startedAt,
116
+ provider: handle.provider,
117
+ reason: "network",
118
+ });
119
+ throw new Error(`Private blob public-upload read failed: ${error instanceof Error ? error.message : "network error"}`, { cause: error });
120
+ }
121
+ await waitForPublicUploadRetry(PUBLIC_UPLOAD_READ_RETRY_DELAYS_MS[attempt]);
122
+ continue;
123
+ }
124
+ if (response.ok)
125
+ break;
126
+ if (!isRetryablePublicUploadStatus(response.status) ||
127
+ attempt === PUBLIC_UPLOAD_READ_RETRY_DELAYS_MS.length) {
128
+ console.warn("[private-blob] public-upload read failed", {
129
+ attempts: attempt + 1,
130
+ elapsedMs: Date.now() - startedAt,
131
+ provider: handle.provider,
132
+ status: response.status,
133
+ });
134
+ throw new Error(`Private blob public-upload read failed (${response.status}): ${response.statusText}`);
135
+ }
136
+ await waitForPublicUploadRetry(PUBLIC_UPLOAD_READ_RETRY_DELAYS_MS[attempt]);
137
+ }
138
+ if (!response?.ok) {
139
+ console.warn("[private-blob] public-upload read failed", {
140
+ attempts: PUBLIC_UPLOAD_READ_RETRY_DELAYS_MS.length + 1,
141
+ elapsedMs: Date.now() - startedAt,
142
+ provider: handle.provider,
143
+ reason: "no-response",
144
+ });
145
+ throw new Error("Private blob public-upload read failed without a response");
146
+ }
147
+ if (attempts > 1) {
148
+ console.info("[private-blob] public-upload read recovered after retry", {
149
+ attempts,
150
+ elapsedMs: Date.now() - startedAt,
151
+ provider: handle.provider,
152
+ });
90
153
  }
91
154
  // The uploaded ciphertext is intentionally opaque; the descriptor carries
92
155
  // auth tag + IV separately so the backing public URL is useless by itself.
@@ -34,37 +34,37 @@ export declare function createListSecretsHandler(): import("h3").EventHandlerWit
34
34
  /** POST /_agent-native/secrets/:key — write a secret. */
35
35
  export declare function createWriteSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
36
36
  error: string;
37
- status?: undefined;
38
37
  ok?: undefined;
38
+ status?: undefined;
39
39
  } | {
40
+ error?: undefined;
40
41
  ok: boolean;
41
42
  status: string;
42
- error?: undefined;
43
43
  } | {
44
+ ok?: undefined;
44
45
  error: string;
45
46
  removed?: undefined;
46
- ok?: undefined;
47
47
  } | {
48
+ error?: undefined;
48
49
  ok: boolean;
49
50
  removed: boolean;
50
- error?: undefined;
51
51
  }>>;
52
52
  /**
53
53
  * POST /_agent-native/secrets/:key/test — validate an optional candidate value
54
54
  * or the current stored value without changing anything.
55
55
  */
56
56
  export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
57
+ ok?: undefined;
57
58
  error: string;
58
59
  note?: undefined;
59
- ok?: undefined;
60
60
  } | {
61
+ error?: undefined;
61
62
  ok: boolean;
62
63
  note?: undefined;
63
- error?: undefined;
64
64
  } | {
65
+ error?: undefined;
65
66
  ok: boolean;
66
67
  note: string;
67
- error?: undefined;
68
68
  } | {
69
69
  note?: undefined;
70
70
  ok: boolean;
@@ -95,11 +95,11 @@ export interface AdHocSecretPayload {
95
95
  export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
96
96
  error: string;
97
97
  } | {
98
+ error?: undefined;
98
99
  ok: boolean;
99
100
  key: string;
100
- error?: undefined;
101
101
  } | {
102
+ error?: undefined;
102
103
  ok: boolean;
103
104
  removed: boolean;
104
- error?: undefined;
105
105
  }>>;
@@ -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;
30
31
  ok: boolean;
31
32
  key: string;
32
33
  baseUrlKey?: string;
33
34
  scope: AgentEngineApiKeyScope;
34
- error?: undefined;
35
35
  }>>;
36
36
  export {};
@@ -2,6 +2,50 @@ overrides:
2
2
  "@assistant-ui/store": ">=0.2.9 <0.2.14"
3
3
  "@assistant-ui/tap": "^0.5.14"
4
4
  nf3: "0.3.17"
5
+ # Tiptap 3.28 packages use caret ranges for their internal dependencies.
6
+ # Keep a fresh scaffold on one tested family so extension-list does not
7
+ # resolve to 3.30 alongside core 3.28 during a generated build.
8
+ "@tiptap/core": "3.28.0"
9
+ "@tiptap/extension-blockquote": "3.28.0"
10
+ "@tiptap/extension-bold": "3.28.0"
11
+ "@tiptap/extension-bubble-menu": "3.28.0"
12
+ "@tiptap/extension-bullet-list": "3.28.0"
13
+ "@tiptap/extension-code": "3.28.0"
14
+ "@tiptap/extension-code-block": "3.28.0"
15
+ "@tiptap/extension-code-block-lowlight": "3.28.0"
16
+ "@tiptap/extension-collaboration": "3.28.0"
17
+ "@tiptap/extension-collaboration-caret": "3.28.0"
18
+ "@tiptap/extension-color": "3.28.0"
19
+ "@tiptap/extension-document": "3.28.0"
20
+ "@tiptap/extension-dropcursor": "3.28.0"
21
+ "@tiptap/extension-floating-menu": "3.28.0"
22
+ "@tiptap/extension-gapcursor": "3.28.0"
23
+ "@tiptap/extension-hard-break": "3.28.0"
24
+ "@tiptap/extension-heading": "3.28.0"
25
+ "@tiptap/extension-horizontal-rule": "3.28.0"
26
+ "@tiptap/extension-image": "3.28.0"
27
+ "@tiptap/extension-italic": "3.28.0"
28
+ "@tiptap/extension-link": "3.28.0"
29
+ "@tiptap/extension-list": "3.28.0"
30
+ "@tiptap/extension-list-item": "3.28.0"
31
+ "@tiptap/extension-list-keymap": "3.28.0"
32
+ "@tiptap/extension-ordered-list": "3.28.0"
33
+ "@tiptap/extension-paragraph": "3.28.0"
34
+ "@tiptap/extension-placeholder": "3.28.0"
35
+ "@tiptap/extension-strike": "3.28.0"
36
+ "@tiptap/extension-table": "3.28.0"
37
+ "@tiptap/extension-table-cell": "3.28.0"
38
+ "@tiptap/extension-table-header": "3.28.0"
39
+ "@tiptap/extension-table-row": "3.28.0"
40
+ "@tiptap/extension-task-item": "3.28.0"
41
+ "@tiptap/extension-task-list": "3.28.0"
42
+ "@tiptap/extension-text": "3.28.0"
43
+ "@tiptap/extension-text-style": "3.28.0"
44
+ "@tiptap/extension-underline": "3.28.0"
45
+ "@tiptap/extensions": "3.28.0"
46
+ "@tiptap/pm": "3.28.0"
47
+ "@tiptap/react": "3.28.0"
48
+ "@tiptap/starter-kit": "3.28.0"
5
49
 
6
50
  allowBuilds:
7
51
  better-sqlite3: true
@@ -15,6 +15,50 @@ overrides:
15
15
  esbuild: "^0.28.1"
16
16
  srvx: "^0.12.4"
17
17
  zod: "^4.4.3"
18
+ # Tiptap 3.28 packages use caret ranges for their internal dependencies.
19
+ # Keep a fresh scaffold on one tested family: otherwise extension-list can
20
+ # resolve to 3.30 alongside core 3.28 and fail during the generated build.
21
+ "@tiptap/core": "3.28.0"
22
+ "@tiptap/extension-blockquote": "3.28.0"
23
+ "@tiptap/extension-bold": "3.28.0"
24
+ "@tiptap/extension-bubble-menu": "3.28.0"
25
+ "@tiptap/extension-bullet-list": "3.28.0"
26
+ "@tiptap/extension-code": "3.28.0"
27
+ "@tiptap/extension-code-block": "3.28.0"
28
+ "@tiptap/extension-code-block-lowlight": "3.28.0"
29
+ "@tiptap/extension-collaboration": "3.28.0"
30
+ "@tiptap/extension-collaboration-caret": "3.28.0"
31
+ "@tiptap/extension-color": "3.28.0"
32
+ "@tiptap/extension-document": "3.28.0"
33
+ "@tiptap/extension-dropcursor": "3.28.0"
34
+ "@tiptap/extension-floating-menu": "3.28.0"
35
+ "@tiptap/extension-gapcursor": "3.28.0"
36
+ "@tiptap/extension-hard-break": "3.28.0"
37
+ "@tiptap/extension-heading": "3.28.0"
38
+ "@tiptap/extension-horizontal-rule": "3.28.0"
39
+ "@tiptap/extension-image": "3.28.0"
40
+ "@tiptap/extension-italic": "3.28.0"
41
+ "@tiptap/extension-link": "3.28.0"
42
+ "@tiptap/extension-list": "3.28.0"
43
+ "@tiptap/extension-list-item": "3.28.0"
44
+ "@tiptap/extension-list-keymap": "3.28.0"
45
+ "@tiptap/extension-ordered-list": "3.28.0"
46
+ "@tiptap/extension-paragraph": "3.28.0"
47
+ "@tiptap/extension-placeholder": "3.28.0"
48
+ "@tiptap/extension-strike": "3.28.0"
49
+ "@tiptap/extension-table": "3.28.0"
50
+ "@tiptap/extension-table-cell": "3.28.0"
51
+ "@tiptap/extension-table-header": "3.28.0"
52
+ "@tiptap/extension-table-row": "3.28.0"
53
+ "@tiptap/extension-task-item": "3.28.0"
54
+ "@tiptap/extension-task-list": "3.28.0"
55
+ "@tiptap/extension-text": "3.28.0"
56
+ "@tiptap/extension-text-style": "3.28.0"
57
+ "@tiptap/extension-underline": "3.28.0"
58
+ "@tiptap/extensions": "3.28.0"
59
+ "@tiptap/pm": "3.28.0"
60
+ "@tiptap/react": "3.28.0"
61
+ "@tiptap/starter-kit": "3.28.0"
18
62
 
19
63
  onlyBuiltDependencies:
20
64
  - "@swc/core"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.149.4",
3
+ "version": "0.149.5",
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": {
@@ -2,6 +2,50 @@ overrides:
2
2
  "@assistant-ui/store": ">=0.2.9 <0.2.14"
3
3
  "@assistant-ui/tap": "^0.5.14"
4
4
  nf3: "0.3.17"
5
+ # Tiptap 3.28 packages use caret ranges for their internal dependencies.
6
+ # Keep a fresh scaffold on one tested family so extension-list does not
7
+ # resolve to 3.30 alongside core 3.28 during a generated build.
8
+ "@tiptap/core": "3.28.0"
9
+ "@tiptap/extension-blockquote": "3.28.0"
10
+ "@tiptap/extension-bold": "3.28.0"
11
+ "@tiptap/extension-bubble-menu": "3.28.0"
12
+ "@tiptap/extension-bullet-list": "3.28.0"
13
+ "@tiptap/extension-code": "3.28.0"
14
+ "@tiptap/extension-code-block": "3.28.0"
15
+ "@tiptap/extension-code-block-lowlight": "3.28.0"
16
+ "@tiptap/extension-collaboration": "3.28.0"
17
+ "@tiptap/extension-collaboration-caret": "3.28.0"
18
+ "@tiptap/extension-color": "3.28.0"
19
+ "@tiptap/extension-document": "3.28.0"
20
+ "@tiptap/extension-dropcursor": "3.28.0"
21
+ "@tiptap/extension-floating-menu": "3.28.0"
22
+ "@tiptap/extension-gapcursor": "3.28.0"
23
+ "@tiptap/extension-hard-break": "3.28.0"
24
+ "@tiptap/extension-heading": "3.28.0"
25
+ "@tiptap/extension-horizontal-rule": "3.28.0"
26
+ "@tiptap/extension-image": "3.28.0"
27
+ "@tiptap/extension-italic": "3.28.0"
28
+ "@tiptap/extension-link": "3.28.0"
29
+ "@tiptap/extension-list": "3.28.0"
30
+ "@tiptap/extension-list-item": "3.28.0"
31
+ "@tiptap/extension-list-keymap": "3.28.0"
32
+ "@tiptap/extension-ordered-list": "3.28.0"
33
+ "@tiptap/extension-paragraph": "3.28.0"
34
+ "@tiptap/extension-placeholder": "3.28.0"
35
+ "@tiptap/extension-strike": "3.28.0"
36
+ "@tiptap/extension-table": "3.28.0"
37
+ "@tiptap/extension-table-cell": "3.28.0"
38
+ "@tiptap/extension-table-header": "3.28.0"
39
+ "@tiptap/extension-table-row": "3.28.0"
40
+ "@tiptap/extension-task-item": "3.28.0"
41
+ "@tiptap/extension-task-list": "3.28.0"
42
+ "@tiptap/extension-text": "3.28.0"
43
+ "@tiptap/extension-text-style": "3.28.0"
44
+ "@tiptap/extension-underline": "3.28.0"
45
+ "@tiptap/extensions": "3.28.0"
46
+ "@tiptap/pm": "3.28.0"
47
+ "@tiptap/react": "3.28.0"
48
+ "@tiptap/starter-kit": "3.28.0"
5
49
 
6
50
  allowBuilds:
7
51
  better-sqlite3: true
@@ -15,6 +15,50 @@ overrides:
15
15
  esbuild: "^0.28.1"
16
16
  srvx: "^0.12.4"
17
17
  zod: "^4.4.3"
18
+ # Tiptap 3.28 packages use caret ranges for their internal dependencies.
19
+ # Keep a fresh scaffold on one tested family: otherwise extension-list can
20
+ # resolve to 3.30 alongside core 3.28 and fail during the generated build.
21
+ "@tiptap/core": "3.28.0"
22
+ "@tiptap/extension-blockquote": "3.28.0"
23
+ "@tiptap/extension-bold": "3.28.0"
24
+ "@tiptap/extension-bubble-menu": "3.28.0"
25
+ "@tiptap/extension-bullet-list": "3.28.0"
26
+ "@tiptap/extension-code": "3.28.0"
27
+ "@tiptap/extension-code-block": "3.28.0"
28
+ "@tiptap/extension-code-block-lowlight": "3.28.0"
29
+ "@tiptap/extension-collaboration": "3.28.0"
30
+ "@tiptap/extension-collaboration-caret": "3.28.0"
31
+ "@tiptap/extension-color": "3.28.0"
32
+ "@tiptap/extension-document": "3.28.0"
33
+ "@tiptap/extension-dropcursor": "3.28.0"
34
+ "@tiptap/extension-floating-menu": "3.28.0"
35
+ "@tiptap/extension-gapcursor": "3.28.0"
36
+ "@tiptap/extension-hard-break": "3.28.0"
37
+ "@tiptap/extension-heading": "3.28.0"
38
+ "@tiptap/extension-horizontal-rule": "3.28.0"
39
+ "@tiptap/extension-image": "3.28.0"
40
+ "@tiptap/extension-italic": "3.28.0"
41
+ "@tiptap/extension-link": "3.28.0"
42
+ "@tiptap/extension-list": "3.28.0"
43
+ "@tiptap/extension-list-item": "3.28.0"
44
+ "@tiptap/extension-list-keymap": "3.28.0"
45
+ "@tiptap/extension-ordered-list": "3.28.0"
46
+ "@tiptap/extension-paragraph": "3.28.0"
47
+ "@tiptap/extension-placeholder": "3.28.0"
48
+ "@tiptap/extension-strike": "3.28.0"
49
+ "@tiptap/extension-table": "3.28.0"
50
+ "@tiptap/extension-table-cell": "3.28.0"
51
+ "@tiptap/extension-table-header": "3.28.0"
52
+ "@tiptap/extension-table-row": "3.28.0"
53
+ "@tiptap/extension-task-item": "3.28.0"
54
+ "@tiptap/extension-task-list": "3.28.0"
55
+ "@tiptap/extension-text": "3.28.0"
56
+ "@tiptap/extension-text-style": "3.28.0"
57
+ "@tiptap/extension-underline": "3.28.0"
58
+ "@tiptap/extensions": "3.28.0"
59
+ "@tiptap/pm": "3.28.0"
60
+ "@tiptap/react": "3.28.0"
61
+ "@tiptap/starter-kit": "3.28.0"
18
62
 
19
63
  onlyBuiltDependencies:
20
64
  - "@swc/core"