Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/windows-recovery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ on:
- 'packages/runtime-host/src/protocol/host-status.ts'
- 'packages/runtime-host/src/protocol/skill-catalog.ts'
- 'packages/runtime-host/src/server/access-credential-store.ts'
- 'packages/runtime-host/src/server/host-resource-probe.ts'
- 'packages/runtime-host/src/server/skill-catalog-repository.ts'
- 'packages/runtime-host/src/server/skill-catalog-transaction.ts'
- 'packages/runtime/src/__tests__/runtime-continuation-crash.test.ts'
Expand Down
29 changes: 29 additions & 0 deletions apps/desktop/resources/licenses/npm/THIRD_PARTY_NOTICES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13620,6 +13620,35 @@ SOFTWARE.

================================================================================

Package: systeminformation@5.33.8
Declared license: MIT
Selected license: MIT
Repository: git+https://github.com/sebhildebrandt/systeminformation.git

--- LICENSE ---
The MIT License (MIT)

Copyright (c) 2014-2026 Sebastian Hildebrandt

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

================================================================================

Package: tiny-typed-emitter@2.1.0
Declared license: MIT
Selected license: MIT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ test('publishes update progress and waits for the managed profile to reconnect',
assert.fail('published update must not inspect the development target'),
resolveUpdatePackage: () => ({ kind: 'npm', specifier: 'maka-agent@1.3.0' }),
currentHostEpoch: () => 'host-before-update',
liveHost: () => undefined,
awaitUpdatedConnection: async (...args) => {
connectionCompletions.push(args);
if (failConnection) throw new Error('authentication required');
Expand Down Expand Up @@ -1502,6 +1503,7 @@ function unusedUpdateDependencies() {
assert.fail('published update must not inspect the development target'),
resolveUpdatePackage: () => ({ kind: 'npm', specifier: 'maka-agent@1.2.3' } as const),
currentHostEpoch: () => undefined,
liveHost: () => undefined,
awaitUpdatedConnection: async () => undefined,
sendProgress: () => undefined,
};
Expand Down
1 change: 1 addition & 0 deletions apps/desktop/src/main/runtime-host-boot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ const runtimeHostManagement = createDesktopRuntimeHostManagement({
resolveUpdatePackage: runtimeHostSetupPackage.resolve,
currentHostEpoch: (profileId) =>
runtimeHostManager?.current(profileId)?.candidate?.client.hostEpoch,
liveHost: (profileId) => runtimeHostManager?.current(profileId)?.candidate?.client,
awaitUpdatedConnection: async (
profileId,
expectedHostId,
Expand Down
14 changes: 13 additions & 1 deletion apps/desktop/src/main/runtime-host-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
*/

import type { IpcMain } from 'electron';
import { decodeRuntimeHostOwnerConnectionCode } from '@maka/runtime-host/client';
import {
decodeRuntimeHostOwnerConnectionCode,
type RuntimeHostConnection,
} from '@maka/runtime-host/client';
import {
RUNTIME_HOST_OPERATOR_ACCESS_MANAGEMENT_CAPABILITY,
RUNTIME_HOST_OPERATOR_PEER_RELAY_DISCOVERY_CAPABILITY,
Expand Down Expand Up @@ -138,6 +141,7 @@ export function createDesktopRuntimeHostManagement(input: {
| DesktopRuntimeHostSetupPackage
| Promise<DesktopRuntimeHostSetupPackage>;
readonly currentHostEpoch: (profileId: string) => string | undefined;
readonly liveHost: (profileId: string) => Pick<RuntimeHostConnection, 'request'> | undefined;
readonly awaitUpdatedConnection: (
profileId: string,
expectedHostId: string,
Expand Down Expand Up @@ -1015,6 +1019,11 @@ export function createDesktopRuntimeHostManagement(input: {
);
};

const getResources = (profileIdValue: unknown) => {
const host = input.liveHost(requireProfileId(profileIdValue));
return host?.request('host.resources.query', {}, 15_000);
};

const channels = {
run: 'runtime-host-management:run',
update: 'runtime-host-management:update',
Expand All @@ -1028,6 +1037,7 @@ export function createDesktopRuntimeHostManagement(input: {
reconcileUpdate: 'runtime-host-management:reconcile-update',
getDirectPeer: 'runtime-host-management:get-direct-peer',
configureDirectPeer: 'runtime-host-management:configure-direct-peer',
getResources: 'runtime-host-management:get-resources',
} as const;
input.ipcMain.handle(
channels.run,
Expand Down Expand Up @@ -1078,6 +1088,8 @@ export function createDesktopRuntimeHostManagement(input: {
reconcileUpdate(profileId));
input.ipcMain.handle(channels.getDirectPeer, (_event, profileId: unknown) =>
getDirectPeer(profileId));
input.ipcMain.handle(channels.getResources, (_event, profileId: unknown) =>
getResources(profileId));
input.ipcMain.handle(
channels.configureDirectPeer,
(
Expand Down
4 changes: 4 additions & 0 deletions apps/desktop/src/preload/bridge-contract.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,9 @@ export interface DesktopRuntimeHostManagementProgress {
| import('@maka/runtime-host/operator').RuntimeHostServiceUpdatePhase;
}

export type DesktopRuntimeHostResources =
import('@maka/runtime-host/protocol').HostResourcesResult;

export interface DesktopRuntimeHostDirectPeerSnapshot {
readonly state: 'unsupported' | 'not_configured' | 'disabled' | 'enabled';
readonly peerId?: string;
Expand Down Expand Up @@ -877,6 +880,7 @@ export interface MakaBridge {
policy: import('@maka/runtime-host/operator').RuntimeHostManagedUpdatePolicy,
): Promise<DesktopRuntimeHostUpdatePolicySnapshot>;
reconcileUpdate(profileId: string): Promise<DesktopRuntimeHostUpdateReconciliationResponse>;
getResources(profileId: string): Promise<DesktopRuntimeHostResources | undefined>;
getDirectPeer(profileId: string): Promise<DesktopRuntimeHostDirectPeerSnapshot>;
configureDirectPeer(
profileId: string,
Expand Down
3 changes: 3 additions & 0 deletions apps/desktop/src/preload/preload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1686,6 +1686,9 @@ const makaBridge = {
reconcileUpdate(profileId: string) {
return ipcRenderer.invoke('runtime-host-management:reconcile-update', profileId);
},
getResources(profileId: string) {
return ipcRenderer.invoke('runtime-host-management:get-resources', profileId);
},
getDirectPeer(profileId: string) {
return ipcRenderer.invoke('runtime-host-management:get-direct-peer', profileId);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export { PeerMeshPeerIdButton } from './ui/peer-mesh-peer-id-button.js';
export { RuntimeHostAddComputerMenu } from './ui/runtime-host-add-computer-menu.js';
export { RuntimeHostConnectionCodeButton } from './ui/runtime-host-connection-code-button.js';
export { RuntimeHostConnectionCodeDialog } from './ui/runtime-host-connection-code-dialog.js';
export { RuntimeHostResourceDialog } from './ui/runtime-host-resource-dialog.js';
export {
RuntimeHostPairingRecoveryButton,
RuntimeHostProfileMoreMenu,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import type { RuntimeHostPeerMeshManagementAction } from '@maka/runtime-host/operator';
import type { RuntimeHostWebRtcStunPolicy } from '@maka/runtime-host/operator';
import type {
HostResourcesResult,
PeerMeshInvitationResult,
PeerMeshQueryResult,
} from '@maka/runtime-host/protocol';
Expand Down Expand Up @@ -103,9 +104,15 @@ export interface RuntimeHostConnectionCodeServices {
writeClipboardText(value: string): Promise<void>;
}

export interface RuntimeHostResourceServices {
query(profileId: string): Promise<HostResourcesResult | undefined>;
schedule(callback: () => void, delayMs: number): () => void;
}

export interface RuntimeHostManagementServices {
readonly peerMesh: PeerMeshServices;
readonly profilePairing: RuntimeHostProfilePairingServices;
readonly connectionCodes: RuntimeHostConnectionCodeServices;
readonly resources: RuntimeHostResourceServices;
readonly supportsWsl: boolean;
}
Loading
Loading