@agent-native/core-corpus 0.212.0 → 0.213.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/templates/analytics/.agents/skills/onboarding-journeys/SKILL.md +29 -14
- package/corpus/templates/analytics/CHANGELOG.md +11 -0
- package/corpus/templates/analytics/actions/estimate-onboarding-journey-cost.ts +23 -6
- package/corpus/templates/analytics/actions/get-onboarding-journey.ts +20 -5
- package/corpus/templates/analytics/actions/provider-api-register.ts +2 -7
- package/corpus/templates/analytics/changelog/2026-10-21-analytics-recognizes-questions-about-connected-data-product-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-21-onboarding-journeys-now-honor-larger-event-row-budgets.md +6 -0
- package/corpus/templates/analytics/changelog/2026-10-21-preserve-unknown-replay-availability-in-partial-journeys.md +6 -0
- package/corpus/templates/analytics/package.json +6 -0
- package/corpus/templates/analytics/scripts/journey-capture-plan.ts +18 -7
- package/corpus/templates/analytics/scripts/journey-capture.ts +3 -1
- package/corpus/templates/analytics/server/lib/db-admin-connections.ts +19 -12
- package/corpus/templates/analytics/server/lib/journey-tree.ts +24 -9
- package/corpus/templates/analytics/server/lib/onboarding-journey-cost.ts +163 -94
- package/corpus/templates/analytics/server/lib/onboarding-journey.ts +162 -74
- package/corpus/templates/assets/server/lib/org-admin.ts +20 -16
- package/corpus/templates/brain/server/lib/zoom-governance.ts +11 -6
- package/corpus/templates/clips/CHANGELOG.md +1 -0
- package/corpus/templates/clips/changelog/2026-10-16-rewind-status-says-when-it-remembers-audio.md +6 -0
- package/corpus/templates/clips/desktop/src/app.tsx +7 -4
- package/corpus/templates/clips/desktop/src/components/RewindCaptureStatus.tsx +25 -0
- package/corpus/templates/clips/desktop/src/lib/rewind-status.ts +6 -1
- package/corpus/templates/clips/desktop/src/shared/config.ts +3 -0
- package/corpus/templates/clips/desktop/src-tauri/src/screen_memory.rs +2 -0
- package/corpus/templates/clips/server/lib/recordings.ts +4 -19
- package/corpus/templates/community/qr/package.json +1 -1
- package/corpus/templates/content/CHANGELOG.md +8 -0
- package/corpus/templates/content/actions/_content-space-access.ts +95 -6
- package/corpus/templates/content/actions/_database-utils.ts +20 -16
- package/corpus/templates/content/actions/_github-source-freshness.ts +72 -17
- package/corpus/templates/content/actions/_github-source-metadata.ts +63 -17
- package/corpus/templates/content/actions/_github-source.ts +141 -77
- package/corpus/templates/content/actions/check-github-connection.ts +15 -0
- package/corpus/templates/content/actions/create-github-collection.ts +180 -0
- package/corpus/templates/content/actions/disconnect-content-database-source.ts +5 -0
- package/corpus/templates/content/actions/link-github-folder.ts +104 -36
- package/corpus/templates/content/actions/refresh-content-database-source.ts +37 -4
- package/corpus/templates/content/actions/sync-github-folder.ts +23 -5
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +172 -19
- package/corpus/templates/content/app/components/editor/database/GitHubLinkDialog.tsx +938 -0
- package/corpus/templates/content/app/components/editor/database/GitHubSourcePanel.tsx +228 -0
- package/corpus/templates/content/app/components/editor/database/GitHubSourceStatusLine.tsx +561 -0
- package/corpus/templates/content/app/components/editor/database/GitHubUnlinkDialog.tsx +96 -0
- package/corpus/templates/content/app/components/editor/database/github-availability.ts +147 -0
- package/corpus/templates/content/app/components/editor/database/github-source-text.ts +280 -0
- package/corpus/templates/content/app/components/layout/Layout.tsx +2 -0
- package/corpus/templates/content/app/hooks/content-action-refresh.ts +6 -0
- package/corpus/templates/content/app/hooks/use-content-database.ts +3 -1
- package/corpus/templates/content/app/hooks/use-github-folder.ts +199 -0
- package/corpus/templates/content/app/i18n-data.ts +154 -1
- package/corpus/templates/content/app/lib/github-link-dialog.ts +86 -0
- package/corpus/templates/content/changelog/2026-10-18-connected-ai-assistants-can-link-a-new-collection-to-a-github.md +1 -1
- package/corpus/templates/content/changelog/2026-10-18-link-a-new-collection-to-a-github-folder-from-its-sources.md +6 -0
- package/corpus/templates/content/changelog/2026-10-21-organization-favorites-include-documents-shared-with-the-cur.md +6 -0
- package/corpus/templates/content/docs/product/capabilities/content.source.sync-policy.md +32 -7
- package/corpus/templates/content/docs/product/encyclopedia.md +3 -3
- package/corpus/templates/content/docs/product/features/content.feature.trust-your-connected-sources.md +2 -2
- package/corpus/templates/content/docs/product/roadmap.md +1 -1
- package/corpus/templates/content/parity/matrix.md +42 -42
- package/corpus/templates/content/parity/matrix.ts +14 -0
- package/corpus/templates/content/server/lib/github-source-client.ts +50 -1
- package/corpus/templates/content/shared/api.ts +3 -0
- package/corpus/templates/content/shared/github-source.ts +68 -0
- package/corpus/templates/design/CHANGELOG.md +1 -0
- package/corpus/templates/design/actions/connect-assets-mcp.ts +5 -9
- package/corpus/templates/design/changelog/2026-10-21-journey-canvases-accept-partial-analytics-samples-when-repla.md +6 -0
- package/corpus/templates/design/shared/journey-canvas.ts +6 -4
- package/corpus/templates/dispatch/.agents/skills/a2a-protocol/SKILL.md +16 -13
- package/corpus/templates/dispatch/CHANGELOG.md +10 -0
- package/corpus/templates/dispatch/changelog/2026-10-21-customer-ai-credit-questions-route-to-account-health-instead.md +6 -0
- package/corpus/templates/dispatch/changelog/2026-10-21-workspace-apps-load-reliably-with-organization-sign-in-and-f.md +6 -0
- package/corpus/templates/factory/server/lib/require-workspace-member.ts +5 -17
- package/corpus/templates/mail/server/lib/queued-drafts.ts +9 -4
- package/corpus/templates/slides/server/workspace-defaults.ts +12 -15
- package/package.json +1 -1
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import type { ContentDatabaseSource } from "@shared/api";
|
|
2
|
+
import { IconExternalLink, IconRefresh } from "@tabler/icons-react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
|
|
5
|
+
import { Button } from "@/components/ui/button";
|
|
6
|
+
import { Spinner } from "@/components/ui/spinner";
|
|
7
|
+
import { useGitHubConnection } from "@/hooks/use-github-folder";
|
|
8
|
+
import { openGitHubLinkDialog } from "@/lib/github-link-dialog";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
githubAvailability,
|
|
12
|
+
githubBlockedExplanation,
|
|
13
|
+
githubOffersNewCollection,
|
|
14
|
+
githubRowDescription,
|
|
15
|
+
type GitHubAvailability,
|
|
16
|
+
type GitHubCollectionPlace,
|
|
17
|
+
} from "./github-availability";
|
|
18
|
+
import {
|
|
19
|
+
GitHubFolderFacts,
|
|
20
|
+
useCheckGitHubForUpdates,
|
|
21
|
+
useNow,
|
|
22
|
+
} from "./GitHubSourceStatusLine";
|
|
23
|
+
import { GitHubUnlinkDialog } from "./GitHubUnlinkDialog";
|
|
24
|
+
import { dbText } from "./text";
|
|
25
|
+
|
|
26
|
+
function openLinkDialog(
|
|
27
|
+
place: GitHubCollectionPlace,
|
|
28
|
+
returnFocusTo: HTMLElement | null,
|
|
29
|
+
) {
|
|
30
|
+
openGitHubLinkDialog({
|
|
31
|
+
target: {
|
|
32
|
+
kind: "collection",
|
|
33
|
+
databaseId: place.databaseId,
|
|
34
|
+
documentId: place.documentId,
|
|
35
|
+
spaceId: place.spaceId,
|
|
36
|
+
parentId: place.parentId,
|
|
37
|
+
},
|
|
38
|
+
returnFocusTo,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function openNewCollectionDialog(
|
|
43
|
+
place: GitHubCollectionPlace,
|
|
44
|
+
returnFocusTo: HTMLElement | null,
|
|
45
|
+
) {
|
|
46
|
+
if (!place.spaceId) return;
|
|
47
|
+
openGitHubLinkDialog({
|
|
48
|
+
target: { kind: "new", spaceId: place.spaceId, parentId: place.parentId },
|
|
49
|
+
returnFocusTo,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The GitHub row in a collection's Sources: whether a folder can be linked
|
|
55
|
+
* here, said on the row itself before any typing. A row that can link opens
|
|
56
|
+
* the dialog; the rest open the GitHub step, which explains and offers a fix.
|
|
57
|
+
*/
|
|
58
|
+
export function useGitHubSourcesRow(
|
|
59
|
+
place: GitHubCollectionPlace,
|
|
60
|
+
sources: ContentDatabaseSource[],
|
|
61
|
+
onOpenStep: () => void,
|
|
62
|
+
) {
|
|
63
|
+
const now = useNow();
|
|
64
|
+
// Only asked when the collection could link, so readers and full
|
|
65
|
+
// collections never wait on GitHub.
|
|
66
|
+
const collectionAllows =
|
|
67
|
+
githubAvailability(place, sources, true).kind === "available";
|
|
68
|
+
const connection = useGitHubConnection(collectionAllows);
|
|
69
|
+
const availability = githubAvailability(
|
|
70
|
+
place,
|
|
71
|
+
sources,
|
|
72
|
+
connection.data?.connected,
|
|
73
|
+
);
|
|
74
|
+
return {
|
|
75
|
+
availability,
|
|
76
|
+
description: githubRowDescription(availability, now),
|
|
77
|
+
// Grayed out when this collection can't take a folder, but still
|
|
78
|
+
// reachable for the reason and, where there is one, the fix.
|
|
79
|
+
muted: availability.kind === "blocked",
|
|
80
|
+
open: (button: HTMLElement | null) => {
|
|
81
|
+
if (
|
|
82
|
+
availability.kind === "available" ||
|
|
83
|
+
availability.kind === "connect"
|
|
84
|
+
) {
|
|
85
|
+
openLinkDialog(place, button);
|
|
86
|
+
} else {
|
|
87
|
+
onOpenStep();
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function LinkedGitHubFolder({
|
|
94
|
+
source,
|
|
95
|
+
place,
|
|
96
|
+
onUnlinked,
|
|
97
|
+
}: {
|
|
98
|
+
source: ContentDatabaseSource;
|
|
99
|
+
place: GitHubCollectionPlace;
|
|
100
|
+
onUnlinked: () => void;
|
|
101
|
+
}) {
|
|
102
|
+
const now = useNow();
|
|
103
|
+
const check = useCheckGitHubForUpdates(source);
|
|
104
|
+
const [unlinkOpen, setUnlinkOpen] = useState(false);
|
|
105
|
+
const status = source.metadata.github;
|
|
106
|
+
if (!status) return null;
|
|
107
|
+
return (
|
|
108
|
+
<div className="grid min-w-0 gap-4" data-github-source-panel="linked">
|
|
109
|
+
<GitHubFolderFacts status={status} now={now} />
|
|
110
|
+
<div className="flex flex-wrap gap-1.5">
|
|
111
|
+
<Button asChild size="sm" variant="outline">
|
|
112
|
+
<a href={status.folderUrl} target="_blank" rel="noreferrer">
|
|
113
|
+
{dbText("githubOpenFolder")}
|
|
114
|
+
<IconExternalLink className="ms-1 size-3.5" aria-hidden />
|
|
115
|
+
</a>
|
|
116
|
+
</Button>
|
|
117
|
+
<Button
|
|
118
|
+
type="button"
|
|
119
|
+
size="sm"
|
|
120
|
+
variant="outline"
|
|
121
|
+
disabled={check.pending}
|
|
122
|
+
onClick={check.run}
|
|
123
|
+
>
|
|
124
|
+
{check.pending ? (
|
|
125
|
+
<Spinner className="me-1 size-3.5" />
|
|
126
|
+
) : (
|
|
127
|
+
<IconRefresh className="me-1 size-3.5" aria-hidden />
|
|
128
|
+
)}
|
|
129
|
+
{dbText("githubCheckForUpdates")}
|
|
130
|
+
</Button>
|
|
131
|
+
</div>
|
|
132
|
+
<div className="grid min-w-0 gap-2 border-t border-border pt-3">
|
|
133
|
+
<p className="break-words text-xs text-muted-foreground">
|
|
134
|
+
{dbText("githubExplainLinked")}
|
|
135
|
+
</p>
|
|
136
|
+
{place.canEdit ? (
|
|
137
|
+
<>
|
|
138
|
+
<Button
|
|
139
|
+
type="button"
|
|
140
|
+
size="sm"
|
|
141
|
+
variant="outline-destructive"
|
|
142
|
+
className="justify-self-start"
|
|
143
|
+
onClick={() => setUnlinkOpen(true)}
|
|
144
|
+
>
|
|
145
|
+
{dbText("githubUnlinkFolder")}
|
|
146
|
+
</Button>
|
|
147
|
+
<GitHubUnlinkDialog
|
|
148
|
+
open={unlinkOpen}
|
|
149
|
+
onOpenChange={setUnlinkOpen}
|
|
150
|
+
documentId={place.documentId}
|
|
151
|
+
sourceId={source.id}
|
|
152
|
+
pageCount={place.pageCount}
|
|
153
|
+
onUnlinked={onUnlinked}
|
|
154
|
+
/>
|
|
155
|
+
</>
|
|
156
|
+
) : null}
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The GitHub step of a collection's Sources: the linked folder's details
|
|
164
|
+
* and Unlink, or why a folder can't be linked here and what to do instead.
|
|
165
|
+
*/
|
|
166
|
+
export function GitHubSourcePanel({
|
|
167
|
+
place,
|
|
168
|
+
sources,
|
|
169
|
+
onUnlinked,
|
|
170
|
+
}: {
|
|
171
|
+
place: GitHubCollectionPlace;
|
|
172
|
+
sources: ContentDatabaseSource[];
|
|
173
|
+
onUnlinked: () => void;
|
|
174
|
+
}) {
|
|
175
|
+
const availability: GitHubAvailability = githubAvailability(
|
|
176
|
+
place,
|
|
177
|
+
sources,
|
|
178
|
+
undefined,
|
|
179
|
+
);
|
|
180
|
+
if (availability.kind === "linked") {
|
|
181
|
+
return (
|
|
182
|
+
<LinkedGitHubFolder
|
|
183
|
+
source={availability.source}
|
|
184
|
+
place={place}
|
|
185
|
+
onUnlinked={onUnlinked}
|
|
186
|
+
/>
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
if (availability.kind === "blocked") {
|
|
190
|
+
return (
|
|
191
|
+
<div className="grid min-w-0 gap-3" data-github-source-panel="blocked">
|
|
192
|
+
<p className="break-words text-sm">
|
|
193
|
+
{githubBlockedExplanation(
|
|
194
|
+
availability.reason,
|
|
195
|
+
place,
|
|
196
|
+
availability.sourceName,
|
|
197
|
+
)}
|
|
198
|
+
</p>
|
|
199
|
+
{githubOffersNewCollection(availability, place) ? (
|
|
200
|
+
<Button
|
|
201
|
+
type="button"
|
|
202
|
+
size="sm"
|
|
203
|
+
className="justify-self-start"
|
|
204
|
+
onClick={(event) =>
|
|
205
|
+
openNewCollectionDialog(place, event.currentTarget)
|
|
206
|
+
}
|
|
207
|
+
>
|
|
208
|
+
{dbText("githubNewCollectionInstead")}
|
|
209
|
+
</Button>
|
|
210
|
+
) : null}
|
|
211
|
+
</div>
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
// It became linkable since the row was opened, like after a page moved out.
|
|
215
|
+
return (
|
|
216
|
+
<div className="grid min-w-0 gap-3" data-github-source-panel="available">
|
|
217
|
+
<p className="break-words text-sm">{dbText("githubLinkDescription")}</p>
|
|
218
|
+
<Button
|
|
219
|
+
type="button"
|
|
220
|
+
size="sm"
|
|
221
|
+
className="justify-self-start"
|
|
222
|
+
onClick={(event) => openLinkDialog(place, event.currentTarget)}
|
|
223
|
+
>
|
|
224
|
+
{dbText("githubLinkTitle")}
|
|
225
|
+
</Button>
|
|
226
|
+
</div>
|
|
227
|
+
);
|
|
228
|
+
}
|