Introduce sms-api & qt-sms#442
Draft
OrkunTokdemir wants to merge 89 commits into
Draft
Conversation
090c53f to
4d27dd8
Compare
41d9cd4 to
1e8b129
Compare
9eb50c7 to
3390a3a
Compare
45ca481 to
576afe3
Compare
b15546d to
51b0acc
Compare
Implement missing IPC operations from the SMS client protocol spec: - Add Cache class with updateCache (cache/update) and clearCache (cache/clear) methods - Add Settings class with setSetting (settings/set) and getSetting (settings/get) methods - Add service/message notification dispatch and onMessage callback in JobCallbacks - Add optional message field to ProgressInfo - Add placeholderText field to UserPrompt (parsed from placeHolderText) - Make prompt type parsing case-insensitive, supporting lowercase variants (choice, text, file, directory) matching C++ behavior - Export new types (MessageInfo) and classes (Cache, Settings) Tests: Add cache.test.ts, settings.test.ts, and extend jsonrpc and packages tests for message notifications, prompt type variants, placeholderText, and progress message field.
Add ServiceLauncher class for on-demand service lifecycle management with socket polling, process spawning, and error reporting. Add Packages.createOffline() method for offline package creation. Update types to match upstream C++ API: - Add ServiceLifecycle error category and codes (ServiceNotFound, ServiceStartFailed, ServiceStartTimeout, ServiceStopFailed) - Add InvalidRequestFormat and NetworkError error codes - Renumber Service/Unknown categories and related error codes - Rename PackageFilters.version to packageVersion, add packageId - Add createOffline IPC method Update integration tests: - Add search, createOffline, and ServiceLauncher test cases - Handle proper JSON-RPC error responses instead of expecting timeouts Update unit tests: - Add createOffline to command test matrix - Add packageVersion/packageId filter key tests
- Use mock HOME dir so the service installs to a test-local path ($MOCK_HOME/Qt) instead of the real home directory - Add install tests: install first available package, install non-existent package, list all packages - Add post-install verification that checks extracted files exist and validates the installation journal contains the correct package ID and version
- Add onStdout/onStderr callbacks to ServiceLauncherOptions for observing service process output - Capture stderr during startup and include it in error messages - Detect early process exit and fail fast instead of polling until timeout - Spawn service with stdio pipes instead of 'ignore' - Add integration test suite (test:integration:launcher) covering start/stop lifecycle, error cases, already-running detection, Session connectivity, and start-stop-start cycles
The C++ service uses camelCase keys (scReplyChoice = "replyChoice", scReplyText = "replyText") as defined in ipcconstants.h. Update the TypeScript client and tests to match.
- Remove erroneous `* 100` multiplication; the service already reports progress in the 0–100 range - Track previous percentage and pass `increment` to `progress.report` so the VS Code progress bar advances correctly - Detect phase resets (e.g. Downloading → Installing) by checking when progress goes backwards and reset the baseline accordingly - Include both the phase message and percentage in the notification
- Add "Get Started" view with an "Open Walkthrough" button - Add "Qt Account" view showing sign-in/sign-out state: - Logged out: "Sign In" button via viewsWelcome content - Logged in: account email in view description and "Sign Out" button - Add `qt-sms.openWalkthrough` command to open the walkthrough - Add "Sign in to Qt Account" as first walkthrough step with auto-completion on login via `onContext:qt-sms.isLoggedIn`
- Split the install progress notification into two phases: a cancellable "Downloading" notification and a non-cancellable "Installing" one - Add Packages.cancel() method to sms-api (packages/cancel IPC) - Pass --no-console-log flag when spawning the SMS service - Update backend URL to `api.install.qt.io`
Support the new installation folder structure where Qt is installed under QtFramework/<version>/<arch>/bin/. Add platform-specific architecture mapping and pass the installed package version to registerInstalledQtPaths().
Add an installed-packages-store backed by globalState to remember which Qt versions have been installed via the extension. On activation (when logged in) and on login, sync the store from the SMS service. In the Install Package command, query listInstalledPackages and merge with globalState to build a complete set of installed versions, then exclude them from the QuickPick so users only see what's available for installation.
- Use Windows named pipe (\\.\pipe\qtclient_socket) as default socket path on Windows; Qt's QLocalServer creates named pipes, not Unix domain sockets - Disable detached mode on Windows to prevent new console/process group creation; add windowsHide to suppress console windows - Update integration test helper with matching platform-aware socket path
…rap on activation - Add bootstrap installer invocation on extension activation using `install --accept-telemetry` (replaces the previous --accept-all flag) - Teach ServiceLauncher.resolveServiceBin() to read serviceInstallPath from QtCompany.ini as a fallback when the binary is not found next to the process executable - Remove the manual qt-sms.serviceExecutablePath setting and its associated plumbing since the service path is now discovered automatically via QtCompany.ini
a97da75 to
611bbb7
Compare
Remove the InstalledPackagesState class and all related functions (initInstalledPackagesStore, getInstalledPackages, markPackageInstalled, scanInstallationPath) that persisted installed Qt framework information in VS Code's globalState. Replace with a direct filesystem check: isVersionInstalledOnDisk now reads the configured installation path and checks whether <installPath>/QtFramework/<version> exists as a directory on each call, reflecting the actual on-disk state without any caching or persistence.
Use only qtaccount.ini with the [QtAccount] group for credential
storage, matching the C++ QtSoftwareManagementService. Remove the
separate [auth/qtaccount] section in QtCompany.ini and all dual-write
logic (saveToQtCompany, loadFromQtCompany, etc.).
Fix Windows path to use %APPDATA% (Roaming) instead of %LOCALAPPDATA%,
matching the C++ service's qEnvironmentVariable("APPDATA").
Rename defaultLegacyPath() to defaultPath(). Keep defaultQtCompanyPath()
as it is still used by the client for serviceInstallPath lookup.
Declare extensionDependencies in package.json for qt-core, qt-cpp, and cmake-tools. Add ensureDependencies() which runs at activation to verify that qt-core and qt-cpp match the qt-sms version and installs the correct versions if they don't. Also installs any missing required extensions.
- After registering a new Qt path in additionalQtPaths, call coreAPI.setValue() and coreAPI.notify() so qt-cpp detects the new kit immediately without requiring a window reload
ee3de45 to
c8b797f
Compare
Add a Known Issues (Alpha) section to readme.md describing the scenario where a leftover QtCompany.ini from a previous installation prevents the bootstrap from being triggered, along with per-platform workaround commands.
Harden isBootstrapInstalled() to verify the service binary actually exists at the path referenced by QtCompany.ini, not just that the ini file is present. A stale ini without a working binary now correctly triggers a fresh bootstrap download. When the bootstrap is already installed, attempt to start the service if it is not already running.
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.
No description provided.