@agent-native/core 0.0.0-beta-20260820194548 → 0.0.0-beta-20260820210146
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/secrets/SKILL.md +5 -1
- package/corpus/templates/analytics/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +0 -3
- package/corpus/templates/analytics/app/pages/Settings.tsx +0 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +0 -1
- package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +1 -1
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +0 -1
- package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +0 -32
- package/corpus/templates/analytics/server/lib/session-replay.ts +1 -5
- package/corpus/templates/assets/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/assets/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/assets/actions/save-generated-image.ts +0 -5
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +2 -262
- package/corpus/templates/assets/app/routes/library.tsx +1 -1
- package/corpus/templates/assets/app/routes/settings.tsx +0 -3
- package/corpus/templates/brain/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/brain/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/brain/actions/ask-brain.ts +0 -1
- package/corpus/templates/brain/app/routes/sources.tsx +0 -4
- package/corpus/templates/brain/server/lib/capture-sanitization.ts +0 -11
- package/corpus/templates/calendar/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/calendar/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +0 -20
- package/corpus/templates/calendar/app/pages/CalendarView.tsx +0 -1
- package/corpus/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/clips/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/clips/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +0 -1
- package/corpus/templates/clips/app/components/library/space-dialogs.tsx +0 -1
- package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +0 -1
- package/corpus/templates/clips/app/components/player/video-player.tsx +2 -2
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +0 -1
- package/corpus/templates/clips/app/components/settings/ai-setup-section.tsx +0 -1
- package/corpus/templates/clips/app/global.css +27 -0
- package/corpus/templates/clips/app/hooks/use-playback-position.ts +0 -2
- package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +1 -3
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +1 -1
- package/corpus/templates/clips/app/routes/record.tsx +1 -1
- package/corpus/templates/clips/app/routes/share.$shareId.tsx +4 -4
- package/corpus/templates/clips/chrome-extension/src/background.ts +0 -13
- package/corpus/templates/clips/chrome-extension/src/overlay.ts +0 -1
- package/corpus/templates/clips/chrome-extension/src/popup.ts +0 -20
- package/corpus/templates/clips/desktop/src/app.tsx +6 -18
- package/corpus/templates/clips/desktop/src/hooks/useMediaDevices.ts +0 -1
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +0 -8
- package/corpus/templates/content/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/content/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/content/actions/_database-source-utils.ts +0 -3
- package/corpus/templates/content/actions/attach-content-database-source.ts +1 -4
- package/corpus/templates/content/actions/prepare-builder-source-execution.ts +1 -1
- package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +0 -6
- package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +0 -580
- package/corpus/templates/content/app/components/editor/database/FormView.tsx +2 -2
- package/corpus/templates/content/app/components/editor/database/filter-sort.ts +1 -1
- package/corpus/templates/content/app/components/editor/database/settings.tsx +0 -23
- package/corpus/templates/content/app/components/editor/database/sidebar.tsx +0 -1
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +8 -304
- package/corpus/templates/content/app/hooks/use-documents.ts +0 -1
- package/corpus/templates/content/shared/api.ts +0 -1
- package/corpus/templates/content/shared/builder-mdx.ts +0 -1
- package/corpus/templates/content/shared/nfm.ts +1 -7
- package/corpus/templates/crm/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/crm/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/crm/actions/merge-crm-records.ts +0 -4
- package/corpus/templates/crm/app/components/crm/record/RecordLists.tsx +0 -1
- package/corpus/templates/crm/server/crm/hubspot-adapter.ts +0 -1
- package/corpus/templates/crm/server/crm/salesforce-adapter.ts +0 -1
- package/corpus/templates/crm/server/db/crm-store.ts +1 -1
- package/corpus/templates/design/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/design/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +1 -14
- package/corpus/templates/design/actions/apply-component-prop-edit.ts +1 -5
- package/corpus/templates/design/actions/generate-design.ts +0 -1
- package/corpus/templates/design/actions/list-design-systems.ts +10 -0
- package/corpus/templates/design/actions/run-design-audit.ts +0 -22
- package/corpus/templates/design/app/components/design/DesignCanvas.tsx +19 -8
- package/corpus/templates/design/app/components/design/EditPanel.tsx +11 -183
- package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +21 -4
- package/corpus/templates/design/app/components/design/QuestionFlow.tsx +1 -5
- package/corpus/templates/design/app/components/design/bridge/codegen.ts +1 -1
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +10 -19
- package/corpus/templates/design/app/components/design/edit-panel/appearance-properties.tsx +1 -1
- package/corpus/templates/design/app/components/design/edit-panel/layout-properties.tsx +13 -3
- package/corpus/templates/design/app/components/design/edit-panel/panel-primitives.tsx +38 -32
- package/corpus/templates/design/app/components/design/edit-panel/position-layout-properties.tsx +1 -4
- package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +0 -4
- package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +15 -6
- package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +2 -2
- package/corpus/templates/design/app/components/visual-editor/NodeRewriteProposal.tsx +0 -1
- package/corpus/templates/design/app/components/visual-editor/ReviewCanvasPins.tsx +1 -1
- package/corpus/templates/design/app/lib/clipboard-content-lineage.ts +11 -1
- package/corpus/templates/design/app/pages/DesignEditor.tsx +50 -254
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +0 -2
- package/corpus/templates/design/app/pages/Index.tsx +17 -0
- package/corpus/templates/design/app/pages/design-editor/canvas-primitive-insert.ts +44 -32
- package/corpus/templates/design/app/pages/design-editor/canvas-primitives.ts +10 -0
- package/corpus/templates/design/app/pages/design-editor/clone-and-pen-edit.ts +49 -3
- package/corpus/templates/design/app/pages/design-editor/clone-idrefs.ts +31 -0
- package/corpus/templates/design/app/pages/design-editor/code-layer-state.ts +28 -0
- package/corpus/templates/design/app/pages/design-editor/commands/add-auto-layout.ts +3 -3
- package/corpus/templates/design/app/pages/design-editor/commands/align-selection.ts +44 -14
- package/corpus/templates/design/app/pages/design-editor/commands/apply-local-content-update.ts +16 -5
- package/corpus/templates/design/app/pages/design-editor/commands/change-selected-z-index.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/frame-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/group-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/nudge-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/paste-selection.ts +142 -17
- package/corpus/templates/design/app/pages/design-editor/commands/screen-visual-duplicate-change.ts +1 -0
- package/corpus/templates/design/app/pages/design-editor/commands/ungroup-selection.ts +1 -1
- package/corpus/templates/design/app/pages/design-editor/commands/visual-duplicate-change.ts +1 -0
- package/corpus/templates/design/app/pages/design-editor/cross-screen-text-color.ts +25 -9
- package/corpus/templates/design/app/pages/design-editor/editor-state.ts +1 -0
- package/corpus/templates/design/app/pages/design-editor/measure-child-rects.ts +83 -0
- package/corpus/templates/design/app/pages/design-editor/paste-placement.ts +66 -0
- package/corpus/templates/design/server/routes/[...page].get.ts +0 -1
- package/corpus/templates/design/shared/code-layer.ts +120 -70
- package/corpus/templates/design/shared/design-surface-index.ts +0 -1
- package/corpus/templates/design/shared/pen-path.ts +0 -4
- package/corpus/templates/dispatch/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/dispatch/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/dispatch/app/routes/integrations.tsx +0 -109
- package/corpus/templates/factory/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/factory/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/factory/app/components/factory/FactoryAuditView.tsx +0 -13
- package/corpus/templates/factory/app/routes/factory.tsx +0 -1
- package/corpus/templates/factory/server/factory-graph/store.ts +0 -1
- package/corpus/templates/forms/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/forms/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/macros/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/macros/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +0 -1
- package/corpus/templates/mail/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/mail/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/mail/app/components/email/EmailList.tsx +0 -1
- package/corpus/templates/mail/app/components/layout/AppLayout.tsx +2 -2
- package/corpus/templates/mail/shared/markdown.ts +3 -0
- package/corpus/templates/plan/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/plan/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/slides/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/slides/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/slides/actions/add-slide.ts +0 -1
- package/corpus/templates/slides/actions/list-decks.ts +1 -1
- package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +1 -4
- package/corpus/templates/slides/app/components/editor/SlideContextToolbar.tsx +0 -1
- package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +1 -1
- package/corpus/templates/slides/app/pages/DeckEditor.tsx +1 -6
- package/corpus/templates/tasks/.agents/skills/secrets/SKILL.md +5 -1
- package/corpus/templates/tasks/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/corpus/templates/tasks/app/components/layout/Layout.tsx +0 -1
- package/corpus/templates/tasks/app/hooks/use-visible-task-fields.ts +1 -4
- package/corpus/templates/tasks/server/custom-fields/store.ts +1 -6
- package/corpus/templates/tasks/shared/list-screen-snapshot.ts +2 -2
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/production-agent.d.ts +19 -6
- package/dist/agent/production-agent.js +57 -16
- package/dist/agent/types.d.ts +3 -0
- package/dist/client/EnvironmentBadge.d.ts +1 -0
- package/dist/client/EnvironmentBadge.js +7 -0
- package/dist/collab/routes.d.ts +1 -1
- package/dist/collab/struct-routes.d.ts +1 -1
- package/dist/config.d.ts +11 -0
- package/dist/config.js +248 -0
- package/dist/deploy/build.js +12 -1
- package/dist/index.d.ts +1 -1
- package/dist/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/notifications/routes.d.ts +6 -6
- package/dist/observability/routes.d.ts +6 -6
- package/dist/resources/handlers.d.ts +2 -2
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-chat/plugin-options.d.ts +3 -2
- package/dist/server/agent-chat-plugin.js +5 -2
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/transcribe-voice.d.ts +1 -1
- package/dist/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
- package/dist/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/dist/templates/default/.agents/skills/secrets/SKILL.md +5 -1
- package/dist/templates/default/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/dist/templates/headless/.agents/skills/secrets/SKILL.md +5 -1
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +5 -1
- package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/dist/vite/agent-native-config-loader.d.ts +1 -0
- package/dist/vite/agent-native-config-loader.js +3 -3
- package/dist/vite/agents-bundle-plugin.d.ts +1 -1
- package/dist/vite/agents-bundle-plugin.js +13 -1
- package/dist/vite/client.js +14 -14
- package/docs/content/agent-native-config.mdx +62 -11
- package/docs/content/agent-surfaces.mdx +6 -0
- package/docs/content/environment-variables.mdx +5 -2
- package/package.json +3 -3
- package/src/templates/chat/.agents/skills/secrets/SKILL.md +5 -1
- package/src/templates/chat/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/src/templates/default/.agents/skills/secrets/SKILL.md +5 -1
- package/src/templates/default/.agents/skills/workspace-conventions/SKILL.md +4 -1
- package/src/templates/headless/.agents/skills/secrets/SKILL.md +5 -1
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +5 -1
- package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -1
package/corpus/README.md
CHANGED
|
@@ -38,7 +38,11 @@ connection exists:
|
|
|
38
38
|
register a `kind: "oauth"` entry so the shared UI renders Connect and the
|
|
39
39
|
runtime owns status, refresh, and reauthorization.
|
|
40
40
|
- **Deploy- or app-level configuration** - use deployment/runtime
|
|
41
|
-
configuration, not a per-user secret row.
|
|
41
|
+
configuration, not a per-user secret row. For a non-secret public setting
|
|
42
|
+
already represented by `AgentNativeConfig`, put the default in
|
|
43
|
+
`agent-native.config.ts` and use its `AGENT_NATIVE_CONFIG_<PATH>` alias only
|
|
44
|
+
for a deployment override. Never put a credential or provider key in that
|
|
45
|
+
public namespace.
|
|
42
46
|
- **Account, customer, manager, or other non-secret identifier** - store it as
|
|
43
47
|
scoped connection metadata or app data, not as a masked secret field.
|
|
44
48
|
|
|
@@ -55,7 +55,10 @@ Preview before `--apply`, commit `agent-native.ejections.json`, and never edit
|
|
|
55
55
|
ZIPs, screenshots, thumbnails, session replay chunks) in configured file/blob
|
|
56
56
|
storage and persist only URLs, ids, or handles.
|
|
57
57
|
- Store shared runtime configuration in the workspace root `.env`; use
|
|
58
|
-
`apps/<app>/.env` only for app-specific overrides.
|
|
58
|
+
`apps/<app>/.env` only for app-specific overrides. For public app behavior,
|
|
59
|
+
prefer the default in `agent-native.config.ts` and use the deterministic
|
|
60
|
+
`AGENT_NATIVE_CONFIG_<UPPER_SNAKE_PATH>` alias only when a non-secret value
|
|
61
|
+
needs a deployment override. Never hardcode API keys,
|
|
59
62
|
tokens, webhook URLs, signing secrets, private Builder/internal data, customer
|
|
60
63
|
data, or credential-looking literals in source, docs, prompts, fixtures,
|
|
61
64
|
application state, action responses, or generated app content. Use
|
|
@@ -15,7 +15,6 @@ import {
|
|
|
15
15
|
IconArchive,
|
|
16
16
|
IconActivity,
|
|
17
17
|
IconHeartbeat,
|
|
18
|
-
IconPlus,
|
|
19
18
|
IconLock,
|
|
20
19
|
IconLink,
|
|
21
20
|
IconMessageCircle,
|
|
@@ -46,7 +45,6 @@ import { Link, useLocation, useNavigate } from "react-router";
|
|
|
46
45
|
import { toast } from "sonner";
|
|
47
46
|
|
|
48
47
|
import { useAuth } from "@/components/auth/AuthProvider";
|
|
49
|
-
import { getIdToken } from "@/lib/auth";
|
|
50
48
|
import { ANALYTICS_CHAT_STORAGE_KEY } from "@/lib/chat-handoff";
|
|
51
49
|
import { cn, shortcutModifierLabel } from "@/lib/utils";
|
|
52
50
|
import {
|
|
@@ -121,7 +119,6 @@ import {
|
|
|
121
119
|
DropdownMenuSeparator,
|
|
122
120
|
DropdownMenuTrigger,
|
|
123
121
|
} from "@/components/ui/dropdown-menu";
|
|
124
|
-
import { Input } from "@/components/ui/input";
|
|
125
122
|
import {
|
|
126
123
|
Popover,
|
|
127
124
|
PopoverTrigger,
|
|
@@ -20,7 +20,6 @@ import { Link } from "react-router";
|
|
|
20
20
|
import { toast } from "sonner";
|
|
21
21
|
|
|
22
22
|
import { Button } from "@/components/ui/button";
|
|
23
|
-
import { Label } from "@/components/ui/label";
|
|
24
23
|
import { Switch } from "@/components/ui/switch";
|
|
25
24
|
|
|
26
25
|
import changelog from "../../CHANGELOG.md?raw";
|
|
@@ -201,7 +201,7 @@ export default function ExplorerDashboardPage() {
|
|
|
201
201
|
);
|
|
202
202
|
const [archivedAt, setArchivedAt] = useState<string | null>(null);
|
|
203
203
|
const [hiddenAt, setHiddenAt] = useState<string | null>(null);
|
|
204
|
-
const [
|
|
204
|
+
const [, setHiddenBy] = useState<string | null>(null);
|
|
205
205
|
const [resourceAccess, setResourceAccess] = useState<ResourceAccess | null>(
|
|
206
206
|
null,
|
|
207
207
|
);
|
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
IconServer,
|
|
22
22
|
IconSettings,
|
|
23
23
|
} from "@tabler/icons-react";
|
|
24
|
-
import { useQuery } from "@tanstack/react-query";
|
|
25
24
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
26
25
|
import { Link, useSearchParams } from "react-router";
|
|
27
26
|
import { toast } from "sonner";
|
|
@@ -557,38 +557,6 @@ function maskSqlLiterals(sql: string): string {
|
|
|
557
557
|
return chars.join("");
|
|
558
558
|
}
|
|
559
559
|
|
|
560
|
-
function rewriteOutsideSqlLiterals(
|
|
561
|
-
sql: string,
|
|
562
|
-
rewrite: (code: string) => string,
|
|
563
|
-
): string {
|
|
564
|
-
let result = "";
|
|
565
|
-
let cursor = 0;
|
|
566
|
-
while (cursor < sql.length) {
|
|
567
|
-
const literalStart = sql.indexOf("'", cursor);
|
|
568
|
-
if (literalStart === -1) {
|
|
569
|
-
result += rewrite(sql.slice(cursor));
|
|
570
|
-
break;
|
|
571
|
-
}
|
|
572
|
-
result += rewrite(sql.slice(cursor, literalStart));
|
|
573
|
-
let literalEnd = literalStart + 1;
|
|
574
|
-
while (literalEnd < sql.length) {
|
|
575
|
-
if (sql[literalEnd] !== "'") {
|
|
576
|
-
literalEnd++;
|
|
577
|
-
continue;
|
|
578
|
-
}
|
|
579
|
-
if (sql[literalEnd + 1] === "'") {
|
|
580
|
-
literalEnd += 2;
|
|
581
|
-
continue;
|
|
582
|
-
}
|
|
583
|
-
literalEnd++;
|
|
584
|
-
break;
|
|
585
|
-
}
|
|
586
|
-
result += sql.slice(literalStart, literalEnd);
|
|
587
|
-
cursor = literalEnd;
|
|
588
|
-
}
|
|
589
|
-
return result;
|
|
590
|
-
}
|
|
591
|
-
|
|
592
560
|
const SQL_LITERAL_PLACEHOLDER_PREFIX = "_fpa_lit_";
|
|
593
561
|
|
|
594
562
|
/**
|
|
@@ -8,11 +8,7 @@ import {
|
|
|
8
8
|
readPrivateBlob,
|
|
9
9
|
type PrivateBlobHandle,
|
|
10
10
|
} from "@agent-native/core/private-blob";
|
|
11
|
-
import {
|
|
12
|
-
getRequestUserEmail,
|
|
13
|
-
recordChange,
|
|
14
|
-
runWithRequestContext,
|
|
15
|
-
} from "@agent-native/core/server";
|
|
11
|
+
import { recordChange, runWithRequestContext } from "@agent-native/core/server";
|
|
16
12
|
import {
|
|
17
13
|
accessFilter,
|
|
18
14
|
resolveAccess,
|
|
@@ -38,7 +38,11 @@ connection exists:
|
|
|
38
38
|
register a `kind: "oauth"` entry so the shared UI renders Connect and the
|
|
39
39
|
runtime owns status, refresh, and reauthorization.
|
|
40
40
|
- **Deploy- or app-level configuration** - use deployment/runtime
|
|
41
|
-
configuration, not a per-user secret row.
|
|
41
|
+
configuration, not a per-user secret row. For a non-secret public setting
|
|
42
|
+
already represented by `AgentNativeConfig`, put the default in
|
|
43
|
+
`agent-native.config.ts` and use its `AGENT_NATIVE_CONFIG_<PATH>` alias only
|
|
44
|
+
for a deployment override. Never put a credential or provider key in that
|
|
45
|
+
public namespace.
|
|
42
46
|
- **Account, customer, manager, or other non-secret identifier** - store it as
|
|
43
47
|
scoped connection metadata or app data, not as a masked secret field.
|
|
44
48
|
|
|
@@ -55,7 +55,10 @@ Preview before `--apply`, commit `agent-native.ejections.json`, and never edit
|
|
|
55
55
|
ZIPs, screenshots, thumbnails, session replay chunks) in configured file/blob
|
|
56
56
|
storage and persist only URLs, ids, or handles.
|
|
57
57
|
- Store shared runtime configuration in the workspace root `.env`; use
|
|
58
|
-
`apps/<app>/.env` only for app-specific overrides.
|
|
58
|
+
`apps/<app>/.env` only for app-specific overrides. For public app behavior,
|
|
59
|
+
prefer the default in `agent-native.config.ts` and use the deterministic
|
|
60
|
+
`AGENT_NATIVE_CONFIG_<UPPER_SNAKE_PATH>` alias only when a non-secret value
|
|
61
|
+
needs a deployment override. Never hardcode API keys,
|
|
59
62
|
tokens, webhook URLs, signing secrets, private Builder/internal data, customer
|
|
60
63
|
data, or credential-looking literals in source, docs, prompts, fixtures,
|
|
61
64
|
application state, action responses, or generated app content. Use
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { defineAction } from "@agent-native/core";
|
|
2
2
|
import type { ActionRunContext } from "@agent-native/core/action";
|
|
3
|
-
import {
|
|
4
|
-
deleteAppState,
|
|
5
|
-
readAppState,
|
|
6
|
-
writeAppState,
|
|
7
|
-
} from "@agent-native/core/application-state";
|
|
8
3
|
import { z } from "zod";
|
|
9
4
|
|
|
10
5
|
import { markAssetSaved } from "../server/handlers/assets.js";
|
|
@@ -34,7 +34,6 @@ import {
|
|
|
34
34
|
IconSettings,
|
|
35
35
|
IconTrash,
|
|
36
36
|
IconUpload,
|
|
37
|
-
IconVideo,
|
|
38
37
|
IconX,
|
|
39
38
|
} from "@tabler/icons-react";
|
|
40
39
|
import {
|
|
@@ -346,7 +345,7 @@ export function BrandKitDetailRoute({
|
|
|
346
345
|
const urlTab = libraryTabFromValue(searchParams.get("tab"));
|
|
347
346
|
const libraryId = explicitLibraryId ?? id!;
|
|
348
347
|
const { data } = useActionQuery("get-library", { id: libraryId }) as any;
|
|
349
|
-
|
|
348
|
+
|
|
350
349
|
const archiveLibrary = useActionMutation("archive-library");
|
|
351
350
|
const duplicateLibrary = useActionMutation("duplicate-library");
|
|
352
351
|
const updateAsset = useActionMutation("update-asset");
|
|
@@ -3483,265 +3482,6 @@ function AssetActionsMenu({
|
|
|
3483
3482
|
);
|
|
3484
3483
|
}
|
|
3485
3484
|
|
|
3486
|
-
function PendingUploadLaneTile({ upload }: { upload: PendingUpload }) {
|
|
3487
|
-
const t = useT();
|
|
3488
|
-
const isChecking = upload.status === "checking";
|
|
3489
|
-
return (
|
|
3490
|
-
<div className="w-36 shrink-0 overflow-hidden rounded-md border border-dashed border-border bg-background sm:w-39">
|
|
3491
|
-
<div className="flex aspect-4/3 items-center justify-center bg-muted/30">
|
|
3492
|
-
<div className="flex flex-col items-center gap-2 text-muted-foreground">
|
|
3493
|
-
<Spinner className="h-5 w-5" />
|
|
3494
|
-
<span className="text-xs font-medium">
|
|
3495
|
-
{isChecking ? t("library.checking") : t("library.uploading")}
|
|
3496
|
-
</span>
|
|
3497
|
-
</div>
|
|
3498
|
-
</div>
|
|
3499
|
-
<div className="p-2.5">
|
|
3500
|
-
<div className="flex items-center gap-2 truncate text-xs font-medium">
|
|
3501
|
-
{upload.mediaType === "video" ? (
|
|
3502
|
-
<IconVideo className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
|
3503
|
-
) : (
|
|
3504
|
-
<IconPhoto className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
|
3505
|
-
)}
|
|
3506
|
-
<span className="truncate">{upload.name}</span>
|
|
3507
|
-
</div>
|
|
3508
|
-
</div>
|
|
3509
|
-
</div>
|
|
3510
|
-
);
|
|
3511
|
-
}
|
|
3512
|
-
|
|
3513
|
-
function AssetLaneTile({
|
|
3514
|
-
asset,
|
|
3515
|
-
folders,
|
|
3516
|
-
selected,
|
|
3517
|
-
deleting,
|
|
3518
|
-
saving,
|
|
3519
|
-
promoting,
|
|
3520
|
-
onToggle,
|
|
3521
|
-
onDelete,
|
|
3522
|
-
updateAsset,
|
|
3523
|
-
onSave,
|
|
3524
|
-
onMoveToReferences,
|
|
3525
|
-
}: {
|
|
3526
|
-
asset: any;
|
|
3527
|
-
folders: any[];
|
|
3528
|
-
selected: boolean;
|
|
3529
|
-
deleting?: boolean;
|
|
3530
|
-
saving?: boolean;
|
|
3531
|
-
promoting?: boolean;
|
|
3532
|
-
onToggle: (checked: boolean) => void;
|
|
3533
|
-
onDelete: () => void;
|
|
3534
|
-
updateAsset: any;
|
|
3535
|
-
onSave?: () => void;
|
|
3536
|
-
onMoveToReferences?: () => void;
|
|
3537
|
-
}) {
|
|
3538
|
-
const t = useT();
|
|
3539
|
-
const [contextOpen, setContextOpen] = useState(false);
|
|
3540
|
-
const displayTitle = assetDisplayTitle(asset);
|
|
3541
|
-
const sourceText = assetLineageSourceText(asset);
|
|
3542
|
-
const canMoveToReferences = Boolean(onMoveToReferences);
|
|
3543
|
-
const hasPrimaryActions = Boolean(onSave || canMoveToReferences);
|
|
3544
|
-
const categoryLabel = assetCategoryLabel(asset);
|
|
3545
|
-
const busy = deleting || saving || promoting;
|
|
3546
|
-
|
|
3547
|
-
return (
|
|
3548
|
-
<div
|
|
3549
|
-
className={[
|
|
3550
|
-
"group relative w-36 shrink-0 overflow-hidden rounded-md border bg-background transition sm:w-39",
|
|
3551
|
-
selected
|
|
3552
|
-
? "border-primary ring-2 ring-primary/25"
|
|
3553
|
-
: "border-border/80 hover:border-foreground/20",
|
|
3554
|
-
deleting ? "opacity-60" : "",
|
|
3555
|
-
].join(" ")}
|
|
3556
|
-
aria-busy={busy}
|
|
3557
|
-
>
|
|
3558
|
-
<div className="absolute left-2 top-2 z-10">
|
|
3559
|
-
<Checkbox
|
|
3560
|
-
checked={selected}
|
|
3561
|
-
onCheckedChange={(checked) => onToggle(checked === true)}
|
|
3562
|
-
aria-label={t("library.selectAsset", { title: displayTitle })}
|
|
3563
|
-
className={[
|
|
3564
|
-
"border-2 border-foreground/40 bg-background/90 shadow-sm opacity-100 transition sm:opacity-0 sm:group-hover:opacity-100 sm:focus-visible:opacity-100",
|
|
3565
|
-
selected ? "sm:opacity-100" : "",
|
|
3566
|
-
].join(" ")}
|
|
3567
|
-
/>
|
|
3568
|
-
</div>
|
|
3569
|
-
<div className="absolute right-2 top-2 z-10">
|
|
3570
|
-
<DropdownMenu>
|
|
3571
|
-
<DropdownMenuTrigger asChild>
|
|
3572
|
-
<Button
|
|
3573
|
-
type="button"
|
|
3574
|
-
variant="secondary"
|
|
3575
|
-
size="icon"
|
|
3576
|
-
className="h-8 w-8 shadow-sm opacity-100 sm:opacity-0 sm:group-hover:opacity-100 sm:focus-visible:opacity-100 data-[state=open]:opacity-100"
|
|
3577
|
-
aria-label={t("library.assetActions")}
|
|
3578
|
-
disabled={busy}
|
|
3579
|
-
>
|
|
3580
|
-
<IconDotsVertical className="h-4 w-4" />
|
|
3581
|
-
</Button>
|
|
3582
|
-
</DropdownMenuTrigger>
|
|
3583
|
-
<DropdownMenuContent align="end">
|
|
3584
|
-
<DropdownMenuItem asChild>
|
|
3585
|
-
<Link to={`/asset/${asset.id}`}>
|
|
3586
|
-
<IconArrowUpRight className="mr-2 h-4 w-4 shrink-0" />
|
|
3587
|
-
{t("library.viewDetails")}
|
|
3588
|
-
</Link>
|
|
3589
|
-
</DropdownMenuItem>
|
|
3590
|
-
<DropdownMenuItem
|
|
3591
|
-
onSelect={(event) => {
|
|
3592
|
-
event.preventDefault();
|
|
3593
|
-
setContextOpen(true);
|
|
3594
|
-
}}
|
|
3595
|
-
>
|
|
3596
|
-
<IconLink className="mr-2 h-4 w-4 shrink-0" />
|
|
3597
|
-
Add to context
|
|
3598
|
-
{/* i18n-ignore assets template UI is raw-English pending template i18n pass */}
|
|
3599
|
-
</DropdownMenuItem>
|
|
3600
|
-
{canMoveToReferences ? (
|
|
3601
|
-
<DropdownMenuItem
|
|
3602
|
-
onSelect={(event) => {
|
|
3603
|
-
event.preventDefault();
|
|
3604
|
-
onMoveToReferences?.();
|
|
3605
|
-
}}
|
|
3606
|
-
>
|
|
3607
|
-
<IconPhotoPlus className="mr-2 h-4 w-4 shrink-0" />
|
|
3608
|
-
{t("library.addToReferences")}
|
|
3609
|
-
</DropdownMenuItem>
|
|
3610
|
-
) : null}
|
|
3611
|
-
<DropdownMenuSub>
|
|
3612
|
-
<DropdownMenuSubTrigger>
|
|
3613
|
-
<IconFolder className="mr-2 h-4 w-4 shrink-0" />
|
|
3614
|
-
{t("library.moveTo")}
|
|
3615
|
-
</DropdownMenuSubTrigger>
|
|
3616
|
-
<DropdownMenuSubContent>
|
|
3617
|
-
<DropdownMenuItem
|
|
3618
|
-
onSelect={() =>
|
|
3619
|
-
updateAsset.mutate({
|
|
3620
|
-
id: asset.id,
|
|
3621
|
-
folderId: null,
|
|
3622
|
-
})
|
|
3623
|
-
}
|
|
3624
|
-
>
|
|
3625
|
-
{t("library.unfiled")}
|
|
3626
|
-
</DropdownMenuItem>
|
|
3627
|
-
{folders.map((folder) => (
|
|
3628
|
-
<DropdownMenuItem
|
|
3629
|
-
key={folder.id}
|
|
3630
|
-
onSelect={() =>
|
|
3631
|
-
updateAsset.mutate({
|
|
3632
|
-
id: asset.id,
|
|
3633
|
-
folderId: folder.id,
|
|
3634
|
-
})
|
|
3635
|
-
}
|
|
3636
|
-
>
|
|
3637
|
-
{folder.title}
|
|
3638
|
-
</DropdownMenuItem>
|
|
3639
|
-
))}
|
|
3640
|
-
</DropdownMenuSubContent>
|
|
3641
|
-
</DropdownMenuSub>
|
|
3642
|
-
<DropdownMenuSeparator />
|
|
3643
|
-
<DropdownMenuItem
|
|
3644
|
-
className="text-destructive focus:bg-destructive/10 focus:text-destructive"
|
|
3645
|
-
onSelect={onDelete}
|
|
3646
|
-
>
|
|
3647
|
-
<IconTrash className="mr-2 h-4 w-4 shrink-0" />
|
|
3648
|
-
{t("assetDetail.delete")}
|
|
3649
|
-
</DropdownMenuItem>
|
|
3650
|
-
</DropdownMenuContent>
|
|
3651
|
-
</DropdownMenu>
|
|
3652
|
-
</div>
|
|
3653
|
-
<Link to={`/asset/${asset.id}`} className="block outline-none">
|
|
3654
|
-
<div className="relative aspect-4/3 bg-muted">
|
|
3655
|
-
<AssetPreview asset={asset} />
|
|
3656
|
-
<div className="pointer-events-none absolute inset-x-0 bottom-0 bg-linear-to-t from-background via-background/90 to-transparent px-2 pb-2 pt-8">
|
|
3657
|
-
<div className="flex items-center gap-1.5 truncate text-xs font-medium">
|
|
3658
|
-
{asset.mediaType === "video" ? (
|
|
3659
|
-
<IconVideo className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
|
3660
|
-
) : (
|
|
3661
|
-
<IconPhoto className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
|
|
3662
|
-
)}
|
|
3663
|
-
<span className="truncate">{displayTitle}</span>
|
|
3664
|
-
</div>
|
|
3665
|
-
<div className="mt-1 flex min-w-0 items-center gap-1 overflow-hidden text-[10px] font-medium text-muted-foreground">
|
|
3666
|
-
{sourceText ? (
|
|
3667
|
-
<span className="truncate">{sourceText}</span>
|
|
3668
|
-
) : (
|
|
3669
|
-
<>
|
|
3670
|
-
<span className="truncate">{asset.status}</span>
|
|
3671
|
-
{categoryLabel ? (
|
|
3672
|
-
<>
|
|
3673
|
-
<span className="shrink-0 text-muted-foreground/60">
|
|
3674
|
-
/
|
|
3675
|
-
</span>
|
|
3676
|
-
<span className="truncate">{categoryLabel}</span>
|
|
3677
|
-
</>
|
|
3678
|
-
) : null}
|
|
3679
|
-
</>
|
|
3680
|
-
)}
|
|
3681
|
-
</div>
|
|
3682
|
-
</div>
|
|
3683
|
-
</div>
|
|
3684
|
-
</Link>
|
|
3685
|
-
{hasPrimaryActions ? (
|
|
3686
|
-
<div className="space-y-2 border-t border-border/70 p-2">
|
|
3687
|
-
<div
|
|
3688
|
-
className={
|
|
3689
|
-
onSave && canMoveToReferences
|
|
3690
|
-
? "grid grid-cols-1 gap-2"
|
|
3691
|
-
: "grid grid-cols-2 gap-2"
|
|
3692
|
-
}
|
|
3693
|
-
>
|
|
3694
|
-
{onSave ? (
|
|
3695
|
-
<Button
|
|
3696
|
-
size="sm"
|
|
3697
|
-
className="h-8 px-2 text-xs"
|
|
3698
|
-
onClick={onSave}
|
|
3699
|
-
disabled={busy}
|
|
3700
|
-
>
|
|
3701
|
-
{saving ? (
|
|
3702
|
-
<Spinner className="h-3.5 w-3.5" />
|
|
3703
|
-
) : (
|
|
3704
|
-
t("library.save")
|
|
3705
|
-
)}
|
|
3706
|
-
</Button>
|
|
3707
|
-
) : null}
|
|
3708
|
-
{canMoveToReferences ? (
|
|
3709
|
-
<Button
|
|
3710
|
-
variant="outline"
|
|
3711
|
-
size="sm"
|
|
3712
|
-
className={
|
|
3713
|
-
onSave ? "h-8 px-2 text-xs" : "col-span-2 h-8 px-2 text-xs"
|
|
3714
|
-
}
|
|
3715
|
-
onClick={onMoveToReferences}
|
|
3716
|
-
disabled={busy}
|
|
3717
|
-
title={t("library.addToReferences")}
|
|
3718
|
-
>
|
|
3719
|
-
{promoting ? (
|
|
3720
|
-
<Spinner className="h-3.5 w-3.5" />
|
|
3721
|
-
) : (
|
|
3722
|
-
t("library.addToReferences")
|
|
3723
|
-
)}
|
|
3724
|
-
</Button>
|
|
3725
|
-
) : null}
|
|
3726
|
-
</div>
|
|
3727
|
-
</div>
|
|
3728
|
-
) : null}
|
|
3729
|
-
<CreativeContextShareSheet
|
|
3730
|
-
open={contextOpen}
|
|
3731
|
-
onOpenChange={setContextOpen}
|
|
3732
|
-
resource={{
|
|
3733
|
-
appId: "assets",
|
|
3734
|
-
resourceType: "asset",
|
|
3735
|
-
resourceId: asset.id,
|
|
3736
|
-
title: displayTitle,
|
|
3737
|
-
updatedAt: asset.updatedAt,
|
|
3738
|
-
preview: { kind: "document", label: "Asset" },
|
|
3739
|
-
}}
|
|
3740
|
-
/>
|
|
3741
|
-
</div>
|
|
3742
|
-
);
|
|
3743
|
-
}
|
|
3744
|
-
|
|
3745
3485
|
export function LiveCandidatesStage({
|
|
3746
3486
|
slots,
|
|
3747
3487
|
draftAssets,
|
|
@@ -3784,7 +3524,7 @@ export function LiveCandidatesStage({
|
|
|
3784
3524
|
asset?: any;
|
|
3785
3525
|
} | null>(null);
|
|
3786
3526
|
const dismissing = dismissSlot.isPending || deleteAsset.isPending;
|
|
3787
|
-
|
|
3527
|
+
|
|
3788
3528
|
const [activeItemId, setActiveItemId] = useState<string | null>(null);
|
|
3789
3529
|
|
|
3790
3530
|
async function handleDismissCandidate() {
|
|
@@ -1155,7 +1155,7 @@ function AllAssetsBrowser({
|
|
|
1155
1155
|
foldersByLibraryId?: Record<string, any[]>;
|
|
1156
1156
|
}) {
|
|
1157
1157
|
const t = useT();
|
|
1158
|
-
|
|
1158
|
+
|
|
1159
1159
|
const queryClient = useQueryClient();
|
|
1160
1160
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
1161
1161
|
const searchParamsKey = searchParams.toString();
|
|
@@ -38,7 +38,11 @@ connection exists:
|
|
|
38
38
|
register a `kind: "oauth"` entry so the shared UI renders Connect and the
|
|
39
39
|
runtime owns status, refresh, and reauthorization.
|
|
40
40
|
- **Deploy- or app-level configuration** - use deployment/runtime
|
|
41
|
-
configuration, not a per-user secret row.
|
|
41
|
+
configuration, not a per-user secret row. For a non-secret public setting
|
|
42
|
+
already represented by `AgentNativeConfig`, put the default in
|
|
43
|
+
`agent-native.config.ts` and use its `AGENT_NATIVE_CONFIG_<PATH>` alias only
|
|
44
|
+
for a deployment override. Never put a credential or provider key in that
|
|
45
|
+
public namespace.
|
|
42
46
|
- **Account, customer, manager, or other non-secret identifier** - store it as
|
|
43
47
|
scoped connection metadata or app data, not as a masked secret field.
|
|
44
48
|
|
|
@@ -55,7 +55,10 @@ Preview before `--apply`, commit `agent-native.ejections.json`, and never edit
|
|
|
55
55
|
ZIPs, screenshots, thumbnails, session replay chunks) in configured file/blob
|
|
56
56
|
storage and persist only URLs, ids, or handles.
|
|
57
57
|
- Store shared runtime configuration in the workspace root `.env`; use
|
|
58
|
-
`apps/<app>/.env` only for app-specific overrides.
|
|
58
|
+
`apps/<app>/.env` only for app-specific overrides. For public app behavior,
|
|
59
|
+
prefer the default in `agent-native.config.ts` and use the deterministic
|
|
60
|
+
`AGENT_NATIVE_CONFIG_<UPPER_SNAKE_PATH>` alias only when a non-secret value
|
|
61
|
+
needs a deployment override. Never hardcode API keys,
|
|
59
62
|
tokens, webhook URLs, signing secrets, private Builder/internal data, customer
|
|
60
63
|
data, or credential-looking literals in source, docs, prompts, fixtures,
|
|
61
64
|
application state, action responses, or generated app content. Use
|
|
@@ -683,10 +683,6 @@ function scopedCredentialCount(provider: BrainConnectionProvider) {
|
|
|
683
683
|
);
|
|
684
684
|
}
|
|
685
685
|
|
|
686
|
-
function countLabel(count: number, singular: string, plural = `${singular}s`) {
|
|
687
|
-
return `${count.toLocaleString()} ${count === 1 ? singular : plural}`;
|
|
688
|
-
}
|
|
689
|
-
|
|
690
686
|
function sharedConnectionReadiness(
|
|
691
687
|
provider: BrainConnectionProvider,
|
|
692
688
|
t: BrainT,
|
|
@@ -399,17 +399,6 @@ function buildClassifierSystemPrompt(settings: BrainSettings) {
|
|
|
399
399
|
.join("\n");
|
|
400
400
|
}
|
|
401
401
|
|
|
402
|
-
function buildSanitizerUserPrompt(input: CaptureSanitizationInput) {
|
|
403
|
-
return [
|
|
404
|
-
`Source provider: ${input.source.provider}`,
|
|
405
|
-
`Capture title: ${sanitizeSensitiveText(input.title)}`,
|
|
406
|
-
"Raw capture text to filter:",
|
|
407
|
-
"```text",
|
|
408
|
-
input.content,
|
|
409
|
-
"```",
|
|
410
|
-
].join("\n");
|
|
411
|
-
}
|
|
412
|
-
|
|
413
402
|
function modelInputLimit(input: CaptureSanitizationInput) {
|
|
414
403
|
return (
|
|
415
404
|
numberSetting(input.sourceConfig?.captureSanitizationMaxChars) ??
|
|
@@ -38,7 +38,11 @@ connection exists:
|
|
|
38
38
|
register a `kind: "oauth"` entry so the shared UI renders Connect and the
|
|
39
39
|
runtime owns status, refresh, and reauthorization.
|
|
40
40
|
- **Deploy- or app-level configuration** - use deployment/runtime
|
|
41
|
-
configuration, not a per-user secret row.
|
|
41
|
+
configuration, not a per-user secret row. For a non-secret public setting
|
|
42
|
+
already represented by `AgentNativeConfig`, put the default in
|
|
43
|
+
`agent-native.config.ts` and use its `AGENT_NATIVE_CONFIG_<PATH>` alias only
|
|
44
|
+
for a deployment override. Never put a credential or provider key in that
|
|
45
|
+
public namespace.
|
|
42
46
|
- **Account, customer, manager, or other non-secret identifier** - store it as
|
|
43
47
|
scoped connection metadata or app data, not as a masked secret field.
|
|
44
48
|
|
|
@@ -55,7 +55,10 @@ Preview before `--apply`, commit `agent-native.ejections.json`, and never edit
|
|
|
55
55
|
ZIPs, screenshots, thumbnails, session replay chunks) in configured file/blob
|
|
56
56
|
storage and persist only URLs, ids, or handles.
|
|
57
57
|
- Store shared runtime configuration in the workspace root `.env`; use
|
|
58
|
-
`apps/<app>/.env` only for app-specific overrides.
|
|
58
|
+
`apps/<app>/.env` only for app-specific overrides. For public app behavior,
|
|
59
|
+
prefer the default in `agent-native.config.ts` and use the deterministic
|
|
60
|
+
`AGENT_NATIVE_CONFIG_<UPPER_SNAKE_PATH>` alias only when a non-secret value
|
|
61
|
+
needs a deployment override. Never hardcode API keys,
|
|
59
62
|
tokens, webhook URLs, signing secrets, private Builder/internal data, customer
|
|
60
63
|
data, or credential-looking literals in source, docs, prompts, fixtures,
|
|
61
64
|
application state, action responses, or generated app content. Use
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
IconClock,
|
|
11
11
|
IconMapPin,
|
|
12
12
|
IconVideo,
|
|
13
|
-
IconRefresh,
|
|
14
13
|
IconBell,
|
|
15
14
|
IconLayoutSidebarRight,
|
|
16
15
|
IconFileText,
|
|
@@ -192,16 +191,6 @@ function formatDuration(start: string, end: string): string {
|
|
|
192
191
|
return `${hours}h ${minutes}min`;
|
|
193
192
|
}
|
|
194
193
|
|
|
195
|
-
function formatTimeShort(dateStr: string): string {
|
|
196
|
-
const d = parseISO(dateStr);
|
|
197
|
-
const h = d.getHours();
|
|
198
|
-
const m = d.getMinutes();
|
|
199
|
-
const period = h >= 12 ? "PM" : "AM";
|
|
200
|
-
const hour12 = h % 12 || 12;
|
|
201
|
-
if (m === 0) return `${hour12} ${period}`;
|
|
202
|
-
return `${hour12}:${m.toString().padStart(2, "0")} ${period}`;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
194
|
/** Extract a Zoom/Meet/Teams link from location or description */
|
|
206
195
|
function extractMeetingLink(event: CalendarEvent): {
|
|
207
196
|
url: string;
|
|
@@ -447,15 +436,6 @@ function toTimeInputValue(iso: string, timezone?: string): string {
|
|
|
447
436
|
return format(d, "HH:mm");
|
|
448
437
|
}
|
|
449
438
|
|
|
450
|
-
function formatEventDateRange(start: string, end: string, allDay?: boolean) {
|
|
451
|
-
const startDate = parseISO(start);
|
|
452
|
-
const endDate = parseISO(end);
|
|
453
|
-
const displayEndDate = allDay ? new Date(endDate.getTime() - 1) : endDate;
|
|
454
|
-
const startLabel = format(startDate, "EEE MMM d");
|
|
455
|
-
const endLabel = format(displayEndDate, "EEE MMM d");
|
|
456
|
-
return startLabel === endLabel ? startLabel : `${startLabel} - ${endLabel}`;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
439
|
interface EventDetailPopoverProps {
|
|
460
440
|
event: CalendarEvent;
|
|
461
441
|
children: React.ReactNode;
|
|
@@ -38,7 +38,11 @@ connection exists:
|
|
|
38
38
|
register a `kind: "oauth"` entry so the shared UI renders Connect and the
|
|
39
39
|
runtime owns status, refresh, and reauthorization.
|
|
40
40
|
- **Deploy- or app-level configuration** - use deployment/runtime
|
|
41
|
-
configuration, not a per-user secret row.
|
|
41
|
+
configuration, not a per-user secret row. For a non-secret public setting
|
|
42
|
+
already represented by `AgentNativeConfig`, put the default in
|
|
43
|
+
`agent-native.config.ts` and use its `AGENT_NATIVE_CONFIG_<PATH>` alias only
|
|
44
|
+
for a deployment override. Never put a credential or provider key in that
|
|
45
|
+
public namespace.
|
|
42
46
|
- **Account, customer, manager, or other non-secret identifier** - store it as
|
|
43
47
|
scoped connection metadata or app data, not as a masked secret field.
|
|
44
48
|
|