@copilotkit/web-inspector 1.68.3 → 1.69.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.
Files changed (58) hide show
  1. package/README.md +28 -12
  2. package/dist/assets/inspector-logo-kite.cjs +12 -0
  3. package/dist/assets/inspector-logo-kite.cjs.map +1 -0
  4. package/dist/assets/inspector-logo-kite.mjs +6 -0
  5. package/dist/assets/inspector-logo-kite.mjs.map +1 -0
  6. package/dist/index.cjs +5574 -1584
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +490 -32
  9. package/dist/index.d.cts.map +1 -1
  10. package/dist/index.d.mts +490 -32
  11. package/dist/index.d.mts.map +1 -1
  12. package/dist/index.mjs +5574 -1587
  13. package/dist/index.mjs.map +1 -1
  14. package/dist/index.umd.js +7014 -1917
  15. package/dist/index.umd.js.map +1 -1
  16. package/dist/lib/event-snippets.cjs +559 -0
  17. package/dist/lib/event-snippets.cjs.map +1 -0
  18. package/dist/lib/event-snippets.d.cts +61 -0
  19. package/dist/lib/event-snippets.d.cts.map +1 -0
  20. package/dist/lib/event-snippets.d.mts +61 -0
  21. package/dist/lib/event-snippets.d.mts.map +1 -0
  22. package/dist/lib/event-snippets.mjs +537 -0
  23. package/dist/lib/event-snippets.mjs.map +1 -0
  24. package/dist/lib/home-briefing.cjs +290 -0
  25. package/dist/lib/home-briefing.cjs.map +1 -0
  26. package/dist/lib/home-briefing.mjs +288 -0
  27. package/dist/lib/home-briefing.mjs.map +1 -0
  28. package/dist/lib/inspector-nav.cjs +59 -0
  29. package/dist/lib/inspector-nav.cjs.map +1 -0
  30. package/dist/lib/inspector-nav.d.cts +11 -0
  31. package/dist/lib/inspector-nav.d.cts.map +1 -0
  32. package/dist/lib/inspector-nav.d.mts +11 -0
  33. package/dist/lib/inspector-nav.d.mts.map +1 -0
  34. package/dist/lib/inspector-nav.mjs +54 -0
  35. package/dist/lib/inspector-nav.mjs.map +1 -0
  36. package/dist/lib/persistence.cjs +102 -0
  37. package/dist/lib/persistence.cjs.map +1 -1
  38. package/dist/lib/persistence.mjs +98 -1
  39. package/dist/lib/persistence.mjs.map +1 -1
  40. package/dist/lib/telemetry.cjs +93 -34
  41. package/dist/lib/telemetry.cjs.map +1 -1
  42. package/dist/lib/telemetry.d.cts +1 -1
  43. package/dist/lib/telemetry.d.cts.map +1 -1
  44. package/dist/lib/telemetry.d.mts +1 -1
  45. package/dist/lib/telemetry.d.mts.map +1 -1
  46. package/dist/lib/telemetry.mjs +86 -32
  47. package/dist/lib/telemetry.mjs.map +1 -1
  48. package/dist/package.cjs +1 -1
  49. package/dist/package.mjs +1 -1
  50. package/dist/styles/generated.cjs +1 -1
  51. package/dist/styles/generated.cjs.map +1 -1
  52. package/dist/styles/generated.mjs +1 -1
  53. package/dist/styles/generated.mjs.map +1 -1
  54. package/package.json +3 -3
  55. package/dist/assets/inspector-logo-icon.cjs +0 -12
  56. package/dist/assets/inspector-logo-icon.cjs.map +0 -1
  57. package/dist/assets/inspector-logo-icon.mjs +0 -6
  58. package/dist/assets/inspector-logo-icon.mjs.map +0 -1
package/dist/index.d.mts CHANGED
@@ -1,5 +1,7 @@
1
+ import { MenuKey } from "./lib/inspector-nav.mjs";
1
2
  import { Anchor } from "./lib/types.mjs";
2
3
  import { InspectorOpenSource } from "./lib/telemetry.mjs";
4
+ import { ActivitySnippetMessage, ChatSnippetCapture, EventSnippet, compileChatSnippet, compileFromActivityMessage, upsertEventSnippet } from "./lib/event-snippets.mjs";
3
5
  import * as lit from "lit";
4
6
  import { LitElement, TemplateResult } from "lit";
5
7
  import { CopilotKitCore, Memory, ɵThread } from "@copilotkit/core";
@@ -8,7 +10,9 @@ import { CopilotKitCore, Memory, ɵThread } from "@copilotkit/core";
8
10
  type InspectorOpenOptions = {
9
11
  /** Select the thread that contains the message. */threadId?: string; /** Narrow the Threads view to the agent that owns the thread. */
10
12
  agentId?: string; /** Scroll the selected thread timeline to this message when available. */
11
- messageId?: string;
13
+ messageId?: string; /** Open this Inspect leaf instead of Threads. */
14
+ menu?: MenuKey; /** Select this Event Snippet after open. */
15
+ snippetId?: string;
12
16
  };
13
17
  declare const WEB_INSPECTOR_TAG: "cpk-web-inspector";
