@agent-native/core 0.98.0 → 0.98.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/corpus/README.md +1 -1
- package/corpus/core/CHANGELOG.md +24 -0
- package/corpus/core/package.json +2 -2
- package/corpus/core/src/action-change-marker.ts +8 -1
- package/corpus/core/src/changelog/parse.ts +8 -3
- package/corpus/core/src/client/AgentPanel.tsx +2 -3
- package/corpus/core/src/client/AssistantChat.tsx +83 -39
- package/corpus/core/src/client/analytics.ts +29 -0
- package/corpus/core/src/client/blocks/library/wireframe-kit.tsx +16 -2
- package/corpus/core/src/client/chat-model-groups.ts +28 -0
- package/corpus/core/src/client/composer/RealtimeVoiceMode.tsx +442 -85
- package/corpus/core/src/client/composer/TiptapComposer.tsx +46 -29
- package/corpus/core/src/client/composer/VoiceButton.tsx +2 -1
- package/corpus/core/src/client/composer/index.ts +5 -0
- package/corpus/core/src/client/composer/useRealtimeVoiceMode.tsx +1206 -67
- package/corpus/core/src/client/index.ts +5 -0
- package/corpus/core/src/client/progress/RunsTray.tsx +13 -1
- package/corpus/core/src/client/settings/SecretsSection.tsx +387 -266
- package/corpus/core/src/client/settings/SettingsPanel.tsx +117 -38
- package/corpus/core/src/client/use-action.ts +12 -0
- package/corpus/core/src/client/use-agent-chat-home-handoff.ts +8 -1
- package/corpus/core/src/client/use-agent-engine-configured.ts +17 -3
- package/corpus/core/src/client/use-db-sync.ts +84 -34
- package/corpus/core/src/client/use-pausing-interval.ts +14 -4
- package/corpus/core/src/integrations/scope-store.ts +1 -1
- package/corpus/core/src/integrations/usage-budget-store.ts +1 -1
- package/corpus/core/src/localization/default-messages.ts +44 -1
- package/corpus/core/src/mcp-client/workspace-servers.ts +4 -4
- package/corpus/core/src/secrets/crypto.ts +28 -8
- package/corpus/core/src/server/action-change.ts +5 -1
- package/corpus/core/src/server/action-routes.ts +8 -0
- package/corpus/core/src/server/poll.ts +1 -0
- package/corpus/core/src/server/realtime-voice.ts +299 -13
- package/corpus/core/src/styles/agent-native.css +2 -2
- package/corpus/core/src/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/core/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
- package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
- package/corpus/core/src/vite/client.ts +9 -1
- package/corpus/templates/analytics/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/analytics/.agents/skills/session-replay/SKILL.md +10 -5
- package/corpus/templates/analytics/AGENTS.md +9 -13
- package/corpus/templates/analytics/actions/navigate.ts +59 -5
- package/corpus/templates/analytics/actions/view-screen.ts +3 -6
- package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +20 -3
- package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +2 -1
- package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +21 -6
- package/corpus/templates/analytics/app/global.css +19 -20
- package/corpus/templates/analytics/app/lib/provider-corpus-job-sync.ts +26 -0
- package/corpus/templates/analytics/app/pages/Settings.tsx +35 -341
- package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +38 -7
- package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +1 -1
- package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +3 -0
- package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +333 -272
- package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +72 -17
- package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +297 -108
- package/corpus/templates/analytics/app/root.tsx +28 -8
- package/corpus/templates/analytics/changelog/2026-06-24-first-party-signup-and-pageview-panels-now-honor-dashboard-filters.md +2 -1
- package/corpus/templates/analytics/changelog/2026-06-25-referrer-dashboard-panels-show-external-domains.md +2 -1
- package/corpus/templates/analytics/changelog/2026-07-06-mobile-chat-header-is-more-compact-and-the-menu-button-opens-navigation.md +1 -0
- package/corpus/templates/analytics/changelog/2026-07-08-dashboard-history-and-chat-context.md +1 -0
- package/corpus/templates/analytics/changelog/2026-07-08-settings-are-cleaner-searchable-and-alerts-have-their-own-tab.md +1 -0
- package/corpus/templates/analytics/changelog/2026-07-08-sidebar-sections-stay-collapsed-until-opened.md +1 -0
- package/corpus/templates/analytics/changelog/2026-07-11-analytics-no-longer-repeatedly-restarts-background-requests-.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-analytics-only-asks-for-replay-storage-when-you-enable-sessi.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-charts-now-show-their-loading-skeleton-while-refreshing.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-realtime-voice-now-shows-a-clear-connection-indicator-comple.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-replay-event-counts-stay-hidden-until-recordings-finish-load.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-replay-storage-key-mismatches-show-actionable-setup-guidance.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-replay-timelines-group-continuous-scrolling-and-dev-tools-co.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-filters-now-stay-compact-in-a-settings-menu-at-mediu.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-replay-console-errors-now-link-to-matching-issues-or.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-replays-load-large-recordings-faster-and-surface-fai.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-replays-preserve-recorded-styles-and-viewport-layout.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-11-session-replays-stay-centered-instead-of-clipping-wide-recor.md +6 -0
- package/corpus/templates/analytics/package.json +1 -1
- package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +1 -303
- package/corpus/templates/analytics/server/handlers/session-replay.ts +57 -0
- package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +1 -1
- package/corpus/templates/analytics/server/lib/demo-dashboards.ts +16 -3
- package/corpus/templates/analytics/server/lib/session-replay-agent-context.ts +12 -0
- package/corpus/templates/analytics/server/lib/session-replay.ts +208 -2
- package/corpus/templates/analytics/server/plugins/onboarding.ts +7 -79
- package/corpus/templates/analytics/server/routes/api/session-replay/recordings/[recordingId]/chunks.get.ts +1 -0
- package/corpus/templates/assets/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/assets/app/global.css +4 -4
- package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +0 -1
- package/corpus/templates/assets/app/routes/library.tsx +0 -1
- package/corpus/templates/brain/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/brain/app/global.css +5 -5
- package/corpus/templates/brain/app/root.tsx +0 -3
- package/corpus/templates/calendar/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/calendar/app/root.tsx +1 -0
- package/corpus/templates/chat/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/clips/app/hooks/use-auto-title.ts +74 -8
- package/corpus/templates/clips/app/hooks/use-library.ts +12 -25
- package/corpus/templates/clips/app/routes/_app.settings._index.tsx +20 -22
- package/corpus/templates/clips/changelog/2026-07-11-generated-titles-no-longer-cause-continuous-background-refreshes.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-11-s3-storage-setup-stays-collapsed-until-you-choose-it-as-the-.md +6 -0
- package/corpus/templates/content/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/content/app/hooks/use-comments.ts +0 -1
- package/corpus/templates/content/changelog/2026-07-11-comments-now-update-from-live-collaboration-events-without-c.md +6 -0
- package/corpus/templates/design/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/forms/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/macros/app/components/layout/AppLayout.tsx +1 -2
- package/corpus/templates/macros/app/root.tsx +0 -3
- package/corpus/templates/mail/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/mail/app/hooks/use-compose-state.ts +1 -0
- package/corpus/templates/mail/app/root.tsx +1 -12
- package/corpus/templates/plan/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/corpus/templates/plan/app/hooks/use-navigation-state.ts +5 -2
- package/corpus/templates/plan/app/hooks/use-plans.ts +6 -13
- package/corpus/templates/plan/app/pages/PlansPage.tsx +5 -27
- package/corpus/templates/plan/changelog/2026-07-11-plan-refreshes-only-when-content-changes.md +6 -0
- package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +4 -1
- package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +1 -1
- package/corpus/templates/slides/app/components/layout/Header.tsx +1 -1
- package/corpus/templates/slides/app/context/DeckContext.tsx +1 -0
- package/corpus/templates/slides/app/hooks/use-slide-comments.ts +7 -31
- package/corpus/templates/slides/changelog/2026-07-11-comments-now-update-from-live-collaboration-events-without-c.md +6 -0
- package/dist/action-change-marker.d.ts +1 -0
- package/dist/action-change-marker.d.ts.map +1 -1
- package/dist/action-change-marker.js +7 -1
- package/dist/action-change-marker.js.map +1 -1
- package/dist/changelog/parse.d.ts +4 -2
- package/dist/changelog/parse.d.ts.map +1 -1
- package/dist/changelog/parse.js +5 -3
- package/dist/changelog/parse.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +2 -3
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +7 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +62 -40
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +26 -0
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.d.ts +2 -0
- package/dist/client/blocks/library/wireframe-kit.d.ts.map +1 -1
- package/dist/client/blocks/library/wireframe-kit.js +9 -2
- package/dist/client/blocks/library/wireframe-kit.js.map +1 -1
- package/dist/client/chat-model-groups.d.ts.map +1 -1
- package/dist/client/chat-model-groups.js +24 -0
- package/dist/client/chat-model-groups.js.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.d.ts +40 -4
- package/dist/client/composer/RealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/RealtimeVoiceMode.js +172 -42
- package/dist/client/composer/RealtimeVoiceMode.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +4 -0
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +47 -29
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/VoiceButton.d.ts.map +1 -1
- package/dist/client/composer/VoiceButton.js +2 -2
- package/dist/client/composer/VoiceButton.js.map +1 -1
- package/dist/client/composer/index.d.ts +2 -2
- package/dist/client/composer/index.d.ts.map +1 -1
- package/dist/client/composer/index.js +1 -1
- package/dist/client/composer/index.js.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.d.ts +100 -3
- package/dist/client/composer/useRealtimeVoiceMode.d.ts.map +1 -1
- package/dist/client/composer/useRealtimeVoiceMode.js +952 -51
- package/dist/client/composer/useRealtimeVoiceMode.js.map +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client/index.js.map +1 -1
- package/dist/client/progress/RunsTray.d.ts.map +1 -1
- package/dist/client/progress/RunsTray.js +10 -1
- package/dist/client/progress/RunsTray.js.map +1 -1
- package/dist/client/settings/SecretsSection.d.ts +2 -3
- package/dist/client/settings/SecretsSection.d.ts.map +1 -1
- package/dist/client/settings/SecretsSection.js +46 -22
- package/dist/client/settings/SecretsSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts +9 -0
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +46 -12
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/use-action.d.ts +2 -0
- package/dist/client/use-action.d.ts.map +1 -1
- package/dist/client/use-action.js +10 -0
- package/dist/client/use-action.js.map +1 -1
- package/dist/client/use-agent-chat-home-handoff.d.ts +2 -0
- package/dist/client/use-agent-chat-home-handoff.d.ts.map +1 -1
- package/dist/client/use-agent-chat-home-handoff.js +7 -1
- package/dist/client/use-agent-chat-home-handoff.js.map +1 -1
- package/dist/client/use-agent-engine-configured.d.ts.map +1 -1
- package/dist/client/use-agent-engine-configured.js +17 -3
- package/dist/client/use-agent-engine-configured.js.map +1 -1
- package/dist/client/use-db-sync.d.ts +8 -2
- package/dist/client/use-db-sync.d.ts.map +1 -1
- package/dist/client/use-db-sync.js +57 -32
- package/dist/client/use-db-sync.js.map +1 -1
- package/dist/client/use-pausing-interval.d.ts.map +1 -1
- package/dist/client/use-pausing-interval.js +16 -4
- package/dist/client/use-pausing-interval.js.map +1 -1
- package/dist/integrations/scope-store.js +1 -1
- package/dist/integrations/scope-store.js.map +1 -1
- package/dist/integrations/usage-budget-store.js +1 -1
- package/dist/integrations/usage-budget-store.js.map +1 -1
- package/dist/localization/default-messages.d.ts +41 -1
- package/dist/localization/default-messages.d.ts.map +1 -1
- package/dist/localization/default-messages.js +41 -1
- package/dist/localization/default-messages.js.map +1 -1
- package/dist/mcp-client/workspace-servers.js +4 -4
- package/dist/mcp-client/workspace-servers.js.map +1 -1
- package/dist/observability/routes.d.ts +5 -5
- package/dist/provider-api/corpus-jobs.d.ts +2 -2
- package/dist/secrets/crypto.d.ts +7 -6
- package/dist/secrets/crypto.d.ts.map +1 -1
- package/dist/secrets/crypto.js +30 -11
- package/dist/secrets/crypto.js.map +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/action-change.d.ts +1 -0
- package/dist/server/action-change.d.ts.map +1 -1
- package/dist/server/action-change.js +4 -1
- package/dist/server/action-change.js.map +1 -1
- package/dist/server/action-routes.d.ts.map +1 -1
- package/dist/server/action-routes.js +5 -0
- package/dist/server/action-routes.js.map +1 -1
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/poll.d.ts.map +1 -1
- package/dist/server/poll.js +1 -0
- package/dist/server/poll.js.map +1 -1
- package/dist/server/realtime-voice.d.ts +7 -0
- package/dist/server/realtime-voice.d.ts.map +1 -1
- package/dist/server/realtime-voice.js +222 -12
- package/dist/server/realtime-voice.js.map +1 -1
- package/dist/styles/agent-native.css +2 -2
- package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
- package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +6 -1
- package/dist/vite/client.js.map +1 -1
- package/package.json +2 -2
- package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +2 -2
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +7 -3
- package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +39 -9
|
@@ -1452,6 +1452,7 @@ export function DeckProvider({ children }: { children: ReactNode }) {
|
|
|
1452
1452
|
es.close();
|
|
1453
1453
|
es = null;
|
|
1454
1454
|
}
|
|
1455
|
+
// request-storm-allow: one deck-scoped SSE with backoff and unmount cleanup carries payloads sync events omit.
|
|
1455
1456
|
const next = new EventSource(`${appBasePath()}/api/decks/events`);
|
|
1456
1457
|
es = next;
|
|
1457
1458
|
next.onmessage = handleMessage;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
appBasePath,
|
|
3
2
|
emailToColor,
|
|
4
3
|
useActionMutation,
|
|
5
4
|
useActionQuery,
|
|
6
5
|
} from "@agent-native/core/client";
|
|
7
|
-
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
8
6
|
|
|
9
7
|
export interface SlideComment {
|
|
10
8
|
id: string;
|
|
@@ -50,12 +48,6 @@ function groupIntoThreads(comments: SlideComment[]): CommentThread[] {
|
|
|
50
48
|
return Array.from(map.values());
|
|
51
49
|
}
|
|
52
50
|
|
|
53
|
-
async function fetchJson<T>(url: string, init?: RequestInit): Promise<T> {
|
|
54
|
-
const res = await fetch(url, init);
|
|
55
|
-
if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
|
|
56
|
-
return res.json();
|
|
57
|
-
}
|
|
58
|
-
|
|
59
51
|
export function useSlideComments(
|
|
60
52
|
deckId: string | null,
|
|
61
53
|
slideId: string | null,
|
|
@@ -71,7 +63,6 @@ export function useSlideComments(
|
|
|
71
63
|
const comments: SlideComment[] = Array.isArray(raw) ? raw : [];
|
|
72
64
|
return groupIntoThreads(comments);
|
|
73
65
|
},
|
|
74
|
-
refetchInterval: 3000,
|
|
75
66
|
},
|
|
76
67
|
);
|
|
77
68
|
}
|
|
@@ -81,31 +72,16 @@ export function useCreateSlideComment() {
|
|
|
81
72
|
}
|
|
82
73
|
|
|
83
74
|
export function useResolveSlideComment() {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
method: "PATCH",
|
|
89
|
-
headers: { "Content-Type": "application/json" },
|
|
90
|
-
body: JSON.stringify({ resolved: true }),
|
|
91
|
-
}),
|
|
92
|
-
onSuccess: () => {
|
|
93
|
-
qc.invalidateQueries({ queryKey: ["action"] });
|
|
94
|
-
},
|
|
95
|
-
});
|
|
75
|
+
return useActionMutation<
|
|
76
|
+
{ ok: boolean; resolved?: boolean },
|
|
77
|
+
{ id: string; resolved?: boolean }
|
|
78
|
+
>("update-slide-comment");
|
|
96
79
|
}
|
|
97
80
|
|
|
98
81
|
export function useDeleteSlideComment() {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
fetchJson<{ ok: boolean }>(`${appBasePath()}/api/comments/${id}`, {
|
|
103
|
-
method: "DELETE",
|
|
104
|
-
}),
|
|
105
|
-
onSuccess: () => {
|
|
106
|
-
qc.invalidateQueries({ queryKey: ["action"] });
|
|
107
|
-
},
|
|
108
|
-
});
|
|
82
|
+
return useActionMutation<{ ok: boolean }, { id: string }>(
|
|
83
|
+
"delete-slide-comment",
|
|
84
|
+
);
|
|
109
85
|
}
|
|
110
86
|
|
|
111
87
|
/** Derive a display color for an author email */
|
|
@@ -4,6 +4,7 @@ export interface ActionChangeTarget {
|
|
|
4
4
|
actionName?: string;
|
|
5
5
|
owner?: string;
|
|
6
6
|
orgId?: string;
|
|
7
|
+
requestSource?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare function actionChangeMarkerSession(target: ActionChangeTarget): string | null;
|
|
9
10
|
export declare function actionChangeMarkerValue(target: ActionChangeTarget): Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-change-marker.d.ts","sourceRoot":"","sources":["../src/action-change-marker.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,sBAAsB,CAAC;AAC5D,eAAO,MAAM,+BAA+B,aAAa,CAAC;AAE1D,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"action-change-marker.d.ts","sourceRoot":"","sources":["../src/action-change-marker.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,sBAAsB,CAAC;AAC5D,eAAO,MAAM,+BAA+B,aAAa,CAAC;AAE1D,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,kBAAkB,GACzB,MAAM,GAAG,IAAI,CAIf;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,kBAAkB,GACzB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQxB;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,OAAO,GACb,kBAAkB,GAAG,IAAI,CAwC3B"}
|
|
@@ -13,6 +13,7 @@ export function actionChangeMarkerValue(target) {
|
|
|
13
13
|
...(target.actionName ? { actionName: target.actionName } : {}),
|
|
14
14
|
...(target.owner ? { owner: target.owner } : {}),
|
|
15
15
|
...(target.orgId ? { orgId: target.orgId } : {}),
|
|
16
|
+
...(target.requestSource ? { requestSource: target.requestSource } : {}),
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
export function parseActionChangeMarker(sessionId, value) {
|
|
@@ -28,12 +29,17 @@ export function parseActionChangeMarker(sessionId, value) {
|
|
|
28
29
|
let actionName;
|
|
29
30
|
let owner;
|
|
30
31
|
let orgId;
|
|
32
|
+
let requestSource;
|
|
31
33
|
if (parsed && typeof parsed === "object") {
|
|
32
34
|
const record = parsed;
|
|
33
35
|
actionName =
|
|
34
36
|
typeof record.actionName === "string" ? record.actionName : undefined;
|
|
35
37
|
owner = typeof record.owner === "string" ? record.owner : undefined;
|
|
36
38
|
orgId = typeof record.orgId === "string" ? record.orgId : undefined;
|
|
39
|
+
requestSource =
|
|
40
|
+
typeof record.requestSource === "string"
|
|
41
|
+
? record.requestSource
|
|
42
|
+
: undefined;
|
|
37
43
|
}
|
|
38
44
|
if (!owner && !orgId && typeof sessionId === "string" && sessionId) {
|
|
39
45
|
if (sessionId.startsWith(ACTION_CHANGE_MARKER_ORG_PREFIX)) {
|
|
@@ -47,6 +53,6 @@ export function parseActionChangeMarker(sessionId, value) {
|
|
|
47
53
|
}
|
|
48
54
|
if (!actionName && !owner && !orgId)
|
|
49
55
|
return null;
|
|
50
|
-
return { actionName, owner, orgId };
|
|
56
|
+
return { actionName, owner, orgId, requestSource };
|
|
51
57
|
}
|
|
52
58
|
//# sourceMappingURL=action-change-marker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-change-marker.js","sourceRoot":"","sources":["../src/action-change-marker.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAC5D,MAAM,CAAC,MAAM,+BAA+B,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"action-change-marker.js","sourceRoot":"","sources":["../src/action-change-marker.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAC5D,MAAM,CAAC,MAAM,+BAA+B,GAAG,UAAU,CAAC;AAS1D,MAAM,UAAU,yBAAyB,CACvC,MAA0B;IAE1B,IAAI,MAAM,CAAC,KAAK;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC;IACtC,IAAI,MAAM,CAAC,KAAK;QAAE,OAAO,GAAG,+BAA+B,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC;IAC7E,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,MAA0B;IAE1B,OAAO;QACL,MAAM,EAAE,QAAQ;QAChB,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/D,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,GAAG,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,EA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W,GAAG,SAAS,CAAC,KAAK,CACjC,+BAA+B,CAAC,MAAM,CACvC,CAAC;YACF,IAAI,WAAW;gBAAE,KAAK,GAAG,WAAW,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,KAAK,GAAG,SAAS,CAAC;QACpB,CAAC;IACH,CAAC;IAED,IAAI,CAAC,UAAU,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACjD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;AACrD,CAAC","sourcesContent":["export const ACTION_CHANGE_MARKER_KEY = \"__action_change__\";\nexport const ACTION_CHANGE_MARKER_ORG_PREFIX = \"__org__:\";\n\nexport interface ActionChangeTarget {\n actionName?: string;\n owner?: string;\n orgId?: string;\n requestSource?: string;\n}\n\nexport function actionChangeMarkerSession(\n target: ActionChangeTarget,\n): string | null {\n if (target.owner) return target.owner;\n if (target.orgId) return `${ACTION_CHANGE_MARKER_ORG_PREFIX}${target.orgId}`;\n return null;\n}\n\nexport function actionChangeMarkerValue(\n target: ActionChangeTarget,\n): Record<string, string> {\n return {\n source: \"action\",\n ...(target.actionName ? { actionName: target.actionName } : {}),\n ...(target.owner ? { owner: target.owner } : {}),\n ...(target.orgId ? { orgId: target.orgId } : {}),\n ...(target.requestSource ? { requestSource: target.requestSource } : {}),\n };\n}\n\nexport function parseActionChangeMarker(\n sessionId: unknown,\n value: unknown,\n): ActionChangeTarget | null {\n let parsed: unknown = value;\n if (typeof value === \"string\") {\n try {\n parsed = JSON.parse(value);\n } catch {\n parsed = null;\n }\n }\n\n let actionName: string | undefined;\n let owner: string | undefined;\n let orgId: string | undefined;\n let requestSource: string | undefined;\n\n if (parsed && typeof parsed === \"object\") {\n const record = parsed as Record<string, unknown>;\n actionName =\n typeof record.actionName === \"string\" ? record.actionName : undefined;\n owner = typeof record.owner === \"string\" ? record.owner : undefined;\n orgId = typeof record.orgId === \"string\" ? record.orgId : undefined;\n requestSource =\n typeof record.requestSource === \"string\"\n ? record.requestSource\n : undefined;\n }\n\n if (!owner && !orgId && typeof sessionId === \"string\" && sessionId) {\n if (sessionId.startsWith(ACTION_CHANGE_MARKER_ORG_PREFIX)) {\n const parsedOrgId = sessionId.slice(\n ACTION_CHANGE_MARKER_ORG_PREFIX.length,\n );\n if (parsedOrgId) orgId = parsedOrgId;\n } else {\n owner = sessionId;\n }\n }\n\n if (!actionName && !owner && !orgId) return null;\n return { actionName, owner, orgId, requestSource };\n}\n"]}
|
|
@@ -51,9 +51,11 @@ export declare function changelogSlug(value: string): string;
|
|
|
51
51
|
export declare function parseChangelog(markdown: string): ChangelogEntry[];
|
|
52
52
|
/**
|
|
53
53
|
* Parse a pending `changelog/<file>.md` entry: optional `---` frontmatter
|
|
54
|
-
* (`type:` / `date:`) followed by the markdown description body.
|
|
54
|
+
* (`type:` / `date:`) followed by the markdown description body. Callers that
|
|
55
|
+
* know the entry filename can provide its date as a fallback for hand-written
|
|
56
|
+
* entries that omit `date:`.
|
|
55
57
|
*/
|
|
56
|
-
export declare function parsePendingEntry(content: string): PendingChangelogEntry;
|
|
58
|
+
export declare function parsePendingEntry(content: string, fallbackDate?: string): PendingChangelogEntry;
|
|
57
59
|
/**
|
|
58
60
|
* Render a set of pending entries as a single dated release section (the body
|
|
59
61
|
* that goes beneath a `## <date>` heading). Groups bullets by type.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../src/changelog/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,wDAAwD;AACxD,MAAM,WAAW,cAAc;IAC7B,uEAAuE;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,IAA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OAAO,GACP,UAAU,GACV,OAAO,GACP,SAAS,GACT,SAAS,GACT,UAAU,CAAC;AAEf;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,mBAAmB,EAOtD,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAOrD,CAAC;AAIF,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMnD;AAiBD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,cAAc,EAAE,CA+CjE;AAOD;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,GACpB,qBAAqB,CAuBvB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,qBAAqB,EAAE,GAAG,MAAM,CAwB1E;AAED,QAAA,MAAM,gBAAgB,QAEgD,CAAC;AAEvE;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,qBAAqB,EAAE,EAChC,WAAW,EAAE,MAAM,GAClB,MAAM,CAgBR;AA0BD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,qBAAqB,EAAE,GAC/B,MAAM,CA2CR;AAED,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/changelog/parse.js
CHANGED
|
@@ -116,9 +116,11 @@ function stripBrackets(title) {
|
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
118
|
* Parse a pending `changelog/<file>.md` entry: optional `---` frontmatter
|
|
119
|
-
* (`type:` / `date:`) followed by the markdown description body.
|
|
119
|
+
* (`type:` / `date:`) followed by the markdown description body. Callers that
|
|
120
|
+
* know the entry filename can provide its date as a fallback for hand-written
|
|
121
|
+
* entries that omit `date:`.
|
|
120
122
|
*/
|
|
121
|
-
export function parsePendingEntry(content) {
|
|
123
|
+
export function parsePendingEntry(content, fallbackDate) {
|
|
122
124
|
let type;
|
|
123
125
|
let date;
|
|
124
126
|
let body = content;
|
|
@@ -139,7 +141,7 @@ export function parsePendingEntry(content) {
|
|
|
139
141
|
}
|
|
140
142
|
return {
|
|
141
143
|
type: normalizeType(type),
|
|
142
|
-
date,
|
|
144
|
+
date: date?.match(ISO_DATE)?.[1] ?? fallbackDate?.match(ISO_DATE)?.[1],
|
|
143
145
|
text: body.trim(),
|
|
144
146
|
};
|
|
145
147
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/changelog/parse.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAkCH;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA0B;IAC1D,OAAO;IACP,UAAU;IACV,OAAO;IACP,SAAS;IACT,SAAS;IACT,UAAU;CACX,CAAC;AAEF,MAAM,YAAY,GAAwC;IACxD,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF,MAAM,QAAQ,GAAG,qBAAqB,CAAC;AAEvC,6DAA6D;AAC7D,MAAM,UAAU,aAAa,CAAC,KAAa;IACzC,OAAO,KAAK;SACT,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClB,CAAC;AAED,SAAS,aAAa,CAAC,GAAuB;IAC5C,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC/C,IAAK,qBAAkC,CAAC,QA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Q,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,KAAK,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,eAAe,CAAC,QAAQ,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;AACtE,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAC","sourcesContent":["/**\n * Shared, dependency-free changelog parsing + serialization.\n *\n * Used by BOTH:\n * - the browser bundle (rendering an app's CHANGELOG.md in the command\n * menu / settings \"What's new\" surface), and\n * - the `agent-native changelog` CLI (rolling pending entry files up into\n * CHANGELOG.md).\n *\n * Keep this file isomorphic: no Node, no browser, no third-party deps. The\n * markdown shape is the conventional \"Keep a Changelog\" layout — a top-level\n * `# Changelog` heading followed by one `## <release>` section per release.\n */\n\n/** A single released section of a CHANGELOG.md file. */\nexport interface ChangelogEntry {\n /** Stable id derived from the heading — used for \"unseen\" tracking. */\n id: string;\n /** Raw heading text, e.g. `2026-06-23` or `v1.2.0 — 2026-06-23`. */\n title: string;\n /** ISO date (YYYY-MM-DD) extracted from the heading, if present. */\n date?: string;\n /** Version label extracted from the heading, if present. */\n version?: string;\n /** Markdown body beneath the heading (until the next `## ` section). */\n body: string;\n}\n\n/** A not-yet-released entry authored as a `changelog/<file>.md` file. */\nexport interface PendingChangelogEntry {\n /** Category — `added`, `improved`, `fixed`, `changed`, etc. */\n type: ChangelogChangeType;\n /** ISO date the entry was authored (YYYY-MM-DD). */\n date?: string;\n /** User-facing description (markdown, single bullet). */\n text: string;\n}\n\nexport type ChangelogChangeType =\n | \"added\"\n | \"improved\"\n | \"fixed\"\n | \"changed\"\n | \"removed\"\n | \"security\";\n\n/**\n * Order changes are grouped under a release heading. Anything not listed here\n * falls back to the \"changed\" group, then renders in insertion order.\n */\nexport const CHANGELOG_GROUP_ORDER: ChangelogChangeType[] = [\n \"added\",\n \"improved\",\n \"fixed\",\n \"changed\",\n \"removed\",\n \"security\",\n];\n\nconst GROUP_LABELS: Record<ChangelogChangeType, string> = {\n added: \"Added\",\n improved: \"Improved\",\n fixed: \"Fixed\",\n changed: \"Changed\",\n removed: \"Removed\",\n security: \"Security\",\n};\n\nconst ISO_DATE = /(\\d{4}-\\d{2}-\\d{2})/;\n\n/** Lowercase, hyphenate, and strip to a URL/id-safe slug. */\nexport function changelogSlug(value: string): string {\n return value\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n .slice(0, 60);\n}\n\nfunction normalizeType(raw: string | undefined): ChangelogChangeType {\n const value = (raw ?? \"\").trim().toLowerCase();\n if ((CHANGELOG_GROUP_ORDER as string[]).includes(value)) {\n return value as ChangelogChangeType;\n }\n // Friendly aliases.\n if (value === \"feature\" || value === \"new\" || value === \"add\") return \"added\";\n if (value === \"improvement\" || value === \"enhancement\" || value === \"perf\") {\n return \"improved\";\n }\n if (value === \"fix\" || value === \"bugfix\" || value === \"bug\") return \"fixed\";\n if (value === \"remove\" || value === \"deprecated\") return \"removed\";\n return \"changed\";\n}\n\n/**\n * Parse a CHANGELOG.md document into structured release entries.\n *\n * Tolerant by design: an empty or malformed file yields an empty list rather\n * than throwing, so a missing/partial changelog never breaks the UI.\n */\nexport function parseChangelog(markdown: string): ChangelogEntry[] {\n if (!markdown || typeof markdown !== \"string\") return [];\n\n const lines = markdown.split(/\\r?\\n/);\n const entries: ChangelogEntry[] = [];\n const seenIds = new Set<string>();\n\n let currentTitle: string | null = null;\n let bodyLines: string[] = [];\n\n const flush = () => {\n if (currentTitle === null) return;\n const title = currentTitle.trim();\n const date = title.match(ISO_DATE)?.[1];\n const version = title.match(/v?\\d+\\.\\d+(?:\\.\\d+)?/)?.[0];\n // Build a stable, unique id from the heading.\n let base = changelogSlug(title) || \"entry\";\n let id = base;\n let n = 2;\n while (seenIds.has(id)) id = `${base}-${n++}`;\n seenIds.add(id);\n entries.push({\n id,\n title,\n date,\n version: version && version !== date ? version : undefined,\n body: bodyLines.join(\"\\n\").trim(),\n });\n currentTitle = null;\n bodyLines = [];\n };\n\n for (const line of lines) {\n // `## ` (but not `### `) starts a new release section.\n const match = /^##\\s+(?!#)(.+?)\\s*$/.exec(line);\n if (match) {\n flush();\n currentTitle = stripBrackets(match[1]);\n continue;\n }\n // Skip the top-level `# Changelog` title and anything before the first `##`.\n if (currentTitle === null) continue;\n bodyLines.push(line);\n }\n flush();\n\n return entries;\n}\n\n/** `## [1.2.0]` → `1.2.0`; leaves un-bracketed headings untouched. */\nfunction stripBrackets(title: string): string {\n return title.replace(/^\\[(.+?)\\]\\s*/, \"$1 \").trim();\n}\n\n/**\n * Parse a pending `changelog/<file>.md` entry: optional `---` frontmatter\n * (`type:` / `date:`) followed by the markdown description body.\n */\nexport function parsePendingEntry(content: string): PendingChangelogEntry {\n let type: string | undefined;\n let date: string | undefined;\n let body = content;\n\n const fm = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---\\r?\\n?/.exec(content);\n if (fm) {\n for (const raw of fm[1].split(/\\r?\\n/)) {\n const kv = /^([a-zA-Z]+)\\s*:\\s*(.+?)\\s*$/.exec(raw);\n if (!kv) continue;\n const key = kv[1].toLowerCase();\n const value = kv[2].replace(/^[\"']|[\"']$/g, \"\").trim();\n if (key === \"type\") type = value;\n else if (key === \"date\") date = value.match(ISO_DATE)?.[1] ?? value;\n }\n body = content.slice(fm[0].length);\n }\n\n return {\n type: normalizeType(type),\n date,\n text: body.trim(),\n };\n}\n\n/**\n * Render a set of pending entries as a single dated release section (the body\n * that goes beneath a `## <date>` heading). Groups bullets by type.\n */\nexport function renderReleaseBody(entries: PendingChangelogEntry[]): string {\n const groups = new Map<ChangelogChangeType, string[]>();\n for (const entry of entries) {\n const text = entry.text.trim();\n if (!text) continue;\n const bullet = text.includes(\"\\n\")\n ? // Preserve multi-line bodies, indenting continuation lines.\n text\n .split(/\\r?\\n/)\n .map((l, i) => (i === 0 ? `- ${l}` : ` ${l}`))\n .join(\"\\n\")\n : `- ${text}`;\n const list = groups.get(entry.type) ?? [];\n list.push(bullet);\n groups.set(entry.type, list);\n }\n\n const sections: string[] = [];\n for (const type of CHANGELOG_GROUP_ORDER) {\n const list = groups.get(type);\n if (!list?.length) continue;\n sections.push(`### ${GROUP_LABELS[type]}\\n\\n${list.join(\"\\n\")}`);\n }\n return sections.join(\"\\n\\n\");\n}\n\nconst CHANGELOG_HEADER =\n \"# Changelog\\n\\n\" +\n \"All notable user-facing changes to this app are documented here.\\n\";\n\n/**\n * Roll a batch of pending entries into an existing CHANGELOG.md document,\n * prepending a new `## <date>` section above the most recent release. Returns\n * the full updated document. Pure — the CLI handles file IO and deletion.\n */\nexport function rollupChangelog(\n existing: string,\n pending: PendingChangelogEntry[],\n releaseDate: string,\n): string {\n const body = renderReleaseBody(pending);\n if (!body) return existing || `${CHANGELOG_HEADER}`;\n\n const section = `## ${releaseDate}\\n\\n${body}\\n`;\n\n const doc = (existing || CHANGELOG_HEADER).replace(/\\s+$/, \"\");\n // Insert the new section immediately before the first existing `## ` release\n // so the header/intro stays on top and releases stay newest-first.\n const firstRelease = doc.search(/^##\\s+(?!#)/m);\n if (firstRelease === -1) {\n return `${doc}\\n\\n${section}\\n`;\n }\n const head = doc.slice(0, firstRelease).replace(/\\s+$/, \"\");\n const rest = doc.slice(firstRelease);\n return `${head}\\n\\n${section}\\n${rest}\\n`;\n}\n\nfunction changelogHeader(markdown: string): string {\n const doc = (markdown || CHANGELOG_HEADER).replace(/\\s+$/, \"\");\n const firstRelease = doc.search(/^##\\s+(?!#)/m);\n const header =\n (firstRelease === -1 ? doc : doc.slice(0, firstRelease)).replace(\n /\\s+$/,\n \"\",\n ) || CHANGELOG_HEADER.trim();\n return header;\n}\n\nfunction pendingSectionTitle(entry: PendingChangelogEntry): string {\n return entry.date?.match(ISO_DATE)?.[1] ?? \"Unreleased\";\n}\n\nfunction pendingSectionSort(a: string, b: string): number {\n const aDate = a.match(ISO_DATE)?.[1];\n const bDate = b.match(ISO_DATE)?.[1];\n if (aDate && bDate) return bDate.localeCompare(aDate);\n if (!aDate && bDate) return -1;\n if (aDate && !bDate) return 1;\n return a.localeCompare(b);\n}\n\n/**\n * Render an app-facing changelog that includes both released CHANGELOG.md\n * sections and adjacent pending `changelog/*.md` entries. Unlike `release`,\n * this is pure and non-destructive, so build/dev bundles can show current\n * product notes without deleting the conflict-free pending files.\n */\nexport function mergePendingChangelog(\n existing: string,\n pending: PendingChangelogEntry[],\n): string {\n const pendingWithText = pending.filter((entry) => entry.text.trim());\n if (pendingWithText.length === 0) return existing || CHANGELOG_HEADER;\n\n const existingEntries = parseChangelog(existing);\n const usedExistingIndexes = new Set<number>();\n const pendingByTitle = new Map<string, PendingChangelogEntry[]>();\n\n for (const entry of pendingWithText) {\n const title = pendingSectionTitle(entry);\n pendingByTitle.set(title, [...(pendingByTitle.get(title) ?? []), entry]);\n }\n\n const sections: string[] = [];\n for (const title of [...pendingByTitle.keys()].sort(pendingSectionSort)) {\n const body = renderReleaseBody(pendingByTitle.get(title) ?? []);\n if (!body) continue;\n\n const existingIndex = existingEntries.findIndex((entry, index) => {\n if (usedExistingIndexes.has(index)) return false;\n return entry.date === title || entry.title === title;\n });\n\n if (existingIndex === -1) {\n sections.push(`## ${title}\\n\\n${body}`);\n continue;\n }\n\n usedExistingIndexes.add(existingIndex);\n const existingEntry = existingEntries[existingIndex];\n sections.push(\n `## ${existingEntry.title}\\n\\n${[body, existingEntry.body]\n .filter(Boolean)\n .join(\"\\n\\n\")}`,\n );\n }\n\n existingEntries.forEach((entry, index) => {\n if (usedExistingIndexes.has(index)) return;\n sections.push(`## ${entry.title}\\n\\n${entry.body}`);\n });\n\n return `${changelogHeader(existing)}\\n\\n${sections.join(\"\\n\\n\")}\\n`;\n}\n\nexport { CHANGELOG_HEADER, GROUP_LABELS };\n"]}
|
|
1
|
+
{"version":3,"file":"parse.js","sourceRoot":"","sources":["../../src/changelog/parse.ts"],"names":[],"mappings":"AAAA;;;;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OTH:\n * - the browser bundle (rendering an app's CHANGELOG.md in the command\n * menu / settings \"What's new\" surface), and\n * - the `agent-native changelog` CLI (rolling pending entry files up into\n * CHANGELOG.md).\n *\n * Keep this file isomorphic: no Node, no browser, no third-party deps. The\n * markdown shape is the conventional \"Keep a Changelog\" layout — a top-level\n * `# Changelog` heading followed by one `## <release>` section per release.\n */\n\n/** A single released section of a CHANGELOG.md file. */\nexport interface ChangelogEntry {\n /** Stable id derived from the heading — used for \"unseen\" tracking. */\n id: string;\n /** Raw heading text, e.g. `2026-06-23` or `v1.2.0 — 2026-06-23`. */\n title: string;\n /** ISO date (YYYY-MM-DD) extracted from the heading, if present. */\n date?: string;\n /** Version label extracted from the heading, if present. */\n version?: string;\n /** Markdown body beneath the heading (until the next `## ` section). */\n body: string;\n}\n\n/** A not-yet-released entry authored as a `changelog/<file>.md` file. */\nexport interface PendingChangelogEntry {\n /** Category — `added`, `improved`, `fixed`, `changed`, etc. */\n type: ChangelogChangeType;\n /** ISO date the entry was authored (YYYY-MM-DD). */\n date?: string;\n /** User-facing description (markdown, single bullet). */\n text: string;\n}\n\nexport type ChangelogChangeType =\n | \"added\"\n | \"improved\"\n | \"fixed\"\n | \"changed\"\n | \"removed\"\n | \"security\";\n\n/**\n * Order changes are grouped under a release heading. Anything not listed here\n * falls back to the \"changed\" group, then renders in insertion order.\n */\nexport const CHANGELOG_GROUP_ORDER: ChangelogChangeType[] = [\n \"added\",\n \"improved\",\n \"fixed\",\n \"changed\",\n \"removed\",\n \"security\",\n];\n\nconst GROUP_LABELS: Record<ChangelogChangeType, string> = {\n added: \"Added\",\n improved: \"Improved\",\n fixed: \"Fixed\",\n changed: \"Changed\",\n removed: \"Removed\",\n security: \"Security\",\n};\n\nconst ISO_DATE = /(\\d{4}-\\d{2}-\\d{2})/;\n\n/** Lowercase, hyphenate, and strip to a URL/id-safe slug. */\nexport function changelogSlug(value: string): string {\n return value\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n .slice(0, 60);\n}\n\nfunction normalizeType(raw: string | undefined): ChangelogChangeType {\n const value = (raw ?? \"\").trim().toLowerCase();\n if ((CHANGELOG_GROUP_ORDER as string[]).includes(value)) {\n return value as ChangelogChangeType;\n }\n // Friendly aliases.\n if (value === \"feature\" || value === \"new\" || value === \"add\") return \"added\";\n if (value === \"improvement\" || value === \"enhancement\" || value === \"perf\") {\n return \"improved\";\n }\n if (value === \"fix\" || value === \"bugfix\" || value === \"bug\") return \"fixed\";\n if (value === \"remove\" || value === \"deprecated\") return \"removed\";\n return \"changed\";\n}\n\n/**\n * Parse a CHANGELOG.md document into structured release entries.\n *\n * Tolerant by design: an empty or malformed file yields an empty list rather\n * than throwing, so a missing/partial changelog never breaks the UI.\n */\nexport function parseChangelog(markdown: string): ChangelogEntry[] {\n if (!markdown || typeof markdown !== \"string\") return [];\n\n const lines = markdown.split(/\\r?\\n/);\n const entries: ChangelogEntry[] = [];\n const seenIds = new Set<string>();\n\n let currentTitle: string | null = null;\n let bodyLines: string[] = [];\n\n const flush = () => {\n if (currentTitle === null) return;\n const title = currentTitle.trim();\n const date = title.match(ISO_DATE)?.[1];\n const version = title.match(/v?\\d+\\.\\d+(?:\\.\\d+)?/)?.[0];\n // Build a stable, unique id from the heading.\n let base = changelogSlug(title) || \"entry\";\n let id = base;\n let n = 2;\n while (seenIds.has(id)) id = `${base}-${n++}`;\n seenIds.add(id);\n entries.push({\n id,\n title,\n date,\n version: version && version !== date ? version : undefined,\n body: bodyLines.join(\"\\n\").trim(),\n });\n currentTitle = null;\n bodyLines = [];\n };\n\n for (const line of lines) {\n // `## ` (but not `### `) starts a new release section.\n const match = /^##\\s+(?!#)(.+?)\\s*$/.exec(line);\n if (match) {\n flush();\n currentTitle = stripBrackets(match[1]);\n continue;\n }\n // Skip the top-level `# Changelog` title and anything before the first `##`.\n if (currentTitle === null) continue;\n bodyLines.push(line);\n }\n flush();\n\n return entries;\n}\n\n/** `## [1.2.0]` → `1.2.0`; leaves un-bracketed headings untouched. */\nfunction stripBrackets(title: string): string {\n return title.replace(/^\\[(.+?)\\]\\s*/, \"$1 \").trim();\n}\n\n/**\n * Parse a pending `changelog/<file>.md` entry: optional `---` frontmatter\n * (`type:` / `date:`) followed by the markdown description body. Callers that\n * know the entry filename can provide its date as a fallback for hand-written\n * entries that omit `date:`.\n */\nexport function parsePendingEntry(\n content: string,\n fallbackDate?: string,\n): PendingChangelogEntry {\n let type: string | undefined;\n let date: string | undefined;\n let body = content;\n\n const fm = /^---\\r?\\n([\\s\\S]*?)\\r?\\n---\\r?\\n?/.exec(content);\n if (fm) {\n for (const raw of fm[1].split(/\\r?\\n/)) {\n const kv = /^([a-zA-Z]+)\\s*:\\s*(.+?)\\s*$/.exec(raw);\n if (!kv) continue;\n const key = kv[1].toLowerCase();\n const value = kv[2].replace(/^[\"']|[\"']$/g, \"\").trim();\n if (key === \"type\") type = value;\n else if (key === \"date\") date = value.match(ISO_DATE)?.[1] ?? value;\n }\n body = content.slice(fm[0].length);\n }\n\n return {\n type: normalizeType(type),\n date: date?.match(ISO_DATE)?.[1] ?? fallbackDate?.match(ISO_DATE)?.[1],\n text: body.trim(),\n };\n}\n\n/**\n * Render a set of pending entries as a single dated release section (the body\n * that goes beneath a `## <date>` heading). Groups bullets by type.\n */\nexport function renderReleaseBody(entries: PendingChangelogEntry[]): string {\n const groups = new Map<ChangelogChangeType, string[]>();\n for (const entry of entries) {\n const text = entry.text.trim();\n if (!text) continue;\n const bullet = text.includes(\"\\n\")\n ? // Preserve multi-line bodies, indenting continuation lines.\n text\n .split(/\\r?\\n/)\n .map((l, i) => (i === 0 ? `- ${l}` : ` ${l}`))\n .join(\"\\n\")\n : `- ${text}`;\n const list = groups.get(entry.type) ?? [];\n list.push(bullet);\n groups.set(entry.type, list);\n }\n\n const sections: string[] = [];\n for (const type of CHANGELOG_GROUP_ORDER) {\n const list = groups.get(type);\n if (!list?.length) continue;\n sections.push(`### ${GROUP_LABELS[type]}\\n\\n${list.join(\"\\n\")}`);\n }\n return sections.join(\"\\n\\n\");\n}\n\nconst CHANGELOG_HEADER =\n \"# Changelog\\n\\n\" +\n \"All notable user-facing changes to this app are documented here.\\n\";\n\n/**\n * Roll a batch of pending entries into an existing CHANGELOG.md document,\n * prepending a new `## <date>` section above the most recent release. Returns\n * the full updated document. Pure — the CLI handles file IO and deletion.\n */\nexport function rollupChangelog(\n existing: string,\n pending: PendingChangelogEntry[],\n releaseDate: string,\n): string {\n const body = renderReleaseBody(pending);\n if (!body) return existing || `${CHANGELOG_HEADER}`;\n\n const section = `## ${releaseDate}\\n\\n${body}\\n`;\n\n const doc = (existing || CHANGELOG_HEADER).replace(/\\s+$/, \"\");\n // Insert the new section immediately before the first existing `## ` release\n // so the header/intro stays on top and releases stay newest-first.\n const firstRelease = doc.search(/^##\\s+(?!#)/m);\n if (firstRelease === -1) {\n return `${doc}\\n\\n${section}\\n`;\n }\n const head = doc.slice(0, firstRelease).replace(/\\s+$/, \"\");\n const rest = doc.slice(firstRelease);\n return `${head}\\n\\n${section}\\n${rest}\\n`;\n}\n\nfunction changelogHeader(markdown: string): string {\n const doc = (markdown || CHANGELOG_HEADER).replace(/\\s+$/, \"\");\n const firstRelease = doc.search(/^##\\s+(?!#)/m);\n const header =\n (firstRelease === -1 ? doc : doc.slice(0, firstRelease)).replace(\n /\\s+$/,\n \"\",\n ) || CHANGELOG_HEADER.trim();\n return header;\n}\n\nfunction pendingSectionTitle(entry: PendingChangelogEntry): string {\n return entry.date?.match(ISO_DATE)?.[1] ?? \"Unreleased\";\n}\n\nfunction pendingSectionSort(a: string, b: string): number {\n const aDate = a.match(ISO_DATE)?.[1];\n const bDate = b.match(ISO_DATE)?.[1];\n if (aDate && bDate) return bDate.localeCompare(aDate);\n if (!aDate && bDate) return -1;\n if (aDate && !bDate) return 1;\n return a.localeCompare(b);\n}\n\n/**\n * Render an app-facing changelog that includes both released CHANGELOG.md\n * sections and adjacent pending `changelog/*.md` entries. Unlike `release`,\n * this is pure and non-destructive, so build/dev bundles can show current\n * product notes without deleting the conflict-free pending files.\n */\nexport function mergePendingChangelog(\n existing: string,\n pending: PendingChangelogEntry[],\n): string {\n const pendingWithText = pending.filter((entry) => entry.text.trim());\n if (pendingWithText.length === 0) return existing || CHANGELOG_HEADER;\n\n const existingEntries = parseChangelog(existing);\n const usedExistingIndexes = new Set<number>();\n const pendingByTitle = new Map<string, PendingChangelogEntry[]>();\n\n for (const entry of pendingWithText) {\n const title = pendingSectionTitle(entry);\n pendingByTitle.set(title, [...(pendingByTitle.get(title) ?? []), entry]);\n }\n\n const sections: string[] = [];\n for (const title of [...pendingByTitle.keys()].sort(pendingSectionSort)) {\n const body = renderReleaseBody(pendingByTitle.get(title) ?? []);\n if (!body) continue;\n\n const existingIndex = existingEntries.findIndex((entry, index) => {\n if (usedExistingIndexes.has(index)) return false;\n return entry.date === title || entry.title === title;\n });\n\n if (existingIndex === -1) {\n sections.push(`## ${title}\\n\\n${body}`);\n continue;\n }\n\n usedExistingIndexes.add(existingIndex);\n const existingEntry = existingEntries[existingIndex];\n sections.push(\n `## ${existingEntry.title}\\n\\n${[body, existingEntry.body]\n .filter(Boolean)\n .join(\"\\n\\n\")}`,\n );\n }\n\n existingEntries.forEach((entry, index) => {\n if (usedExistingIndexes.has(index)) return;\n sections.push(`## ${entry.title}\\n\\n${entry.body}`);\n });\n\n return `${changelogHeader(existing)}\\n\\n${sections.join(\"\\n\\n\")}\\n`;\n}\n\nexport { CHANGELOG_HEADER, GROUP_LABELS };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentPanel.d.ts","sourceRoot":"","sources":["../../src/client/AgentPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAmBH,OAAO,KASN,MAAM,OAAO,CAAC;AAkCf,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAapE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM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EACzB,mBAAmB,EACnB,KAAK,EACL,cAAc,EACd,YAAY,EACZ,aAAa,GACd,EAAE,iBAAiB,qBAilBnB;AAED;;;GAGG;AACH,wBAAgB,cAAc,SAqB7B;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,4BAqCtE"}
|
|
@@ -624,7 +624,7 @@ function AgentPanelInner({ defaultMode = "chat", className, style, apiUrl, empty
|
|
|
624
624
|
})(), _jsx(FeedbackButton, { variant: "icon", side: "bottom", align: "end", chatSessionId: activeChatSessionId, chatStorageKey: storageKey, open: feedbackOpen, onOpenChange: setFeedbackOpen, trigger: _jsx("button", { type: "button", tabIndex: -1, "aria-hidden": "true", className: "pointer-events-none absolute end-0 top-full h-px w-px opacity-0" }) }), mode === "chat" && (_jsx(IconTooltip, { content: t("agentPanel.newChat"), children: _jsx("button", { onClick: addTab, "aria-label": t("agentPanel.newChat"), className: "flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-accent/50", children: _jsx(IconPlus, { size: 14 }) }) })), mode === "cli" && canUseCodeTools && (_jsx(IconTooltip, { content: t("agentPanel.newTerminal"), children: _jsx("button", { onClick: addCliTab, "aria-label": t("agentPanel.newTerminal"), className: "flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-accent/50", children: _jsx(IconPlus, { size: 14 }) }) })), _jsxs(DropdownMenu, { open: headerMenuOpen, onOpenChange: setHeaderMenuOpen, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("button", { className: cn("flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-accent/50", (headerMenuOpen || mode === "settings") &&
|
|
625
625
|
"bg-accent text-foreground"), "aria-label": t("agentPanel.panelOptions"), children: _jsx(IconDotsVertical, { size: 14 }) }) }), _jsxs(DropdownMenuContent, { align: "end", sideOffset: 6, className: "w-48", children: [onCollapse && (_jsxs(_Fragment, { children: [_jsxs(DropdownMenuItem, { onSelect: onCollapse, children: [_jsx(IconLayoutSidebarRightCollapse, { size: 14, className: "shrink-0" }), t("agentPanel.collapseSidebar"), _jsx(DropdownMenuShortcut, { children: toggleSidebarHint })] }), _jsx(DropdownMenuSeparator, {})] })), mode === "chat" && toggleHistory && (_jsxs(DropdownMenuItem, { onSelect: toggleHistory, children: [_jsx(IconHistory, { size: 14, className: "shrink-0" }), showHistory
|
|
626
626
|
? t("agentPanel.hideChats")
|
|
627
|
-
: t("agentPanel.allChats")] })), mode === "chat" && (_jsx(RunsTrayMenuItem, { pollMs:
|
|
627
|
+
: t("agentPanel.allChats")] })), mode === "chat" && (_jsx(RunsTrayMenuItem, { pollMs: 0, limit: 12, showRecent: true, onOpenThread: openRunThread })), mode === "chat" && _jsx(DropdownMenuSeparator, {}), mode === "cli" && availableClis.length > 0 && (_jsxs(_Fragment, { children: [availableClis.map((cli) => (_jsxs(DropdownMenuItem, { onSelect: () => selectCli(cli.command), className: cn(cli.command === selectedCli
|
|
628
628
|
? "font-medium"
|
|
629
629
|
: "text-muted-foreground"), children: [cli.command === selectedCli ? (_jsx(IconCheck, { size: 12, className: "shrink-0" })) : (_jsx("span", { className: "w-3" })), cli.label] }, cli.command))), _jsx(DropdownMenuSeparator, {})] })), allowSettingsMode && (_jsxs(DropdownMenuItem, { onSelect: () => switchMode("settings"), className: cn(mode === "settings" ? "font-medium" : "text-muted-foreground"), children: [_jsx(IconSettings, { size: 14, className: "shrink-0" }), t("agentPanel.settings")] })), _jsxs(DropdownMenuItem, { onSelect: () => {
|
|
630
630
|
// Defer past the closing DropdownMenu's focus-restore/dismiss-layer
|
|
@@ -819,7 +819,7 @@ const SIDEBAR_ANIMATION_MS = 260;
|
|
|
819
819
|
const SIDEBAR_OVERLAY_Z_INDEX = 70;
|
|
820
820
|
const SIDEBAR_FULLSCREEN_Z_INDEX = 90;
|
|
821
821
|
/** Max width of the centered chat column in fullscreen mode (Claude-style). */
|
|
822
|
-
const FULLSCREEN_CONTENT_MAX_PX =
|
|
822
|
+
const FULLSCREEN_CONTENT_MAX_PX = 570;
|
|
823
823
|
function ResizeHandle({ position, onDrag, }) {
|
|
824
824
|
const ref = useRef(null);
|
|
825
825
|
const dragging = useRef(false);
|
|
@@ -991,7 +991,6 @@ function URLSync({ browserTabId }) {
|
|
|
991
991
|
return null;
|
|
992
992
|
}
|
|
993
993
|
},
|
|
994
|
-
refetchInterval: 2_000,
|
|
995
994
|
retry: false,
|
|
996
995
|
});
|
|
997
996
|
const lastProcessedDedupKeyRef = React.useRef(null);
|