@agent-native/core 0.134.0 → 0.134.1
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/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +6 -0
- package/corpus/core/docs/content/template-content-developers.mdx +1 -1
- package/corpus/core/package.json +1 -1
- package/corpus/templates/clips/changelog/2026-07-29-meeting-notes-no-longer-transcribe-the-other-side-twice-when.md +6 -0
- package/corpus/templates/clips/desktop/src/hooks/useMeetingTranscription.ts +37 -48
- package/corpus/templates/clips/desktop/src/lib/transcription-capture.ts +7 -5
- package/corpus/templates/clips/desktop/src/lib/transcription-engine.ts +182 -106
- package/corpus/templates/clips/desktop/src/overlays/live-transcript.tsx +43 -14
- package/corpus/templates/clips/desktop/src/overlays/recording-pill.tsx +3 -3
- package/corpus/templates/clips/desktop/src-tauri/src/echo_guard.rs +443 -0
- package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +1 -0
- package/corpus/templates/clips/desktop/src-tauri/src/whisper_speech.rs +125 -16
- package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +6 -4
- package/corpus/templates/content/actions/_database-membership-lock.ts +25 -0
- package/corpus/templates/content/actions/_database-row-batch.ts +6 -2
- package/corpus/templates/content/actions/_database-source-utils.ts +289 -129
- package/corpus/templates/content/actions/_database-utils.ts +12 -3
- package/corpus/templates/content/actions/add-content-database-source-field-property.ts +39 -21
- package/corpus/templates/content/actions/attach-content-database-source.ts +4 -1
- package/corpus/templates/content/actions/change-content-database-source-role.ts +3 -5
- package/corpus/templates/content/actions/duplicate-document-property.ts +59 -46
- package/corpus/templates/content/actions/execute-builder-source-execution.ts +77 -71
- package/corpus/templates/content/actions/materialize-builder-required-fields.ts +7 -0
- package/corpus/templates/content/actions/remove-database-items.ts +183 -0
- package/corpus/templates/content/actions/set-document-property.ts +57 -39
- package/corpus/templates/content/actions/sync-local-folder-source.ts +7 -0
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +471 -329
- package/corpus/templates/content/app/components/editor/database/row-access.ts +45 -0
- package/corpus/templates/content/app/components/editor/database/shared.tsx +141 -38
- package/corpus/templates/content/app/hooks/use-content-database.ts +2 -2
- package/corpus/templates/content/app/i18n-data.ts +130 -0
- package/corpus/templates/content/changelog/2026-07-30-database-rows-can-now-be-removed-without-deleting-their-page.md +6 -0
- package/corpus/templates/content/parity/eval-scenarios.ts +2 -2
- package/corpus/templates/content/parity/matrix.md +1 -1
- package/corpus/templates/content/parity/matrix.ts +4 -5
- package/corpus/templates/content/shared/api.ts +4 -0
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +26 -11
- package/corpus/templates/design/actions/take-design-screenshot.ts +7 -0
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +11 -3
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +4 -1
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +54 -17
- package/corpus/templates/design/app/components/design/design-canvas/local-runtime.ts +126 -0
- package/corpus/templates/design/app/components/templates/TemplatePreview.tsx +2 -0
- package/corpus/templates/design/app/pages/Index.tsx +3 -1
- package/corpus/templates/design/app/pages/Present.tsx +2 -1
- package/corpus/templates/design/changelog/2026-07-30-a-broken-inline-script-in-a-generated-screen-is-now-caught-o.md +6 -0
- package/corpus/templates/design/changelog/2026-07-30-design-html-is-now-validated-with-a-spec-grade-html-parser-i.md +6 -0
- package/corpus/templates/design/changelog/2026-07-30-designs-now-load-their-tailwind-and-alpine-runtimes-from-the.md +6 -0
- package/corpus/templates/design/changelog/2026-07-30-designs-with-a-broken-alpine-expression-are-now-caught-on-sa.md +6 -0
- package/corpus/templates/design/changelog/2026-07-30-editing-a-design-no-longer-strips-its-styling-the-canvas-kep.md +6 -0
- package/corpus/templates/design/package.json +4 -0
- package/corpus/templates/design/shared/html-integrity.ts +802 -556
- package/dist/notifications/routes.d.ts +3 -3
- package/docs/content/template-content-developers.mdx +1 -1
- package/package.json +1 -1
- package/corpus/templates/content/actions/delete-database-items.ts +0 -89
|
@@ -13,13 +13,12 @@ import {
|
|
|
13
13
|
type DocumentPropertyType,
|
|
14
14
|
} from "../shared/properties.js";
|
|
15
15
|
import { resolveContentDocumentAccess } from "./_content-document-access.js";
|
|
16
|
+
import { lockDatabaseMemberships } from "./_database-membership-lock.js";
|
|
16
17
|
import {
|
|
17
18
|
getDatabaseById,
|
|
18
19
|
listPropertiesForDatabaseDocuments,
|
|
19
20
|
nanoid,
|
|
20
21
|
normalizedValueJson,
|
|
21
|
-
writeBlockFieldContent,
|
|
22
|
-
writePrimaryBlocksContent,
|
|
23
22
|
} from "./_property-utils.js";
|
|
24
23
|
|
|
25
24
|
export default defineAction({
|
|
@@ -84,17 +83,34 @@ export default defineAction({
|
|
|
84
83
|
const target = blocksStorageTarget(
|
|
85
84
|
parsePropertyOptions(definition.optionsJson),
|
|
86
85
|
);
|
|
87
|
-
|
|
88
|
-
await
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
await db.transaction(async (tx) => {
|
|
87
|
+
await lockDatabaseMemberships(tx, [membership.id]);
|
|
88
|
+
if (target === "document_body") {
|
|
89
|
+
await tx
|
|
90
|
+
.update(schema.documents)
|
|
91
|
+
.set({ content, updatedAt: now })
|
|
92
|
+
.where(eq(schema.documents.id, documentId));
|
|
93
|
+
} else {
|
|
94
|
+
await tx
|
|
95
|
+
.insert(schema.documentBlockFieldContents)
|
|
96
|
+
.values({
|
|
97
|
+
id: nanoid(),
|
|
98
|
+
ownerEmail: database.ownerEmail,
|
|
99
|
+
documentId,
|
|
100
|
+
propertyId,
|
|
101
|
+
content,
|
|
102
|
+
createdAt: now,
|
|
103
|
+
updatedAt: now,
|
|
104
|
+
})
|
|
105
|
+
.onConflictDoUpdate({
|
|
106
|
+
target: [
|
|
107
|
+
schema.documentBlockFieldContents.documentId,
|
|
108
|
+
schema.documentBlockFieldContents.propertyId,
|
|
109
|
+
],
|
|
110
|
+
set: { content, updatedAt: now },
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
});
|
|
98
114
|
return {
|
|
99
115
|
documentId,
|
|
100
116
|
databaseId: database.id,
|
|
@@ -113,32 +129,34 @@ export default defineAction({
|
|
|
113
129
|
}
|
|
114
130
|
|
|
115
131
|
const valueJson = normalizedValueJson(type, value);
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
132
|
+
await db.transaction(async (tx) => {
|
|
133
|
+
await lockDatabaseMemberships(tx, [membership.id]);
|
|
134
|
+
const [existing] = await tx
|
|
135
|
+
.select({ id: schema.documentPropertyValues.id })
|
|
136
|
+
.from(schema.documentPropertyValues)
|
|
137
|
+
.where(
|
|
138
|
+
and(
|
|
139
|
+
eq(schema.documentPropertyValues.documentId, documentId),
|
|
140
|
+
eq(schema.documentPropertyValues.propertyId, propertyId),
|
|
141
|
+
),
|
|
142
|
+
);
|
|
143
|
+
if (existing) {
|
|
144
|
+
await tx
|
|
145
|
+
.update(schema.documentPropertyValues)
|
|
146
|
+
.set({ valueJson, updatedAt: now })
|
|
147
|
+
.where(eq(schema.documentPropertyValues.id, existing.id));
|
|
148
|
+
} else {
|
|
149
|
+
await tx.insert(schema.documentPropertyValues).values({
|
|
150
|
+
id: nanoid(),
|
|
151
|
+
ownerEmail: database.ownerEmail,
|
|
152
|
+
documentId,
|
|
153
|
+
propertyId,
|
|
154
|
+
valueJson,
|
|
155
|
+
createdAt: now,
|
|
156
|
+
updatedAt: now,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
});
|
|
142
160
|
|
|
143
161
|
return {
|
|
144
162
|
documentId,
|
|
@@ -18,6 +18,7 @@ import { setFavoriteMembership } from "./_content-favorites.js";
|
|
|
18
18
|
import { ensureDocumentsFilesMembership } from "./_content-files.js";
|
|
19
19
|
import { resolveContentSpaceAccess } from "./_content-space-access.js";
|
|
20
20
|
import { provisionContentSpaces } from "./_content-spaces.js";
|
|
21
|
+
import { lockDatabaseMemberships } from "./_database-membership-lock.js";
|
|
21
22
|
import { LOCAL_FOLDER_SOURCE_TYPE } from "./_local-folder-source.js";
|
|
22
23
|
|
|
23
24
|
const MAX_SOURCE_FILES = 500;
|
|
@@ -616,6 +617,12 @@ export default defineAction({
|
|
|
616
617
|
[item.documentId, item] as const,
|
|
617
618
|
),
|
|
618
619
|
);
|
|
620
|
+
await lockDatabaseMemberships(
|
|
621
|
+
tx,
|
|
622
|
+
filesItems.map(
|
|
623
|
+
(item: typeof schema.contentDatabaseItems.$inferSelect) => item.id,
|
|
624
|
+
),
|
|
625
|
+
);
|
|
619
626
|
for (const plan of plans.filter((candidate) => !candidate.conflict)) {
|
|
620
627
|
if (plan.keepContent) continue;
|
|
621
628
|
const item = itemByDocumentId.get(plan.id);
|