@agent-native/core 0.157.3 → 0.157.4
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/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/analytics/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +40 -1
- package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/assets/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/brain/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/calendar/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +3 -1
- package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/chat/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/clips/.agents/skills/meetings/SKILL.md +7 -7
- package/corpus/templates/clips/actions/approve-recording-access-request.ts +147 -0
- package/corpus/templates/clips/actions/request-recording-access.ts +121 -23
- package/corpus/templates/clips/actions/view-screen.ts +1 -1
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +34 -53
- package/corpus/templates/clips/app/components/player/request-access-dialog.tsx +104 -0
- package/corpus/templates/clips/app/components/player/share-dialog.tsx +36 -45
- package/corpus/templates/clips/app/components/sharing/share-ui.tsx +3 -6
- package/corpus/templates/clips/app/i18n/en-US.ts +26 -1
- package/corpus/templates/clips/app/lib/public-meeting.ts +1 -1
- package/corpus/templates/clips/app/routes/access-request.approve.tsx +250 -0
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +9 -32
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +123 -37
- package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +41 -1
- package/corpus/templates/clips/server/lib/calendar-event-meetings.ts +1 -0
- package/corpus/templates/clips/server/lib/emails.ts +40 -11
- package/corpus/templates/clips/shared/recording-link.ts +32 -1
- package/corpus/templates/clips/shared/share-attribution.ts +13 -0
- package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/content/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/content/app/components/editor/DocumentBlockFields.tsx +22 -10
- package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +2 -1
- package/corpus/templates/content/app/components/editor/VisualEditor.tsx +245 -9
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +185 -134
- package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +61 -45
- package/corpus/templates/content/app/components/editor/extensions/ImageNode.ts +6 -0
- package/corpus/templates/content/app/components/editor/image-upload.ts +137 -5
- package/corpus/templates/content/app/global.css +8 -0
- package/corpus/templates/content/changelog/2026-08-12-image-uploads-now-confirm-the-image-can-be-displayed-before-.md +6 -0
- package/corpus/templates/content/changelog/2026-08-14-images-fill-the-page-width-by-default-and-remain-visible-whe.md +6 -0
- package/corpus/templates/content/changelog/2026-08-14-images-inserted-from-the-slash-command-stay-saved-after-uplo.md +6 -0
- package/corpus/templates/content/changelog/2026-08-14-svg-files-can-be-selected-reliably-from-the-image-picker.md +6 -0
- package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/crm/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/design/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/dispatch/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/factory/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/forms/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/macros/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/mail/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +6 -1
- package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/plan/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/plan/app/pages/PlansPage.tsx +25 -30
- package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/slides/.agents/skills/sharing/SKILL.md +21 -0
- package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +2 -1
- package/corpus/templates/slides/app/components/editor/ShareDialog.tsx +124 -180
- package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +1 -0
- package/corpus/templates/slides/app/global.css +99 -3
- package/corpus/templates/slides/app/i18n/en-US.ts +1 -0
- package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/tasks/.agents/skills/sharing/SKILL.md +21 -0
- package/dist/chat-threads/schema.d.ts +1 -1
- package/dist/cli/code-agent-executor.js +318 -0
- package/dist/client/AgentPanel.d.ts +13 -1
- package/dist/client/AgentPanel.js +41 -3
- package/dist/client/AssistantChat.d.ts +9 -1
- package/dist/client/AssistantChat.js +26 -13
- package/dist/client/MultiTabAssistantChat.js +18 -5
- package/dist/client/agent-chat.d.ts +8 -0
- package/dist/client/agent-chat.js +15 -0
- package/dist/client/app-chat-sidebar.d.ts +23 -0
- package/dist/client/app-chat-sidebar.js +53 -0
- package/dist/client/app-providers.js +31 -2
- package/dist/client/frame-protocol.d.ts +20 -2
- package/dist/client/hooks/index.d.ts +1 -0
- package/dist/client/hooks/index.js +1 -0
- package/dist/client/sharing/AgentShareSection.d.ts +8 -0
- package/dist/client/sharing/AgentShareSection.js +50 -0
- package/dist/client/sharing/ShareButton.js +2 -1
- package/dist/client/sharing/ShareDialog.d.ts +2 -2
- package/dist/client/sharing/ShareDialog.js +21 -29
- package/dist/client/sharing/index.d.ts +1 -0
- package/dist/client/sharing/index.js +1 -0
- package/dist/client/sharing/useShareButtonController.d.ts +1 -0
- package/dist/client/sharing/useShareDialogController.d.ts +3 -0
- package/dist/client/sharing/useShareDialogController.js +2 -1
- package/dist/client/theme.d.ts +21 -0
- package/dist/client/theme.js +60 -0
- package/dist/client/ui/index.d.ts +1 -1
- package/dist/client/ui/index.js +1 -1
- package/dist/client/use-session.js +23 -0
- package/dist/collab/awareness.d.ts +2 -2
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/dashboard-storage/schema.d.ts +1 -1
- package/dist/data-programs/schema.d.ts +1 -1
- package/dist/extensions/schema.d.ts +1 -1
- package/dist/localization/core-messages/ar-SA.js +6 -0
- package/dist/localization/core-messages/de-DE.js +6 -0
- package/dist/localization/core-messages/en-US.d.ts +6 -0
- package/dist/localization/core-messages/en-US.js +6 -0
- package/dist/localization/core-messages/es-ES.js +6 -0
- package/dist/localization/core-messages/fr-FR.js +6 -0
- package/dist/localization/core-messages/hi-IN.js +6 -0
- package/dist/localization/core-messages/ja-JP.js +6 -0
- package/dist/localization/core-messages/ko-KR.js +6 -0
- package/dist/localization/core-messages/pt-BR.js +6 -0
- package/dist/localization/core-messages/zh-CN.js +6 -0
- package/dist/localization/core-messages/zh-TW.js +6 -0
- package/dist/localization/core-messages.d.ts +6 -0
- package/dist/localization/default-messages.d.ts +1 -0
- package/dist/localization/default-messages.js +1 -0
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +14 -14
- package/dist/provider-api/actions/provider-api.d.ts +14 -14
- package/dist/server/auth.js +8 -5
- package/dist/server/identity-sso-store.d.ts +6 -1
- package/dist/server/identity-sso-store.js +57 -14
- package/dist/server/identity-sso.d.ts +7 -8
- package/dist/server/identity-sso.js +15 -12
- package/dist/sharing/actions/list-resource-shares.d.ts +2 -0
- package/dist/sharing/actions/list-resource-shares.js +1 -0
- package/dist/sharing/schema.d.ts +1 -1
- package/dist/sharing/schema.js +4 -1
- package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/dist/templates/chat/.agents/skills/sharing/SKILL.md +21 -0
- package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/dist/templates/default/.agents/skills/sharing/SKILL.md +21 -0
- package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +21 -0
- package/docs/content/cross-app-sso.mdx +24 -17
- package/package.json +2 -2
- package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/src/templates/chat/.agents/skills/sharing/SKILL.md +21 -0
- package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/src/templates/default/.agents/skills/sharing/SKILL.md +21 -0
- package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +21 -0
package/corpus/README.md
CHANGED
|
@@ -182,6 +182,11 @@ in the moment of agent use.
|
|
|
182
182
|
five-item sidebar preview and a footer row with New chat followed by an
|
|
183
183
|
ellipsis disclosure up to fifteen. Apps inject routing, labels, and domain
|
|
184
184
|
actions.
|
|
185
|
+
- **Data grid kit**: provider-agnostic spreadsheet mechanics belong in
|
|
186
|
+
`@agent-native/toolkit/data-grid`. Apps provide rows, typed columns, editor
|
|
187
|
+
slots, selection and width state, persistence callbacks, and product-level
|
|
188
|
+
row/body slots. Keep database models, access checks, grouping, drag/drop,
|
|
189
|
+
and domain actions in the app adapter.
|
|
185
190
|
- **Agent page kit**: the full-page `/agent` surface (`AgentTabsPage` from
|
|
186
191
|
`@agent-native/core/client`) with Context, Files, Connections, Jobs, and
|
|
187
192
|
Access tabs plus a Personal/Organization scope toggle. The canonical home
|
|
@@ -184,6 +184,27 @@ import { ShareButton } from "@agent-native/core/client/sharing";
|
|
|
184
184
|
|
|
185
185
|
For list views, show `<VisibilityBadge visibility={row.visibility} />` next to each resource.
|
|
186
186
|
|
|
187
|
+
## Standard share surface
|
|
188
|
+
|
|
189
|
+
All app share popovers should use the same compact surface contract:
|
|
190
|
+
|
|
191
|
+
- Use the text-only `ShareTrigger` from `@agent-native/toolkit/sharing`.
|
|
192
|
+
- Render ordinary links with `ShareCopyRow`, which exposes a Copy action without
|
|
193
|
+
printing the raw URL.
|
|
194
|
+
- Keep general access and individual people access in the standard Core sharing
|
|
195
|
+
flow. The people flow supports email invites, roles, notifications, and
|
|
196
|
+
removal through the shared share actions.
|
|
197
|
+
- Add `ShareAgentsSection` only when the resource has a real agent-readable
|
|
198
|
+
link or prompt. Keep it collapsed by default and supply domain-specific
|
|
199
|
+
content through the shared section shell.
|
|
200
|
+
- App-specific tabs or controls may remain when they represent a real domain
|
|
201
|
+
action (for example, an embed-code editor), but they should retain the same
|
|
202
|
+
trigger, copy-row, access, and spacing language.
|
|
203
|
+
|
|
204
|
+
`ShareDisclosureSection` is the toolkit-owned shell for optional expandable
|
|
205
|
+
share details; use its `ShareAgentsSection` or `SharePeopleSection` wrappers
|
|
206
|
+
instead of creating another collapsible share panel in a template.
|
|
207
|
+
|
|
187
208
|
## Actions available everywhere
|
|
188
209
|
|
|
189
210
|
The framework auto-mounts these actions in every template — no per-template boilerplate:
|
|
@@ -651,6 +651,45 @@ function rewriteSqlFunctionCalls(
|
|
|
651
651
|
return match ? result : result + sql.slice(cursor);
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
+
function coerceEventDateComparisonOperands(sql: string): string {
|
|
655
|
+
const comparisonRe =
|
|
656
|
+
/\b(?:[A-Za-z_][A-Za-z0-9_]*\.)?event_date\s*(?:<=|>=|<>|=|<|>)\s*/gi;
|
|
657
|
+
let cursor = 0;
|
|
658
|
+
let result = "";
|
|
659
|
+
let match = comparisonRe.exec(sql);
|
|
660
|
+
while (match) {
|
|
661
|
+
const operandStart = match.index + match[0].length;
|
|
662
|
+
const formatMatch = /^FORMAT_DATE\s*\(/i.exec(sql.slice(operandStart));
|
|
663
|
+
if (formatMatch) {
|
|
664
|
+
const openIndex = operandStart + formatMatch[0].lastIndexOf("(");
|
|
665
|
+
const closeIndex = findMatchingSqlParen(sql, openIndex);
|
|
666
|
+
if (closeIndex === -1) {
|
|
667
|
+
throw new Error(
|
|
668
|
+
"First-party BigQuery query has an unterminated FORMAT_DATE call",
|
|
669
|
+
);
|
|
670
|
+
}
|
|
671
|
+
const args = splitTopLevelSqlArgs(sql.slice(openIndex + 1, closeIndex));
|
|
672
|
+
if (args.length === 2 && /^'%Y-%m-%d'$/i.test(args[0] ?? "")) {
|
|
673
|
+
result += sql.slice(cursor, operandStart) + (args[1] ?? "");
|
|
674
|
+
cursor = closeIndex + 1;
|
|
675
|
+
comparisonRe.lastIndex = cursor;
|
|
676
|
+
match = comparisonRe.exec(sql);
|
|
677
|
+
continue;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
const matchEnd = match.index + match[0].length;
|
|
681
|
+
result += sql.slice(cursor, matchEnd);
|
|
682
|
+
cursor = matchEnd;
|
|
683
|
+
comparisonRe.lastIndex = cursor;
|
|
684
|
+
match = comparisonRe.exec(sql);
|
|
685
|
+
}
|
|
686
|
+
result += sql.slice(cursor);
|
|
687
|
+
return result.replace(
|
|
688
|
+
/(\b(?:[A-Za-z_][A-Za-z0-9_]*\.)?event_date\s*(?:<=|>=|<>|=|<|>)\s*)'(\d{4}-\d{2}-\d{2})'/gi,
|
|
689
|
+
"$1DATE '$2'",
|
|
690
|
+
);
|
|
691
|
+
}
|
|
692
|
+
|
|
654
693
|
function replacePostgresCastsInCode(code: string): string {
|
|
655
694
|
const castType = new RegExp(
|
|
656
695
|
"::\\s*(date|timestamp|timestamptz|int|int2|int4|int8|integer|float|float4|float8|double\\s+precision|numeric|text|varchar|boolean|bool|json|jsonb)\\b",
|
|
@@ -936,7 +975,7 @@ export function renderFirstPartyAnalyticsBigQuerySql(
|
|
|
936
975
|
translateFirstPartyAnalyticsBigQuerySql(normalizedScopeSql);
|
|
937
976
|
const bound = bindSqlArguments(translated, args);
|
|
938
977
|
return addPartitionPrunedEventDeduplication(
|
|
939
|
-
qualifyQuerySources(bound, table),
|
|
978
|
+
coerceEventDateComparisonOperands(qualifyQuerySources(bound, table)),
|
|
940
979
|
table,
|
|
941
980
|
);
|
|
942
981
|
}
|
|
@@ -182,6 +182,11 @@ in the moment of agent use.
|
|
|
182
182
|
five-item sidebar preview and a footer row with New chat followed by an
|
|
183
183
|
ellipsis disclosure up to fifteen. Apps inject routing, labels, and domain
|
|
184
184
|
actions.
|
|
185
|
+
- **Data grid kit**: provider-agnostic spreadsheet mechanics belong in
|
|
186
|
+
`@agent-native/toolkit/data-grid`. Apps provide rows, typed columns, editor
|
|
187
|
+
slots, selection and width state, persistence callbacks, and product-level
|
|
188
|
+
row/body slots. Keep database models, access checks, grouping, drag/drop,
|
|
189
|
+
and domain actions in the app adapter.
|
|
185
190
|
- **Agent page kit**: the full-page `/agent` surface (`AgentTabsPage` from
|
|
186
191
|
`@agent-native/core/client`) with Context, Files, Connections, Jobs, and
|
|
187
192
|
Access tabs plus a Personal/Organization scope toggle. The canonical home
|
|
@@ -184,6 +184,27 @@ import { ShareButton } from "@agent-native/core/client/sharing";
|
|
|
184
184
|
|
|
185
185
|
For list views, show `<VisibilityBadge visibility={row.visibility} />` next to each resource.
|
|
186
186
|
|
|
187
|
+
## Standard share surface
|
|
188
|
+
|
|
189
|
+
All app share popovers should use the same compact surface contract:
|
|
190
|
+
|
|
191
|
+
- Use the text-only `ShareTrigger` from `@agent-native/toolkit/sharing`.
|
|
192
|
+
- Render ordinary links with `ShareCopyRow`, which exposes a Copy action without
|
|
193
|
+
printing the raw URL.
|
|
194
|
+
- Keep general access and individual people access in the standard Core sharing
|
|
195
|
+
flow. The people flow supports email invites, roles, notifications, and
|
|
196
|
+
removal through the shared share actions.
|
|
197
|
+
- Add `ShareAgentsSection` only when the resource has a real agent-readable
|
|
198
|
+
link or prompt. Keep it collapsed by default and supply domain-specific
|
|
199
|
+
content through the shared section shell.
|
|
200
|
+
- App-specific tabs or controls may remain when they represent a real domain
|
|
201
|
+
action (for example, an embed-code editor), but they should retain the same
|
|
202
|
+
trigger, copy-row, access, and spacing language.
|
|
203
|
+
|
|
204
|
+
`ShareDisclosureSection` is the toolkit-owned shell for optional expandable
|
|
205
|
+
share details; use its `ShareAgentsSection` or `SharePeopleSection` wrappers
|
|
206
|
+
instead of creating another collapsible share panel in a template.
|
|
207
|
+
|
|
187
208
|
## Actions available everywhere
|
|
188
209
|
|
|
189
210
|
The framework auto-mounts these actions in every template — no per-template boilerplate:
|
|
@@ -182,6 +182,11 @@ in the moment of agent use.
|
|
|
182
182
|
five-item sidebar preview and a footer row with New chat followed by an
|
|
183
183
|
ellipsis disclosure up to fifteen. Apps inject routing, labels, and domain
|
|
184
184
|
actions.
|
|
185
|
+
- **Data grid kit**: provider-agnostic spreadsheet mechanics belong in
|
|
186
|
+
`@agent-native/toolkit/data-grid`. Apps provide rows, typed columns, editor
|
|
187
|
+
slots, selection and width state, persistence callbacks, and product-level
|
|
188
|
+
row/body slots. Keep database models, access checks, grouping, drag/drop,
|
|
189
|
+
and domain actions in the app adapter.
|
|
185
190
|
- **Agent page kit**: the full-page `/agent` surface (`AgentTabsPage` from
|
|
186
191
|
`@agent-native/core/client`) with Context, Files, Connections, Jobs, and
|
|
187
192
|
Access tabs plus a Personal/Organization scope toggle. The canonical home
|
|
@@ -184,6 +184,27 @@ import { ShareButton } from "@agent-native/core/client/sharing";
|
|
|
184
184
|
|
|
185
185
|
For list views, show `<VisibilityBadge visibility={row.visibility} />` next to each resource.
|
|
186
186
|
|
|
187
|
+
## Standard share surface
|
|
188
|
+
|
|
189
|
+
All app share popovers should use the same compact surface contract:
|
|
190
|
+
|
|
191
|
+
- Use the text-only `ShareTrigger` from `@agent-native/toolkit/sharing`.
|
|
192
|
+
- Render ordinary links with `ShareCopyRow`, which exposes a Copy action without
|
|
193
|
+
printing the raw URL.
|
|
194
|
+
- Keep general access and individual people access in the standard Core sharing
|
|
195
|
+
flow. The people flow supports email invites, roles, notifications, and
|
|
196
|
+
removal through the shared share actions.
|
|
197
|
+
- Add `ShareAgentsSection` only when the resource has a real agent-readable
|
|
198
|
+
link or prompt. Keep it collapsed by default and supply domain-specific
|
|
199
|
+
content through the shared section shell.
|
|
200
|
+
- App-specific tabs or controls may remain when they represent a real domain
|
|
201
|
+
action (for example, an embed-code editor), but they should retain the same
|
|
202
|
+
trigger, copy-row, access, and spacing language.
|
|
203
|
+
|
|
204
|
+
`ShareDisclosureSection` is the toolkit-owned shell for optional expandable
|
|
205
|
+
share details; use its `ShareAgentsSection` or `SharePeopleSection` wrappers
|
|
206
|
+
instead of creating another collapsible share panel in a template.
|
|
207
|
+
|
|
187
208
|
## Actions available everywhere
|
|
188
209
|
|
|
189
210
|
The framework auto-mounts these actions in every template — no per-template boilerplate:
|
|
@@ -182,6 +182,11 @@ in the moment of agent use.
|
|
|
182
182
|
five-item sidebar preview and a footer row with New chat followed by an
|
|
183
183
|
ellipsis disclosure up to fifteen. Apps inject routing, labels, and domain
|
|
184
184
|
actions.
|
|
185
|
+
- **Data grid kit**: provider-agnostic spreadsheet mechanics belong in
|
|
186
|
+
`@agent-native/toolkit/data-grid`. Apps provide rows, typed columns, editor
|
|
187
|
+
slots, selection and width state, persistence callbacks, and product-level
|
|
188
|
+
row/body slots. Keep database models, access checks, grouping, drag/drop,
|
|
189
|
+
and domain actions in the app adapter.
|
|
185
190
|
- **Agent page kit**: the full-page `/agent` surface (`AgentTabsPage` from
|
|
186
191
|
`@agent-native/core/client`) with Context, Files, Connections, Jobs, and
|
|
187
192
|
Access tabs plus a Personal/Organization scope toggle. The canonical home
|
|
@@ -184,6 +184,27 @@ import { ShareButton } from "@agent-native/core/client/sharing";
|
|
|
184
184
|
|
|
185
185
|
For list views, show `<VisibilityBadge visibility={row.visibility} />` next to each resource.
|
|
186
186
|
|
|
187
|
+
## Standard share surface
|
|
188
|
+
|
|
189
|
+
All app share popovers should use the same compact surface contract:
|
|
190
|
+
|
|
191
|
+
- Use the text-only `ShareTrigger` from `@agent-native/toolkit/sharing`.
|
|
192
|
+
- Render ordinary links with `ShareCopyRow`, which exposes a Copy action without
|
|
193
|
+
printing the raw URL.
|
|
194
|
+
- Keep general access and individual people access in the standard Core sharing
|
|
195
|
+
flow. The people flow supports email invites, roles, notifications, and
|
|
196
|
+
removal through the shared share actions.
|
|
197
|
+
- Add `ShareAgentsSection` only when the resource has a real agent-readable
|
|
198
|
+
link or prompt. Keep it collapsed by default and supply domain-specific
|
|
199
|
+
content through the shared section shell.
|
|
200
|
+
- App-specific tabs or controls may remain when they represent a real domain
|
|
201
|
+
action (for example, an embed-code editor), but they should retain the same
|
|
202
|
+
trigger, copy-row, access, and spacing language.
|
|
203
|
+
|
|
204
|
+
`ShareDisclosureSection` is the toolkit-owned shell for optional expandable
|
|
205
|
+
share details; use its `ShareAgentsSection` or `SharePeopleSection` wrappers
|
|
206
|
+
instead of creating another collapsible share panel in a template.
|
|
207
|
+
|
|
187
208
|
## Actions available everywhere
|
|
188
209
|
|
|
189
210
|
The framework auto-mounts these actions in every template — no per-template boilerplate:
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
AgentSidebar,
|
|
3
3
|
AgentToggleButton,
|
|
4
4
|
} from "@agent-native/core/client/agent-chat";
|
|
5
|
+
import { usePerAppChatOpen } from "@agent-native/core/client/hooks";
|
|
5
6
|
import { useT } from "@agent-native/core/client/i18n";
|
|
6
7
|
import { InvitationBanner } from "@agent-native/core/client/org";
|
|
7
8
|
import { useAppearanceSync } from "@agent-native/core/client/ui";
|
|
@@ -234,6 +235,7 @@ export function AppLayout({ children }: AppLayoutProps) {
|
|
|
234
235
|
const [sidebarOpen, setSidebarOpen] = useState(false);
|
|
235
236
|
const [sidebarCollapsed, setSidebarCollapsed] =
|
|
236
237
|
useState(readSidebarCollapsed);
|
|
238
|
+
const perAppChatOpen = usePerAppChatOpen();
|
|
237
239
|
const [selectedDate, setSelectedDate] = useState(new Date());
|
|
238
240
|
const [viewMode, setViewMode] = useState<ViewMode>(isMobile ? "day" : "week");
|
|
239
241
|
const [peopleSearchOpen, setPeopleSearchOpen] = useState(false);
|
|
@@ -387,7 +389,7 @@ export function AppLayout({ children }: AppLayoutProps) {
|
|
|
387
389
|
<Sidebar
|
|
388
390
|
open={sidebarOpen}
|
|
389
391
|
onClose={() => setSidebarOpen(false)}
|
|
390
|
-
collapsed={!isMobile && sidebarCollapsed}
|
|
392
|
+
collapsed={!isMobile && (sidebarCollapsed || perAppChatOpen)}
|
|
391
393
|
onCollapsedChange={isMobile ? undefined : setSidebarCollapsed}
|
|
392
394
|
/>
|
|
393
395
|
<AgentSidebar
|
|
@@ -182,6 +182,11 @@ in the moment of agent use.
|
|
|
182
182
|
five-item sidebar preview and a footer row with New chat followed by an
|
|
183
183
|
ellipsis disclosure up to fifteen. Apps inject routing, labels, and domain
|
|
184
184
|
actions.
|
|
185
|
+
- **Data grid kit**: provider-agnostic spreadsheet mechanics belong in
|
|
186
|
+
`@agent-native/toolkit/data-grid`. Apps provide rows, typed columns, editor
|
|
187
|
+
slots, selection and width state, persistence callbacks, and product-level
|
|
188
|
+
row/body slots. Keep database models, access checks, grouping, drag/drop,
|
|
189
|
+
and domain actions in the app adapter.
|
|
185
190
|
- **Agent page kit**: the full-page `/agent` surface (`AgentTabsPage` from
|
|
186
191
|
`@agent-native/core/client`) with Context, Files, Connections, Jobs, and
|
|
187
192
|
Access tabs plus a Personal/Organization scope toggle. The canonical home
|
|
@@ -184,6 +184,27 @@ import { ShareButton } from "@agent-native/core/client/sharing";
|
|
|
184
184
|
|
|
185
185
|
For list views, show `<VisibilityBadge visibility={row.visibility} />` next to each resource.
|
|
186
186
|
|
|
187
|
+
## Standard share surface
|
|
188
|
+
|
|
189
|
+
All app share popovers should use the same compact surface contract:
|
|
190
|
+
|
|
191
|
+
- Use the text-only `ShareTrigger` from `@agent-native/toolkit/sharing`.
|
|
192
|
+
- Render ordinary links with `ShareCopyRow`, which exposes a Copy action without
|
|
193
|
+
printing the raw URL.
|
|
194
|
+
- Keep general access and individual people access in the standard Core sharing
|
|
195
|
+
flow. The people flow supports email invites, roles, notifications, and
|
|
196
|
+
removal through the shared share actions.
|
|
197
|
+
- Add `ShareAgentsSection` only when the resource has a real agent-readable
|
|
198
|
+
link or prompt. Keep it collapsed by default and supply domain-specific
|
|
199
|
+
content through the shared section shell.
|
|
200
|
+
- App-specific tabs or controls may remain when they represent a real domain
|
|
201
|
+
action (for example, an embed-code editor), but they should retain the same
|
|
202
|
+
trigger, copy-row, access, and spacing language.
|
|
203
|
+
|
|
204
|
+
`ShareDisclosureSection` is the toolkit-owned shell for optional expandable
|
|
205
|
+
share details; use its `ShareAgentsSection` or `SharePeopleSection` wrappers
|
|
206
|
+
instead of creating another collapsible share panel in a template.
|
|
207
|
+
|
|
187
208
|
## Actions available everywhere
|
|
188
209
|
|
|
189
210
|
The framework auto-mounts these actions in every template — no per-template boilerplate:
|
|
@@ -182,6 +182,11 @@ in the moment of agent use.
|
|
|
182
182
|
five-item sidebar preview and a footer row with New chat followed by an
|
|
183
183
|
ellipsis disclosure up to fifteen. Apps inject routing, labels, and domain
|
|
184
184
|
actions.
|
|
185
|
+
- **Data grid kit**: provider-agnostic spreadsheet mechanics belong in
|
|
186
|
+
`@agent-native/toolkit/data-grid`. Apps provide rows, typed columns, editor
|
|
187
|
+
slots, selection and width state, persistence callbacks, and product-level
|
|
188
|
+
row/body slots. Keep database models, access checks, grouping, drag/drop,
|
|
189
|
+
and domain actions in the app adapter.
|
|
185
190
|
- **Agent page kit**: the full-page `/agent` surface (`AgentTabsPage` from
|
|
186
191
|
`@agent-native/core/client`) with Context, Files, Connections, Jobs, and
|
|
187
192
|
Access tabs plus a Personal/Organization scope toggle. The canonical home
|
|
@@ -78,7 +78,7 @@ When meetings are enabled, the Clips desktop app also watches for native Zoom (`
|
|
|
78
78
|
| `list-meetings` | Upcoming + past, scoped via `accessFilter`; reads connected Google Calendar live |
|
|
79
79
|
| `get-meeting` | One meeting + participants + segments + notes |
|
|
80
80
|
| `create-meeting` | Create a meeting row (`source`: `calendar` / `adhoc` / `manual`); desktop adhoc Zoom/Teams detection passes `source: "adhoc"` |
|
|
81
|
-
| `update-meeting` | Inline title/notes edits
|
|
81
|
+
| `update-meeting` | Inline title/notes edits and owner/admin visibility changes; meeting share links include the full transcript whenever one exists |
|
|
82
82
|
| `delete-meeting` | Soft-delete a meeting from the visible list; linked recordings and calendar events stay intact |
|
|
83
83
|
| `start-meeting-recording` | Begin native macOS transcript stream + create the linked recording |
|
|
84
84
|
| `stop-meeting-recording` | End the active capture |
|
|
@@ -103,11 +103,11 @@ sharing/status boundary.
|
|
|
103
103
|
## Sharing meeting notes and transcripts
|
|
104
104
|
|
|
105
105
|
Meeting share links always include generated notes: the summary, key points,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
linked recording's
|
|
106
|
+
action items, and the full transcript whenever a linked transcript exists.
|
|
107
|
+
There is no transcript-sharing toggle. The legacy `share_transcript` column is
|
|
108
|
+
retained for database compatibility, but it is no longer a control and does not
|
|
109
|
+
change the meeting share payload. Sharing a meeting still must not expose the
|
|
110
|
+
linked recording's media or comments.
|
|
111
111
|
|
|
112
112
|
## Cleanup credential order
|
|
113
113
|
|
|
@@ -139,7 +139,7 @@ The app exposes `view`, `meetingId`, and `dictationId` so the agent always knows
|
|
|
139
139
|
"scheduledStart": "...",
|
|
140
140
|
"scheduledEnd": "...",
|
|
141
141
|
"transcriptStatus": "ready",
|
|
142
|
-
"shareTranscript":
|
|
142
|
+
"shareTranscript": true,
|
|
143
143
|
"participants": [{ "email": "alice@ex.com", "name": "Alice" }, ...],
|
|
144
144
|
"actionItems": [{ "assigneeEmail": "alice@ex.com", "text": "..." }, ...],
|
|
145
145
|
"hasRecording": true,
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { defineAction } from "@agent-native/core";
|
|
2
|
+
import { verifyScopedAgentAccessToken } from "@agent-native/core/server";
|
|
3
|
+
import {
|
|
4
|
+
getRequestOrgId,
|
|
5
|
+
getRequestUserEmail,
|
|
6
|
+
} from "@agent-native/core/server/request-context";
|
|
7
|
+
import { resolveAccess } from "@agent-native/core/sharing";
|
|
8
|
+
import shareResource from "@agent-native/core/sharing/actions/share-resource";
|
|
9
|
+
import { and, eq, sql } from "drizzle-orm";
|
|
10
|
+
import { z } from "zod";
|
|
11
|
+
|
|
12
|
+
import { getDb, schema } from "../server/db/index.js";
|
|
13
|
+
import { normalizeOwnerEmail } from "../server/lib/recordings.js";
|
|
14
|
+
import { CLIPS_ACCESS_APPROVAL_TOKEN_PREFIX } from "../shared/recording-link.js";
|
|
15
|
+
|
|
16
|
+
function httpError(message: string, statusCode: number): Error {
|
|
17
|
+
return Object.assign(new Error(message), { statusCode });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default defineAction({
|
|
21
|
+
description:
|
|
22
|
+
"Approve a private Clips access request and add the requester as a viewer in the recording's standard sharing list.",
|
|
23
|
+
schema: z.object({
|
|
24
|
+
recordingId: z.string().min(1).describe("Recording ID to share."),
|
|
25
|
+
approvalToken: z
|
|
26
|
+
.string()
|
|
27
|
+
.trim()
|
|
28
|
+
.min(1)
|
|
29
|
+
.describe("Signed approval capability from the owner email."),
|
|
30
|
+
}),
|
|
31
|
+
agentTool: false,
|
|
32
|
+
run: async ({ recordingId, approvalToken }) => {
|
|
33
|
+
const approverEmail = getRequestUserEmail();
|
|
34
|
+
if (!approverEmail) {
|
|
35
|
+
throw httpError("Sign in as the clip owner to allow access.", 401);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const token = verifyScopedAgentAccessToken(approvalToken, {
|
|
39
|
+
resourceKind: CLIPS_ACCESS_APPROVAL_TOKEN_PREFIX,
|
|
40
|
+
resourceId: recordingId,
|
|
41
|
+
});
|
|
42
|
+
if (!token.ok || !token.viewerEmail) {
|
|
43
|
+
throw httpError("This access request is invalid or expired.", 404);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const normalizedApproverEmail = normalizeOwnerEmail(approverEmail);
|
|
47
|
+
const access = await resolveAccess("recording", recordingId, {
|
|
48
|
+
userEmail: normalizedApproverEmail,
|
|
49
|
+
orgId: getRequestOrgId() ?? undefined,
|
|
50
|
+
});
|
|
51
|
+
if (!access || !["owner", "admin"].includes(access.role)) {
|
|
52
|
+
throw httpError("Only a clip owner or admin can allow access.", 403);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const db = getDb();
|
|
56
|
+
const [recording] = await db
|
|
57
|
+
.select({
|
|
58
|
+
id: schema.recordings.id,
|
|
59
|
+
title: schema.recordings.title,
|
|
60
|
+
visibility: schema.recordings.visibility,
|
|
61
|
+
trashedAt: schema.recordings.trashedAt,
|
|
62
|
+
})
|
|
63
|
+
.from(schema.recordings)
|
|
64
|
+
.where(eq(schema.recordings.id, recordingId))
|
|
65
|
+
.limit(1);
|
|
66
|
+
if (
|
|
67
|
+
!recording ||
|
|
68
|
+
recording.trashedAt ||
|
|
69
|
+
recording.visibility === "public"
|
|
70
|
+
) {
|
|
71
|
+
throw httpError(`Recording ${recordingId} not found`, 404);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const requesterEmail = normalizeOwnerEmail(token.viewerEmail);
|
|
75
|
+
const accessRequests = await db
|
|
76
|
+
.select({ payload: schema.recordingEvents.payload })
|
|
77
|
+
.from(schema.recordingEvents)
|
|
78
|
+
.where(
|
|
79
|
+
and(
|
|
80
|
+
eq(schema.recordingEvents.recordingId, recordingId),
|
|
81
|
+
eq(schema.recordingEvents.kind, "access-request"),
|
|
82
|
+
),
|
|
83
|
+
);
|
|
84
|
+
const request = accessRequests.find((event) => {
|
|
85
|
+
try {
|
|
86
|
+
const payload = JSON.parse(event.payload) as {
|
|
87
|
+
requesterEmail?: string;
|
|
88
|
+
};
|
|
89
|
+
return (
|
|
90
|
+
typeof payload.requesterEmail === "string" &&
|
|
91
|
+
normalizeOwnerEmail(payload.requesterEmail) === requesterEmail
|
|
92
|
+
);
|
|
93
|
+
} catch {
|
|
94
|
+
// coercion-ok: malformed historical event payload cannot authorize a share.
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
if (!request) {
|
|
99
|
+
throw httpError("This access request is invalid or expired.", 404);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const [existingShare] = await db
|
|
103
|
+
.select({ id: schema.recordingShares.id })
|
|
104
|
+
.from(schema.recordingShares)
|
|
105
|
+
.where(
|
|
106
|
+
and(
|
|
107
|
+
eq(schema.recordingShares.resourceId, recordingId),
|
|
108
|
+
eq(schema.recordingShares.principalType, "user"),
|
|
109
|
+
// Share email principals are normalized on write, but this keeps
|
|
110
|
+
// approval idempotent for rows created before that convention.
|
|
111
|
+
sql`lower(${schema.recordingShares.principalId}) = ${requesterEmail}`,
|
|
112
|
+
),
|
|
113
|
+
)
|
|
114
|
+
.limit(1);
|
|
115
|
+
if (existingShare) {
|
|
116
|
+
return {
|
|
117
|
+
ok: true as const,
|
|
118
|
+
alreadyAllowed: true,
|
|
119
|
+
requesterEmail,
|
|
120
|
+
recordingId,
|
|
121
|
+
recordingTitle: recording.title,
|
|
122
|
+
shareId: existingShare.id,
|
|
123
|
+
message: "Access was already granted to this requester.",
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const shareResult = (await shareResource.run({
|
|
128
|
+
resourceType: "recording",
|
|
129
|
+
resourceId: recordingId,
|
|
130
|
+
principalType: "user",
|
|
131
|
+
principalId: requesterEmail,
|
|
132
|
+
role: "viewer",
|
|
133
|
+
notify: false,
|
|
134
|
+
})) as { id: string };
|
|
135
|
+
const shareId = shareResult.id;
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
ok: true as const,
|
|
139
|
+
alreadyAllowed: false,
|
|
140
|
+
requesterEmail,
|
|
141
|
+
recordingId,
|
|
142
|
+
recordingTitle: recording.title,
|
|
143
|
+
shareId,
|
|
144
|
+
message: "Access granted. This requester can now view the clip.",
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
});
|