14
18
  declare const THREAD_INSPECTOR_TAG: "cpk-thread-inspector";
@@ -116,6 +120,12 @@ declare class CpkThreadInspector extends PortableLitElement {
116
120
  liveMessageVersion: {
117
121
  attribute: boolean;
118
122
  };
123
+ viewInAppMode: {
124
+ attribute: boolean;
125
+ };
126
+ viewInAppError: {
127
+ attribute: boolean;
128
+ };
119
129
  focusMessageId: {
120
130
  attribute: boolean;
121
131
  };
@@ -201,6 +211,8 @@ declare class CpkThreadInspector extends PortableLitElement {
201
211
  * so the conversation view reflects live streaming output.
202
212
  */
203
213
  liveMessageVersion: number;
214
+ viewInAppMode: "hidden" | "view" | "stop";
215
+ viewInAppError: string | null;
204
216
  focusMessageId: string | null;
205
217
  focusRequestId: number;
206
218
  private _tab;
@@ -364,6 +376,7 @@ declare class CpkThreadInspector extends PortableLitElement {
364
376
  private onDetailDividerUp;
365
377
  render(): TemplateResult<1>;
366
378
  private renderMetadataStrip;
379
+ private renderViewInAppAction;
367
380
  private renderActiveBulkControls;
368
381
  private renderRawEventBulkControls;
369
382
  private revealSourceEvent;
@@ -457,15 +470,50 @@ declare class WebInspectorElement extends LitElement {
457
470
  private isDragging;
458
471
  private pointerContext;
459
472
  private isOpen;
473
+ private accountCtaMotionPaused;
460
474
  private draggedDuringInteraction;
461
475
  private ignoreNextButtonClick;
462
476
  private selectedMenu;
463
477
  private pendingPersistedMenu;
478
+ private hasOpenedInspector;
479
+ private sidebarCollapsed;
480
+ private sidebarRailTooltip;
481
+ private colorScheme;
482
+ private hasExplicitColorScheme;
483
+ private systemColorSchemeMediaQuery;
484
+ private briefingRestoreMenu;
485
+ private homeViewedThisOpen;
464
486
  private hasResolvedCore;
465
487
  private settingsOpen;
466
488
  private readonly lastSelectedMenuByGroup;
467
489
  private lastScrolledAgentNavigationLayout;
490
+ private eventSnippets;
491
+ private selectedSnippetId;
492
+ private snippetRecipe;
493
+ private snippetName;
494
+ private snippetJson;
495
+ private snippetToolName;
496
+ private snippetToolArgs;
497
+ private snippetReasoningText;
498
+ private snippetTextContent;
499
+ private snippetActivityType;
500
+ private snippetActivityContent;
501
+ private snippetError;
502
+ private snippetBanner;
503
+ private snippetConfirmOpen;
504
+ private lastInject;
505
+ private snippetListWidth;
506
+ private snippetDividerResizing;
507
+ private snippetDividerPointerId;
508
+ private snippetDividerStartX;
509
+ private snippetDividerStartWidth;
468
510
  private selectedThreadId;
511
+ private inAppThreadId;
512
+ private inAppAgentId;
513
+ private inAppSource;
514
+ private activeViewInAppRequestId;
515
+ private viewInAppError;
516
+ private inspectorBridgeUnsubscribers;
469
517
  private selectedRealThreadIsExplicit;
470
518
  private selectedLocalExampleThreadId;
471
519
  private requestedThreadId;
@@ -479,16 +527,32 @@ declare class WebInspectorElement extends LitElement {
479
527
  private _threads;
480
528
  private _threadStoreSubscriptions;
481
529
  private _threadsByAgent;
530
+ private threadUsageSignature;
531
+ private threadUsageRefreshTimer;
482
532
  private _threadsErrorByAgent;
483
533
  private _threadsLoadingByAgent;
484
534
  private _ownedThreadStores;
535
+ private playgroundAgent;
536
+ private playgroundAgentId;
537
+ private playgroundAgentUnsubscribe;
538
+ private playgroundMessages;
539
+ private playgroundInput;
540
+ private playgroundIsRunning;
541
+ private playgroundRunStartedAt;
542
+ private playgroundReasoningDurations;
543
+ private playgroundIsLoadingThread;
544
+ private playgroundError;
545
+ private playgroundSourceThreadId;
546
+ private playgroundShowEphemeralNotice;
485
547
  private threadCapabilityEnabled;
486
548
  private threadCapabilityGeneration;
487
549
  private contextMenuOpen;
550
+ private layoutMenuOpen;
488
551
  private dockMode;
489
552
  private popOut;
490
553
  private inspectorPortal;
491
554
  private previousBodyMargins;
555
+ private previousHtmlOverflowX;
492
556
  private transitionTimeoutId;
493
557
  private bodyTransitionTimeoutIds;
494
558
  private pendingSelectedContext;
@@ -502,14 +566,83 @@ declare class WebInspectorElement extends LitElement {
502
566
  private evtColWidths;
503
567
  private _evtColResize;
504
568
  private announcementHtml;
569
+ private announcementMarkdown;
505
570
  private announcementTimestamp;
506
571
  private announcementPreviewText;
507
572
  private announcementCtaLabel;
508
- private hasUnseenAnnouncement;
509
573
  private announcementLoaded;
510
574
  private announcementPromise;
511
- private showAnnouncementPreview;
512
- private announcementExpanded;
575
+ private newsSignalArmed;
576
+ /** Which signal's beat is in flight, or null between beats. */
577
+ private pulsingSignal;
578
+ /**
579
+ * The single pending-beat slot. A beat that cannot land is deferred, never
580
+ * discarded — see `startSignalPulse` for the four reasons it cannot land.
581
+ */
582
+ private pendingPulseSignal;
583
+ private pulseTimeoutId;
584
+ /**
585
+ * Per-source latches for the error signal, fed from the subscriptions that
586
+ * already exist rather than from the event history: the event buffer is
587
+ * bounded per agent and in total and evicts entries, so counting events
588
+ * could silently lose a live failure.
589
+ */
590
+ private readonly errorSignalArmed;
591
+ /** Unread app errors. Cleared when the landing view is read. */
592
+ private readonly eventErrorArmed;
593
+ /** Latest detail for each event source, retained after that source is read. */
594
+ private readonly eventErrorDetails;
595
+ private pendingScrollToEventId;
596
+ private pendingScrollToToolCallId;
597
+ /** Last time an inspector-owned /threads refresh left this host, per agent. */
598
+ private readonly threadRefreshLastSentAt;
599
+ /** Trailing /threads refresh timers, one per agent. */
600
+ private readonly threadRefreshTrailingTimers;
601
+ /**
602
+ * Whether this outage has already had its beat. Global rather than
603
+ * per-source: a connection failure cascades into thread failures, so one
604
+ * root cause must not produce two nudges. Reset when nothing is red, which
605
+ * is what makes a resolved-then-recurring failure beat again.
606
+ */
607
+ private errorBeatSpent;
608
+ /** Per-outage dedup for `oss.inspector.error_signal_viewed`. */
609
+ private readonly errorSignalViewedSources;
610
+ /**
611
+ * The signal whose gesture is running its tail — the pill on screen and the
612
+ * sentence in the live region, both of which outlive the beat.
613
+ *
614
+ * Together with `pulsingSignal` this IS the single pending-beat slot, not a
615
+ * second scheduling concept: `startSignalPulse` defers while either is set,
616
+ * so the third deferral reason simply covers a longer beat. Null for the
617
+ * announcement, which has no tail and therefore behaves exactly as before.
618
+ */
619
+ private gestureSignal;
620
+ /** Where the running gesture's pill is, or null when it has none. */
621
+ private pillPhase;
622
+ /**
623
+ * Which side the pill opens from, or null before the room has been measured.
624
+ * Decided once, at gesture start, and never revisited mid-gesture.
625
+ */
626
+ private pillDirection;
627
+ private pillTimeoutId;
628
+ /** Hover/focus menu on the closed launcher. */
629
+ private launcherHudOpen;
630
+ private launcherHudSide;
631
+ private launcherHudHelp;
632
+ private launcherHudCloseTimer;
633
+ /**
634
+ * Leaf a HUD row asked for. Consumed by `openInspector` so a red dot on
635
+ * the circle cannot steal "Turn on Threads". Not a public open option.
636
+ */
637
+ private hudLandingMenu;
638
+ /**
639
+ * Whether this outage's pill actually opened. Per outage rather than per
640
+ * phase, so a second source arming behind the first reports the same answer
641
+ * the reader actually got. Reset with `errorBeatSpent`.
642
+ */
643
+ private pillOutcome;
644
+ private viewedNewsSignalIds;
645
+ private pendingNewsSignalViewed;
513
646
  private viewedBannerSurfaces;
514
647
  private pendingBannerViewed;
515
648
  private clickedBannerIds;
@@ -543,20 +676,18 @@ declare class WebInspectorElement extends LitElement {
543
676
  private resizePointerId;
544
677
  private resizeStart;
545
678
  private resizeInitialSize;
679
+ private resizeInitialPosition;
680
+ private resizeEdge;
546
681
  private isResizing;
547
682
  private readonly customTabIcons;
548
683
  private get menuItems();
549
- /** Return the primary navigation group that owns a legacy leaf key. */
550
- private getGroupForMenu;
551
- /** Return the primary group for the current legacy leaf selection. */
552
- private get selectedGroup();
553
- /** Return only currently visible legacy leaves owned by a group. */
684
+ /** Return only currently visible leaves owned by a group. */
554
685
  private getVisibleMenuItemsForGroup;
555
686
  /** Resolve a group's last visible leaf, falling back to its first leaf. */
556
687
  private getMenuForGroup;
557
688
  /** Replace a leaf that became hidden with its group's first visible leaf. */
558
689
  private reconcileSelectedMenuVisibility;
559
- /** Open a primary group at its last currently visible legacy leaf. */
690
+ /** Open a sidebar group at its last currently visible leaf. */
560
691
  private handleGroupSelect;
561
692
  /** Toggle Settings without replacing or persisting the active legacy leaf. */
562
693
  private handleSettingsToggle;
@@ -587,10 +718,15 @@ declare class WebInspectorElement extends LitElement {
587
718
  /** Selects the onboarding path for an enabled runtime with no saved Threads. */
588
719
  private getThreadsEmptyOnboardingAction;
589
720
  private subscribeToThreadStore;
721
+ private rebuildFlattenedThreads;
722
+ private scheduleInspectorUsageRefresh;
723
+ private clearInspectorUsageRefresh;
590
724
  private autoSelectLatestThread;
591
725
  private teardownThreadStoreSubscriptions;
592
726
  private ensureOwnedThreadStore;
593
727
  private refreshOwnedThreadStore;
728
+ private sendOwnedThreadRefresh;
729
+ private cancelThreadRefreshDebounce;
594
730
  private updateOwnedThreadStoreHeaders;
595
731
  private removeOwnedThreadStore;
596
732
  private teardownOwnedThreadStores;
@@ -631,6 +767,7 @@ declare class WebInspectorElement extends LitElement {
631
767
  private updateContextOptions;
632
768
  private getEventsForSelectedContext;
633
769
  private focusThread;
770
+ private focusEventSnippets;
634
771
  private filterEvents;
635
772
  private getLatestStateForAgent;
636
773
  private getLatestMessagesForAgent;
@@ -649,19 +786,89 @@ declare class WebInspectorElement extends LitElement {
649
786
  static styles: lit.CSSResult[];
650
787
  connectedCallback(): void;
651
788
  private ensureBrandFonts;
789
+ private handleDocumentVisibilityChange;
652
790
  disconnectedCallback(): void;
653
791
  firstUpdated(): void;
654
792
  render(): TemplateResult<1>;
655
793
  protected willUpdate(): void;
656
794
  protected updated(): void;
657
795
  private renderButton;
796
+ /**
797
+ * The words the running gesture carries, or null when the launcher is quiet.
798
+ *
799
+ * Read from the signal's own description rather than from a condition on the
800
+ * tone, so a third signal can carry a pill by declaring a label.
801
+ */
802
+ private getGestureLabel;
803
+ /**
804
+ * The pill, laid out at its full width and clipped, for the whole gesture.
805
+ *
806
+ * It renders from the first frame of the beat — clipped to nothing, so it
807
+ * shows nothing — because the room it needs cannot be measured until it has
808
+ * been laid out, and the direction is decided at gesture start.
809
+ */
810
+ private renderLauncherPill;
811
+ /**
812
+ * A click on the pill opens the Inspector, exactly as pressing the mark
813
+ * does — reusing the launcher's own open source, so the telemetry catalogue
814
+ * is untouched and the two paths cannot be told apart downstream.
815
+ *
816
+ * Deliberately NOT focusable and deliberately not in the tab order: the
817
+ * launcher beside it is already a focusable control for this same action,
818
+ * and a second tab stop for one action is a regression. The pill stays
819
+ * `aria-hidden` and this handler is a pointer affordance only.
820
+ *
821
+ * The gesture ends with the open, because `openInspector` cancels the tail —
822
+ * the panel is over the launcher, so there is nothing left to reveal.
823
+ */
824
+ private handlePillClick;
825
+ private isLauncherHudBlocked;
826
+ private resolveLauncherHudSide;
827
+ private openLauncherHud;
828
+ private closeLauncherHud;
829
+ private handleLauncherHudEnter;
830
+ private handleLauncherHudLeave;
831
+ private handleLauncherHudFocusIn;
832
+ private handleLauncherHudFocusOut;
833
+ private handleLauncherHudKeydown;
834
+ private handleHudActionClick;
835
+ private handleHudHelpClick;
836
+ private handleHudRowClick;
837
+ private renderHudCheck;
838
+ private renderHudRow;
839
+ private renderLauncherHud;
658
840
  /** Render a trusted action with optional context-specific copy. */
659
841
  private renderInspectorAction;
660
- private renderInspectorMetadataHeader;
842
+ private renderInspectorSidebar;
843
+ private renderSidebarIntelligenceStatus;
844
+ private handleSidebarToggle;
845
+ private handleSidebarRailTooltipShow;
846
+ private handleSidebarRailTooltipHide;
847
+ private handleColorSchemeToggle;
848
+ private getHomeModel;
849
+ private renderHomeView;
850
+ private renderHomeWhatsNewPreview;
851
+ private renderWhatsNewView;
852
+ private renderHomeIntelligenceHud;
853
+ private renderHomeSystemHealth;
854
+ private renderEventErrorBanner;
855
+ private handleEventErrorBannerKeydown;
856
+ /** Scroll the landing view to the failed tool call or RUN_ERROR again. */
857
+ private refocusEventErrorLanding;
858
+ private handleHomeLastEventSelect;
859
+ private renderHomeFeatures;
860
+ private handleHomeHeroCta;
861
+ private maybeTrackHomeViewed;
661
862
  private renderWindow;
662
863
  private hydrateStateFromStorageEarly;
663
864
  private hydrateStateFromStorage;
664
- /** Restore a visible legacy leaf, or use Threads for stale state. */
865
+ /** Follow the OS preference until a person deliberately picks a theme. */
866
+ private hydrateColorSchemePreference;
867
+ private getSystemColorScheme;
868
+ private readonly handleSystemColorSchemeChange;
869
+ private subscribeToSystemColorScheme;
870
+ private unsubscribeFromSystemColorScheme;
871
+ /** Restore a visible leaf, or open Home for first install and stale state. */
665
872
  private restorePersistedMenu;
666
873
  /** Resolve a valid stored leaf after the first Core exposes its sources. */
667
874
  private resolvePendingPersistedMenu;
@@ -676,6 +883,7 @@ declare class WebInspectorElement extends LitElement {
676
883
  private get isPoppedOut();
677
884
  private get activeRoot();
678
885
  private getPopOutCssTexts;
886
+ private getRenderedInspectorWindowSize;
679
887
  private requestPopOut;
680
888
  private unbindPopOutPointerDown;
681
889
  private handlePopOutClosed;
@@ -709,7 +917,8 @@ declare class WebInspectorElement extends LitElement {
709
917
  openInspector(source: InspectorOpenSource, options?: InspectorOpenOptions): void;
710
918
  private closeInspector;
711
919
  private renderIcon;
712
- private renderDockControls;
920
+ private renderWindowLayoutMenu;
921
+ private handleLayoutMenuToggle;
713
922
  private getDockedWindowStyles;
714
923
  private handleDockClick;
715
924
  private serializeAttributes;
@@ -729,7 +938,37 @@ declare class WebInspectorElement extends LitElement {
729
938
  private copiedContextItems;
730
939
  private renderCoreWarningBanner;
731
940
  private getCoreStatusSummary;
941
+ private resolvePlaygroundAgentId;
942
+ private teardownPlaygroundAgent;
943
+ private syncPlaygroundMessages;
944
+ private startPlaygroundSession;
945
+ private mapThreadMessagesToPlayground;
946
+ private handlePlaygroundThreadSourceChange;
947
+ private runPlaygroundAgent;
948
+ private sendPlaygroundMessage;
949
+ private handlePlaygroundSubmit;
950
+ private handlePlaygroundSuggestion;
951
+ private handlePlaygroundInput;
952
+ private handlePlaygroundKeyDown;
953
+ private handlePlaygroundRetry;
954
+ private handlePlaygroundStop;
955
+ private renderPlaygroundComposer;
956
+ private reloadEventSnippets;
957
+ private handleSnippetImportChange;
958
+ private renderSnippetImportControl;
959
+ private selectEventSnippet;
960
+ private compileSnippetDraft;
961
+ private getSnippetThreadId;
962
+ private getSnippetRunId;
963
+ private getSnippetTargetAgent;
964
+ private applyRecipeToEditor;
965
+ private handleSnippetRecipeChange;
966
+ private saveCurrentSnippet;
967
+ private runCurrentSnippet;
968
+ private resetLastSnippetRun;
969
+ private renderEventSnippetsView;
732
970
  private renderMainContent;
971
+ private renderPlaygroundView;
733
972
  private renderSettingsPanel;
734
973
  private trackOpened;
735
974
  private getVisibleInspectorMetadataAction;
@@ -740,11 +979,13 @@ declare class WebInspectorElement extends LitElement {
740
979
  private trackMetadataModuleIfChanged;
741
980
  private maybeTrackInspectorMetadataViews;
742
981
  private handleInspectorMetadataActionClick;
743
- private trackBannerDismissedOnce;
744
- private trackBannerClickedOnce;
982
+ private trackWhatsNewClickedOnce;
745
983
  private handleTalkToEngineerClick;
746
984
  private handleThreadsIntelligenceSignupClick;
747
985
  private handleThreadsTalkToEngineerClick;
986
+ private handleSnippetListDividerPointerDown;
987
+ private handleSnippetListDividerPointerMove;
988
+ private handleSnippetListDividerPointerUp;
748
989
  private handleThreadDividerPointerDown;
749
990
  private handleThreadDividerPointerMove;
750
991
  private handleThreadDividerPointerUp;
@@ -754,6 +995,12 @@ declare class WebInspectorElement extends LitElement {
754
995
  private getExampleThreadProvider;
755
996
  private trackThreadsExampleViewedOnce;
756
997
  private trackThreadsExampleSelectedOnce;
998
+ private subscribeToInspectorThreadBridge;
999
+ private unsubscribeFromInspectorThreadBridge;
1000
+ private getViewInAppMode;
1001
+ private handleViewInApp;
1002
+ private handleStopViewing;
1003
+ private getSelectedRealThread;
757
1004
  private getCurrentExampleTourProps;
758
1005
  private trackThreadsExampleTourStepViewedOnce;
759
1006
  private syncExampleTourTab;
@@ -808,8 +1055,10 @@ declare class WebInspectorElement extends LitElement {
808
1055
  /** Renders trusted Threads usage and its independent plan action. */
809
1056
  private renderThreadsUsageFooter;
810
1057
  private renderThreadsView;
1058
+ private renderEventsToolbar;
811
1059
  private renderEventsTable;
812
1060
  private handleEventFilterInput;
1061
+ private handleEventAgentChange;
813
1062
  private handleEventTypeChange;
814
1063
  private resetEventFilters;
815
1064
  private _onEvtColResizeStart;
@@ -819,8 +1068,31 @@ declare class WebInspectorElement extends LitElement {
819
1068
  private exportEvents;
820
1069
  private renderAgentsView;
821
1070
  private renderContextDropdown;
1071
+ /**
1072
+ * The Agent view is empty on "All Agents". Pick the agent that just failed
1073
+ * a tool, or the one with the most recent activity.
1074
+ */
1075
+ private applyEventErrorLanding;
1076
+ /**
1077
+ * Whether the landing view really carries the item the card points at.
1078
+ * Mirrors the two branches of `applyEventErrorLanding` that can bail out.
1079
+ */
1080
+ private hasEventErrorHighlight;
1081
+ private findLatestRunErrorEvent;
1082
+ private flushErrorLandingScroll;
1083
+ /**
1084
+ * The Agent view is empty on "All Agents". Pick the agent that just failed
1085
+ * a tool, or the one with the most recent activity.
1086
+ */
1087
+ private focusAgentForView;
822
1088
  private handleMenuSelect;
823
1089
  private handleContextDropdownToggle;
1090
+ /** Expand the icon-rail agent scope on hover while preserving keyboard access. */
1091
+ private handleIconRailContextPointerEnter;
1092
+ private handleIconRailContextPointerLeave;
1093
+ private handleIconRailContextPointerDown;
1094
+ private handleIconRailContextFocusIn;
1095
+ private handleIconRailContextFocusOut;
824
1096
  private handleContextOptionSelect;
825
1097
  private renderCapabilitiesView;
826
1098
  private renderCapabilityRow;
@@ -837,31 +1109,220 @@ declare class WebInspectorElement extends LitElement {
837
1109
  private renderContextView;
838
1110
  private renderContextCard;
839
1111
  private getContextValuePreview;
1112
+ private getToolsForAgent;
1113
+ private renderAgentToolsSection;
840
1114
  private formatContextValue;
841
1115
  private copyContextValue;
842
1116
  private toggleContextExpansion;
843
1117
  private handleGlobalPointerDown;
844
1118
  private toggleRowExpansion;
845
- private renderAnnouncementBanner;
1119
+ /** Whether a given subject currently has something to say. */
1120
+ private isSignalArmed;
1121
+ /**
1122
+ * The signal that owns the single launcher dot, or null when the launcher is
1123
+ * quiet. Precedence rather than replacement: a suppressed signal stays armed
1124
+ * and takes the dot as soon as the higher-priority one clears, and its own
1125
+ * navigation marker is visible the whole time.
1126
+ */
1127
+ private getActiveLauncherSignal;
1128
+ /**
1129
+ * The marker a navigation entry carries, or null for an unmarked entry.
1130
+ *
1131
+ * Markers are independent of the launcher's single dot, so a suppressed
1132
+ * signal is never actually hidden once the panel is open. They also render
1133
+ * on the entry that is *currently selected*: for the news signal that never
1134
+ * mattered, because its marker clears as soon as the view renders, but a
1135
+ * state mirror stays true while it is being read and suppressing it on the
1136
+ * active entry would make it reappear on navigating away.
1137
+ */
1138
+ private getNavigationSignalFor;
1139
+ /** Whether a wiring error source is currently red. */
1140
+ private hasArmedErrorSignal;
1141
+ private armEventErrorFromCode;
1142
+ private armEventError;
1143
+ private clearEventError;
1144
+ private clearAllEventErrors;
1145
+ /**
1146
+ * An event error is unread until its landing view is actually on screen.
1147
+ * Opening the Inspector for a different leaf must not burn it.
1148
+ */
1149
+ private maybeCompleteEventErrorView;
1150
+ private isReducedMotionPreferred;
1151
+ private armNewsSignal;
1152
+ private clearNewsSignal;
1153
+ /**
1154
+ * Requests one beat for a signal, running it now or deferring it.
1155
+ *
1156
+ * There is a single pending slot and four reasons a beat cannot land. All
1157
+ * four are the same situation — "cannot land now, run later" — and treating
1158
+ * them alike is the point: three separate behaviours for one situation would
1159
+ * not survive a third signal.
1160
+ *
1161
+ * Reason 3 is not cosmetic. Starting a beat while one runs does not restart
1162
+ * the animation, because the attribute it binds to does not change value and
1163
+ * the pseudo-element selectors match on attribute *presence*; the running
1164
+ * beat would merely change colour mid-flight. A failure that arms during an
1165
+ * announcement beat must wait for that beat to end, or it would run only as
1166
+ * its final fraction.
1167
+ *
1168
+ * A failure's beat is followed by a pill, and the whole 3.4-second gesture
1169
+ * holds this one slot for its full duration. That is not a second scheduling
1170
+ * concept: reason 3 already says "another beat is running", and a gesture is
1171
+ * simply a longer beat.
1172
+ */
1173
+ private startSignalPulse;
1174
+ private stopSignalPulse;
1175
+ /**
1176
+ * Runs a deferred beat if it can land now, and drops it if its reason to
1177
+ * exist has gone: a nudge about a problem that no longer exists is worse
1178
+ * than no nudge at all.
1179
+ */
1180
+ private flushPendingSignalPulse;
1181
+ /**
1182
+ * Drops a signal's gesture, pending or running, when the signal goes quiet.
1183
+ *
1184
+ * The pill closes early: it states a condition, and the condition has
1185
+ * stopped being true. The beat is left to finish, because a beat asserts
1186
+ * nothing — it says *here*, and "here" is still true.
1187
+ */
1188
+ private retireSignal;
1189
+ /**
1190
+ * The signal holding the single gesture slot: a beat in flight, or the pill
1191
+ * and spoken sentence that follow it. One slot, not two — see reason 3 in
1192
+ * `startSignalPulse`.
1193
+ */
1194
+ private get gestureSlotSignal();
1195
+ /**
1196
+ * Opens the gesture's tail alongside the beat, for a signal that carries a
1197
+ * pill. The pill is rendered immediately — clipped to nothing, so it shows
1198
+ * nothing — because its full width has to be on the page before the room
1199
+ * either side of the launcher can be measured.
1200
+ *
1201
+ * A signal with no pill label gets no tail at all, so the announcement's
1202
+ * gesture is exactly the beat it has always been.
1203
+ */
1204
+ private beginGestureTail;
1205
+ /**
1206
+ * Chooses the side, or suppresses the pill, from the room actually available
1207
+ * at gesture start. Measured once, from the DOM, because the launcher is
1208
+ * draggable and its position persists: a reader who parked it near the left
1209
+ * edge would otherwise get a permanently truncated pill.
1210
+ *
1211
+ * Where neither side has room there is no pill at all rather than a cut-off
1212
+ * one — the dot and the beat still fire, so the signal is intact and only
1213
+ * the label is lost. Constraining where the reader may drag the control to
1214
+ * protect this animation was considered and rejected: the page is theirs.
1215
+ */
1216
+ private resolvePillDirection;
1217
+ /** Records the measurement's verdict, and drops the pill when it is null. */
1218
+ private setPillOutcome;
1219
+ /** Runs the pill's three phases in series once the beat has finished. */
1220
+ private openPill;
1221
+ private advancePill;
1222
+ /**
1223
+ * Closes the pill before its hold is out, because the failure it names has
1224
+ * been fixed. A pill that has not opened yet is simply dropped; the beat is
1225
+ * never cut short.
1226
+ */
1227
+ private closePillEarly;
1228
+ /** Releases the slot and leaves the plain mark with its dot behind. */
1229
+ private endGesture;
1230
+ /**
1231
+ * Drops the gesture's tail outright, with no closing animation, for the
1232
+ * cases where the launcher itself has gone: the panel opened over it, or the
1233
+ * element was removed from the page.
1234
+ */
1235
+ private cancelGestureTail;
1236
+ private cancelPillTimeout;
1237
+ /**
1238
+ * Whether each error source is currently broken.
1239
+ *
1240
+ * Only two *wiring* conditions qualify. App errors (runs, tools, memory)
1241
+ * are unread events on a different latch — they name themselves on the pill
1242
+ * and clear when their landing view is read. Notably absent from *this*
1243
+ * latch:
1244
+ *
1245
+ * - **A failed agent run.** A run is an event. It arms `run`, not this
1246
+ * state. The resting wiring dot must not stay red for the rest of a debug
1247
+ * hour.
1248
+ * - **The core error channel as a wiring source.** Handshake failure already
1249
+ * sets the connection state. Other codes arm `run` or `tool`.
1250
+ * - **Memory failures before Learning is live.** The memory store is lazy
1251
+ * because creating it opens a realtime connection. Once it exists, a load
1252
+ * failure arms `memory`.
1253
+ * - **Product states.** An unconfigured Intelligence and an unentitled
1254
+ * Memory plan are not defects. The signal fires only where wiring is
1255
+ * present and the call still fails — which for threads is guaranteed by
1256
+ * `_threadsErrorByAgent` only ever being written while the thread
1257
+ * endpoints are available.
1258
+ *
1259
+ * Known limitation: the runtime handshake runs once, on connect. A server
1260
+ * that dies *after* the page loaded leaves the connection state at connected
1261
+ * and raises nothing; the next page load re-runs the handshake and the
1262
+ * signal appears then. The signal reports the wiring state as last
1263
+ * established. Closing that gap means a re-probe in the core, which is a
1264
+ * runtime concern.
1265
+ */
1266
+ private isErrorSourceBroken;
1267
+ /**
1268
+ * Mirrors both error latches onto the live state. Called from `willUpdate`,
1269
+ * because every mutation of the underlying state already requests an update,
1270
+ * so the resting dot follows the state within the same render.
1271
+ */
1272
+ private evaluateErrorSignals;
1273
+ /**
1274
+ * Applies the rising-edge rule after a latch changed.
1275
+ *
1276
+ * The beat fires on the transition from "no failure" to "at least one
1277
+ * failure", evaluated globally across the sources and never again while
1278
+ * anything is red — one root cause, one nudge.
1279
+ */
1280
+ private onErrorSignalsChanged;
1281
+ /**
1282
+ * Records `oss.inspector.error_signal_viewed` once per source per outage,
1283
+ * when the dot is actually on screen.
1284
+ *
1285
+ * Unlike the announcement's launcher event this fires immediately rather
1286
+ * than waiting for the runtime handshake to report `telemetryDisabled`.
1287
+ * The held-queue would never drain for the connection source — a connection
1288
+ * failure means the handshake did not complete — so queuing would guarantee
1289
+ * zero data for the case this event exists to measure. `trackOpened` already
1290
+ * sends on the same terms. Both opt-out layers still gate it: the local
1291
+ * opt-out inside `track`, and the runtime's flag once it is known.
1292
+ */
1293
+ private maybeTrackErrorSignalViewed;
1294
+ private maybeTrackNewsSignalViewed;
1295
+ /** Which of the three What's new states the feed currently supports. */
1296
+ private getWhatsNewState;
846
1297
  /**
847
1298
  * Which announcement surface is on screen right now, or null when the
848
- * announcement isn't visible. Mirrors the render gates in
849
- * `renderAnnouncementPreview` (bubble) and `renderAnnouncementBanner`
850
- * (in-panel card) — opening the panel clears `showAnnouncementPreview`, so
851
- * the two are mutually exclusive.
1299
+ * announcement isn't visible. What's new is the only surface: an impression
1300
+ * requires the panel open, that view selected, and content actually
1301
+ * rendered — a loading state is not an impression.
852
1302
  */
853
1303
  private getVisibleBannerSurface;
854
1304
  /**
855
- * Records a `banner_viewed` impression for whichever surface is currently
856
- * visible, once per announcement per surface.
1305
+ * The single condition that retires the news signal: What's new has
1306
+ * rendered *with content*.
1307
+ *
1308
+ * Deliberately not on panel open — the common reason to open the Inspector
1309
+ * is AG-UI events, and clearing there would burn a whole announcement
1310
+ * silently and turn "viewed" into "opened the Inspector at some point".
1311
+ * Deliberately not behind an acknowledge button, which is a dismiss button
1312
+ * under another name. And a loading state does not count, because the feed
1313
+ * is asynchronous and a reader who arrived early has seen nothing.
1314
+ *
1315
+ * The launcher dot and the navigation marker both read the same signal, so
1316
+ * the two can never disagree about whether something has been read.
1317
+ */
1318
+ private maybeCompleteWhatsNewView;
1319
+ /**
1320
+ * Records a `whats_new_viewed` impression for whichever surface is
1321
+ * currently visible, once per announcement per surface.
857
1322
  */
858
- private maybeTrackBannerViewed;
859
- private flushPendingBannerViewed;
1323
+ private maybeTrackWhatsNewViewed;
1324
+ private flushPendingWhatsNewTelemetry;
860
1325
  private ensureAnnouncementLoading;
861
- private renderAnnouncementPreview;
862
- private handleAnnouncementPreviewClick;
863
- private handleDismissAnnouncementPreview;
864
- private dismissAnnouncement;
865
1326
  private fetchAnnouncement;
866
1327
  private convertMarkdownToHtml;
867
1328
  private isSafeAnnouncementHref;
@@ -872,9 +1333,6 @@ declare class WebInspectorElement extends LitElement {
872
1333
  private appendRefParam;
873
1334
  private isCopilotKitDestination;
874
1335
  private escapeHtmlAttr;
875
- private loadStoredAnnouncementTimestamp;
876
- private persistAnnouncementTimestamp;
877
- private markAnnouncementSeen;
878
1336
  }
879
1337
  declare function defineWebInspector(registry?: CustomElementRegistry | undefined): void;
880
1338
  declare global {
@@ -883,5 +1341,5 @@ declare global {
883
1341
  }
884
1342
  } //# sourceMappingURL=index.d.ts.map
885
1343
  //#endregion
886
- export { type Anchor, CpkThreadInspector, InspectorOpenOptions, THREAD_INSPECTOR_TAG, ThreadDebuggerEvent, ThreadDebuggerMessage, ThreadDebuggerMetadata, ThreadDebuggerProvider, ThreadDebuggerProviderLoadOptions, ThreadDebuggerToolCall, WEB_INSPECTOR_TAG, WebInspectorElement, defineWebInspector, type CapabilityToolRow as ɵCapabilityToolRow, ɵCpkThreadDetails, buildCapabilityRows as ɵbuildCapabilityRows, maxRecallScore as ɵmaxRecallScore, normalizeRelevance as ɵnormalizeRelevance, relevanceBarWidth as ɵrelevanceBarWidth };
1344
+ export { type ActivitySnippetMessage, type Anchor, type ChatSnippetCapture, CpkThreadInspector, type EventSnippet, InspectorOpenOptions, THREAD_INSPECTOR_TAG, ThreadDebuggerEvent, ThreadDebuggerMessage, ThreadDebuggerMetadata, ThreadDebuggerProvider, ThreadDebuggerProviderLoadOptions, ThreadDebuggerToolCall, WEB_INSPECTOR_TAG, WebInspectorElement, compileChatSnippet, compileFromActivityMessage, defineWebInspector, upsertEventSnippet, type CapabilityToolRow as ɵCapabilityToolRow, ɵCpkThreadDetails, buildCapabilityRows as ɵbuildCapabilityRows, maxRecallScore as ɵmaxRecallScore, normalizeRelevance as ɵnormalizeRelevance, relevanceBarWidth as ɵrelevanceBarWidth };
887
1345
  //# sourceMappingURL=index.d.mts.map