@agent-native/core 0.72.4 → 0.73.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/core/CHANGELOG.md +28 -0
- package/corpus/core/docs/content/skills-guide.md +14 -0
- package/corpus/core/docs/content/template-clips.md +7 -1
- package/corpus/core/package.json +1 -1
- package/corpus/core/src/agent/durable-background.ts +25 -12
- package/corpus/core/src/cli/create.ts +1 -1
- package/corpus/core/src/cli/skills.ts +450 -19
- package/corpus/core/src/server/auth.ts +7 -0
- package/corpus/core/src/server/onboarding-html.ts +95 -9
- package/corpus/core/src/templates/default/AGENTS.md +4 -0
- package/corpus/core/src/templates/default/package.json +2 -1
- package/corpus/core/src/templates/headless/AGENTS.md +4 -0
- package/corpus/core/src/templates/headless/package.json +1 -0
- package/corpus/core/src/templates/workspace-root/AGENTS.md +4 -0
- package/corpus/core/src/templates/workspace-root/README.md +4 -0
- package/corpus/core/src/templates/workspace-root/package.json +1 -0
- package/corpus/templates/analytics/actions/update-dashboard.ts +3 -4
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +144 -40
- package/corpus/templates/analytics/app/global.css +15 -13
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +9 -32
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +0 -26
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +0 -23
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/pivot.ts +65 -2
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +3 -4
- package/corpus/templates/analytics/changelog/2026-06-24-dashboard-charts-now-fill-sparse-template-time-series-suppor.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-dashboard-rows-now-auto-fit-panels-so-one-two-or-three-chart.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-dashboard-traffic-tables-now-show-top-urls-and-shared-clips-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-first-party-signup-and-pageview-panels-now-honor-dashboard-filters.md +5 -0
- package/corpus/templates/analytics/changelog/2026-06-24-first-party-template-dashboards-now-include-repeat-users-ret.md +6 -0
- package/corpus/templates/analytics/changelog/2026-06-24-retention-charts-now-break-out-1-day-and-7-day-return-rates-.md +6 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +256 -44
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +7 -2
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +35 -8
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +287 -42
- package/corpus/templates/calendar/changelog/2026-06-23-added-a-heads-up-explaining-google-s-app-not-verified-screen.md +1 -1
- package/corpus/templates/calendar/server/plugins/auth.ts +12 -0
- package/corpus/templates/clips/.agents/skills/recording/SKILL.md +7 -7
- package/corpus/templates/clips/AGENTS.md +6 -2
- package/corpus/templates/clips/app/components/capture-install-options.tsx +20 -4
- package/corpus/templates/clips/app/components/player/player-controls.tsx +62 -32
- package/corpus/templates/clips/app/lib/capture-install-options.ts +39 -5
- package/corpus/templates/clips/app/routes/download.tsx +2 -2
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +1 -1
- package/corpus/templates/clips/changelog/2026-06-24-inline-slack-playback-controls-no-longer-shift-when-adjustin.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-24-shared-clips-now-expose-their-full-console-log-stream-all-le.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-24-shared-clips-now-expose-their-full-fetch-xhr-network-request.md +6 -0
- package/corpus/templates/clips/changelog/2026-06-24-the-chrome-extension-option-now-only-appears-on-supported-hosts.md +5 -0
- package/corpus/templates/clips/chrome-extension/STORE_DRAFT.md +13 -8
- package/corpus/templates/clips/chrome-extension/public/manifest.json +1 -1
- package/corpus/templates/clips/chrome-extension/scripts/package.ts +15 -2
- package/corpus/templates/clips/chrome-extension/src/overlay.css +4 -25
- package/corpus/templates/clips/chrome-extension/src/overlay.ts +1 -3
- package/corpus/templates/clips/server/lib/public-agent-context.ts +67 -24
- package/corpus/templates/mail/server/plugins/auth.ts +4 -1
- package/corpus/templates/plan/app/pages/PlansPage.tsx +271 -197
- package/corpus/templates/plan/server/plan-content.ts +45 -2
- package/dist/agent/durable-background.d.ts +9 -4
- package/dist/agent/durable-background.d.ts.map +1 -1
- package/dist/agent/durable-background.js +24 -11
- package/dist/agent/durable-background.js.map +1 -1
- package/dist/cli/create.js +1 -1
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +361 -19
- package/dist/cli/skills.js.map +1 -1
- package/dist/server/auth.d.ts +7 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +1 -0
- package/dist/server/auth.js.map +1 -1
- package/dist/server/onboarding-html.d.ts +15 -0
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +73 -9
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/templates/default/AGENTS.md +4 -0
- package/dist/templates/default/package.json +2 -1
- package/dist/templates/headless/AGENTS.md +4 -0
- package/dist/templates/headless/package.json +1 -0
- package/dist/templates/workspace-root/AGENTS.md +4 -0
- package/dist/templates/workspace-root/README.md +4 -0
- package/dist/templates/workspace-root/package.json +1 -0
- package/docs/content/skills-guide.md +14 -0
- package/docs/content/template-clips.md +7 -1
- package/package.json +1 -1
- package/src/templates/default/AGENTS.md +4 -0
- package/src/templates/default/package.json +2 -1
- package/src/templates/headless/AGENTS.md +4 -0
- package/src/templates/headless/package.json +1 -0
- package/src/templates/workspace-root/AGENTS.md +4 -0
- package/src/templates/workspace-root/README.md +4 -0
- package/src/templates/workspace-root/package.json +1 -0
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
* After first account exists, this page acts as a normal login page.
|
|
8
8
|
*/
|
|
9
9
|
import { type GoogleAuthMode } from "./google-auth-mode.js";
|
|
10
|
+
export interface SignupLegalNoticeOptions {
|
|
11
|
+
termsUrl: string;
|
|
12
|
+
privacyUrl: string;
|
|
13
|
+
termsLabel?: string;
|
|
14
|
+
privacyLabel?: string;
|
|
15
|
+
prefix?: string;
|
|
16
|
+
connector?: string;
|
|
17
|
+
suffix?: string;
|
|
18
|
+
}
|
|
10
19
|
export interface OnboardingHtmlOptions {
|
|
11
20
|
/**
|
|
12
21
|
* Hide email/password forms and show ONLY the Google sign-in button.
|
|
@@ -45,6 +54,12 @@ export interface OnboardingHtmlOptions {
|
|
|
45
54
|
continueLabel?: string;
|
|
46
55
|
cancelLabel?: string;
|
|
47
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Optional email signup legal copy. Builder-hosted `*.agent-native.com`
|
|
59
|
+
* deployments get the Agent Native links automatically; self-hosted and
|
|
60
|
+
* custom-domain apps must opt in with their own URLs.
|
|
61
|
+
*/
|
|
62
|
+
signupLegalNotice?: SignupLegalNoticeOptions | false;
|
|
48
63
|
/**
|
|
49
64
|
* Google sign-in flow: `'popup'`, `'redirect'`, or `'auto'` (default).
|
|
50
65
|
* Falls back to `GOOGLE_AUTH_MODE` env var, then `'auto'`. Builder web
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboarding-html.d.ts","sourceRoot":"","sources":["../../src/server/onboarding-html.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"onboarding-html.d.ts","sourceRoot":"","sources":["../../src/server/onboarding-html.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AA+C/B,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAmBD,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QACpB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QACxB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,wBAAwB,GAAG,KAAK,CAAC;IACrD;;;;OAIG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,qBAA0B,GAAG,MAAM,CAylE1E;AAED,kDAAkD;AAClD,eAAO,MAAM,eAAe,QAAsB,CAAC;AAEnD;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CA0G7C"}
|
|
@@ -40,6 +40,22 @@ function withAppBasePath(path) {
|
|
|
40
40
|
const basePath = normalizeAppBasePath(process.env.VITE_APP_BASE_PATH || process.env.APP_BASE_PATH);
|
|
41
41
|
return `${basePath}${cleanPath}`;
|
|
42
42
|
}
|
|
43
|
+
const AGENT_NATIVE_TERMS_URL = "https://www.agent-native.com/terms";
|
|
44
|
+
const AGENT_NATIVE_PRIVACY_URL = "https://www.agent-native.com/privacy";
|
|
45
|
+
function normalizeRequestHostname(host) {
|
|
46
|
+
const firstHost = host?.split(",")[0]?.trim().toLowerCase() ?? "";
|
|
47
|
+
if (!firstHost)
|
|
48
|
+
return "";
|
|
49
|
+
if (firstHost.startsWith("[")) {
|
|
50
|
+
const close = firstHost.indexOf("]");
|
|
51
|
+
return close > 0 ? firstHost.slice(1, close) : firstHost;
|
|
52
|
+
}
|
|
53
|
+
return firstHost.replace(/:\d+$/, "");
|
|
54
|
+
}
|
|
55
|
+
function isAgentNativeHostedHost(host) {
|
|
56
|
+
const hostname = normalizeRequestHostname(host);
|
|
57
|
+
return (hostname === "agent-native.com" || hostname.endsWith(".agent-native.com"));
|
|
58
|
+
}
|
|
43
59
|
export function getOnboardingHtml(opts = {}) {
|
|
44
60
|
const showGoogle = hasGoogleOAuth();
|
|
45
61
|
const googleOnly = !!opts.googleOnly;
|
|
@@ -71,6 +87,19 @@ export function getOnboardingHtml(opts = {}) {
|
|
|
71
87
|
.replace(/</g, "<")
|
|
72
88
|
.replace(/>/g, ">")
|
|
73
89
|
.replace(/"/g, """);
|
|
90
|
+
const hostedSignupLegalNotice = opts.signupLegalNotice === undefined &&
|
|
91
|
+
isAgentNativeHostedHost(opts.requestHost)
|
|
92
|
+
? {
|
|
93
|
+
termsUrl: AGENT_NATIVE_TERMS_URL,
|
|
94
|
+
privacyUrl: AGENT_NATIVE_PRIVACY_URL,
|
|
95
|
+
}
|
|
96
|
+
: undefined;
|
|
97
|
+
const signupLegalNotice = opts.signupLegalNotice === false
|
|
98
|
+
? undefined
|
|
99
|
+
: (opts.signupLegalNotice ?? hostedSignupLegalNotice);
|
|
100
|
+
const signupLegalNoteHtml = signupLegalNotice
|
|
101
|
+
? ` <p class="legal-note">${esc(signupLegalNotice.prefix ?? "By signing up, you accept our")} <a href="${esc(signupLegalNotice.termsUrl)}" target="_blank" rel="noreferrer">${esc(signupLegalNotice.termsLabel ?? "Terms")}</a> ${esc(signupLegalNotice.connector ?? "and")} <a href="${esc(signupLegalNotice.privacyUrl)}" target="_blank" rel="noreferrer">${esc(signupLegalNotice.privacyLabel ?? "Privacy Policy")}</a>${esc(signupLegalNotice.suffix ?? ".")}</p>`
|
|
102
|
+
: "";
|
|
74
103
|
const googleSignInNotice = opts.googleSignInNotice;
|
|
75
104
|
const googleNoticeBodyParts = googleSignInNotice
|
|
76
105
|
? (Array.isArray(googleSignInNotice.body)
|
|
@@ -104,11 +133,16 @@ export function getOnboardingHtml(opts = {}) {
|
|
|
104
133
|
aria-describedby="google-preflight-copy"
|
|
105
134
|
tabindex="-1"
|
|
106
135
|
>
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
<
|
|
110
|
-
|
|
136
|
+
<button type="button" class="google-preflight-close" aria-label="Close Google sign-in choices" onclick="__anHideGoogleNotice()">×</button>
|
|
137
|
+
<div class="google-preflight-main">
|
|
138
|
+
<span class="google-preflight-icon" aria-hidden="true">
|
|
139
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.24 3.957l-8.422 14.06a1.989 1.989 0 0 0 1.7 2.983h16.845a1.989 1.989 0 0 0 1.7 -2.983l-8.423 -14.06a1.989 1.989 0 0 0 -3.4 0z"/><path d="M12 9v4"/><path d="M12 16h.01"/></svg>
|
|
140
|
+
</span>
|
|
141
|
+
<div class="google-preflight-text">
|
|
142
|
+
<p class="google-preflight-title" id="google-preflight-title">${esc(googleSignInNotice.title)}</p>
|
|
111
143
|
${googleNoticeBodyHtml}
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
112
146
|
<div class="google-preflight-actions">
|
|
113
147
|
<button type="button" class="btn-primary" id="google-preflight-continue" onclick="__anAcceptGoogleNotice()">${esc(googleSignInNotice.continueLabel ?? "Continue")}</button>
|
|
114
148
|
${googleNoticeRunLocalHtml}
|
|
@@ -623,6 +657,19 @@ ${hasMarketing
|
|
|
623
657
|
cursor: pointer;
|
|
624
658
|
}
|
|
625
659
|
.btn-secondary:hover { color: #bbb; border-color: rgba(255,255,255,0.2); }
|
|
660
|
+
.legal-note {
|
|
661
|
+
margin-top: 0.625rem;
|
|
662
|
+
color: #666;
|
|
663
|
+
font-size: 0.6875rem;
|
|
664
|
+
line-height: 1.45;
|
|
665
|
+
text-align: center;
|
|
666
|
+
}
|
|
667
|
+
.legal-note a {
|
|
668
|
+
color: #777;
|
|
669
|
+
text-decoration: underline;
|
|
670
|
+
text-underline-offset: 2px;
|
|
671
|
+
}
|
|
672
|
+
.legal-note a:hover { color: #aaa; }
|
|
626
673
|
.msg { margin-top: 0.75rem; font-size: 0.8125rem; display: none; }
|
|
627
674
|
.msg.error { color: #f87171; }
|
|
628
675
|
.msg.success { color: #33C4FF; }
|
|
@@ -814,25 +861,40 @@ ${hasMarketing
|
|
|
814
861
|
border-left: 1px solid rgba(255,255,255,0.12);
|
|
815
862
|
border-top: 1px solid rgba(255,255,255,0.12);
|
|
816
863
|
}
|
|
817
|
-
.google-preflight-
|
|
864
|
+
.google-preflight-main {
|
|
818
865
|
display: flex;
|
|
819
866
|
align-items: flex-start;
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
margin-bottom: 0.375rem;
|
|
867
|
+
gap: 0.625rem;
|
|
868
|
+
padding-right: 1.25rem;
|
|
823
869
|
}
|
|
870
|
+
.google-preflight-icon {
|
|
871
|
+
display: inline-flex;
|
|
872
|
+
align-items: center;
|
|
873
|
+
justify-content: center;
|
|
874
|
+
flex: none;
|
|
875
|
+
width: 1.75rem;
|
|
876
|
+
height: 1.75rem;
|
|
877
|
+
border-radius: 7px;
|
|
878
|
+
background: rgba(245,158,11,0.15);
|
|
879
|
+
color: #fcd34d;
|
|
880
|
+
}
|
|
881
|
+
.google-preflight-icon svg { width: 1rem; height: 1rem; }
|
|
882
|
+
.google-preflight-text { min-width: 0; }
|
|
824
883
|
.google-preflight-title {
|
|
825
884
|
color: #fff;
|
|
826
885
|
font-size: 0.8125rem;
|
|
827
886
|
font-weight: 600;
|
|
887
|
+
margin-bottom: 0.25rem;
|
|
828
888
|
}
|
|
829
889
|
.google-preflight-close {
|
|
890
|
+
position: absolute;
|
|
891
|
+
top: 0.5rem;
|
|
892
|
+
right: 0.5rem;
|
|
830
893
|
display: inline-flex;
|
|
831
894
|
align-items: center;
|
|
832
895
|
justify-content: center;
|
|
833
896
|
width: 1.5rem;
|
|
834
897
|
height: 1.5rem;
|
|
835
|
-
margin: -0.25rem -0.25rem 0 0;
|
|
836
898
|
background: transparent;
|
|
837
899
|
border: none;
|
|
838
900
|
border-radius: 999px;
|
|
@@ -858,6 +920,7 @@ ${hasMarketing
|
|
|
858
920
|
flex: 1;
|
|
859
921
|
width: auto;
|
|
860
922
|
margin-top: 0;
|
|
923
|
+
white-space: nowrap;
|
|
861
924
|
}
|
|
862
925
|
.google-preflight-command {
|
|
863
926
|
margin-top: 0.75rem;
|
|
@@ -952,6 +1015,7 @@ ${googleOnly
|
|
|
952
1015
|
<label for="s-pass2">Confirm password</label>
|
|
953
1016
|
<input id="s-pass2" type="password" autocomplete="new-password" placeholder="Confirm password" required minlength="8" />
|
|
954
1017
|
<button type="submit">Create account</button>
|
|
1018
|
+
${signupLegalNoteHtml}
|
|
955
1019
|
<p class="msg" id="s-msg"></p>
|
|
956
1020
|
</form>
|
|
957
1021
|
|