@agent-native/core 0.154.4 → 0.155.0
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/templates/analytics/.agents/skills/account-health/SKILL.md +76 -0
- package/corpus/templates/analytics/.agents/skills/bigquery/SKILL.md +3 -0
- package/corpus/templates/analytics/.agents/skills/cross-source-analysis/SKILL.md +2 -1
- package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +6 -5
- package/corpus/templates/analytics/AGENTS.md +3 -0
- package/corpus/templates/analytics/actions/account-deep-dive.ts +3 -2
- package/corpus/templates/analytics/actions/bigquery.ts +1 -1
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +4 -1
- package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +1 -0
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyCombobox.tsx +12 -4
- package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyValueCombobox.tsx +5 -2
- package/corpus/templates/analytics/app/pages/adhoc/explorer/property-label.ts +32 -0
- package/corpus/templates/analytics/changelog/2026-08-13-account-health-readouts-verify-customer-scope-and-contract-metrics.md +7 -0
- package/corpus/templates/analytics/server/jobs/analytics-bigquery-backfill.ts +43 -17
- package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +17 -0
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +4 -0
- package/corpus/templates/calendar/AGENTS.md +2 -0
- package/corpus/templates/calendar/DEVELOPING.md +4 -4
- package/corpus/templates/calendar/actions/get-settings.ts +4 -11
- package/corpus/templates/calendar/actions/update-availability.ts +15 -4
- package/corpus/templates/calendar/actions/update-settings.ts +15 -4
- package/corpus/templates/calendar/app/components/booking/DatePicker.tsx +9 -3
- package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +21 -19
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +9 -6
- package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +25 -3
- package/corpus/templates/calendar/app/components/calendar/InlineEventPickers.tsx +10 -3
- package/corpus/templates/calendar/app/components/calendar/MonthView.tsx +9 -9
- package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +11 -3
- package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +10 -4
- package/corpus/templates/calendar/app/i18n-data.ts +30 -0
- package/corpus/templates/calendar/app/lib/availability-schedule.ts +53 -0
- package/corpus/templates/calendar/app/lib/event-form-utils.ts +5 -0
- package/corpus/templates/calendar/app/pages/AvailabilitySettings.tsx +90 -28
- package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +135 -61
- package/corpus/templates/calendar/app/pages/BookingPage.tsx +2 -0
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +30 -15
- package/corpus/templates/calendar/app/pages/Settings.tsx +60 -1
- package/corpus/templates/calendar/changelog/2026-08-13-find-a-time-now-closes-from-a-clear-header-action.md +6 -0
- package/corpus/templates/calendar/server/handlers/bookings.ts +2 -1
- package/corpus/templates/calendar/server/handlers/settings.ts +12 -16
- package/corpus/templates/calendar/shared/api.ts +1 -0
- package/corpus/templates/calendar/shared/availability-schedule.ts +64 -0
- package/corpus/templates/calendar/shared/calendar-week.ts +21 -0
- package/corpus/templates/calendar/shared/settings.ts +44 -0
- package/corpus/templates/clips/AGENTS.md +2 -0
- package/corpus/templates/clips/actions/add-comment.ts +5 -2
- package/corpus/templates/clips/actions/finalize-recording.ts +31 -1
- package/corpus/templates/clips/actions/get-recording-player-data.ts +9 -0
- package/corpus/templates/clips/actions/lib/ensure-seekable-video.ts +21 -1
- package/corpus/templates/clips/actions/reply-to-comment.ts +5 -2
- package/corpus/templates/clips/actions/update-comment.ts +9 -2
- package/corpus/templates/clips/app/components/library/search-bar.tsx +26 -13
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +135 -3
- package/corpus/templates/clips/app/components/player/comments-panel.tsx +5 -99
- package/corpus/templates/clips/app/components/player/playback-comment-overlay.tsx +7 -3
- package/corpus/templates/clips/app/components/player/video-player.tsx +84 -24
- package/corpus/templates/clips/app/components/workspace/notifications-list.tsx +11 -3
- package/corpus/templates/clips/app/i18n/en-US.ts +12 -0
- package/corpus/templates/clips/app/lib/public-meeting.ts +11 -3
- package/corpus/templates/clips/app/lib/search-focus.ts +15 -0
- package/corpus/templates/clips/app/root.tsx +2 -1
- package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +94 -26
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +24 -7
- package/corpus/templates/clips/app/routes/embed.$shareId.tsx +8 -4
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +14 -7
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +8 -4
- package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +72 -26
- package/corpus/templates/clips/changelog/2026-08-13-inline-markdown-comments.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-13-private-meeting-agent-links.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +116 -19
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +13 -29
- package/corpus/templates/clips/desktop/src/lib/recording-request.ts +39 -0
- package/corpus/templates/clips/desktop/src/lib/settings-navigation.ts +11 -0
- package/corpus/templates/clips/desktop/src/lib/whisper-model-picker.ts +7 -0
- package/corpus/templates/clips/desktop/src/styles.css +117 -0
- package/corpus/templates/clips/server/db/index.ts +10 -0
- package/corpus/templates/clips/server/db/schema.ts +1 -0
- package/corpus/templates/clips/server/lib/recordings.ts +3 -1
- package/corpus/templates/clips/server/lib/seekable-media-state.ts +90 -0
- package/corpus/templates/clips/server/plugins/db.ts +5 -0
- package/corpus/templates/clips/server/routes/api/public-meeting.get.ts +37 -4
- package/corpus/templates/clips/server/routes/api/public-recording.get.ts +16 -5
- package/corpus/templates/clips/shared/clips-ai-prefs.ts +3 -0
- package/corpus/templates/clips/shared/meeting-agent-access.ts +5 -0
- package/corpus/templates/content/.agents/skills/content/SKILL.md +2 -2
- package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +20 -4
- package/corpus/templates/content/actions/_database-row-mutation.ts +1490 -0
- package/corpus/templates/content/actions/_database-utils.ts +44 -0
- package/corpus/templates/content/actions/_property-utils.ts +4 -1
- package/corpus/templates/content/actions/add-comment.ts +2 -1
- package/corpus/templates/content/actions/add-database-item.ts +62 -240
- package/corpus/templates/content/actions/configure-document-property.ts +165 -1
- package/corpus/templates/content/actions/delete-document-property.ts +18 -0
- package/corpus/templates/content/actions/set-document-property.ts +78 -1
- package/corpus/templates/content/actions/update-comment.ts +1 -1
- package/corpus/templates/content/actions/update-database-item.ts +62 -0
- package/corpus/templates/content/actions/upsert-database-item-by-key.ts +43 -796
- package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +24 -15
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +10 -8
- package/corpus/templates/content/app/hooks/use-content-database.ts +33 -32
- package/corpus/templates/content/changelog/2026-08-10-database-row-actions-now-validate-exact-schemas-and-safe-ret.md +6 -0
- package/corpus/templates/content/parity/matrix.md +1 -1
- package/corpus/templates/content/parity/matrix.ts +2 -0
- package/corpus/templates/content/server/db/schema.ts +39 -3
- package/corpus/templates/content/server/plugins/db.ts +30 -0
- package/corpus/templates/content/shared/api.ts +75 -2
- package/corpus/templates/design/actions/generate-design.ts +10 -7
- package/corpus/templates/design/actions/present-design-variants.ts +35 -6
- package/corpus/templates/design/actions/run-design-audit.ts +33 -0
- package/corpus/templates/design/changelog/2026-08-13-the-design-audit-now-catches-a-screen-that-renders-behind-an.md +6 -0
- package/corpus/templates/design/shared/design-review.ts +1 -0
- package/corpus/templates/design/shared/html-integrity.ts +66 -0
- package/corpus/templates/dispatch/.env.example +5 -0
- package/corpus/templates/dispatch/AGENTS.md +24 -19
- package/corpus/templates/dispatch/app/i18n-data.ts +20 -0
- package/corpus/templates/dispatch/server/lib/identity-sso.ts +21 -90
- package/corpus/templates/dispatch/server/plugins/identity-sso.ts +3 -12
- package/corpus/templates/dispatch/shared/feature-flags.ts +4 -0
- package/corpus/templates/factory/AGENTS.md +5 -1
- package/corpus/templates/factory/README.md +23 -0
- package/corpus/templates/factory/actions/view-screen.ts +17 -0
- package/corpus/templates/factory/app/components/factory/FactoryAgentsView.tsx +239 -0
- package/corpus/templates/factory/app/components/factory/FactoryCanvas.tsx +2 -0
- package/corpus/templates/factory/app/components/factory/FactoryInspector.tsx +130 -7
- package/corpus/templates/factory/app/i18n/en-US.ts +20 -0
- package/corpus/templates/factory/app/routes/factory.tsx +41 -0
- package/corpus/templates/factory/package.json +1 -0
- package/corpus/templates/factory/server/factory-graph/contracts.ts +2 -0
- package/corpus/templates/factory/server/plugins/agent-chat.ts +9 -0
- package/corpus/templates/factory/server/plugins/dispatch-db.ts +1 -0
- package/corpus/templates/factory/server/plugins/setup-dispatch.ts +3 -0
- package/corpus/templates/mail/app/lib/native-mcp-exclusions.ts +3 -0
- package/corpus/templates/mail/vite.config.ts +7 -0
- package/corpus/templates/plan/actions/reply-to-plan-comment.ts +7 -2
- package/corpus/templates/plan/actions/resolve-plan-comment.ts +2 -2
- package/corpus/templates/plan/actions/update-visual-plan.ts +1 -1
- package/corpus/templates/plan/app/pages/PlansPage.tsx +29 -20
- package/corpus/templates/slides/actions/add-slide-comment.ts +1 -1
- package/corpus/templates/slides/actions/update-slide-comment.ts +1 -1
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +9 -6
- package/dist/action.d.ts +22 -0
- package/dist/action.js +27 -0
- package/dist/agent/production-agent.js +5 -1
- package/dist/agent/thread-data-builder.js +17 -1
- package/dist/cli/skills-content/help.js +6 -4
- package/dist/cli/skills.js +17 -2
- package/dist/cli/workspacify.d.ts +5 -0
- package/dist/cli/workspacify.js +65 -8
- package/dist/client/AgentPanel.d.ts +5 -0
- package/dist/client/AgentPanel.js +20 -4
- package/dist/client/AssistantChat.d.ts +21 -0
- package/dist/client/AssistantChat.js +66 -68
- package/dist/client/active-run-state.d.ts +14 -1
- package/dist/client/active-run-state.js +0 -0
- package/dist/client/agent-chat-adapter.js +107 -5
- package/dist/client/analytics.js +9 -2
- package/dist/client/chat/tool-call-display.js +4 -4
- package/dist/client/chat-first/apps-rail.js +9 -4
- package/dist/client/chat-first/primary-nav.d.ts +2 -1
- package/dist/client/chat-first/primary-nav.js +3 -3
- package/dist/client/chat-first/types.d.ts +5 -1
- package/dist/client/markdown/InlineMarkdown.d.ts +23 -0
- package/dist/client/markdown/InlineMarkdown.js +65 -0
- package/dist/client/markdown/index.d.ts +1 -0
- package/dist/client/markdown/index.js +1 -0
- package/dist/client/review/ReviewThreadPanel.js +2 -1
- package/dist/client/run-stream-ownership.d.ts +39 -0
- package/dist/client/run-stream-ownership.js +65 -0
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/feature-flags/index.d.ts +1 -1
- package/dist/feature-flags/index.js +1 -1
- package/dist/feature-flags/store.d.ts +10 -0
- package/dist/feature-flags/store.js +112 -1
- package/dist/guards/no-env-credentials.js +4 -0
- package/dist/index.browser.d.ts +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/integrations/adapters/slack.js +5 -1
- package/dist/localization/default-messages.d.ts +1 -0
- package/dist/localization/default-messages.js +1 -0
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +1 -1
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +11 -11
- package/dist/provider-api/actions/provider-api.d.ts +15 -15
- package/dist/resources/agents.js +40 -5
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/resources/metadata.d.ts +10 -0
- package/dist/resources/metadata.js +7 -3
- package/dist/review/actions/create-review-comment.js +1 -1
- package/dist/review/actions/reply-review-comment.js +1 -1
- package/dist/review/actions/resolve-review-thread.js +1 -1
- package/dist/server/action-routes.js +42 -8
- package/dist/server/agent-discovery.js +14 -3
- package/dist/server/core-routes-plugin.js +1 -1
- package/dist/server/identity-sso-migrations.d.ts +7 -0
- package/dist/server/identity-sso-migrations.js +36 -0
- package/dist/server/identity-sso-store.d.ts +3 -2
- package/dist/server/identity-sso-store.js +8 -3
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/release-migrations.js +4 -0
- package/dist/tracking/providers.js +13 -3
- package/dist/workspace-files/tool.js +1 -1
- package/package.json +3 -2
|
@@ -226,7 +226,10 @@ export default defineAction({
|
|
|
226
226
|
database.id,
|
|
227
227
|
);
|
|
228
228
|
const [lockedDatabase] = await tx
|
|
229
|
-
.select({
|
|
229
|
+
.select({
|
|
230
|
+
id: schema.contentDatabases.id,
|
|
231
|
+
naturalKeyPropertyId: schema.contentDatabases.naturalKeyPropertyId,
|
|
232
|
+
})
|
|
230
233
|
.from(schema.contentDatabases)
|
|
231
234
|
.where(
|
|
232
235
|
and(
|
|
@@ -272,6 +275,41 @@ export default defineAction({
|
|
|
272
275
|
if (isComputedPropertyType(lockedType)) {
|
|
273
276
|
throw new Error("Computed properties cannot be edited.");
|
|
274
277
|
}
|
|
278
|
+
const isNaturalKey = lockedDatabase.naturalKeyPropertyId === propertyId;
|
|
279
|
+
if (isNaturalKey) {
|
|
280
|
+
let parsed: unknown;
|
|
281
|
+
try {
|
|
282
|
+
parsed = JSON.parse(valueJson);
|
|
283
|
+
} catch {
|
|
284
|
+
parsed = null;
|
|
285
|
+
}
|
|
286
|
+
if (typeof parsed !== "string" || !parsed.trim()) {
|
|
287
|
+
throw new Error(
|
|
288
|
+
"A database natural key must remain a non-empty string.",
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
const [existingNaturalKeyClaim] = await tx
|
|
292
|
+
.select({
|
|
293
|
+
keyValueJson: schema.contentDatabaseItemKeyClaims.keyValueJson,
|
|
294
|
+
})
|
|
295
|
+
.from(schema.contentDatabaseItemKeyClaims)
|
|
296
|
+
.where(
|
|
297
|
+
and(
|
|
298
|
+
eq(schema.contentDatabaseItemKeyClaims.databaseId, database.id),
|
|
299
|
+
eq(schema.contentDatabaseItemKeyClaims.propertyId, propertyId),
|
|
300
|
+
eq(schema.contentDatabaseItemKeyClaims.documentId, documentId),
|
|
301
|
+
),
|
|
302
|
+
)
|
|
303
|
+
.limit(1);
|
|
304
|
+
if (
|
|
305
|
+
existingNaturalKeyClaim &&
|
|
306
|
+
existingNaturalKeyClaim.keyValueJson !== valueJson
|
|
307
|
+
) {
|
|
308
|
+
throw new Error(
|
|
309
|
+
"A claimed database natural key cannot be changed. Create a new row instead.",
|
|
310
|
+
);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
275
313
|
const [conflictingClaim] = await tx
|
|
276
314
|
.select({ id: schema.contentDatabaseItemKeyClaims.id })
|
|
277
315
|
.from(schema.contentDatabaseItemKeyClaims)
|
|
@@ -314,6 +352,45 @@ export default defineAction({
|
|
|
314
352
|
updatedAt: now,
|
|
315
353
|
});
|
|
316
354
|
}
|
|
355
|
+
if (isNaturalKey) {
|
|
356
|
+
await tx
|
|
357
|
+
.insert(schema.contentDatabaseItemKeyClaims)
|
|
358
|
+
.values({
|
|
359
|
+
id: nanoid(),
|
|
360
|
+
ownerEmail: database.ownerEmail,
|
|
361
|
+
orgId: database.orgId,
|
|
362
|
+
databaseId: database.id,
|
|
363
|
+
propertyId,
|
|
364
|
+
keyValueJson: valueJson,
|
|
365
|
+
itemId: membership.id,
|
|
366
|
+
documentId,
|
|
367
|
+
createdAt: now,
|
|
368
|
+
updatedAt: now,
|
|
369
|
+
})
|
|
370
|
+
.onConflictDoNothing();
|
|
371
|
+
const [claim] = await tx
|
|
372
|
+
.select({
|
|
373
|
+
itemId: schema.contentDatabaseItemKeyClaims.itemId,
|
|
374
|
+
documentId: schema.contentDatabaseItemKeyClaims.documentId,
|
|
375
|
+
})
|
|
376
|
+
.from(schema.contentDatabaseItemKeyClaims)
|
|
377
|
+
.where(
|
|
378
|
+
and(
|
|
379
|
+
eq(schema.contentDatabaseItemKeyClaims.databaseId, database.id),
|
|
380
|
+
eq(schema.contentDatabaseItemKeyClaims.propertyId, propertyId),
|
|
381
|
+
eq(schema.contentDatabaseItemKeyClaims.keyValueJson, valueJson),
|
|
382
|
+
),
|
|
383
|
+
);
|
|
384
|
+
if (
|
|
385
|
+
!claim ||
|
|
386
|
+
claim.itemId !== membership.id ||
|
|
387
|
+
claim.documentId !== documentId
|
|
388
|
+
) {
|
|
389
|
+
throw new Error(
|
|
390
|
+
"This natural key is already claimed by another database row.",
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
317
394
|
await tx
|
|
318
395
|
.delete(schema.contentDatabaseItemKeyClaims)
|
|
319
396
|
.where(
|
|
@@ -9,7 +9,7 @@ import { getDb, schema } from "../server/db/index.js";
|
|
|
9
9
|
|
|
10
10
|
export default defineAction({
|
|
11
11
|
description:
|
|
12
|
-
"Update a document comment. Resolving or reopening a comment applies to the full thread.",
|
|
12
|
+
"Update a document comment. Comment text supports inline Markdown without headings. Resolving or reopening a comment applies to the full thread.",
|
|
13
13
|
schema: z.object({
|
|
14
14
|
id: z.string().describe("Comment ID"),
|
|
15
15
|
documentId: z.string().optional().describe("Document ID"),
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { buildDeepLink } from "@agent-native/core/server";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
import type { ContentDatabaseRowMutationResult } from "../shared/api.js";
|
|
6
|
+
import {
|
|
7
|
+
databaseMutationEnvelopeSchema,
|
|
8
|
+
updateDatabaseRow,
|
|
9
|
+
} from "./_database-row-mutation.js";
|
|
10
|
+
|
|
11
|
+
const schema = databaseMutationEnvelopeSchema.extend({
|
|
12
|
+
itemId: z.string().min(1).describe("Exact database membership row ID"),
|
|
13
|
+
documentId: z.string().min(1).describe("Exact row page ID"),
|
|
14
|
+
expectedRowRevision: z
|
|
15
|
+
.string()
|
|
16
|
+
.min(1)
|
|
17
|
+
.describe("Row revision returned by get-content-database"),
|
|
18
|
+
title: z.string().trim().min(1).max(500).optional(),
|
|
19
|
+
propertyValues: z
|
|
20
|
+
.record(z.string(), z.unknown())
|
|
21
|
+
.optional()
|
|
22
|
+
.describe(
|
|
23
|
+
"Sparse strict patch keyed by property definition ID; omitted fields are preserved and explicit null clears a value",
|
|
24
|
+
),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export default defineAction({
|
|
28
|
+
description:
|
|
29
|
+
"Sparsely update one exact Content database row by stable item and document IDs. Requires schema and row revisions, validates every non-Blocks property, and returns a verified idempotent receipt.",
|
|
30
|
+
schema,
|
|
31
|
+
http: { method: "PUT" },
|
|
32
|
+
audit: {
|
|
33
|
+
recordInputs: false,
|
|
34
|
+
target: (args) => ({
|
|
35
|
+
type: "document",
|
|
36
|
+
id: args.documentId,
|
|
37
|
+
visibility: "private",
|
|
38
|
+
}),
|
|
39
|
+
summary: (_args, result) => {
|
|
40
|
+
const receipt = (result as ContentDatabaseRowMutationResult | null)
|
|
41
|
+
?.receipt;
|
|
42
|
+
return receipt
|
|
43
|
+
? `${receipt.outcome === "unchanged" ? "Checked" : "Updated"} Content database row ${receipt.row.itemId}`
|
|
44
|
+
: "Updated Content database row";
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
run: updateDatabaseRow,
|
|
48
|
+
link: ({ result }) => {
|
|
49
|
+
const documentId = (result as ContentDatabaseRowMutationResult | null)
|
|
50
|
+
?.receipt.row.documentId;
|
|
51
|
+
if (!documentId) return null;
|
|
52
|
+
return {
|
|
53
|
+
url: buildDeepLink({
|
|
54
|
+
app: "content",
|
|
55
|
+
view: "editor",
|
|
56
|
+
params: { documentId },
|
|
57
|
+
}),
|
|
58
|
+
label: "Open database row",
|
|
59
|
+
view: "editor",
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
});
|