@omniviewdev/runtime 0.27.2 → 0.28.0
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/dist/activity/ActivityCard.d.ts +8 -0
- package/dist/activity/ActivityProvider.d.ts +6 -0
- package/dist/activity/ActivitySurfaces.d.ts +8 -0
- package/dist/activity/NotificationCenter.d.ts +2 -0
- package/dist/activity/client.d.ts +25 -0
- package/dist/activity/context.d.ts +51 -0
- package/dist/activity/index.d.ts +8 -0
- package/dist/activity/store.d.ts +32 -0
- package/dist/{hooks/snackbar/NotificationCenter.styles.d.ts → activity/styles.d.ts} +60 -34
- package/dist/activity/types.d.ts +163 -0
- package/dist/api.cjs +1 -1
- package/dist/api.js +1 -1
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/activity/frontendservice.d.ts +27 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/activity/index.d.ts +2 -0
- package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/models.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/activity/index.d.ts +1 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/activity/models.d.ts +114 -0
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/resource/v2/index.d.ts +2 -2
- package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/resource/v2/models.d.ts +91 -1
- package/dist/context/index.d.ts +0 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/parseAppError.d.ts +8 -33
- package/dist/hooks/connection/useConnections.d.ts +3 -3
- package/dist/hooks/exec/useNativeExec.d.ts +1 -1
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/networker/useResourcePortForwarder.d.ts +3 -3
- package/dist/hooks/resource/index.d.ts +0 -1
- package/dist/index.cjs +5 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3300 -2836
- package/dist/resource/v2/ancillary.d.ts +2 -0
- package/dist/resource/v2/client.d.ts +2 -0
- package/dist/{service-CDYj21m9.js → service-BohjVV8G.js} +5 -7
- package/dist/service-Dm78ll2_.cjs +1 -0
- package/package.json +3 -3
- package/dist/context/operations/OperationsContext.d.ts +0 -27
- package/dist/hooks/operations/useOperations.d.ts +0 -1
- package/dist/hooks/resource/useStreamAction.d.ts +0 -14
- package/dist/hooks/snackbar/index.d.ts +0 -1
- package/dist/hooks/snackbar/useSnackbar.d.ts +0 -26
- package/dist/service-DO0Rrm3E.cjs +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ActivityProgress, ActivityRecord } from './types';
|
|
3
|
+
/** Ratios use integer arithmetic; canonical counts never pass through Number. */
|
|
4
|
+
export declare function progressPercent(progress: ActivityProgress): number | undefined;
|
|
5
|
+
export declare function ActivityCard({ record, toast, }: {
|
|
6
|
+
record: ActivityRecord;
|
|
7
|
+
toast?: boolean;
|
|
8
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ActivityProviderProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
};
|
|
5
|
+
/** Mount once above consumers. Host owns work; this bridge owns observation only. */
|
|
6
|
+
export declare function ActivityProvider({ children }: ActivityProviderProps): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ActivityAction, ActivityRecord } from './types';
|
|
3
|
+
export type ActivitySurfacesProps = {
|
|
4
|
+
onAction?: (action: ActivityAction, record: ActivityRecord) => void | Promise<void>;
|
|
5
|
+
canHandleAction?: (action: ActivityAction, record: ActivityRecord) => boolean;
|
|
6
|
+
};
|
|
7
|
+
/** Mount once inside host theme and action contexts, beneath ActivityProvider. */
|
|
8
|
+
export declare function ActivitySurfaces({ onAction, canHandleAction }: ActivitySurfacesProps): React.JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CancellablePromise } from '@wailsio/runtime';
|
|
2
|
+
import { ActivityChange, ActivityObservationError, ActivityRecord, ActivitySnapshot, ActivitySpec, ActivitySubscription, AlertRequest, BeginTaskRequest, FinishTaskRequest, ReportTaskRequest, ResolveAlertRequest, SetPresentationRequest, StartResourceActionRequest } from './types';
|
|
3
|
+
declare function subscribe(): Promise<ActivitySubscription>;
|
|
4
|
+
declare function heartbeat(): Promise<void>;
|
|
5
|
+
export declare const activityClient: {
|
|
6
|
+
heartbeat: typeof heartbeat;
|
|
7
|
+
subscribe: typeof subscribe;
|
|
8
|
+
attach: (id: string) => CancellablePromise<ActivitySnapshot>;
|
|
9
|
+
snapshot: () => CancellablePromise<ActivitySnapshot>;
|
|
10
|
+
unsubscribe: (id: string) => CancellablePromise<void>;
|
|
11
|
+
listen: (id: string, apply: (change: ActivityChange) => void) => () => void;
|
|
12
|
+
listenObservationErrors: (receive: (error: ActivityObservationError) => void) => () => void;
|
|
13
|
+
beginTask: (request: BeginTaskRequest) => Promise<ActivityRecord>;
|
|
14
|
+
reportTask: (request: ReportTaskRequest) => Promise<ActivityRecord>;
|
|
15
|
+
finishTask: (request: FinishTaskRequest) => Promise<ActivityRecord>;
|
|
16
|
+
publishMessage: (request: ActivitySpec) => Promise<ActivityRecord>;
|
|
17
|
+
upsertAlert: (request: AlertRequest) => Promise<ActivityRecord>;
|
|
18
|
+
resolveAlert: (request: ResolveAlertRequest) => Promise<ActivityRecord>;
|
|
19
|
+
setPresentation: (request: SetPresentationRequest) => CancellablePromise<ActivityRecord>;
|
|
20
|
+
clearHistory: () => CancellablePromise<void>;
|
|
21
|
+
requestCancellation: (id: string) => CancellablePromise<ActivityRecord>;
|
|
22
|
+
startResourceAction: (request: StartResourceActionRequest) => CancellablePromise<ActivityRecord>;
|
|
23
|
+
};
|
|
24
|
+
export type ActivityClient = typeof activityClient;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { ActivityAction, ActivityFilter, ActivityRecord, NotificationOptions, StartResourceActionRequest } from './types';
|
|
2
|
+
import { ActivityStore } from './store';
|
|
3
|
+
export type ActivityContextValue = {
|
|
4
|
+
store: ActivityStore;
|
|
5
|
+
records: ActivityRecord[];
|
|
6
|
+
activeTasks: ActivityRecord[];
|
|
7
|
+
notificationCount: number;
|
|
8
|
+
centerOpen: boolean;
|
|
9
|
+
filter: ActivityFilter;
|
|
10
|
+
openNotifications: (filter?: ActivityFilter) => void;
|
|
11
|
+
closeNotifications: () => void;
|
|
12
|
+
setCollapsed: (id: string, collapsed: boolean) => Promise<void>;
|
|
13
|
+
dismissToast: (id: string) => Promise<void>;
|
|
14
|
+
clearHistory: () => Promise<void>;
|
|
15
|
+
notify: (options: NotificationOptions) => Promise<ActivityRecord | undefined>;
|
|
16
|
+
startResourceAction: (request: StartResourceActionRequest) => Promise<ActivityRecord>;
|
|
17
|
+
requestCancellation: (id: string) => Promise<ActivityRecord>;
|
|
18
|
+
performAction: (record: ActivityRecord, action: ActivityAction | number, onAction?: (action: ActivityAction, record: ActivityRecord) => void | Promise<void>) => Promise<void>;
|
|
19
|
+
canHandleAction: (action: ActivityAction, record: ActivityRecord) => boolean;
|
|
20
|
+
busyActions: ReadonlySet<string>;
|
|
21
|
+
actionErrors: ReadonlyMap<string, string>;
|
|
22
|
+
error?: string;
|
|
23
|
+
selectedDetailsID?: string;
|
|
24
|
+
openDetails: (id: string) => void;
|
|
25
|
+
restoreFocus?: () => void;
|
|
26
|
+
};
|
|
27
|
+
export declare const ActivityContext: import('react').Context<ActivityContextValue | undefined>;
|
|
28
|
+
declare function useActivityContext(): ActivityContextValue;
|
|
29
|
+
export declare function useActivities(): {
|
|
30
|
+
records: ActivityRecord[];
|
|
31
|
+
activeTasks: ActivityRecord[];
|
|
32
|
+
notificationCount: number;
|
|
33
|
+
centerOpen: boolean;
|
|
34
|
+
filter: ActivityFilter;
|
|
35
|
+
openNotifications: (filter?: ActivityFilter) => void;
|
|
36
|
+
closeNotifications: () => void;
|
|
37
|
+
setCollapsed: (id: string, collapsed: boolean) => Promise<void>;
|
|
38
|
+
dismissToast: (id: string) => Promise<void>;
|
|
39
|
+
clearHistory: () => Promise<void>;
|
|
40
|
+
error: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
export declare function useNotifications(): {
|
|
43
|
+
notify: (options: NotificationOptions) => Promise<ActivityRecord | undefined>;
|
|
44
|
+
openNotifications: (filter?: ActivityFilter) => void;
|
|
45
|
+
notificationCount: number;
|
|
46
|
+
};
|
|
47
|
+
export declare function useActivityActions(): {
|
|
48
|
+
startResourceAction: (request: StartResourceActionRequest) => Promise<ActivityRecord>;
|
|
49
|
+
requestCancellation: (id: string) => Promise<ActivityRecord>;
|
|
50
|
+
};
|
|
51
|
+
export { useActivityContext };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export { ActivityProvider } from './ActivityProvider';
|
|
3
|
+
export type { ActivityProviderProps } from './ActivityProvider';
|
|
4
|
+
export { ActivitySurfaces } from './ActivitySurfaces';
|
|
5
|
+
export type { ActivitySurfacesProps } from './ActivitySurfaces';
|
|
6
|
+
export { useActivities, useNotifications, useActivityActions } from './context';
|
|
7
|
+
export { activityClient } from './client';
|
|
8
|
+
export { ActivityStore, isActiveTask, needsAttention } from './store';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ActivityChange, ActivityFilter, ActivityRecord, ActivitySnapshot, DiagnosticAction } from './types';
|
|
2
|
+
import { ActivityClient } from './client';
|
|
3
|
+
export declare const isActiveTask: (record: ActivityRecord) => boolean;
|
|
4
|
+
export declare const needsAttention: (record: ActivityRecord) => boolean;
|
|
5
|
+
export type ActivityView = {
|
|
6
|
+
records: ActivityRecord[];
|
|
7
|
+
centerOpen: boolean;
|
|
8
|
+
filter: ActivityFilter;
|
|
9
|
+
pinnedIds: ReadonlySet<string>;
|
|
10
|
+
};
|
|
11
|
+
/** One read model; presentation surfaces never own a second history. */
|
|
12
|
+
export declare class ActivityStore {
|
|
13
|
+
private records;
|
|
14
|
+
private tombstones;
|
|
15
|
+
private snapshotRevision;
|
|
16
|
+
private listeners;
|
|
17
|
+
private diagnostics;
|
|
18
|
+
private view;
|
|
19
|
+
getSnapshot: () => ActivityView;
|
|
20
|
+
subscribe: (listener: () => void) => () => void;
|
|
21
|
+
private emit;
|
|
22
|
+
applyChange: (change: ActivityChange) => void;
|
|
23
|
+
private put;
|
|
24
|
+
applyRecord: (record: ActivityRecord) => void;
|
|
25
|
+
applySnapshot: (snapshot: ActivitySnapshot) => void;
|
|
26
|
+
setDiagnosticActions: (id: string, actions: DiagnosticAction[]) => void;
|
|
27
|
+
getDiagnosticActions: (id: string) => DiagnosticAction[];
|
|
28
|
+
openNotifications: (filter?: ActivityFilter) => void;
|
|
29
|
+
closeNotifications: () => void;
|
|
30
|
+
}
|
|
31
|
+
/** Subscribe, install listener, then arm: no mutation can fall between snapshot and listener. */
|
|
32
|
+
export declare function connectActivityStore(store: ActivityStore, client: Pick<ActivityClient, 'subscribe' | 'listen' | 'attach' | 'unsubscribe'>, signal: AbortSignal): Promise<void>;
|
|
@@ -1,77 +1,103 @@
|
|
|
1
1
|
export declare const styles: {
|
|
2
|
-
|
|
2
|
+
panel: {
|
|
3
3
|
position: "fixed";
|
|
4
4
|
right: string;
|
|
5
5
|
bottom: number;
|
|
6
6
|
zIndex: "calc(var(--ov-z-toast, 9999) + 1)";
|
|
7
7
|
width: string;
|
|
8
|
-
minWidth: number;
|
|
9
8
|
maxHeight: string;
|
|
10
9
|
display: "flex";
|
|
11
10
|
flexDirection: "column";
|
|
12
11
|
overflow: "hidden";
|
|
13
12
|
padding: number;
|
|
14
13
|
};
|
|
15
|
-
|
|
14
|
+
header: {
|
|
16
15
|
flex: string;
|
|
17
16
|
gap: string;
|
|
18
17
|
paddingInline: string;
|
|
19
|
-
background: string;
|
|
20
18
|
borderBottom: string;
|
|
21
19
|
};
|
|
22
|
-
|
|
23
|
-
marginLeft: string;
|
|
24
|
-
};
|
|
25
|
-
List: {
|
|
20
|
+
list: {
|
|
26
21
|
minHeight: number;
|
|
27
22
|
overflowY: "auto";
|
|
28
23
|
overscrollBehavior: "contain";
|
|
29
24
|
};
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
row: {
|
|
26
|
+
borderBottom: string;
|
|
27
|
+
padding: string;
|
|
28
|
+
display: "grid";
|
|
29
|
+
gap: string;
|
|
30
|
+
minWidth: number;
|
|
32
31
|
};
|
|
33
|
-
|
|
32
|
+
toast: {
|
|
33
|
+
width: string;
|
|
34
|
+
minWidth: number;
|
|
35
|
+
padding: number;
|
|
36
|
+
overflow: "hidden";
|
|
37
|
+
};
|
|
38
|
+
title: {
|
|
34
39
|
display: "flex";
|
|
35
40
|
alignItems: "center";
|
|
36
41
|
gap: string;
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
ErrorIcon: {
|
|
40
|
-
flex: string;
|
|
41
|
-
color: "var(--ov-color-danger)";
|
|
42
|
+
minWidth: number;
|
|
42
43
|
};
|
|
43
|
-
|
|
44
|
+
titleText: {
|
|
44
45
|
flex: number;
|
|
45
46
|
minWidth: number;
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
overflow: "hidden";
|
|
48
|
+
textOverflow: "ellipsis";
|
|
49
|
+
whiteSpace: "nowrap";
|
|
50
|
+
};
|
|
51
|
+
actions: {
|
|
52
|
+
display: "flex";
|
|
53
|
+
gap: string;
|
|
54
|
+
alignItems: "center";
|
|
55
|
+
flexWrap: "wrap";
|
|
48
56
|
};
|
|
49
|
-
|
|
57
|
+
metrics: {
|
|
58
|
+
display: "flex";
|
|
59
|
+
gap: string;
|
|
60
|
+
flexWrap: "wrap";
|
|
61
|
+
};
|
|
62
|
+
compactProgress: {
|
|
63
|
+
display: "flex";
|
|
64
|
+
alignItems: "center";
|
|
65
|
+
gap: string;
|
|
66
|
+
width: string;
|
|
67
|
+
flexShrink: number;
|
|
50
68
|
minWidth: number;
|
|
51
|
-
overflowWrap: "anywhere";
|
|
52
69
|
};
|
|
53
|
-
|
|
54
|
-
|
|
70
|
+
progressRow: {
|
|
71
|
+
display: "flex";
|
|
72
|
+
alignItems: "center";
|
|
73
|
+
gap: string;
|
|
74
|
+
minWidth: number;
|
|
75
|
+
};
|
|
76
|
+
progressCount: {
|
|
77
|
+
flexShrink: number;
|
|
78
|
+
fontVariantNumeric: "tabular-nums";
|
|
79
|
+
whiteSpace: "nowrap";
|
|
80
|
+
maxWidth: string;
|
|
81
|
+
overflow: "hidden";
|
|
82
|
+
textOverflow: "ellipsis";
|
|
83
|
+
};
|
|
84
|
+
progress: {
|
|
85
|
+
flex: number;
|
|
86
|
+
minWidth: number;
|
|
55
87
|
};
|
|
56
|
-
|
|
88
|
+
code: {
|
|
57
89
|
display: "block";
|
|
58
|
-
margin:
|
|
90
|
+
margin: number;
|
|
59
91
|
padding: string;
|
|
60
92
|
maxHeight: number;
|
|
61
93
|
overflow: "auto";
|
|
62
94
|
whiteSpace: "pre-wrap";
|
|
63
95
|
overflowWrap: "anywhere";
|
|
64
|
-
lineHeight: number;
|
|
65
96
|
userSelect: "text";
|
|
66
97
|
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
flexWrap: "wrap";
|
|
70
|
-
gap: string;
|
|
71
|
-
};
|
|
72
|
-
CopyError: {
|
|
98
|
+
error: {
|
|
99
|
+
color: "var(--ov-color-danger)";
|
|
73
100
|
margin: number;
|
|
74
|
-
|
|
75
|
-
borderTop: string;
|
|
101
|
+
overflowWrap: "anywhere";
|
|
76
102
|
};
|
|
77
103
|
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { AccessRoute, ActionRequest, ResourceReference } from '../resource/v2/domain';
|
|
2
|
+
export type ActivitySeverity = 'info' | 'success' | 'warning' | 'error';
|
|
3
|
+
export type ActivityProgress = {
|
|
4
|
+
kind: 'indeterminate';
|
|
5
|
+
message?: string;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'units';
|
|
8
|
+
current: string;
|
|
9
|
+
total: string;
|
|
10
|
+
unit: string;
|
|
11
|
+
} | {
|
|
12
|
+
kind: 'steps';
|
|
13
|
+
current: string;
|
|
14
|
+
total: string;
|
|
15
|
+
label: string;
|
|
16
|
+
};
|
|
17
|
+
export type ActivityMetric = {
|
|
18
|
+
id: string;
|
|
19
|
+
label: string;
|
|
20
|
+
value: string;
|
|
21
|
+
unit?: string;
|
|
22
|
+
tone?: ActivitySeverity;
|
|
23
|
+
};
|
|
24
|
+
export type ResourceNavigationIntent = {
|
|
25
|
+
pluginID: string;
|
|
26
|
+
targetId: string;
|
|
27
|
+
route: AccessRoute;
|
|
28
|
+
reference: ResourceReference;
|
|
29
|
+
representation: string;
|
|
30
|
+
};
|
|
31
|
+
export type ResourceActionIntent = {
|
|
32
|
+
pluginID: string;
|
|
33
|
+
request: ActionRequest;
|
|
34
|
+
};
|
|
35
|
+
export type ActivityAction = {
|
|
36
|
+
id: string;
|
|
37
|
+
kind: 'navigate-resource';
|
|
38
|
+
label: string;
|
|
39
|
+
target: ResourceNavigationIntent;
|
|
40
|
+
} | {
|
|
41
|
+
id: string;
|
|
42
|
+
kind: 'resource-action';
|
|
43
|
+
label: string;
|
|
44
|
+
intent: ResourceActionIntent;
|
|
45
|
+
} | {
|
|
46
|
+
id: string;
|
|
47
|
+
kind: 'cancel-task';
|
|
48
|
+
label: string;
|
|
49
|
+
taskId: string;
|
|
50
|
+
};
|
|
51
|
+
export type ActivityPresentation = {
|
|
52
|
+
title: string;
|
|
53
|
+
message?: string;
|
|
54
|
+
details?: string;
|
|
55
|
+
progress?: ActivityProgress;
|
|
56
|
+
metrics?: ActivityMetric[];
|
|
57
|
+
actions?: ActivityAction[];
|
|
58
|
+
};
|
|
59
|
+
export type ActivitySource = {
|
|
60
|
+
pluginID?: string;
|
|
61
|
+
connectionID?: string;
|
|
62
|
+
resource?: ResourceNavigationIntent;
|
|
63
|
+
};
|
|
64
|
+
export type TaskState = 'starting' | 'running' | 'paused' | 'succeeded' | 'failed' | 'cancelled' | 'unknown';
|
|
65
|
+
export type ActivityRecord = {
|
|
66
|
+
id: string;
|
|
67
|
+
revision: number;
|
|
68
|
+
source: ActivitySource;
|
|
69
|
+
kind: 'task' | 'alert' | 'message';
|
|
70
|
+
severity: ActivitySeverity;
|
|
71
|
+
createdAt: string;
|
|
72
|
+
updatedAt: string;
|
|
73
|
+
observedAt?: string;
|
|
74
|
+
parentId?: string;
|
|
75
|
+
presentation: ActivityPresentation;
|
|
76
|
+
task?: {
|
|
77
|
+
state: TaskState;
|
|
78
|
+
cancellation: 'unsupported' | 'available' | 'requested' | 'acknowledged';
|
|
79
|
+
unknownReason?: string;
|
|
80
|
+
};
|
|
81
|
+
alert?: {
|
|
82
|
+
key: string;
|
|
83
|
+
state: 'firing' | 'resolved' | 'unknown';
|
|
84
|
+
occurrences: number;
|
|
85
|
+
acknowledgedAt?: string;
|
|
86
|
+
snoozedUntil?: string;
|
|
87
|
+
};
|
|
88
|
+
visibility: {
|
|
89
|
+
collapsed: boolean;
|
|
90
|
+
toastDismissed: boolean;
|
|
91
|
+
read: boolean;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export type ActivitySnapshot = {
|
|
95
|
+
revision: number;
|
|
96
|
+
records: ActivityRecord[];
|
|
97
|
+
};
|
|
98
|
+
export type ActivityChange = {
|
|
99
|
+
revision: number;
|
|
100
|
+
record?: ActivityRecord;
|
|
101
|
+
removedIds?: string[];
|
|
102
|
+
};
|
|
103
|
+
export type ActivitySubscription = {
|
|
104
|
+
id: string;
|
|
105
|
+
snapshot: ActivitySnapshot;
|
|
106
|
+
};
|
|
107
|
+
export type ActivityObservationError = {
|
|
108
|
+
id: string;
|
|
109
|
+
pluginID: string;
|
|
110
|
+
message: string;
|
|
111
|
+
};
|
|
112
|
+
export type ActivitySpec = {
|
|
113
|
+
presentation: ActivityPresentation;
|
|
114
|
+
source?: ActivitySource;
|
|
115
|
+
severity?: ActivitySeverity;
|
|
116
|
+
parentId?: string;
|
|
117
|
+
};
|
|
118
|
+
export type BeginTaskRequest = ActivitySpec;
|
|
119
|
+
export type ReportTaskRequest = {
|
|
120
|
+
id: string;
|
|
121
|
+
presentation: ActivityPresentation;
|
|
122
|
+
state?: 'running' | 'paused';
|
|
123
|
+
observedAt?: string;
|
|
124
|
+
};
|
|
125
|
+
export type FinishTaskRequest = {
|
|
126
|
+
id: string;
|
|
127
|
+
state: 'succeeded' | 'failed' | 'cancelled' | 'unknown';
|
|
128
|
+
presentation?: ActivityPresentation;
|
|
129
|
+
};
|
|
130
|
+
export type AlertRequest = ActivitySpec & {
|
|
131
|
+
key: string;
|
|
132
|
+
observedAt: string;
|
|
133
|
+
};
|
|
134
|
+
export type ResolveAlertRequest = {
|
|
135
|
+
key: string;
|
|
136
|
+
observedAt: string;
|
|
137
|
+
};
|
|
138
|
+
export type SetPresentationRequest = {
|
|
139
|
+
id: string;
|
|
140
|
+
collapsed?: boolean;
|
|
141
|
+
toastDismissed?: boolean;
|
|
142
|
+
read?: boolean;
|
|
143
|
+
snoozedUntil?: string;
|
|
144
|
+
acknowledged?: boolean;
|
|
145
|
+
};
|
|
146
|
+
export type StartResourceActionRequest = {
|
|
147
|
+
pluginID: string;
|
|
148
|
+
request: ActionRequest;
|
|
149
|
+
presentation: ActivityPresentation;
|
|
150
|
+
parentId?: string;
|
|
151
|
+
};
|
|
152
|
+
export type ActivityFilter = 'all' | 'active' | 'attention';
|
|
153
|
+
/** Callbacks are trusted, same-session UI behavior. They never cross the host bridge. */
|
|
154
|
+
export type DiagnosticAction = {
|
|
155
|
+
label: string;
|
|
156
|
+
onClick: () => void | Promise<void>;
|
|
157
|
+
};
|
|
158
|
+
export type NotificationOptions = {
|
|
159
|
+
title: string;
|
|
160
|
+
severity: ActivitySeverity;
|
|
161
|
+
details?: string;
|
|
162
|
+
actions?: Array<ActivityAction | DiagnosticAction>;
|
|
163
|
+
};
|
package/dist/api.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./service-DO0Rrm3E.cjs"),c=require("./index-BVi9X4oU.cjs"),r=require("./events-B9wlH6cT.cjs"),p=require("./models-CpFXL1IY.cjs"),f={kind:"none"},G=(1n<<64n)-1n,m=t=>typeof t=="string"&&/^(0|[1-9][0-9]*)$/.test(t)&&t.length<=20&&BigInt(t)<=G,x=(t,e)=>Number.isSafeInteger(t)&&t>=0&&t<=e;function a(t,e,n=[]){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&e.every(i=>Object.prototype.hasOwnProperty.call(t,i))&&Object.keys(t).every(i=>e.includes(i)||n.includes(i))}function d(t){return typeof t=="string"}function o(t){return d(t)&&t.length>0}function N(t){return t==="complete"||t==="partial"||t==="unknown"}function R(t){return!a(t,["type","title","status","detail"],["instance","suggestions","actions","code","requestId","recovery","location"])||!d(t.type)||!d(t.title)||!Number.isSafeInteger(t.status)||!d(t.detail)||["instance","code","requestId","recovery"].some(e=>e in t&&!d(t[e]))||"suggestions"in t&&(!Array.isArray(t.suggestions)||!t.suggestions.every(d))||"actions"in t&&(!Array.isArray(t.actions)||!t.actions.every(e=>a(e,["type","label"],["target"])&&d(e.type)&&d(e.label)&&(!("target"in e)||d(e.target))))?!1:!("location"in t)||a(t.location,["start","end","unit"])&&Number.isSafeInteger(t.location.start)&&Number.isSafeInteger(t.location.end)&&d(t.location.unit)}function M(t){if(!a(t,["coverage","limitations","freshness","count"],["continuation"])||!N(t.coverage)||!Array.isArray(t.limitations)||!t.limitations.every(d)||!["current","snapshot","stale"].includes(t.freshness)||"continuation"in t&&!o(t.continuation))return!1;const e=t.count;return a(e,["kind"])&&e.kind==="unknown"||a(e,["kind","value"])&&(e.kind==="exact"||e.kind==="estimate")&&m(e.value)}function L(t){if(!a(t,["lane","leaseId","payload"],["generation","sequence"])||!o(t.leaseId))return!1;const e=t.payload;return t.lane==="control"?!a(t,["lane","leaseId","payload"])||!a(e,["kind"],["reason","generation","nextGeneration","state","error"])?!1:e.kind==="reset"?a(e,["kind","generation","nextGeneration","reason"])&&o(e.generation)&&o(e.nextGeneration)&&["gap","overflow","sourceInvalidated","bindingChanged"].includes(e.reason):e.kind==="control"?a(e,["kind","state","generation"])&&e.state==="complete"&&o(e.generation):e.kind==="close"?a(e,["kind","reason"],["error"])&&["closed","cancelled","failed","accessInvalidated"].includes(e.reason)&&(!("error"in e)||R(e.error)):!1:t.lane!=="data"||!a(t,["lane","leaseId","generation","sequence","payload"])||!o(t.generation)||!m(t.sequence)||!a(e,["kind","metadata"],["rows","changes"])||!M(e.metadata)?!1:e.kind==="open"?a(e,["kind","rows","metadata"])&&Array.isArray(e.rows)&&e.rows.every(y):e.kind!=="changes"||!a(e,["kind","changes","metadata"])||!Array.isArray(e.changes)?!1:e.changes.every(n=>a(n,["kind"],["index","key","row"])?n.kind==="enter"?a(n,["kind","index","row"])&&Number.isSafeInteger(n.index)&&y(n.row):n.kind==="update"?a(n,["kind","key","row"])&&o(n.key)&&y(n.row):n.kind==="move"?a(n,["kind","key","index"])&&o(n.key)&&Number.isSafeInteger(n.index):(n.kind==="leave"||n.kind==="delete")&&a(n,["kind","key"])&&o(n.key):!1)}function w(t,e=0){if(!t||e>64||!a(t,t.kind==="null"?["kind"]:["kind","value"]))return!1;switch(t.kind){case"null":return!0;case"bool":return typeof t.value=="boolean";case"string":case"timestamp":return typeof t.value=="string";case"double":return typeof t.value=="number"&&Number.isFinite(t.value);case"uint64":return m(t.value);case"int64":return typeof t.value=="string"&&/^(-[1-9][0-9]*|0|[1-9][0-9]*)$/.test(t.value)&&t.value.length<=20&&BigInt(t.value)>=-(1n<<63n)&&BigInt(t.value)<1n<<63n;case"list":return Array.isArray(t.value)&&t.value.every(n=>w(n,e+1));case"map":return!!t.value&&typeof t.value=="object"&&!Array.isArray(t.value)&&Object.values(t.value).every(n=>w(n,e+1));default:return!1}}function y(t){return!a(t,["key","targetId","resource","representation","provenance","values"])||!o(t.key)||!o(t.targetId)||!a(t.resource,["address"],["incarnation"])||"incarnation"in t.resource&&!o(t.resource.incarnation)||!a(t.resource.address,["provider","authority","type","scope","id"])||!o(t.resource.address.provider)||!o(t.resource.address.authority)||!o(t.resource.address.type)||!o(t.resource.address.id)||!Array.isArray(t.resource.address.scope)||!t.resource.address.scope.every(e=>a(e,["dimension","value"])&&o(e.dimension)&&d(e.value))||!a(t.representation,["id","revision"])||!o(t.representation.id)||!o(t.representation.revision)||!a(t.provenance,["source","coverage","stale"])||!o(t.provenance.source)||!N(t.provenance.coverage)||typeof t.provenance.stale!="boolean"||!t.values||typeof t.values!="object"||Array.isArray(t.values)?!1:Object.values(t.values).every(e=>a(e,["state"])&&(e.state==="absent"||e.state==="null")||a(e,["state","value"])&&e.state==="value"&&w(e.value))}function q(t){const e=structuredClone(t),n=i=>{i&&typeof i=="object"&&!Object.isFrozen(i)&&(Object.values(i).forEach(n),Object.freeze(i))};return n(e),e}class z{constructor(e,n){if(this.leaseId=e,this.maxRows=n,!e||!Number.isSafeInteger(n)||n<1||n>512)throw new RangeError("Invalid lease or window bound")}leaseId;maxRows;snapshot=Object.freeze({status:"attaching",rows:Object.freeze([]),stale:!1});generation;sequence=0n;opened=!1;recovering=!1;previousReset;getSnapshot(){return this.snapshot}attach(e){if(!e||this.snapshot.status!=="attaching")throw new Error("Invalid attachment");this.generation=e,this.publish({status:"pending",generation:e,rows:[],stale:!1})}disconnected(){return this.close(),{kind:"reopen"}}close(){this.generation=void 0,this.previousReset=void 0,this.opened=!1,this.recovering=!1,this.publish({status:"closed",rows:[],stale:!1})}apply(e){if(this.snapshot.status==="closed"||e&&typeof e=="object"&&typeof e.leaseId=="string"&&e.leaseId!==this.leaseId)return f;if(this.snapshot.status==="attaching")return this.fail();try{if(!L(e)||new TextEncoder().encode(JSON.stringify(e)).length>256*1024)return this.publish({...this.snapshot,rows:[],metadata:void 0,stale:!1}),this.snapshot.status==="complete"?this.disconnected():this.fail()}catch{return this.publish({...this.snapshot,rows:[],metadata:void 0,stale:!1}),this.snapshot.status==="complete"?this.disconnected():this.fail()}if(this.snapshot.status==="complete"&&(e.lane==="data"||e.lane==="control"&&e.payload.kind==="reset"))return this.disconnected();if(e.lane==="control"){const n=e.payload;if(n.kind==="close")return this.close(),n.error&&this.publish({status:"closed",rows:[],stale:!1,error:n.error}),f;if(n.kind==="control")return n.generation===this.generation&&this.opened&&!this.recovering&&this.publish({...this.snapshot,status:"complete"}),f;if(n.generation!==this.generation)return f;if(!n.nextGeneration||n.nextGeneration===n.generation||n.nextGeneration===this.previousReset?.generation)return this.publish({...this.snapshot,rows:[],metadata:void 0,stale:!1}),this.fail();this.previousReset={generation:n.generation,nextGeneration:n.nextGeneration},this.generation=n.nextGeneration,this.sequence=0n,this.opened=!1,this.recovering=!1;const i=n.reason==="bindingChanged"||n.reason==="sourceInvalidated";return this.publish({status:"pending",generation:this.generation,rows:i?[]:this.snapshot.rows,metadata:i?void 0:this.snapshot.metadata,stale:!i&&this.snapshot.rows.length>0}),f}if(e.generation!==this.generation||this.recovering)return f;try{if(new TextEncoder().encode(JSON.stringify(e)).length>256*1024)return this.fail();if(!m(e.sequence)||BigInt(e.sequence)!==this.sequence+1n)return this.fail();const n=e.payload;if(n.metadata.count.kind!=="unknown"&&!m(n.metadata.count.value))return this.fail();let i;if(n.kind==="open"){if(this.opened||n.rows.length>this.maxRows)return this.fail();if(i=n.rows.slice(),i.some(s=>!y(s))||new Set(i.map(s=>s.key)).size!==i.length)return this.fail()}else{if(!this.opened||n.changes.length>128)return this.fail();i=this.snapshot.rows.slice();for(const s of n.changes)if(s.kind==="enter"){if(!y(s.row)||i.some(h=>h.key===s.row.key)||!x(s.index,i.length)||i.length>=this.maxRows)return this.fail();i.splice(s.index,0,s.row)}else{const h=i.findIndex(g=>g.key===s.key);if(h<0)return this.fail();if(s.kind==="update"){if(!y(s.row)||s.row.key!==s.key)return this.fail();i[h]=s.row}else if(s.kind==="move"){const[g]=i.splice(h,1);if(!x(s.index,i.length))return this.fail();i.splice(s.index,0,g)}else if(s.kind==="leave"||s.kind==="delete")i.splice(h,1);else return this.fail()}}return this.sequence=BigInt(e.sequence),this.opened=!0,this.publish({status:"ready",generation:this.generation,rows:i,metadata:n.metadata,stale:!1}),f}catch{return this.fail()}}fail(){return this.generation?this.recovering?f:(this.recovering=!0,this.publish({...this.snapshot,status:"recovering",stale:this.snapshot.rows.length>0}),{kind:"recover",generation:this.generation}):(this.close(),{kind:"reopen"})}publish(e){this.snapshot=q(e)}}let J=class _{running;url;source;error;constructor(e={}){"running"in e||(this.running=!1),"url"in e||(this.url=""),"source"in e||(this.source=""),"error"in e||(this.error=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new _(n)}};function U(){return r.ByID(3755720097).then(t=>V(t))}const V=J.createFrom,W=Object.freeze(Object.defineProperty({__proto__:null,GetStatus:U},Symbol.toStringTag,{value:"Module"}));class D{pid;startIdentity;executable;constructor(e={}){"pid"in e||(this.pid=0),"startIdentity"in e||(this.startIdentity=""),"executable"in e||(this.executable=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new D(n)}}class v{key;role;pluginID;ownership;identity;windows;windowAssociation;evidence;error;constructor(e={}){"key"in e||(this.key=""),"role"in e||(this.role=""),"pluginID"in e||(this.pluginID=""),"ownership"in e||(this.ownership=""),"identity"in e||(this.identity=null),"windows"in e||(this.windows=[]),"windowAssociation"in e||(this.windowAssociation=""),"evidence"in e||(this.evidence=""),"error"in e||(this.error=""),Object.assign(this,e)}static createFrom(e={}){const n=Z,i=X;let s=typeof e=="string"?JSON.parse(e):e;return"identity"in s&&(s.identity=n(s.identity)),"windows"in s&&(s.windows=i(s.windows)),new v(s)}}class k{observedAt;processes;constructor(e={}){"observedAt"in e||(this.observedAt="0001-01-01T00:00:00.000Z"),"processes"in e||(this.processes=[]),Object.assign(this,e)}static createFrom(e={}){const n=Y;let i=typeof e=="string"?JSON.parse(e):e;return"processes"in i&&(i.processes=n(i.processes)),new k(i)}}class O{name;id;nativeID;ownership;error;constructor(e={}){"name"in e||(this.name=""),"id"in e||(this.id=0),"nativeID"in e||(this.nativeID=0),"ownership"in e||(this.ownership=""),"error"in e||(this.error=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new O(n)}}const Q=D.createFrom,Z=c.Nullable(Q),H=O.createFrom,X=c.Array(H),K=v.createFrom,Y=c.Array(K);function $(){return r.ByID(3873589115).then(t=>ee(t))}const ee=k.createFrom,te=Object.freeze(Object.defineProperty({__proto__:null,GetSnapshot:$},Symbol.toStringTag,{value:"Module"}));class B{supported;enabled;engine;window;application;target;error;constructor(e={}){"supported"in e||(this.supported=!1),"enabled"in e||(this.enabled=!1),"engine"in e||(this.engine=""),"window"in e||(this.window=""),"application"in e||(this.application=""),"target"in e||(this.target=""),"error"in e||(this.error=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new B(n)}}function ne(t){return r.ByID(2352399502,t).then(e=>ie(e))}const ie=B.createFrom,re=Object.freeze(Object.defineProperty({__proto__:null,GetStatus:ne},Symbol.toStringTag,{value:"Module"}));function se(t,e){return r.ByID(1112300727,t,e)}function ae(t){return r.ByID(3545575747,t)}function oe(){return r.ByID(973353934).then(t=>De(t))}function ce(){return r.ByID(3274001154).then(t=>ve(t))}function le(){return r.ByID(1957733758).then(t=>Oe(t))}function de(){return r.ByID(3570265771).then(t=>Te(t))}function ue(){return r.ByID(338269344).then(t=>Ae(t))}function fe(t){return r.ByID(2544305887,t).then(e=>xe(e))}function pe(t,e){return r.ByID(1042852749,t,e)}function he(){return r.ByID(3071199936)}function ye(t){return r.ByID(2852029597,t)}function ge(t){return r.ByID(2119350976,t)}function me(t,e,n){return r.ByID(1507504662,t,e,n)}function be(t){return r.ByID(4286704285,t)}function Ie(t,e){return r.ByID(323373508,t,e)}function Se(t){return r.ByID(2912056327,t)}function we(t,e,n){return r.ByID(3748367702,t,e,n)}const De=p.ConfigView.createFrom,ve=p.Status.createFrom,ke=p.ConnectionPolicyView.createFrom,Oe=c.Array(ke),Be=p.PendingConfirmation.createFrom,Te=c.Array(Be),Fe=p.PresetView.createFrom,Ae=c.Array(Fe),je=p.ToolView.createFrom,xe=c.Array(je),Ne=Object.freeze(Object.defineProperty({__proto__:null,ApplyPreset:se,DeleteUserPreset:ae,GetConfig:oe,GetStatus:ce,ListConnectionPolicies:le,ListPendingConfirmations:de,ListPresets:ue,ListTools:fe,ResolveConfirmation:pe,RotateToken:he,SaveUserPreset:ye,SetBlockConnectionsByDefault:ge,SetConnectionAccess:me,SetEnabled:be,SetPluginEnabled:Ie,SetPort:Se,SetToolOverride:we},Symbol.toStringTag,{value:"Module"}));function _e(t){return r.ByID(3503478684,t)}const Ce=Object.freeze(Object.defineProperty({__proto__:null,DetectLanguage:_e},Symbol.toStringTag,{value:"Module"}));function Pe(t,e){return r.ByID(2691208406,t,e)}function Ee(t,e){return r.ByID(3932965591,t,e)}function Ge(t,e){return r.ByID(1686862755,t,e)}function Re(t,e,n){return r.ByID(3705442919,t,e,n)}function Me(t){return r.ByID(3024854267,t)}function Le(t){return r.ByID(3423289677,t)}function qe(t){return r.ByID(158417611,t)}function ze(t){return r.ByID(3413815733,t)}function Je(t,e){return r.ByID(2047870999,t,e)}const Ue=Object.freeze(Object.defineProperty({__proto__:null,Debug:Pe,Error:Ee,Info:Ge,Log:Re,ReadLog:Me,ReportStartupReady:Le,StartTail:qe,StopTail:ze,Warn:Je},Symbol.toStringTag,{value:"Module"}));class T{windowName;token;pending;constructor(e={}){"windowName"in e||(this.windowName=""),"token"in e||(this.token=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new T(n)}}function Ve(){return r.ByID(2260974144).then(t=>Ze(t))}function We(t,e,n,i){return r.ByID(286400678,t,e,n,i)}function Qe(t){return r.ByID(1772773955,t)}const Ze=T.createFrom,He=Object.freeze(Object.defineProperty({__proto__:null,Register:Ve,Respond:We,Unregister:Qe},Symbol.toStringTag,{value:"Module"}));function Xe(t,e){return r.ByID(712656304,t,e).then(n=>at(n))}function Ke(t){return r.ByID(4153226260,t).then(e=>b(e))}function Ye(t){return r.ByID(1859413816,t)}function $e(){return r.ByID(2707386443).then(t=>ot(t))}function et(t){return r.ByID(2381063937,t)}function tt(t){return r.ByID(123659362,t).then(e=>b(e))}function nt(t){return r.ByID(709599671,t).then(e=>b(e))}function it(t,e){return r.ByID(2105869281,t,e).then(n=>b(n))}function rt(t){return r.ByID(1371062537,t)}const st=p.LogEntry.createFrom,at=c.Array(st),b=p.DevServerState.createFrom,ot=c.Array(b),ct=Object.freeze(Object.defineProperty({__proto__:null,GetDevServerLogs:Xe,GetDevServerState:Ke,IsManaged:Ye,ListDevServerStates:$e,RebuildPlugin:et,RestartDevServer:tt,StartDevServer:nt,StartDevServerForPath:it,StopDevServer:rt},Symbol.toStringTag,{value:"Module"}));function lt(t,e){return r.ByID(1867216983,t,e).then(n=>C(n))}function dt(){return r.ByID(3418650705).then(t=>yt(t))}function ut(t,e){return r.ByID(4138610615,t,e).then(n=>C(n))}function ft(t){return r.ByID(3055914536,t)}function pt(t){return r.ByID(1502487629,t)}const ht=p.LogEntry$1.createFrom,C=c.Array(ht),yt=c.Array(c.Any),gt=Object.freeze(Object.defineProperty({__proto__:null,GetLogs:lt,ListStreams:dt,SearchLogs:ut,Subscribe:ft,Unsubscribe:pt},Symbol.toStringTag,{value:"Module"}));class I{browser;vite;hmr;mcp;control;health;constructor(e={}){"browser"in e||(this.browser=null),"vite"in e||(this.vite=null),"hmr"in e||(this.hmr=null),"mcp"in e||(this.mcp=null),"control"in e||(this.control=null),"health"in e||(this.health=null),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new I(n)}}let mt=class P{code;message;details;constructor(e={}){"code"in e||(this.code=""),"message"in e||(this.message=""),Object.assign(this,e)}static createFrom(e={}){const n=bt;let i=typeof e=="string"?JSON.parse(e):e;return"details"in i&&(i.details=n(i.details)),new P(i)}};class F{schemaVersion;workspaceID;instanceID;generation;kind;channel;displayName;stateRoot;process;version;commit;repositories;endpoints;plugins;readiness;lastError;startedAt;constructor(e={}){"schemaVersion"in e||(this.schemaVersion=0),"workspaceID"in e||(this.workspaceID=""),"instanceID"in e||(this.instanceID=""),"generation"in e||(this.generation=""),"kind"in e||(this.kind=""),"channel"in e||(this.channel=""),"displayName"in e||(this.displayName=""),"stateRoot"in e||(this.stateRoot=""),"process"in e||(this.process=new S),"version"in e||(this.version=""),"commit"in e||(this.commit=""),"repositories"in e||(this.repositories=[]),"endpoints"in e||(this.endpoints=new I),"plugins"in e||(this.plugins=[]),"readiness"in e||(this.readiness=""),"startedAt"in e||(this.startedAt="0001-01-01T00:00:00.000Z"),Object.assign(this,e)}static createFrom(e={}){const n=It,i=wt,s=Dt,h=kt,g=E;let l=typeof e=="string"?JSON.parse(e):e;return"process"in l&&(l.process=n(l.process)),"repositories"in l&&(l.repositories=i(l.repositories)),"endpoints"in l&&(l.endpoints=s(l.endpoints)),"plugins"in l&&(l.plugins=h(l.plugins)),"lastError"in l&&(l.lastError=g(l.lastError)),new F(l)}}class A{id;version;source;generation;mode;buildStatus;viteStatus;rpcStatus;controllerStatus;operationID;lastError;constructor(e={}){"id"in e||(this.id=""),"version"in e||(this.version=""),"source"in e||(this.source=""),"generation"in e||(this.generation=""),"mode"in e||(this.mode=""),"buildStatus"in e||(this.buildStatus=""),"viteStatus"in e||(this.viteStatus=""),"rpcStatus"in e||(this.rpcStatus=""),"controllerStatus"in e||(this.controllerStatus=""),Object.assign(this,e)}static createFrom(e={}){const n=E;let i=typeof e=="string"?JSON.parse(e):e;return"lastError"in i&&(i.lastError=n(i.lastError)),new A(i)}}class S{pid;startIdentity;executable;workspaceID;generation;role;source;constructor(e={}){"pid"in e||(this.pid=0),"startIdentity"in e||(this.startIdentity=""),"executable"in e||(this.executable=""),"workspaceID"in e||(this.workspaceID=""),"generation"in e||(this.generation=""),"role"in e||(this.role=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new S(n)}}class j{id;path;ref;commit;constructor(e={}){"id"in e||(this.id=""),"path"in e||(this.path=""),"ref"in e||(this.ref=""),"commit"in e||(this.commit=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new j(n)}}const bt=c.Map(c.Any,c.Any),It=S.createFrom,St=j.createFrom,wt=c.Array(St),Dt=I.createFrom,vt=A.createFrom,kt=c.Array(vt),Ot=mt.createFrom,E=c.Nullable(Ot);function Bt(){return r.ByID(678226073).then(t=>xt(t))}function Tt(){return r.ByID(1706570792)}function Ft(t){return r.ByID(2957909098,t).then(e=>Nt(e))}function At(t){return r.ByID(473489213,t)}function jt(t,e){return r.ByID(3778694836,t,e)}const xt=F.createFrom,Nt=c.Array(c.Any);exports.DataClient=u.servicewrapper;exports.ExecClient=u.exec;exports.GraphClient=u.graphClient;exports.LogsClient=u.logs;exports.MetricClient=u.metric;exports.NetworkerClient=u.networker;exports.PluginManager=u.servicewrapper$1;exports.ResourceClient=u.client;exports.SettingsService=u.binding;exports.UIClient=u.servicewrapper$2;exports.WindowClient=u.service;exports.DevServerManager=ct;exports.DiagnosticsClient=Ue;exports.ExtensionDiagnosticsClient=He;exports.GetInstanceInfo=Bt;exports.GetOperatingSystem=Tt;exports.HostProfiling=W;exports.McpRelayClient=Ne;exports.OpenFileSelectionDialog=Ft;exports.PluginLogManager=gt;exports.ProcessInventory=te;exports.QueryLeaseObserver=z;exports.SaveFileDialog=At;exports.UiInspection=re;exports.UtilsClient=Ce;exports.WriteFileContent=jt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./service-Dm78ll2_.cjs"),c=require("./index-BVi9X4oU.cjs"),r=require("./events-B9wlH6cT.cjs"),p=require("./models-CpFXL1IY.cjs"),f={kind:"none"},G=(1n<<64n)-1n,m=t=>typeof t=="string"&&/^(0|[1-9][0-9]*)$/.test(t)&&t.length<=20&&BigInt(t)<=G,x=(t,e)=>Number.isSafeInteger(t)&&t>=0&&t<=e;function a(t,e,n=[]){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&e.every(i=>Object.prototype.hasOwnProperty.call(t,i))&&Object.keys(t).every(i=>e.includes(i)||n.includes(i))}function d(t){return typeof t=="string"}function o(t){return d(t)&&t.length>0}function N(t){return t==="complete"||t==="partial"||t==="unknown"}function R(t){return!a(t,["type","title","status","detail"],["instance","suggestions","actions","code","requestId","recovery","location"])||!d(t.type)||!d(t.title)||!Number.isSafeInteger(t.status)||!d(t.detail)||["instance","code","requestId","recovery"].some(e=>e in t&&!d(t[e]))||"suggestions"in t&&(!Array.isArray(t.suggestions)||!t.suggestions.every(d))||"actions"in t&&(!Array.isArray(t.actions)||!t.actions.every(e=>a(e,["type","label"],["target"])&&d(e.type)&&d(e.label)&&(!("target"in e)||d(e.target))))?!1:!("location"in t)||a(t.location,["start","end","unit"])&&Number.isSafeInteger(t.location.start)&&Number.isSafeInteger(t.location.end)&&d(t.location.unit)}function M(t){if(!a(t,["coverage","limitations","freshness","count"],["continuation"])||!N(t.coverage)||!Array.isArray(t.limitations)||!t.limitations.every(d)||!["current","snapshot","stale"].includes(t.freshness)||"continuation"in t&&!o(t.continuation))return!1;const e=t.count;return a(e,["kind"])&&e.kind==="unknown"||a(e,["kind","value"])&&(e.kind==="exact"||e.kind==="estimate")&&m(e.value)}function L(t){if(!a(t,["lane","leaseId","payload"],["generation","sequence"])||!o(t.leaseId))return!1;const e=t.payload;return t.lane==="control"?!a(t,["lane","leaseId","payload"])||!a(e,["kind"],["reason","generation","nextGeneration","state","error"])?!1:e.kind==="reset"?a(e,["kind","generation","nextGeneration","reason"])&&o(e.generation)&&o(e.nextGeneration)&&["gap","overflow","sourceInvalidated","bindingChanged"].includes(e.reason):e.kind==="control"?a(e,["kind","state","generation"])&&e.state==="complete"&&o(e.generation):e.kind==="close"?a(e,["kind","reason"],["error"])&&["closed","cancelled","failed","accessInvalidated"].includes(e.reason)&&(!("error"in e)||R(e.error)):!1:t.lane!=="data"||!a(t,["lane","leaseId","generation","sequence","payload"])||!o(t.generation)||!m(t.sequence)||!a(e,["kind","metadata"],["rows","changes"])||!M(e.metadata)?!1:e.kind==="open"?a(e,["kind","rows","metadata"])&&Array.isArray(e.rows)&&e.rows.every(y):e.kind!=="changes"||!a(e,["kind","changes","metadata"])||!Array.isArray(e.changes)?!1:e.changes.every(n=>a(n,["kind"],["index","key","row"])?n.kind==="enter"?a(n,["kind","index","row"])&&Number.isSafeInteger(n.index)&&y(n.row):n.kind==="update"?a(n,["kind","key","row"])&&o(n.key)&&y(n.row):n.kind==="move"?a(n,["kind","key","index"])&&o(n.key)&&Number.isSafeInteger(n.index):(n.kind==="leave"||n.kind==="delete")&&a(n,["kind","key"])&&o(n.key):!1)}function w(t,e=0){if(!t||e>64||!a(t,t.kind==="null"?["kind"]:["kind","value"]))return!1;switch(t.kind){case"null":return!0;case"bool":return typeof t.value=="boolean";case"string":case"timestamp":return typeof t.value=="string";case"double":return typeof t.value=="number"&&Number.isFinite(t.value);case"uint64":return m(t.value);case"int64":return typeof t.value=="string"&&/^(-[1-9][0-9]*|0|[1-9][0-9]*)$/.test(t.value)&&t.value.length<=20&&BigInt(t.value)>=-(1n<<63n)&&BigInt(t.value)<1n<<63n;case"list":return Array.isArray(t.value)&&t.value.every(n=>w(n,e+1));case"map":return!!t.value&&typeof t.value=="object"&&!Array.isArray(t.value)&&Object.values(t.value).every(n=>w(n,e+1));default:return!1}}function y(t){return!a(t,["key","targetId","resource","representation","provenance","values"])||!o(t.key)||!o(t.targetId)||!a(t.resource,["address"],["incarnation"])||"incarnation"in t.resource&&!o(t.resource.incarnation)||!a(t.resource.address,["provider","authority","type","scope","id"])||!o(t.resource.address.provider)||!o(t.resource.address.authority)||!o(t.resource.address.type)||!o(t.resource.address.id)||!Array.isArray(t.resource.address.scope)||!t.resource.address.scope.every(e=>a(e,["dimension","value"])&&o(e.dimension)&&d(e.value))||!a(t.representation,["id","revision"])||!o(t.representation.id)||!o(t.representation.revision)||!a(t.provenance,["source","coverage","stale"])||!o(t.provenance.source)||!N(t.provenance.coverage)||typeof t.provenance.stale!="boolean"||!t.values||typeof t.values!="object"||Array.isArray(t.values)?!1:Object.values(t.values).every(e=>a(e,["state"])&&(e.state==="absent"||e.state==="null")||a(e,["state","value"])&&e.state==="value"&&w(e.value))}function q(t){const e=structuredClone(t),n=i=>{i&&typeof i=="object"&&!Object.isFrozen(i)&&(Object.values(i).forEach(n),Object.freeze(i))};return n(e),e}class z{constructor(e,n){if(this.leaseId=e,this.maxRows=n,!e||!Number.isSafeInteger(n)||n<1||n>512)throw new RangeError("Invalid lease or window bound")}leaseId;maxRows;snapshot=Object.freeze({status:"attaching",rows:Object.freeze([]),stale:!1});generation;sequence=0n;opened=!1;recovering=!1;previousReset;getSnapshot(){return this.snapshot}attach(e){if(!e||this.snapshot.status!=="attaching")throw new Error("Invalid attachment");this.generation=e,this.publish({status:"pending",generation:e,rows:[],stale:!1})}disconnected(){return this.close(),{kind:"reopen"}}close(){this.generation=void 0,this.previousReset=void 0,this.opened=!1,this.recovering=!1,this.publish({status:"closed",rows:[],stale:!1})}apply(e){if(this.snapshot.status==="closed"||e&&typeof e=="object"&&typeof e.leaseId=="string"&&e.leaseId!==this.leaseId)return f;if(this.snapshot.status==="attaching")return this.fail();try{if(!L(e)||new TextEncoder().encode(JSON.stringify(e)).length>256*1024)return this.publish({...this.snapshot,rows:[],metadata:void 0,stale:!1}),this.snapshot.status==="complete"?this.disconnected():this.fail()}catch{return this.publish({...this.snapshot,rows:[],metadata:void 0,stale:!1}),this.snapshot.status==="complete"?this.disconnected():this.fail()}if(this.snapshot.status==="complete"&&(e.lane==="data"||e.lane==="control"&&e.payload.kind==="reset"))return this.disconnected();if(e.lane==="control"){const n=e.payload;if(n.kind==="close")return this.close(),n.error&&this.publish({status:"closed",rows:[],stale:!1,error:n.error}),f;if(n.kind==="control")return n.generation===this.generation&&this.opened&&!this.recovering&&this.publish({...this.snapshot,status:"complete"}),f;if(n.generation!==this.generation)return f;if(!n.nextGeneration||n.nextGeneration===n.generation||n.nextGeneration===this.previousReset?.generation)return this.publish({...this.snapshot,rows:[],metadata:void 0,stale:!1}),this.fail();this.previousReset={generation:n.generation,nextGeneration:n.nextGeneration},this.generation=n.nextGeneration,this.sequence=0n,this.opened=!1,this.recovering=!1;const i=n.reason==="bindingChanged"||n.reason==="sourceInvalidated";return this.publish({status:"pending",generation:this.generation,rows:i?[]:this.snapshot.rows,metadata:i?void 0:this.snapshot.metadata,stale:!i&&this.snapshot.rows.length>0}),f}if(e.generation!==this.generation||this.recovering)return f;try{if(new TextEncoder().encode(JSON.stringify(e)).length>256*1024)return this.fail();if(!m(e.sequence)||BigInt(e.sequence)!==this.sequence+1n)return this.fail();const n=e.payload;if(n.metadata.count.kind!=="unknown"&&!m(n.metadata.count.value))return this.fail();let i;if(n.kind==="open"){if(this.opened||n.rows.length>this.maxRows)return this.fail();if(i=n.rows.slice(),i.some(s=>!y(s))||new Set(i.map(s=>s.key)).size!==i.length)return this.fail()}else{if(!this.opened||n.changes.length>128)return this.fail();i=this.snapshot.rows.slice();for(const s of n.changes)if(s.kind==="enter"){if(!y(s.row)||i.some(h=>h.key===s.row.key)||!x(s.index,i.length)||i.length>=this.maxRows)return this.fail();i.splice(s.index,0,s.row)}else{const h=i.findIndex(g=>g.key===s.key);if(h<0)return this.fail();if(s.kind==="update"){if(!y(s.row)||s.row.key!==s.key)return this.fail();i[h]=s.row}else if(s.kind==="move"){const[g]=i.splice(h,1);if(!x(s.index,i.length))return this.fail();i.splice(s.index,0,g)}else if(s.kind==="leave"||s.kind==="delete")i.splice(h,1);else return this.fail()}}return this.sequence=BigInt(e.sequence),this.opened=!0,this.publish({status:"ready",generation:this.generation,rows:i,metadata:n.metadata,stale:!1}),f}catch{return this.fail()}}fail(){return this.generation?this.recovering?f:(this.recovering=!0,this.publish({...this.snapshot,status:"recovering",stale:this.snapshot.rows.length>0}),{kind:"recover",generation:this.generation}):(this.close(),{kind:"reopen"})}publish(e){this.snapshot=q(e)}}let J=class _{running;url;source;error;constructor(e={}){"running"in e||(this.running=!1),"url"in e||(this.url=""),"source"in e||(this.source=""),"error"in e||(this.error=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new _(n)}};function U(){return r.ByID(3755720097).then(t=>V(t))}const V=J.createFrom,W=Object.freeze(Object.defineProperty({__proto__:null,GetStatus:U},Symbol.toStringTag,{value:"Module"}));class D{pid;startIdentity;executable;constructor(e={}){"pid"in e||(this.pid=0),"startIdentity"in e||(this.startIdentity=""),"executable"in e||(this.executable=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new D(n)}}class v{key;role;pluginID;ownership;identity;windows;windowAssociation;evidence;error;constructor(e={}){"key"in e||(this.key=""),"role"in e||(this.role=""),"pluginID"in e||(this.pluginID=""),"ownership"in e||(this.ownership=""),"identity"in e||(this.identity=null),"windows"in e||(this.windows=[]),"windowAssociation"in e||(this.windowAssociation=""),"evidence"in e||(this.evidence=""),"error"in e||(this.error=""),Object.assign(this,e)}static createFrom(e={}){const n=Z,i=X;let s=typeof e=="string"?JSON.parse(e):e;return"identity"in s&&(s.identity=n(s.identity)),"windows"in s&&(s.windows=i(s.windows)),new v(s)}}class k{observedAt;processes;constructor(e={}){"observedAt"in e||(this.observedAt="0001-01-01T00:00:00.000Z"),"processes"in e||(this.processes=[]),Object.assign(this,e)}static createFrom(e={}){const n=Y;let i=typeof e=="string"?JSON.parse(e):e;return"processes"in i&&(i.processes=n(i.processes)),new k(i)}}class O{name;id;nativeID;ownership;error;constructor(e={}){"name"in e||(this.name=""),"id"in e||(this.id=0),"nativeID"in e||(this.nativeID=0),"ownership"in e||(this.ownership=""),"error"in e||(this.error=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new O(n)}}const Q=D.createFrom,Z=c.Nullable(Q),H=O.createFrom,X=c.Array(H),K=v.createFrom,Y=c.Array(K);function $(){return r.ByID(3873589115).then(t=>ee(t))}const ee=k.createFrom,te=Object.freeze(Object.defineProperty({__proto__:null,GetSnapshot:$},Symbol.toStringTag,{value:"Module"}));class B{supported;enabled;engine;window;application;target;error;constructor(e={}){"supported"in e||(this.supported=!1),"enabled"in e||(this.enabled=!1),"engine"in e||(this.engine=""),"window"in e||(this.window=""),"application"in e||(this.application=""),"target"in e||(this.target=""),"error"in e||(this.error=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new B(n)}}function ne(t){return r.ByID(2352399502,t).then(e=>ie(e))}const ie=B.createFrom,re=Object.freeze(Object.defineProperty({__proto__:null,GetStatus:ne},Symbol.toStringTag,{value:"Module"}));function se(t,e){return r.ByID(1112300727,t,e)}function ae(t){return r.ByID(3545575747,t)}function oe(){return r.ByID(973353934).then(t=>De(t))}function ce(){return r.ByID(3274001154).then(t=>ve(t))}function le(){return r.ByID(1957733758).then(t=>Oe(t))}function de(){return r.ByID(3570265771).then(t=>Te(t))}function ue(){return r.ByID(338269344).then(t=>Ae(t))}function fe(t){return r.ByID(2544305887,t).then(e=>xe(e))}function pe(t,e){return r.ByID(1042852749,t,e)}function he(){return r.ByID(3071199936)}function ye(t){return r.ByID(2852029597,t)}function ge(t){return r.ByID(2119350976,t)}function me(t,e,n){return r.ByID(1507504662,t,e,n)}function be(t){return r.ByID(4286704285,t)}function Ie(t,e){return r.ByID(323373508,t,e)}function Se(t){return r.ByID(2912056327,t)}function we(t,e,n){return r.ByID(3748367702,t,e,n)}const De=p.ConfigView.createFrom,ve=p.Status.createFrom,ke=p.ConnectionPolicyView.createFrom,Oe=c.Array(ke),Be=p.PendingConfirmation.createFrom,Te=c.Array(Be),Fe=p.PresetView.createFrom,Ae=c.Array(Fe),je=p.ToolView.createFrom,xe=c.Array(je),Ne=Object.freeze(Object.defineProperty({__proto__:null,ApplyPreset:se,DeleteUserPreset:ae,GetConfig:oe,GetStatus:ce,ListConnectionPolicies:le,ListPendingConfirmations:de,ListPresets:ue,ListTools:fe,ResolveConfirmation:pe,RotateToken:he,SaveUserPreset:ye,SetBlockConnectionsByDefault:ge,SetConnectionAccess:me,SetEnabled:be,SetPluginEnabled:Ie,SetPort:Se,SetToolOverride:we},Symbol.toStringTag,{value:"Module"}));function _e(t){return r.ByID(3503478684,t)}const Ce=Object.freeze(Object.defineProperty({__proto__:null,DetectLanguage:_e},Symbol.toStringTag,{value:"Module"}));function Pe(t,e){return r.ByID(2691208406,t,e)}function Ee(t,e){return r.ByID(3932965591,t,e)}function Ge(t,e){return r.ByID(1686862755,t,e)}function Re(t,e,n){return r.ByID(3705442919,t,e,n)}function Me(t){return r.ByID(3024854267,t)}function Le(t){return r.ByID(3423289677,t)}function qe(t){return r.ByID(158417611,t)}function ze(t){return r.ByID(3413815733,t)}function Je(t,e){return r.ByID(2047870999,t,e)}const Ue=Object.freeze(Object.defineProperty({__proto__:null,Debug:Pe,Error:Ee,Info:Ge,Log:Re,ReadLog:Me,ReportStartupReady:Le,StartTail:qe,StopTail:ze,Warn:Je},Symbol.toStringTag,{value:"Module"}));class T{windowName;token;pending;constructor(e={}){"windowName"in e||(this.windowName=""),"token"in e||(this.token=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new T(n)}}function Ve(){return r.ByID(2260974144).then(t=>Ze(t))}function We(t,e,n,i){return r.ByID(286400678,t,e,n,i)}function Qe(t){return r.ByID(1772773955,t)}const Ze=T.createFrom,He=Object.freeze(Object.defineProperty({__proto__:null,Register:Ve,Respond:We,Unregister:Qe},Symbol.toStringTag,{value:"Module"}));function Xe(t,e){return r.ByID(712656304,t,e).then(n=>at(n))}function Ke(t){return r.ByID(4153226260,t).then(e=>b(e))}function Ye(t){return r.ByID(1859413816,t)}function $e(){return r.ByID(2707386443).then(t=>ot(t))}function et(t){return r.ByID(2381063937,t)}function tt(t){return r.ByID(123659362,t).then(e=>b(e))}function nt(t){return r.ByID(709599671,t).then(e=>b(e))}function it(t,e){return r.ByID(2105869281,t,e).then(n=>b(n))}function rt(t){return r.ByID(1371062537,t)}const st=p.LogEntry.createFrom,at=c.Array(st),b=p.DevServerState.createFrom,ot=c.Array(b),ct=Object.freeze(Object.defineProperty({__proto__:null,GetDevServerLogs:Xe,GetDevServerState:Ke,IsManaged:Ye,ListDevServerStates:$e,RebuildPlugin:et,RestartDevServer:tt,StartDevServer:nt,StartDevServerForPath:it,StopDevServer:rt},Symbol.toStringTag,{value:"Module"}));function lt(t,e){return r.ByID(1867216983,t,e).then(n=>C(n))}function dt(){return r.ByID(3418650705).then(t=>yt(t))}function ut(t,e){return r.ByID(4138610615,t,e).then(n=>C(n))}function ft(t){return r.ByID(3055914536,t)}function pt(t){return r.ByID(1502487629,t)}const ht=p.LogEntry$1.createFrom,C=c.Array(ht),yt=c.Array(c.Any),gt=Object.freeze(Object.defineProperty({__proto__:null,GetLogs:lt,ListStreams:dt,SearchLogs:ut,Subscribe:ft,Unsubscribe:pt},Symbol.toStringTag,{value:"Module"}));class I{browser;vite;hmr;mcp;control;health;constructor(e={}){"browser"in e||(this.browser=null),"vite"in e||(this.vite=null),"hmr"in e||(this.hmr=null),"mcp"in e||(this.mcp=null),"control"in e||(this.control=null),"health"in e||(this.health=null),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new I(n)}}let mt=class P{code;message;details;constructor(e={}){"code"in e||(this.code=""),"message"in e||(this.message=""),Object.assign(this,e)}static createFrom(e={}){const n=bt;let i=typeof e=="string"?JSON.parse(e):e;return"details"in i&&(i.details=n(i.details)),new P(i)}};class F{schemaVersion;workspaceID;instanceID;generation;kind;channel;displayName;stateRoot;process;version;commit;repositories;endpoints;plugins;readiness;lastError;startedAt;constructor(e={}){"schemaVersion"in e||(this.schemaVersion=0),"workspaceID"in e||(this.workspaceID=""),"instanceID"in e||(this.instanceID=""),"generation"in e||(this.generation=""),"kind"in e||(this.kind=""),"channel"in e||(this.channel=""),"displayName"in e||(this.displayName=""),"stateRoot"in e||(this.stateRoot=""),"process"in e||(this.process=new S),"version"in e||(this.version=""),"commit"in e||(this.commit=""),"repositories"in e||(this.repositories=[]),"endpoints"in e||(this.endpoints=new I),"plugins"in e||(this.plugins=[]),"readiness"in e||(this.readiness=""),"startedAt"in e||(this.startedAt="0001-01-01T00:00:00.000Z"),Object.assign(this,e)}static createFrom(e={}){const n=It,i=wt,s=Dt,h=kt,g=E;let l=typeof e=="string"?JSON.parse(e):e;return"process"in l&&(l.process=n(l.process)),"repositories"in l&&(l.repositories=i(l.repositories)),"endpoints"in l&&(l.endpoints=s(l.endpoints)),"plugins"in l&&(l.plugins=h(l.plugins)),"lastError"in l&&(l.lastError=g(l.lastError)),new F(l)}}class A{id;version;source;generation;mode;buildStatus;viteStatus;rpcStatus;controllerStatus;operationID;lastError;constructor(e={}){"id"in e||(this.id=""),"version"in e||(this.version=""),"source"in e||(this.source=""),"generation"in e||(this.generation=""),"mode"in e||(this.mode=""),"buildStatus"in e||(this.buildStatus=""),"viteStatus"in e||(this.viteStatus=""),"rpcStatus"in e||(this.rpcStatus=""),"controllerStatus"in e||(this.controllerStatus=""),Object.assign(this,e)}static createFrom(e={}){const n=E;let i=typeof e=="string"?JSON.parse(e):e;return"lastError"in i&&(i.lastError=n(i.lastError)),new A(i)}}class S{pid;startIdentity;executable;workspaceID;generation;role;source;constructor(e={}){"pid"in e||(this.pid=0),"startIdentity"in e||(this.startIdentity=""),"executable"in e||(this.executable=""),"workspaceID"in e||(this.workspaceID=""),"generation"in e||(this.generation=""),"role"in e||(this.role=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new S(n)}}class j{id;path;ref;commit;constructor(e={}){"id"in e||(this.id=""),"path"in e||(this.path=""),"ref"in e||(this.ref=""),"commit"in e||(this.commit=""),Object.assign(this,e)}static createFrom(e={}){let n=typeof e=="string"?JSON.parse(e):e;return new j(n)}}const bt=c.Map(c.Any,c.Any),It=S.createFrom,St=j.createFrom,wt=c.Array(St),Dt=I.createFrom,vt=A.createFrom,kt=c.Array(vt),Ot=mt.createFrom,E=c.Nullable(Ot);function Bt(){return r.ByID(678226073).then(t=>xt(t))}function Tt(){return r.ByID(1706570792)}function Ft(t){return r.ByID(2957909098,t).then(e=>Nt(e))}function At(t){return r.ByID(473489213,t)}function jt(t,e){return r.ByID(3778694836,t,e)}const xt=F.createFrom,Nt=c.Array(c.Any);exports.DataClient=u.servicewrapper;exports.ExecClient=u.exec;exports.GraphClient=u.graphClient;exports.LogsClient=u.logs;exports.MetricClient=u.metric;exports.NetworkerClient=u.networker;exports.PluginManager=u.servicewrapper$1;exports.ResourceClient=u.client;exports.SettingsService=u.binding;exports.UIClient=u.servicewrapper$2;exports.WindowClient=u.service;exports.DevServerManager=ct;exports.DiagnosticsClient=Ue;exports.ExtensionDiagnosticsClient=He;exports.GetInstanceInfo=Bt;exports.GetOperatingSystem=Tt;exports.HostProfiling=W;exports.McpRelayClient=Ne;exports.OpenFileSelectionDialog=Ft;exports.PluginLogManager=gt;exports.ProcessInventory=te;exports.QueryLeaseObserver=z;exports.SaveFileDialog=At;exports.UiInspection=re;exports.UtilsClient=Ce;exports.WriteFileContent=jt;
|
package/dist/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as Ht, e as Qt, g as Xt, l as Kt, m as Yt, n as $t, a as en, c as tn, b as nn, d as rn, f as sn } from "./service-
|
|
1
|
+
import { s as Ht, e as Qt, g as Xt, l as Kt, m as Yt, n as $t, a as en, c as tn, b as nn, d as rn, f as sn } from "./service-BohjVV8G.js";
|
|
2
2
|
import { A as l, N, a as m, M as R } from "./index-zyAgCXOO.js";
|
|
3
3
|
import { B as r } from "./events-CgnLM6iV.js";
|
|
4
4
|
import { C as M, S as L, a as z, P as J, b as q, T as B, D as U, L as V, c as W } from "./models-CcH0zldZ.js";
|
package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/activity/frontendservice.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CancellablePromise as $CancellablePromise } from '@wailsio/runtime';
|
|
2
|
+
import * as activity$0 from "../../../../plugin-sdk/pkg/activity/models.js";
|
|
3
|
+
/**
|
|
4
|
+
* Attach arms publication under the same lock used to capture the snapshot.
|
|
5
|
+
* Clients install their subscription listener before calling this barrier.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Attach(id: string): $CancellablePromise<activity$0.Snapshot>;
|
|
8
|
+
export declare function BeginTask(sessionID: string, encoded: string): $CancellablePromise<activity$0.Record>;
|
|
9
|
+
export declare function ClearHistory(): $CancellablePromise<void>;
|
|
10
|
+
export declare function FinishTask(sessionID: string, encoded: string): $CancellablePromise<activity$0.Record>;
|
|
11
|
+
/**
|
|
12
|
+
* Heartbeat renews only the specified document's report-only producer lease.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Heartbeat(id: string): $CancellablePromise<void>;
|
|
15
|
+
export declare function PublishMessage(sessionID: string, encoded: string): $CancellablePromise<activity$0.Record>;
|
|
16
|
+
export declare function ReportTask(sessionID: string, encoded: string): $CancellablePromise<activity$0.Record>;
|
|
17
|
+
export declare function RequestCancellation(id: string): $CancellablePromise<activity$0.Record>;
|
|
18
|
+
export declare function ResolveAlert(sessionID: string, request: activity$0.ResolveAlertRequest): $CancellablePromise<activity$0.Record>;
|
|
19
|
+
export declare function SetPresentation(request: activity$0.SetPresentationRequest): $CancellablePromise<activity$0.Record>;
|
|
20
|
+
export declare function Snapshot(): $CancellablePromise<activity$0.Snapshot>;
|
|
21
|
+
export declare function StartResourceAction(encoded: string): $CancellablePromise<activity$0.Record>;
|
|
22
|
+
export declare function Subscribe(): $CancellablePromise<activity$0.Subscription>;
|
|
23
|
+
/**
|
|
24
|
+
* Unsubscribe removes a view, never cancels work or immediately retires producers.
|
|
25
|
+
*/
|
|
26
|
+
export declare function Unsubscribe(id: string): $CancellablePromise<void>;
|
|
27
|
+
export declare function UpsertAlert(sessionID: string, encoded: string): $CancellablePromise<activity$0.Record>;
|
package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/models.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare class ActionEventDTO {
|
|
|
7
7
|
"type": string;
|
|
8
8
|
"data"?: resourcev2$0.Value | null;
|
|
9
9
|
"error"?: apperror$0.AppError | null;
|
|
10
|
+
"activity"?: resourcev2$0.ActivityPresentation | null;
|
|
10
11
|
/** Creates a new ActionEventDTO instance. */
|
|
11
12
|
constructor($$source?: Partial<ActionEventDTO>);
|
|
12
13
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Alert, Presentation, Record, ResolveAlertRequest, SetPresentationRequest, Snapshot, Source, Subscription, Task, Visibility } from './models.js';
|