Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add opt-in usage collection so plugin authors can understand which features people use, without tying Necto to an analytics service. App and web plugins record named events; Necto adds common metadata and forwards permitted events to one user-approved desktop Event Exporter. The exporter owns formatting, batching, delivery, retries, and persistence.
necto.log(...)andregistrar.logger, with device/desktop/native sources and web/CLI invocation context.HTTPExporterwith JSON batches, retry backoff, and persisted pending events. Normal shutdown allows up to five seconds to finish or checkpoint work.Review guide
NectoMac/Sources/NectoMacService/NectoEventDispatcher.swift,Sources/NectoSDK/NectoPluginLogger.swift, andWebPackages/Bridge/src/{index,exporter,types}.ts.Necto/InstallCoordinator.swift,Necto/PluginApprovalSheet.swift,Necto/NectoExporterRuntime.swift, andNecto/SettingsScreen.swift. Check UI/CLI approval parity, shell access, exclusions, and shutdown.WebPackages/HTTPExporter/, then built-in instrumentation and its tests. Exporter-specific batching and retry behavior stay outside the dispatcher.Changelog
Add opt-in usage collection through desktop Event Exporters, plugin logging APIs, and a configurable HTTP exporter.
Test Plan
NectoAppTestspassed 84 tests in 14 suites.script/test swift, web tests and typechecks, built-in panel builds, and panel asset checks passed.HTTPExporterwith synthetic events over HTTPS: verified partial/threshold batches, 503 retries, recovery with stable event IDs, and checkpoint removal after success. Verified timers and retry backoff while Necto was inactive, with a native regression test that does not wake JavaScript.Limits: USB-device behavior and delivery during crashes or system sleep were not verified. Delivery is best effort; receivers should deduplicate by event ID. Integration checks used shorter batch thresholds without changing shipped defaults.
Screenshots
Native Necto integration build, using a local-only test exporter. The installation metadata/path is obscured in the settings capture. No app is connected in these captures.
Collection settings
Exporter diagnostics
The log includes local recorder activity and synthetic HTTP retry checks.