@agent-native/core 0.146.3 → 0.146.5
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/dashboard-management/SKILL.md +13 -10
- package/corpus/templates/analytics/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/analytics/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/analytics/actions/compose-dashboard.ts +53 -6
- package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +8 -2
- package/corpus/templates/analytics/actions/migrate-first-party-analytics-to-bigquery.ts +3 -1
- package/corpus/templates/analytics/actions/mutate-dashboard.ts +48 -9
- package/corpus/templates/analytics/actions/update-dashboard.ts +80 -6
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/analytics/app/pages/Settings.tsx +5 -1
- package/corpus/templates/analytics/app/routes/agent.tsx +7 -5
- package/corpus/templates/analytics/changelog/2026-08-07-dashboard-creation-and-edits-now-save-faster-with-reliable-s.md +6 -0
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +19 -19
- package/corpus/templates/analytics/server/jobs/analytics-bigquery-backfill.ts +21 -2
- package/corpus/templates/analytics/server/lib/bigquery.ts +59 -24
- package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +44 -8
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +3 -5
- package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +33 -69
- package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +90 -24
- package/corpus/templates/analytics/server/lib/real-data-actions.ts +1 -1
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +17 -2
- package/corpus/templates/analytics/shared/dashboard-report-timeouts.ts +2 -0
- package/corpus/templates/assets/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/assets/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/assets/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/assets/app/routes/agent.tsx +7 -5
- package/corpus/templates/assets/app/routes/settings.tsx +7 -2
- package/corpus/templates/assets/netlify.toml +1 -1
- package/corpus/templates/assets/package.json +1 -0
- package/corpus/templates/assets/scripts/migrate-production.ts +24 -0
- package/corpus/templates/assets/server/plugins/creative-context.ts +1 -1
- package/corpus/templates/assets/server/plugins/db.ts +1 -1
- package/corpus/templates/assets/tsconfig.json +1 -0
- package/corpus/templates/brain/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/brain/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/brain/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/brain/app/lib/brain.ts +4 -2
- package/corpus/templates/brain/app/root.tsx +1 -1
- package/corpus/templates/brain/app/routes/agent.tsx +10 -2
- package/corpus/templates/brain/netlify.toml +1 -1
- package/corpus/templates/brain/package.json +2 -0
- package/corpus/templates/brain/scripts/migrate-production.ts +24 -0
- package/corpus/templates/brain/server/plugins/db.ts +1 -1
- package/corpus/templates/brain/tsconfig.json +1 -0
- package/corpus/templates/calendar/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/calendar/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -1
- package/corpus/templates/calendar/app/root.tsx +1 -1
- package/corpus/templates/calendar/app/routes/_app.agent.tsx +8 -16
- package/corpus/templates/calendar/netlify.toml +1 -1
- package/corpus/templates/calendar/package.json +1 -0
- package/corpus/templates/calendar/scripts/migrate-production.ts +24 -0
- package/corpus/templates/calendar/server/plugins/db.ts +1 -1
- package/corpus/templates/calendar/tsconfig.json +1 -0
- package/corpus/templates/chat/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/chat/app/hooks/use-navigation-state.ts +5 -2
- package/corpus/templates/chat/app/routes/agent.tsx +7 -31
- package/corpus/templates/chat/netlify.toml +1 -1
- package/corpus/templates/chat/package.json +1 -0
- package/corpus/templates/chat/scripts/migrate-production.ts +31 -0
- package/corpus/templates/chat/tsconfig.json +1 -0
- package/corpus/templates/clips/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/clips/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
- package/corpus/templates/clips/app/root.tsx +1 -1
- package/corpus/templates/clips/app/routes/_app.agent.tsx +9 -7
- package/corpus/templates/clips/netlify.toml +1 -1
- package/corpus/templates/clips/package.json +1 -0
- package/corpus/templates/clips/scripts/migrate-production.ts +24 -0
- package/corpus/templates/clips/server/plugins/db.ts +1 -1
- package/corpus/templates/clips/tsconfig.json +1 -0
- package/corpus/templates/content/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/content/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/content/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/content/app/root.tsx +1 -1
- package/corpus/templates/content/app/routes/_app.agent.tsx +9 -8
- package/corpus/templates/content/app/routes/_app.settings.tsx +7 -2
- package/corpus/templates/content/netlify.toml +1 -1
- package/corpus/templates/content/package.json +2 -0
- package/corpus/templates/content/scripts/migrate-production.ts +28 -0
- package/corpus/templates/content/server/plugins/creative-context.ts +1 -1
- package/corpus/templates/content/server/plugins/db.ts +2 -2
- package/corpus/templates/crm/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/crm/app/components/crm/RecordActions.tsx +4 -1
- package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +1 -1
- package/corpus/templates/crm/app/routes/agent.tsx +10 -2
- package/corpus/templates/crm/netlify.toml +1 -1
- package/corpus/templates/crm/package.json +2 -0
- package/corpus/templates/crm/scripts/migrate-production.ts +24 -0
- package/corpus/templates/crm/server/plugins/db.ts +1 -1
- package/corpus/templates/crm/tsconfig.json +1 -0
- package/corpus/templates/design/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/design/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/design/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/design/app/root.tsx +1 -1
- package/corpus/templates/design/app/routes/agent.tsx +9 -7
- package/corpus/templates/design/app/routes/settings.tsx +7 -2
- package/corpus/templates/design/netlify.toml +1 -1
- package/corpus/templates/design/package.json +1 -0
- package/corpus/templates/design/scripts/migrate-production.ts +24 -0
- package/corpus/templates/design/server/plugins/creative-context.ts +1 -1
- package/corpus/templates/design/server/plugins/db.ts +1 -1
- package/corpus/templates/design/tsconfig.json +1 -0
- package/corpus/templates/dispatch/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/dispatch/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/dispatch/app/root.tsx +5 -2
- package/corpus/templates/dispatch/app/routes/agent.tsx +7 -7
- package/corpus/templates/dispatch/netlify.toml +1 -1
- package/corpus/templates/dispatch/package.json +1 -0
- package/corpus/templates/dispatch/scripts/migrate-production.ts +23 -0
- package/corpus/templates/dispatch/tsconfig.json +1 -0
- package/corpus/templates/factory/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/factory/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/factory/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/factory/app/hooks/use-navigation-state.ts +5 -2
- package/corpus/templates/factory/app/root.tsx +1 -1
- package/corpus/templates/factory/app/routes/agent.tsx +9 -14
- package/corpus/templates/factory/netlify.toml +1 -1
- package/corpus/templates/factory/package.json +1 -0
- package/corpus/templates/factory/scripts/migrate-production.ts +31 -0
- package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +2 -0
- package/corpus/templates/factory/tsconfig.json +1 -0
- package/corpus/templates/forms/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/forms/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/forms/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/forms/app/root.tsx +1 -1
- package/corpus/templates/forms/app/routes/_app.agent.tsx +9 -7
- package/corpus/templates/forms/netlify.toml +1 -1
- package/corpus/templates/forms/package.json +2 -0
- package/corpus/templates/forms/scripts/migrate-production.ts +24 -0
- package/corpus/templates/forms/server/plugins/db.ts +1 -1
- package/corpus/templates/forms/tsconfig.json +1 -0
- package/corpus/templates/macros/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +5 -3
- package/corpus/templates/macros/app/root.tsx +1 -1
- package/corpus/templates/macros/app/routes/agent.tsx +9 -6
- package/corpus/templates/macros/netlify.toml +1 -1
- package/corpus/templates/macros/package.json +1 -0
- package/corpus/templates/macros/scripts/migrate-production.ts +24 -0
- package/corpus/templates/macros/server/plugins/db.ts +1 -1
- package/corpus/templates/macros/tsconfig.json +1 -0
- package/corpus/templates/mail/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/mail/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +8 -2
- package/corpus/templates/mail/app/components/layout/CommandPalette.tsx +1 -1
- package/corpus/templates/mail/app/routes/agent.tsx +9 -6
- package/corpus/templates/mail/netlify.toml +1 -1
- package/corpus/templates/mail/package.json +1 -0
- package/corpus/templates/mail/scripts/migrate-production.ts +24 -0
- package/corpus/templates/mail/server/plugins/db.ts +1 -1
- package/corpus/templates/mail/tsconfig.json +1 -0
- package/corpus/templates/plan/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/plan/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/plan/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/plan/app/root.tsx +1 -1
- package/corpus/templates/plan/app/routes/agent.tsx +9 -6
- package/corpus/templates/plan/netlify.toml +1 -1
- package/corpus/templates/plan/package.json +1 -0
- package/corpus/templates/plan/scripts/migrate-production.ts +24 -0
- package/corpus/templates/plan/server/plugins/00-mcp.ts +3 -2
- package/corpus/templates/plan/server/plugins/db.ts +1 -1
- package/corpus/templates/plan/tsconfig.json +1 -0
- package/corpus/templates/slides/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/slides/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/slides/app/components/editor/ImageGenPanel.tsx +8 -12
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +39 -2
- package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/slides/app/i18n/en-US.ts +1 -0
- package/corpus/templates/slides/app/lib/create-deck-generation.ts +22 -5
- package/corpus/templates/slides/app/pages/Index.tsx +20 -5
- package/corpus/templates/slides/app/root.tsx +1 -1
- package/corpus/templates/slides/app/routes/agent.tsx +6 -9
- package/corpus/templates/slides/app/routes/settings.tsx +7 -2
- package/corpus/templates/slides/netlify.toml +1 -1
- package/corpus/templates/slides/package.json +1 -0
- package/corpus/templates/slides/scripts/migrate-production.ts +24 -0
- package/corpus/templates/slides/server/plugins/creative-context.ts +1 -1
- package/corpus/templates/slides/server/plugins/db.ts +1 -1
- package/corpus/templates/slides/tsconfig.json +1 -0
- package/corpus/templates/tasks/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/corpus/templates/tasks/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/corpus/templates/tasks/app/components/layout/Layout.tsx +1 -1
- package/corpus/templates/tasks/app/routes/agent.tsx +10 -2
- package/corpus/templates/tasks/netlify.toml +1 -1
- package/corpus/templates/tasks/package.json +1 -0
- package/corpus/templates/tasks/scripts/migrate-production.ts +24 -0
- package/corpus/templates/tasks/server/plugins/db.ts +1 -1
- package/corpus/templates/tasks/tsconfig.json +1 -0
- package/dist/action.d.ts +2 -0
- package/dist/agent/production-agent.d.ts +1 -0
- package/dist/agent/production-agent.js +2 -0
- package/dist/agent/thread-data-builder.d.ts +4 -0
- package/dist/agent/thread-data-builder.js +44 -0
- package/dist/automations/service.d.ts +1 -0
- package/dist/automations/service.js +21 -2
- package/dist/cli/create.js +20 -2
- package/dist/client/agent-page/AgentJobsTab.js +3 -1
- package/dist/client/agent-page/AutomationDetailsDialog.js +9 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/navigation/index.d.ts +1 -1
- package/dist/client/navigation/index.js +1 -1
- package/dist/client/org/OrgSwitcher.js +1 -1
- package/dist/client/settings/SettingsPanel.d.ts +8 -0
- package/dist/client/settings/SettingsPanel.js +16 -1
- package/dist/client/settings/index.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/db/migrations.js +7 -13
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/jobs/actions/list-automation-runs.d.ts +1 -0
- package/dist/jobs/actions/list-automation-runs.js +9 -2
- package/dist/jobs/actions/list-recurring-jobs.js +3 -1
- package/dist/jobs/actions/manage-recurring-job.js +1 -1
- package/dist/jobs/actions/run-automation-now.js +1 -0
- package/dist/jobs/background-automation-runner.js +2 -0
- package/dist/jobs/frontmatter.d.ts +2 -0
- package/dist/jobs/frontmatter.js +4 -0
- package/dist/jobs/run-history.d.ts +4 -0
- package/dist/jobs/run-history.js +28 -8
- package/dist/jobs/run-now.d.ts +4 -1
- package/dist/jobs/run-now.js +4 -3
- package/dist/jobs/scheduler.js +18 -0
- package/dist/jobs/tools.d.ts +3 -2
- package/dist/jobs/tools.js +26 -12
- package/dist/localization/default-messages.d.ts +1 -0
- package/dist/localization/default-messages.js +1 -0
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.js +34 -0
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/observability/routes.d.ts +1 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/server/action-routes.d.ts +2 -0
- package/dist/server/action-routes.js +1 -0
- package/dist/server/agent-chat-plugin.js +3 -2
- package/dist/server/builder-browser.js +24 -8
- package/dist/templates/chat/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/dist/templates/chat/app/hooks/use-navigation-state.ts +5 -2
- package/dist/templates/chat/app/routes/agent.tsx +7 -31
- package/dist/templates/chat/netlify.toml +1 -1
- package/dist/templates/chat/package.json +1 -0
- package/dist/templates/chat/scripts/migrate-production.ts +31 -0
- package/dist/templates/chat/tsconfig.json +1 -0
- package/dist/templates/default/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/dist/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/dist/templates/default/app/routes/_index.tsx +1 -1
- package/dist/templates/default/app/routes/agent.tsx +7 -25
- package/dist/templates/default/package.json +1 -0
- package/dist/templates/default/scripts/migrate-production.ts +31 -0
- package/dist/templates/default/tsconfig.json +1 -0
- package/dist/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/dist/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/dist/templates/workspace-root/AGENTS.md +2 -1
- package/dist/triggers/actions/list-automations.js +1 -1
- package/dist/triggers/actions/manage-automation.js +5 -1
- package/dist/triggers/actions.d.ts +1 -1
- package/dist/triggers/actions.js +21 -15
- package/dist/triggers/dispatcher.js +17 -2
- package/dist/triggers/routes.d.ts +1 -0
- package/dist/triggers/routes.js +1 -0
- package/package.json +3 -3
- package/src/templates/chat/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/src/templates/chat/app/hooks/use-navigation-state.ts +5 -2
- package/src/templates/chat/app/routes/agent.tsx +7 -31
- package/src/templates/chat/netlify.toml +1 -1
- package/src/templates/chat/package.json +1 -0
- package/src/templates/chat/scripts/migrate-production.ts +31 -0
- package/src/templates/chat/tsconfig.json +1 -0
- package/src/templates/default/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/src/templates/default/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/src/templates/default/app/routes/_index.tsx +1 -1
- package/src/templates/default/app/routes/agent.tsx +7 -25
- package/src/templates/default/package.json +1 -0
- package/src/templates/default/scripts/migrate-production.ts +31 -0
- package/src/templates/default/tsconfig.json +1 -0
- package/src/templates/headless/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +7 -3
- package/src/templates/workspace-core/.agents/skills/upgrade-agent-native/SKILL.md +5 -2
- package/src/templates/workspace-root/AGENTS.md +2 -1
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
normalizeReferenceUrls,
|
|
5
5
|
} from "@shared/api";
|
|
6
6
|
import { IconX } from "@tabler/icons-react";
|
|
7
|
-
import { IconLoader2 } from "@tabler/icons-react";
|
|
8
7
|
import { useState, useEffect, useRef } from "react";
|
|
9
8
|
import { createPortal } from "react-dom";
|
|
10
9
|
|
|
@@ -98,7 +97,7 @@ export default function ImageGenPanel({
|
|
|
98
97
|
const [disabledDefaults, setDisabledDefaults] = useState<Set<number>>(
|
|
99
98
|
new Set(),
|
|
100
99
|
);
|
|
101
|
-
const {
|
|
100
|
+
const { submit: agentSubmit } = useAgentGenerating();
|
|
102
101
|
const panelRef = useRef<HTMLDivElement>(null);
|
|
103
102
|
|
|
104
103
|
useEffect(() => {
|
|
@@ -148,6 +147,11 @@ export default function ImageGenPanel({
|
|
|
148
147
|
|
|
149
148
|
agentSubmit(label, context);
|
|
150
149
|
setPrompt("");
|
|
150
|
+
// Generation happens asynchronously in the agent chat, which already
|
|
151
|
+
// surfaces its own progress/failure state — keeping this popup open with
|
|
152
|
+
// a separate loading flag risks it getting stuck if the two states
|
|
153
|
+
// diverge (e.g. the chat run keeps going after this request finishes).
|
|
154
|
+
onOpenChange(false);
|
|
151
155
|
};
|
|
152
156
|
|
|
153
157
|
if (!open) return null;
|
|
@@ -246,17 +250,9 @@ export default function ImageGenPanel({
|
|
|
246
250
|
{/* Generate button */}
|
|
247
251
|
<button
|
|
248
252
|
onClick={handleGenerate}
|
|
249
|
-
|
|
250
|
-
className="w-full px-4 py-2 rounded-lg bg-[#609FF8] hover:bg-[#7AB2FA] disabled:opacity-70 disabled:cursor-not-allowed text-black text-sm font-medium transition-colors flex items-center justify-center gap-2"
|
|
253
|
+
className="w-full px-4 py-2 rounded-lg bg-[#609FF8] hover:bg-[#7AB2FA] text-black text-sm font-medium transition-colors flex items-center justify-center gap-2"
|
|
251
254
|
>
|
|
252
|
-
|
|
253
|
-
<>
|
|
254
|
-
<IconLoader2 className="w-4 h-4 animate-spin" />
|
|
255
|
-
{t("raw.generatingImage")}
|
|
256
|
-
</>
|
|
257
|
-
) : (
|
|
258
|
-
"Generate"
|
|
259
|
-
)}
|
|
255
|
+
Generate
|
|
260
256
|
</button>
|
|
261
257
|
</div>
|
|
262
258
|
</div>,
|
|
@@ -17,7 +17,12 @@ import {
|
|
|
17
17
|
} from "@agent-native/toolkit/collab-ui";
|
|
18
18
|
import { appStateKeyForBrowserTab } from "@shared/app-state-tabs";
|
|
19
19
|
import { hashSlideContent } from "@shared/slide-fit";
|
|
20
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
IconMaximize,
|
|
22
|
+
IconX,
|
|
23
|
+
IconZoomIn,
|
|
24
|
+
IconZoomOut,
|
|
25
|
+
} from "@tabler/icons-react";
|
|
21
26
|
import {
|
|
22
27
|
useState,
|
|
23
28
|
useCallback,
|
|
@@ -136,6 +141,25 @@ import { SlideContextToolbar } from "./SlideContextToolbar";
|
|
|
136
141
|
import { SlideOverflowWarning } from "./SlideOverflowWarning";
|
|
137
142
|
import { SpeakerNotesPanel } from "./SpeakerNotesPanel";
|
|
138
143
|
|
|
144
|
+
function ExcalidrawExitButton(props: { onExit: () => void; label: string }) {
|
|
145
|
+
return (
|
|
146
|
+
<Tooltip>
|
|
147
|
+
<TooltipTrigger asChild>
|
|
148
|
+
<Button
|
|
149
|
+
variant="ghost"
|
|
150
|
+
size="icon"
|
|
151
|
+
className="absolute right-3 top-3 z-20 h-8 w-8 cursor-pointer border border-border bg-popover/95 shadow-lg backdrop-blur"
|
|
152
|
+
onClick={props.onExit}
|
|
153
|
+
aria-label={props.label}
|
|
154
|
+
>
|
|
155
|
+
<IconX className="h-4 w-4" />
|
|
156
|
+
</Button>
|
|
157
|
+
</TooltipTrigger>
|
|
158
|
+
<TooltipContent side="bottom">{props.label}</TooltipContent>
|
|
159
|
+
</Tooltip>
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
139
163
|
let builderIdCounter = 0;
|
|
140
164
|
const CANVAS_ZOOM_PRESETS = [10, 25, 50, 75, 100, 125, 150, 200] as const;
|
|
141
165
|
|
|
@@ -4184,10 +4208,23 @@ export default function SlideEditor({
|
|
|
4184
4208
|
<div className="flex min-h-0 flex-1 overflow-hidden">
|
|
4185
4209
|
<div className="min-w-0 flex-1 overflow-hidden">
|
|
4186
4210
|
{slide.excalidrawData ? (
|
|
4187
|
-
<div className="h-full bg-background">
|
|
4211
|
+
<div className="relative h-full bg-background">
|
|
4212
|
+
{!readOnly && (
|
|
4213
|
+
<ExcalidrawExitButton
|
|
4214
|
+
// JSON.stringify drops `undefined` properties before the patch
|
|
4215
|
+
// reaches the network request, so the server's
|
|
4216
|
+
// `fields.excalidrawData !== undefined` merge check never sees
|
|
4217
|
+
// the clear — the canvas would reappear after reload. "" is a
|
|
4218
|
+
// serializable value that survives the round trip and is
|
|
4219
|
+
// already treated as "no data" everywhere excalidrawData is read.
|
|
4220
|
+
onExit={() => onUpdateSlide({ excalidrawData: "" })}
|
|
4221
|
+
label={t("raw.exitExcalidrawCanvas")}
|
|
4222
|
+
/>
|
|
4223
|
+
)}
|
|
4188
4224
|
<ExcalidrawSlide
|
|
4189
4225
|
initialData={slide.excalidrawData}
|
|
4190
4226
|
onChange={(data) => onUpdateSlide({ excalidrawData: data })}
|
|
4227
|
+
readOnly={readOnly}
|
|
4191
4228
|
/>
|
|
4192
4229
|
</div>
|
|
4193
4230
|
) : (
|
|
@@ -117,7 +117,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
117
117
|
]}
|
|
118
118
|
scope={deckScope}
|
|
119
119
|
browserTabId={TAB_ID}
|
|
120
|
-
agentPageHref="/agent"
|
|
120
|
+
agentPageHref="/settings/agent"
|
|
121
121
|
suppressFirstRunOnboarding={isSlidesEditorRoute(location.pathname)}
|
|
122
122
|
composerSlot={<CreativeContextComposerChip />}
|
|
123
123
|
threadFooterSlot={<GoogleDriveConnectionCta />}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
callAction,
|
|
3
|
+
deleteClientAppState,
|
|
4
|
+
} from "@agent-native/core/client/hooks";
|
|
5
|
+
import { appStateKeyForBrowserTab } from "@shared/app-state-tabs";
|
|
2
6
|
import { extractGoogleDocUrls } from "@shared/google-docs";
|
|
3
7
|
import { flushSync } from "react-dom";
|
|
4
8
|
|
|
@@ -10,6 +14,7 @@ import {
|
|
|
10
14
|
importUploadedDeckIntoDeck,
|
|
11
15
|
type ImportedSourceDeck,
|
|
12
16
|
} from "@/lib/import-uploaded-deck";
|
|
17
|
+
import { TAB_ID } from "@/lib/tab-id";
|
|
13
18
|
|
|
14
19
|
interface DesignSystemGenerationContextResult {
|
|
15
20
|
agentContext?: string;
|
|
@@ -103,7 +108,7 @@ function describeUploadedFilesForAgent(
|
|
|
103
108
|
"",
|
|
104
109
|
importedSourceDeck
|
|
105
110
|
? `The user uploaded ${files.length} file(s). The ${sourceFile?.originalName ?? importedSourceDeck.format.toUpperCase()} source deck has already been imported into target deck ${deckId} with ${importedSourceDeck.slideCount} source slide(s); do not import it again.`
|
|
106
|
-
: `The user uploaded ${files.length} file(s). These
|
|
111
|
+
: `The user uploaded ${files.length} file(s). These are mandatory source material, not optional references — process every one of them with the matching import action BEFORE adding the first slide:`,
|
|
107
112
|
fileList,
|
|
108
113
|
"",
|
|
109
114
|
"File handling rules:",
|
|
@@ -112,10 +117,11 @@ function describeUploadedFilesForAgent(
|
|
|
112
117
|
: `- PPTX files: call \`import-pptx --filePath \"<path>\" --deckId ${deckId}\` before adding or editing slides.`,
|
|
113
118
|
importedSourceDeck
|
|
114
119
|
? "- For a PDF source, keep the original full-page image in every slide and add restrained design-system chrome around it without obscuring source content. Never OCR-reconstruct a source-faithful page from extracted text."
|
|
115
|
-
: `- PDF and DOCX files: call \`import-file --filePath \"<path>\" --format auto --deckId ${deckId}\` and use the returned extracted text as source material. For a visual PDF whose original layout should be preserved, pass \`--importIntoDeck true\` instead of rebuilding the pages from extracted text.`,
|
|
120
|
+
: `- PDF and DOCX files: call \`import-file --filePath \"<path>\" --format auto --deckId ${deckId}\` and use the returned extracted text as source material. The returned text is capped for reliability; re-run with maxChars only if more context is needed. For a visual PDF whose original layout should be preserved, pass \`--importIntoDeck true\` instead of rebuilding the pages from extracted text. Do not proceed to add-slide until this call has returned for every PDF/DOCX in the list above.`,
|
|
116
121
|
"- Text-like files: use the uploaded-text-file blocks already included in the prompt; do not call import-file for them.",
|
|
117
|
-
'- Image files with an embeddable URL
|
|
122
|
+
'- Image files with an embeddable URL are mandatory assets: if the user specified where to use one (e.g. "on the first and last slide"), embed it there with `<img src="...">` exactly as requested. Do not omit a requested image and continue silently — if it truly cannot be placed, say why in your final chat response.',
|
|
118
123
|
"- Image files without a URL are visual/reference assets only; do not claim to have processed a PPTX/PDF/DOCX unless the relevant import action succeeds.",
|
|
124
|
+
"- Before your final response, verify every uploaded file above was either imported (PPTX/PDF/DOCX) or placed as requested (images). If any file's content or requested placement is missing from the deck, say so explicitly instead of reporting success.",
|
|
119
125
|
].join("\n");
|
|
120
126
|
}
|
|
121
127
|
|
|
@@ -351,12 +357,23 @@ export async function startDeckGeneration({
|
|
|
351
357
|
"",
|
|
352
358
|
"Before generating, if the request or selected references leave a meaningful choice unresolved, use the `ask-question` tool to ask one concise, prompt-specific question in the inline guided-question flow. Generate the question wording and 2 to 4 options from the user's request and selected references, like Claude's design-question flow; do not use a fixed generic questionnaire. Ask only a choice that materially affects the deck, such as audience, tone, structure, or length. If the prompt already makes the choice clear, do not ask it again. Wait for the user's answer or skip before adding slides.",
|
|
353
359
|
sourceModeInstructions,
|
|
354
|
-
"If the user asked for a specific slide count, keep going sequentially until that count is reached unless a tool error blocks you.",
|
|
360
|
+
"If the user asked for a specific slide count, keep going sequentially until that count is reached unless a tool error blocks you. If no explicit count was given (including when the guided slide-count question was skipped), infer the count from the distinct topics/sections implied by the request — one slide per section plus a title and closing slide — and add slides for every section before considering the deck done. Do not stop at an arbitrary round number (e.g. 10) if sections remain uncovered, and never call `generate-slides-ai` for this flow; it is a legacy single-shot helper capped at 10 slides.",
|
|
355
361
|
"Every slide is rendered into a fixed native canvas (default 16:9 is 960x540 CSS pixels, with 740x380px available inside standard 80px 110px padding). Keep the main content within that fit budget; split dense source material across more slides instead of packing it tightly. Never use zoom, transform: scale(), clipping, or scroll overflow to hide content overflow, and keep body text at least 16px.",
|
|
356
362
|
"Each slide's --content must be full HTML. Slide HTML templates are in your AGENTS.md.",
|
|
357
363
|
"Do NOT use create-deck (the deck already exists). Do NOT call db-schema, the resources tool, or search-files.",
|
|
358
364
|
].join("\n");
|
|
359
365
|
|
|
366
|
+
// A guided-question card from the previous deck's still-finishing agent run
|
|
367
|
+
// shares this browser tab's single "guided-questions" slot. Without
|
|
368
|
+
// clearing it here, a late answer to that stale question can render on top
|
|
369
|
+
// of the deck we're about to navigate to. Best-effort: if the previous
|
|
370
|
+
// run's question arrives after this clear, it can still reappear, but this
|
|
371
|
+
// closes the common case where it's already pending when a new deck starts.
|
|
372
|
+
deleteClientAppState(
|
|
373
|
+
appStateKeyForBrowserTab("guided-questions", TAB_ID),
|
|
374
|
+
).catch(() => {});
|
|
375
|
+
deleteClientAppState("guided-questions").catch(() => {});
|
|
376
|
+
|
|
360
377
|
navigate(`/deck/${deck.id}?generating=1`, {
|
|
361
378
|
replace: true,
|
|
362
379
|
flushSync: true,
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
callAction,
|
|
3
|
+
deleteClientAppState,
|
|
4
|
+
useSession,
|
|
5
|
+
} from "@agent-native/core/client/hooks";
|
|
2
6
|
import { useT } from "@agent-native/core/client/i18n";
|
|
3
7
|
import { buildSignInReturnHref } from "@agent-native/core/client/ui";
|
|
4
8
|
import {
|
|
5
9
|
useSetHeaderActions,
|
|
6
10
|
useSetPageTitle,
|
|
7
11
|
} from "@agent-native/toolkit/app-shell";
|
|
12
|
+
import { appStateKeyForBrowserTab } from "@shared/app-state-tabs";
|
|
8
13
|
import { extractGoogleDocUrls } from "@shared/google-docs";
|
|
9
14
|
import {
|
|
10
15
|
IconAlertTriangle,
|
|
@@ -61,6 +66,7 @@ import {
|
|
|
61
66
|
rememberRecentReference,
|
|
62
67
|
type RecentReference,
|
|
63
68
|
} from "@/lib/recent-references";
|
|
69
|
+
import { TAB_ID } from "@/lib/tab-id";
|
|
64
70
|
|
|
65
71
|
const NEW_DECK_DRAFT_SCOPE = "slides-new-deck";
|
|
66
72
|
const PENDING_PROMPT_KEY = "slides:pending-deck-prompt";
|
|
@@ -198,7 +204,7 @@ function describeUploadedFilesForAgent(
|
|
|
198
204
|
"",
|
|
199
205
|
importedSourceDeck
|
|
200
206
|
? `The user uploaded ${files.length} file(s). The ${importedSourceDeck.file.originalName} source deck has already been imported into target deck ${deckId} with ${importedSourceDeck.slideCount} source slide(s); do not import it again.`
|
|
201
|
-
: `The user uploaded ${files.length} file(s). These
|
|
207
|
+
: `The user uploaded ${files.length} file(s). These are mandatory source material, not optional references — process every one of them with the matching import action BEFORE adding the first slide:`,
|
|
202
208
|
fileList,
|
|
203
209
|
"",
|
|
204
210
|
"File handling rules:",
|
|
@@ -207,10 +213,11 @@ function describeUploadedFilesForAgent(
|
|
|
207
213
|
: `- PPTX files: call \`import-pptx --filePath "<path>" --deckId ${deckId}\` before adding or editing slides.`,
|
|
208
214
|
importedSourceDeck
|
|
209
215
|
? "- For a PDF source, keep the original full-page image in every slide and add restrained design-system chrome around it without obscuring source content. Never OCR-reconstruct a source-faithful page from extracted text."
|
|
210
|
-
: `- PDF and DOCX files: call \`import-file --filePath "<path>" --format auto --deckId ${deckId}\` and use the returned extracted text as source material. For a visual PDF whose original layout should be preserved, pass \`--importIntoDeck true\` instead of rebuilding the pages from extracted text.`,
|
|
216
|
+
: `- PDF and DOCX files: call \`import-file --filePath "<path>" --format auto --deckId ${deckId}\` and use the returned extracted text as source material. The returned text is capped for reliability; re-run with maxChars only if more context is needed. For a visual PDF whose original layout should be preserved, pass \`--importIntoDeck true\` instead of rebuilding the pages from extracted text. Do not proceed to add-slide until this call has returned for every PDF/DOCX in the list above.`,
|
|
211
217
|
"- Text-like files: use the uploaded-text-file blocks already included in the prompt; do not call import-file for them.",
|
|
212
|
-
'- Image files with an embeddable URL
|
|
218
|
+
'- Image files with an embeddable URL are mandatory assets: if the user specified where to use one (e.g. "on the first and last slide"), embed it there with `<img src="...">` exactly as requested. Do not omit a requested image and continue silently — if it truly cannot be placed, say why in your final chat response.',
|
|
213
219
|
"- Image files without a URL are visual/reference assets only; do not claim to have processed a PPTX/PDF/DOCX unless the relevant import action succeeds.",
|
|
220
|
+
"- Before your final response, verify every uploaded file above was either imported (PPTX/PDF/DOCX) or placed as requested (images). If any file's content or requested placement is missing from the deck, say so explicitly instead of reporting success.",
|
|
214
221
|
].join("\n");
|
|
215
222
|
}
|
|
216
223
|
|
|
@@ -731,12 +738,20 @@ export default function Index() {
|
|
|
731
738
|
"",
|
|
732
739
|
"Before generating, if the request or selected references leave a meaningful choice unresolved, use the `ask-question` tool to ask one concise, prompt-specific question in the inline guided-question flow. Generate the question wording and 2 to 4 options from the user's request and selected references, like Claude's design-question flow; do not use a fixed generic questionnaire. Ask only a choice that materially affects the deck, such as audience, tone, structure, or length. If the prompt already makes the choice clear, do not ask it again. Wait for the user's answer or skip before adding slides.",
|
|
733
740
|
sourceModeInstructions,
|
|
734
|
-
"If the user asked for a specific slide count, keep going sequentially until that count is reached unless a tool error blocks you.",
|
|
741
|
+
"If the user asked for a specific slide count, keep going sequentially until that count is reached unless a tool error blocks you. If no explicit count was given (including when the guided slide-count question was skipped), infer the count from the distinct topics/sections implied by the request — one slide per section plus a title and closing slide — and add slides for every section before considering the deck done. Do not stop at an arbitrary round number (e.g. 10) if sections remain uncovered, and never call `generate-slides-ai` for this flow; it is a legacy single-shot helper capped at 10 slides.",
|
|
735
742
|
"Every slide is rendered into a fixed native canvas (default 16:9 is 960x540 CSS pixels, with 740x380px available inside standard 80px 110px padding). Keep the main content within that fit budget; split dense source material across more slides instead of packing it tightly. Never use zoom, transform: scale(), clipping, or scroll overflow to hide content overflow, and keep body text at least 16px.",
|
|
736
743
|
"Each slide's --content must be full HTML. Slide HTML templates are in your AGENTS.md.",
|
|
737
744
|
"Do NOT use create-deck (the deck already exists). Do NOT call db-schema, the resources tool, or search-files.",
|
|
738
745
|
].join("\n");
|
|
739
746
|
|
|
747
|
+
// See the matching comment in create-deck-generation.ts: clear any
|
|
748
|
+
// guided-question card left over from the previous deck's still-finishing
|
|
749
|
+
// run so it can't surface on top of the deck we're navigating to now.
|
|
750
|
+
deleteClientAppState(
|
|
751
|
+
appStateKeyForBrowserTab("guided-questions", TAB_ID),
|
|
752
|
+
).catch(() => {});
|
|
753
|
+
deleteClientAppState("guided-questions").catch(() => {});
|
|
754
|
+
|
|
740
755
|
navigate(`/deck/${deck.id}?generating=1`, {
|
|
741
756
|
replace: true,
|
|
742
757
|
flushSync: true,
|
|
@@ -229,7 +229,7 @@ function AppContent() {
|
|
|
229
229
|
{t("root.searchDecks")}
|
|
230
230
|
</CommandMenu.Item>
|
|
231
231
|
<CommandMenu.Item
|
|
232
|
-
onSelect={() => navigate("/agent")}
|
|
232
|
+
onSelect={() => navigate("/settings/agent")}
|
|
233
233
|
keywords={["agent", "context", "connections", "jobs", "access"]}
|
|
234
234
|
>
|
|
235
235
|
<IconHierarchy2 size={16} />
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { createCreativeContextAgentTab } from "@agent-native/creative-context/client";
|
|
4
|
-
import { useSetPageTitle } from "@agent-native/toolkit/app-shell";
|
|
1
|
+
import { buildLegacyAgentSettingsRoute } from "@agent-native/core/client/navigation";
|
|
2
|
+
import { Navigate, useLocation } from "react-router";
|
|
5
3
|
|
|
6
4
|
import messages from "@/i18n/en-US";
|
|
7
5
|
|
|
@@ -10,13 +8,12 @@ export function meta() {
|
|
|
10
8
|
}
|
|
11
9
|
|
|
12
10
|
export default function AgentRoute() {
|
|
13
|
-
const
|
|
14
|
-
useSetPageTitle(t("settings.agentTitle"));
|
|
11
|
+
const location = useLocation();
|
|
15
12
|
|
|
16
13
|
return (
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
<Navigate
|
|
15
|
+
to={buildLegacyAgentSettingsRoute(location.hash, location.search)}
|
|
16
|
+
replace
|
|
20
17
|
/>
|
|
21
18
|
);
|
|
22
19
|
}
|
|
@@ -9,7 +9,10 @@ import {
|
|
|
9
9
|
useAgentSettingsTabs,
|
|
10
10
|
type SettingsSearchEntry,
|
|
11
11
|
} from "@agent-native/core/client/settings";
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
CreativeContextSettingsLink,
|
|
14
|
+
createCreativeContextAgentTab,
|
|
15
|
+
} from "@agent-native/creative-context/client";
|
|
13
16
|
import { useSetPageTitle } from "@agent-native/toolkit/app-shell";
|
|
14
17
|
import { useMemo } from "react";
|
|
15
18
|
import { toast } from "sonner";
|
|
@@ -26,7 +29,9 @@ export function meta() {
|
|
|
26
29
|
|
|
27
30
|
export default function SettingsRoute() {
|
|
28
31
|
const t = useT();
|
|
29
|
-
const agentSettingsTabs = useAgentSettingsTabs(
|
|
32
|
+
const agentSettingsTabs = useAgentSettingsTabs({
|
|
33
|
+
agentAdditionalTabFactories: [createCreativeContextAgentTab],
|
|
34
|
+
});
|
|
30
35
|
useSetPageTitle(t("settings.title"));
|
|
31
36
|
const { prefs, loading: prefsLoading, save: savePrefs } = useSlidesPrefs();
|
|
32
37
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
ignore = "node ./scripts/netlify-ignore-build.mjs slides"
|
|
3
3
|
# Rebuild Core explicitly so a cached Netlify install cannot bundle an older
|
|
4
4
|
# agent loop or A2A handler into Slides' server functions.
|
|
5
|
-
command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && pnpm --filter @agent-native/core build && NITRO_PRESET=netlify pnpm --filter slides build"
|
|
5
|
+
command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && pnpm --filter @agent-native/core build && NITRO_PRESET=netlify pnpm --filter slides build && if [ \"${CONTEXT:-}\" = \"production\" ]; then pnpm --filter slides migrate:production; fi"
|
|
6
6
|
publish = "templates/slides/dist"
|
|
7
7
|
functions = "templates/slides/.netlify/functions-internal"
|
|
8
8
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
|
|
2
|
+
import { runFrameworkReleaseMigrations } from "@agent-native/core/server";
|
|
3
|
+
|
|
4
|
+
import { runSlidesMigrations } from "../server/plugins/db.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Release-time schema entrypoint for Slides.
|
|
8
|
+
*
|
|
9
|
+
* This script is the production owner of schema changes. It runs against the
|
|
10
|
+
* direct migration endpoint selected by core, while request functions skip
|
|
11
|
+
* all migration and ensure-table work automatically.
|
|
12
|
+
*/
|
|
13
|
+
async function main(): Promise<void> {
|
|
14
|
+
await withMigrationRuntime(async () => {
|
|
15
|
+
await runFrameworkReleaseMigrations(null);
|
|
16
|
+
await runSlidesMigrations(null);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
await main();
|
|
22
|
+
} finally {
|
|
23
|
+
await closeDbExec();
|
|
24
|
+
}
|
|
@@ -33,7 +33,7 @@ const schemaTables = Object.values(schema).filter(isDrizzleTable);
|
|
|
33
33
|
// packages/core/src/db/migrations.ts for the full rationale). Version numbers
|
|
34
34
|
// alone are not a safe identity across parallel branches that each extend
|
|
35
35
|
// this list independently.
|
|
36
|
-
const runSlidesMigrations = runMigrations(
|
|
36
|
+
export const runSlidesMigrations = runMigrations(
|
|
37
37
|
[
|
|
38
38
|
{
|
|
39
39
|
version: 1,
|
|
@@ -36,8 +36,10 @@ Tier 4 includes **all** of the following — not only editing package source:
|
|
|
36
36
|
- Files under `node_modules/@agent-native/*` (core, dispatch, scheduling, …)
|
|
37
37
|
- `pnpm.overrides`, `overrides`, `resolutions`, or `patchedDependencies` that
|
|
38
38
|
target any `@agent-native/*` package
|
|
39
|
-
-
|
|
40
|
-
|
|
39
|
+
- `pnpm patch`, `pnpm patch-commit`, or local package patch artifacts for any
|
|
40
|
+
dependency
|
|
41
|
+
- Invented "dispatch/core behavior" shims meant to paper over a version skew
|
|
42
|
+
or failed upgrade
|
|
41
43
|
|
|
42
44
|
This does not prohibit intentional app-owned UI customization. When public
|
|
43
45
|
props and composition are insufficient, the `customizing-agent-native` skill
|
|
@@ -100,8 +102,10 @@ inline strings in components.
|
|
|
100
102
|
- Don't confuse readable package source with app-owned code: use
|
|
101
103
|
`customizing-agent-native` and `agent-native eject` for supported ownership
|
|
102
104
|
transfer
|
|
105
|
+
- Don't use `pnpm patch` / `pnpm patch-commit`, commit `patches/` artifacts, or
|
|
106
|
+
add `pnpm.patchedDependencies` to "make the app run" after a version bump
|
|
103
107
|
- Don't add `pnpm.overrides` / `patchedDependencies` / `resolutions` for
|
|
104
|
-
`@agent-native/*` to
|
|
108
|
+
`@agent-native/*` to paper over a broken upgrade
|
|
105
109
|
- Don't invent local dispatch/core behavior overrides when upgrade fails —
|
|
106
110
|
run `npx @agent-native/core@latest upgrade`, then fix app-level errors only
|
|
107
111
|
- Don't modify `.agents/skills/` or `AGENTS.md` unless explicitly requested
|
|
@@ -15,8 +15,9 @@ metadata:
|
|
|
15
15
|
|
|
16
16
|
When an older Agent Native app/branch needs to run on current packages, use
|
|
17
17
|
`agent-native upgrade`. Never "fix" upgrade breakage with
|
|
18
|
-
`pnpm
|
|
19
|
-
|
|
18
|
+
`pnpm patch`, `pnpm patch-commit`, `pnpm.patchedDependencies`,
|
|
19
|
+
`pnpm.overrides`, `patchedDependencies`, `resolutions`, local patch artifacts,
|
|
20
|
+
or edits under `node_modules/@agent-native/*` — especially not against
|
|
20
21
|
`@agent-native/core` or `@agent-native/dispatch`.
|
|
21
22
|
|
|
22
23
|
## Why
|
|
@@ -109,6 +110,8 @@ install → refresh scaffold skills → verify, then fix **app** code only.
|
|
|
109
110
|
|
|
110
111
|
- Don't add `pnpm.overrides`, `overrides`, `resolutions`, or
|
|
111
112
|
`patchedDependencies` for any `@agent-native/*` package
|
|
113
|
+
- Don't run `pnpm patch` or `pnpm patch-commit`, or commit files under
|
|
114
|
+
`patches/`, for any dependency
|
|
112
115
|
- Don't edit `node_modules/@agent-native/core` or
|
|
113
116
|
`node_modules/@agent-native/dispatch`
|
|
114
117
|
- Don't invent local "dispatch behavior" shims to paper over version skew
|
|
@@ -113,7 +113,7 @@ export function Layout({ children }: LayoutProps) {
|
|
|
113
113
|
chatViewTransition
|
|
114
114
|
storageKey="tasks"
|
|
115
115
|
browserTabId={TAB_ID}
|
|
116
|
-
agentPageHref="/agent"
|
|
116
|
+
agentPageHref="/settings/agent"
|
|
117
117
|
onFullscreenRequest={() => focusAgentChat()}
|
|
118
118
|
emptyStateText={t("agent.emptyState")}
|
|
119
119
|
dynamicSuggestions={false}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildLegacyAgentSettingsRoute } from "@agent-native/core/client/navigation";
|
|
2
|
+
import { Navigate, useLocation } from "react-router";
|
|
2
3
|
|
|
3
4
|
import { APP_TITLE } from "@/lib/app-config";
|
|
4
5
|
|
|
@@ -7,5 +8,12 @@ export function meta() {
|
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export default function AgentRoute() {
|
|
10
|
-
|
|
11
|
+
const location = useLocation();
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<Navigate
|
|
15
|
+
to={buildLegacyAgentSettingsRoute(location.hash, location.search)}
|
|
16
|
+
replace
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
11
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[build]
|
|
2
2
|
ignore = "node ./scripts/netlify-ignore-build.mjs tasks"
|
|
3
|
-
command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter tasks build"
|
|
3
|
+
command = "export DATABASE_URL=${NETLIFY_DATABASE_URL:-$DATABASE_URL} && pnpm install && NITRO_PRESET=netlify pnpm --filter tasks build && if [ \"${CONTEXT:-}\" = \"production\" ]; then pnpm --filter tasks migrate:production; fi"
|
|
4
4
|
publish = "templates/tasks/dist"
|
|
5
5
|
functions = "templates/tasks/.netlify/functions-internal"
|
|
6
6
|
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"start": "agent-native start",
|
|
11
11
|
"format.fix": "oxfmt --write .",
|
|
12
12
|
"typecheck": "agent-native typecheck",
|
|
13
|
+
"migrate:production": "tsx scripts/migrate-production.ts",
|
|
13
14
|
"action": "agent-native action",
|
|
14
15
|
"script": "agent-native script",
|
|
15
16
|
"db:push": "drizzle-kit push",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { closeDbExec, withMigrationRuntime } from "@agent-native/core/db";
|
|
2
|
+
import { runFrameworkReleaseMigrations } from "@agent-native/core/server";
|
|
3
|
+
|
|
4
|
+
import { runTasksMigrations } from "../server/plugins/db.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Release-time schema entrypoint for Tasks.
|
|
8
|
+
*
|
|
9
|
+
* This script is the production owner of schema changes. It runs against the
|
|
10
|
+
* direct migration endpoint selected by core, while request functions skip
|
|
11
|
+
* all migration and ensure-table work automatically.
|
|
12
|
+
*/
|
|
13
|
+
async function main(): Promise<void> {
|
|
14
|
+
await withMigrationRuntime(async () => {
|
|
15
|
+
await runFrameworkReleaseMigrations(null);
|
|
16
|
+
await runTasksMigrations(null);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
await main();
|
|
22
|
+
} finally {
|
|
23
|
+
await closeDbExec();
|
|
24
|
+
}
|
|
@@ -8,7 +8,7 @@ import * as schema from "../db/schema.js";
|
|
|
8
8
|
|
|
9
9
|
// Keep historical entries unnamed for legacy-ledger compatibility; every new
|
|
10
10
|
// migration must add a stable, unique `name` slug.
|
|
11
|
-
const runTasksMigrations = runMigrations(
|
|
11
|
+
export const runTasksMigrations = runMigrations(
|
|
12
12
|
[
|
|
13
13
|
{
|
|
14
14
|
version: 1,
|
package/dist/action.d.ts
CHANGED
|
@@ -60,6 +60,8 @@ export interface ActionRunContext {
|
|
|
60
60
|
requestHeaders?: Headers;
|
|
61
61
|
/** Resolved org id, or `null` when the request has no org. */
|
|
62
62
|
orgId?: string | null;
|
|
63
|
+
/** Hosting app/template id used for app-owned resource boundaries. */
|
|
64
|
+
appId?: string;
|
|
63
65
|
/** How this action was invoked. */
|
|
64
66
|
caller: ActionCaller;
|
|
65
67
|
/** Present only for trigger-dispatched automation calls. */
|
|
@@ -697,6 +697,7 @@ export declare function runAgentLoop(opts: {
|
|
|
697
697
|
onOutcome?: (outcome: AgentLoopOutcome) => void;
|
|
698
698
|
ownerEmail?: string | null;
|
|
699
699
|
orgId?: string | null;
|
|
700
|
+
appId?: string;
|
|
700
701
|
/** Action invocation attribution. Defaults to the normal agent tool loop. */
|
|
701
702
|
actionCaller?: ActionCaller;
|
|
702
703
|
/** Trusted trigger lineage for automation-dispatched action calls. */
|
|
@@ -3974,6 +3974,7 @@ export async function runAgentLoop(opts) {
|
|
|
3974
3974
|
? Boolean(await actionEntry.needsApproval(toolCall.input, {
|
|
3975
3975
|
userEmail: getRequestUserEmail(),
|
|
3976
3976
|
orgId: getRequestOrgId() ?? null,
|
|
3977
|
+
appId: opts.appId,
|
|
3977
3978
|
caller: opts.actionCaller ?? "tool",
|
|
3978
3979
|
automation: opts.automation,
|
|
3979
3980
|
networkProtocol: opts.networkProtocol,
|
|
@@ -4370,6 +4371,7 @@ export async function runAgentLoop(opts) {
|
|
|
4370
4371
|
send,
|
|
4371
4372
|
userEmail: actionUserEmail ?? undefined,
|
|
4372
4373
|
orgId: actionOrgId,
|
|
4374
|
+
appId: opts.appId,
|
|
4373
4375
|
caller: opts.actionCaller ?? "tool",
|
|
4374
4376
|
automation: opts.automation,
|
|
4375
4377
|
networkProtocol: opts.networkProtocol,
|
|
@@ -17,6 +17,10 @@ interface ContentPart {
|
|
|
17
17
|
completedSideEffect?: boolean;
|
|
18
18
|
mcpApp?: AgentMcpAppPayload;
|
|
19
19
|
chatUI?: ActionChatUIConfig;
|
|
20
|
+
approval?: {
|
|
21
|
+
approvalKey: string;
|
|
22
|
+
dismissed?: boolean;
|
|
23
|
+
};
|
|
20
24
|
}
|
|
21
25
|
interface BuildAssistantMessageOptions {
|
|
22
26
|
suppressInternalContinuation?: boolean;
|