@omniviewdev/runtime 0.10.0 → 0.12.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.
Files changed (113) hide show
  1. package/dist/api.cjs +1 -1
  2. package/dist/api.d.ts +7 -6
  3. package/dist/api.js +205 -133
  4. package/dist/bindings/events/index.d.ts +20 -0
  5. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/invocation/index.d.ts +1 -0
  6. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/invocation/models.d.ts +19 -0
  7. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/exec/servicewrapper.d.ts +1 -1
  8. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/logs/servicewrapper.d.ts +1 -1
  9. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/index.d.ts +1 -1
  10. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/models.d.ts +0 -20
  11. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/metric/servicewrapper.d.ts +3 -6
  12. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/networker/servicewrapper.d.ts +1 -1
  13. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/index.d.ts +2 -2
  14. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graph/models.d.ts +3 -15
  15. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/graphservice.d.ts +5 -18
  16. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/index.d.ts +1 -1
  17. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/models.d.ts +190 -9
  18. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper.d.ts +34 -74
  19. package/dist/bindings/github.com/omniviewdev/omniview/internal/mcprelay/index.d.ts +3 -0
  20. package/dist/bindings/github.com/omniviewdev/omniview/internal/mcprelay/models.d.ts +178 -0
  21. package/dist/bindings/github.com/omniviewdev/omniview/internal/mcprelay/servicewrapper.d.ts +30 -0
  22. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models.d.ts +27 -0
  23. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/resource/v2/index.d.ts +2 -0
  24. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/resource/v2/models.d.ts +809 -0
  25. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.d.ts +94 -0
  26. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/models.d.ts +16 -6
  27. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/index.d.ts +1 -1
  28. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/models.d.ts +27 -17
  29. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/index.d.ts +1 -1
  30. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models.d.ts +47 -24
  31. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/index.d.ts +1 -1
  32. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/models.d.ts +41 -20
  33. package/dist/bindings/github.com/omniviewdev/plugin-sdk/settings/models.d.ts +16 -4
  34. package/dist/{calls-Bg_uMVc9.cjs → calls-B-HP1Icv.cjs} +1 -1
  35. package/dist/{calls-BvZkVSse.js → calls-DYGtxNJ6.js} +1 -0
  36. package/dist/compat/types.d.ts +1 -1
  37. package/dist/context/drawer/RightDrawerContext.d.ts +8 -4
  38. package/dist/context/drawer/types.d.ts +11 -21
  39. package/dist/context/operations/OperationsContext.d.ts +5 -5
  40. package/dist/exec.d.ts +5 -0
  41. package/dist/graph-JDqyJC_i.js +10 -0
  42. package/dist/graph-wHun0Bkz.cjs +1 -0
  43. package/dist/hooks/connection/index.d.ts +2 -1
  44. package/dist/hooks/connection/useConnection.d.ts +9 -30
  45. package/dist/hooks/connection/useConnectionProfiles.d.ts +7 -0
  46. package/dist/hooks/connection/useConnectionStatus.d.ts +8 -1
  47. package/dist/hooks/connection/useConnections.d.ts +3 -2
  48. package/dist/hooks/connection/useScopeValues.d.ts +9 -0
  49. package/dist/hooks/logs/useLogSession.d.ts +4 -1
  50. package/dist/hooks/metric/useMetricStream.d.ts +6 -2
  51. package/dist/hooks/metric/useResourceMetrics.d.ts +6 -2
  52. package/dist/hooks/networker/types.d.ts +5 -2
  53. package/dist/hooks/networker/useResourcePortForwarder.d.ts +1 -1
  54. package/dist/hooks/resource/useConnectionQueryGuard.d.ts +1 -1
  55. package/dist/hooks/resource/useDependencyTree.d.ts +4 -12
  56. package/dist/hooks/resource/useEditorSchemas.d.ts +12 -7
  57. package/dist/hooks/resource/useEventBatcher.d.ts +12 -47
  58. package/dist/hooks/resource/useRelatedResources.d.ts +6 -14
  59. package/dist/hooks/resource/useResolvedResourceTarget.d.ts +162 -0
  60. package/dist/hooks/resource/useResource.d.ts +7 -58
  61. package/dist/hooks/resource/useResourceActions.d.ts +9 -58
  62. package/dist/hooks/resource/useResourceGraph.d.ts +4 -12
  63. package/dist/hooks/resource/useResourceGroups.d.ts +5 -19
  64. package/dist/hooks/resource/useResourceMutations.d.ts +5 -61
  65. package/dist/hooks/resource/useResourceSearch.d.ts +5 -34
  66. package/dist/hooks/resource/useResourceType.d.ts +6 -19
  67. package/dist/hooks/resource/useResourceTypes.d.ts +5 -20
  68. package/dist/hooks/resource/useResources.d.ts +34 -60
  69. package/dist/hooks/resource/useStreamAction.d.ts +4 -8
  70. package/dist/hooks/resource/useWatchState.d.ts +15 -22
  71. package/dist/index.cjs +4 -4
  72. package/dist/index.d.ts +6 -1
  73. package/dist/index.js +2970 -2878
  74. package/dist/logs.d.ts +14 -0
  75. package/dist/metric.d.ts +35 -0
  76. package/dist/models-Cg1YRHQm.js +583 -0
  77. package/dist/models-DSGyy8lg.cjs +1 -0
  78. package/dist/models-UwESEW2B.js +1232 -0
  79. package/dist/models-dzj-SsFZ.cjs +1 -0
  80. package/dist/models.cjs +1 -1
  81. package/dist/models.d.ts +13 -8
  82. package/dist/models.js +118 -209
  83. package/dist/networker.d.ts +31 -0
  84. package/dist/resource/v2/ancillary.d.ts +161 -0
  85. package/dist/resource/v2/client.d.ts +57 -0
  86. package/dist/resource/v2/domain.d.ts +204 -0
  87. package/dist/resource/v2/graph-client.d.ts +7 -0
  88. package/dist/resource/v2/graph.d.ts +35 -0
  89. package/dist/resource/v2/host.d.ts +129 -0
  90. package/dist/resource/v2/requestJSON.d.ts +2 -0
  91. package/dist/resource/v2/value.d.ts +9 -0
  92. package/dist/resourceQueryKeys.d.ts +8 -4
  93. package/dist/runtime.cjs +1 -1
  94. package/dist/runtime.js +1 -1
  95. package/dist/search.d.ts +9 -11
  96. package/dist/servicewrapper-BOM6A8IG.cjs +1 -0
  97. package/dist/servicewrapper-Bda7yi8z.js +684 -0
  98. package/dist/types/watch.d.ts +48 -21
  99. package/dist/utils/activeSyncAggregator.d.ts +2 -2
  100. package/package.json +1 -1
  101. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/index.d.ts +0 -2
  102. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models.d.ts +0 -1199
  103. package/dist/compat/resource.d.ts +0 -4
  104. package/dist/hooks/connection/useConnectionNamespaces.d.ts +0 -21
  105. package/dist/legacyEnum-CKqyRmbX.js +0 -15
  106. package/dist/legacyEnum-DkV5yRdA.cjs +0 -1
  107. package/dist/models-BxypsesT.cjs +0 -1
  108. package/dist/models-C6jzDokQ.js +0 -347
  109. package/dist/models-CT4kHj47.js +0 -2444
  110. package/dist/models-DQl7tqts.cjs +0 -1
  111. package/dist/servicewrapper-C6SURWw1.js +0 -850
  112. package/dist/servicewrapper-COMjQHnY.cjs +0 -1
  113. package/dist/utils/resourceKey.d.ts +0 -12
@@ -0,0 +1,161 @@
1
+ import { AccessRoute, ResourceReference, SchemaBinding, ScopeEntry, Value } from './domain';
2
+ import { Connection } from '../../bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
3
+ /** Ancillary transport traits; finite support comes only from the qualified catalog. */
4
+ export type Feature = 'connections' | 'connectionBrowser' | 'connectionOverlay' | 'scopeValues' | 'presentation' | 'editorSchemas' | 'schemaDocuments' | 'relationships' | 'health' | 'actionCatalog' | 'streamingActions' | 'bestEffortUpdates';
5
+ export interface FeatureSet {
6
+ traits: readonly Feature[];
7
+ }
8
+ /** Explicit host-owned desired state, never a replay of native discovery snapshots. */
9
+ export interface ConnectionOverlay {
10
+ upserts: readonly Connection[];
11
+ disabledIDs: readonly string[];
12
+ }
13
+ export interface EditorSchema {
14
+ type: string;
15
+ fileMatch: string;
16
+ uri: string;
17
+ language: string;
18
+ binding: SchemaBinding;
19
+ }
20
+ export interface ResourceGroup {
21
+ id: string;
22
+ name: string;
23
+ description: string;
24
+ icon: string;
25
+ resources: readonly string[];
26
+ }
27
+ export interface ResourceDefinition {
28
+ columnDefs: readonly ColumnDefinition[];
29
+ }
30
+ export interface ColumnDefinition {
31
+ id: string;
32
+ header: string;
33
+ accessor: string;
34
+ accessorPriority?: string;
35
+ colorMap?: {
36
+ [key: string]: string;
37
+ };
38
+ color?: string;
39
+ align?: string;
40
+ hidden?: boolean;
41
+ width?: number;
42
+ formatter?: string;
43
+ component?: string;
44
+ componentParams?: unknown;
45
+ resourceLink?: ResourceLink;
46
+ valueMap?: {
47
+ [key: string]: string;
48
+ };
49
+ }
50
+ export interface ResourceLink {
51
+ type?: string;
52
+ typeAccessor?: string;
53
+ typeMap?: {
54
+ [key: string]: string;
55
+ };
56
+ idAccessor: string;
57
+ scopeAccessors: readonly ScopeExtractor[];
58
+ displayId: boolean;
59
+ }
60
+ export type SchemaType = 'string' | 'integer' | 'number' | 'boolean' | 'object' | 'array';
61
+ export interface SchemaProperty {
62
+ type: SchemaType;
63
+ description?: string;
64
+ enum?: readonly string[];
65
+ default?: unknown;
66
+ minimum?: number;
67
+ maximum?: number;
68
+ properties?: {
69
+ [key: string]: SchemaProperty;
70
+ };
71
+ required?: readonly string[];
72
+ }
73
+ /** Retained action schema subset, not a normalized resource schema. */
74
+ export interface Schema {
75
+ properties?: {
76
+ [key: string]: SchemaProperty;
77
+ };
78
+ required?: readonly string[];
79
+ }
80
+ export type ActionScope = 'instance' | 'type';
81
+ export interface ActionDescriptor {
82
+ id: string;
83
+ label: string;
84
+ description: string;
85
+ icon: string;
86
+ scope: ActionScope;
87
+ streaming: boolean;
88
+ paramsSchema?: Schema;
89
+ outputSchema?: Schema;
90
+ dangerous?: boolean;
91
+ }
92
+ export interface ActionEvent {
93
+ type: string;
94
+ data: Value;
95
+ error?: ResourceOperationError;
96
+ }
97
+ export interface ResourceOperationError {
98
+ code: string;
99
+ title: string;
100
+ message: string;
101
+ suggestions?: readonly string[];
102
+ }
103
+ export type HealthStatus = 'healthy' | 'degraded' | 'unhealthy' | 'pending' | 'unknown';
104
+ export type EventSeverity = 'normal' | 'warning' | 'error';
105
+ export interface HealthCondition {
106
+ type: string;
107
+ status: string;
108
+ reason?: string;
109
+ message?: string;
110
+ lastProbeTime?: string;
111
+ lastTransitionTime?: string;
112
+ }
113
+ export interface ResourceHealth {
114
+ status: HealthStatus;
115
+ reason?: string;
116
+ message?: string;
117
+ since?: string;
118
+ conditions?: readonly HealthCondition[];
119
+ }
120
+ export interface ResourceEvent {
121
+ type: EventSeverity;
122
+ reason: string;
123
+ message: string;
124
+ source?: string;
125
+ count?: number;
126
+ firstSeen: string;
127
+ lastSeen: string;
128
+ }
129
+ export type RelationshipType = 'owns' | 'runs_on' | 'uses' | 'exposes' | 'manages' | 'member_of' | 'selects';
130
+ export type EdgeDirection = '' | 'incoming';
131
+ export interface RelationshipExtractor {
132
+ method: string;
133
+ fieldPath?: string;
134
+ labelSelector?: {
135
+ [key: string]: string;
136
+ };
137
+ }
138
+ export interface ScopeExtractor {
139
+ dimension: string;
140
+ fieldPath: string;
141
+ }
142
+ export interface RelationshipDescriptor {
143
+ type: RelationshipType;
144
+ targetType: string;
145
+ label: string;
146
+ inverseLabel?: string;
147
+ cardinality?: string;
148
+ direction?: EdgeDirection;
149
+ extractor?: RelationshipExtractor;
150
+ targetScope: readonly ScopeEntry[];
151
+ scopeExtractors: readonly ScopeExtractor[];
152
+ }
153
+ export interface RelationshipTarget {
154
+ reference: ResourceReference;
155
+ route: AccessRoute;
156
+ displayName?: string;
157
+ }
158
+ export interface ResolvedRelationship {
159
+ descriptor: RelationshipDescriptor;
160
+ targets: readonly RelationshipTarget[];
161
+ }
@@ -0,0 +1,57 @@
1
+ import { CancellablePromise } from '@wailsio/runtime';
2
+ import { AccessRoute, ActionRequest, Catalog as CatalogResult, CatalogRequest, GetRequest, MutationRequest, ReadTarget, Record, SchemaDocument, SchemaDocumentReference, Value } from './domain';
3
+ import { ActionDescriptor, EditorSchema, FeatureSet, RelationshipDescriptor, ResolvedRelationship, ResourceDefinition, ResourceEvent, ResourceGroup, ResourceHealth } from './ancillary';
4
+ import { AppError } from '../../errors/types';
5
+ import { WatchConnectionSummary } from '../../types/watch';
6
+ import { ConnectionProfile, ConnectionProfileResult, HostConnectionState, HostEnumerateRequest, HostGetRequest, HostNativeQueryRequest, HostRecord, HostSourcePage, HostSubscriptionRequest, ResolvedResourceReference, ResolvedResourceTarget, ResolveReferenceRequest, ResolveTargetRequest } from './host';
7
+ import { Connection } from '../../bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
8
+ export declare const Features: (pluginID: string) => CancellablePromise<FeatureSet>;
9
+ export declare const Catalog: (pluginID: string, request: CatalogRequest) => CancellablePromise<CatalogResult>;
10
+ export declare const Get: (pluginID: string, request: HostGetRequest) => CancellablePromise<HostRecord>;
11
+ export declare const Enumerate: (pluginID: string, request: HostEnumerateRequest) => CancellablePromise<HostSourcePage>;
12
+ export declare const NativeQuery: (pluginID: string, request: HostNativeQueryRequest) => CancellablePromise<HostSourcePage>;
13
+ export declare const Mutate: (pluginID: string, request: MutationRequest) => CancellablePromise<Record>;
14
+ export declare const Action: (pluginID: string, request: ActionRequest) => CancellablePromise<Value>;
15
+ export declare const ResolveTarget: (pluginID: string, request: ResolveTargetRequest) => CancellablePromise<ResolvedResourceTarget>;
16
+ export declare const ResolveReference: (pluginID: string, request: ResolveReferenceRequest) => CancellablePromise<ResolvedResourceReference>;
17
+ export declare const GetSchemaDocument: (pluginID: string, route: AccessRoute, reference: SchemaDocumentReference) => CancellablePromise<SchemaDocument>;
18
+ export declare const GetAllConnectionStates: () => CancellablePromise<{
19
+ [pluginID: string]: HostConnectionState[];
20
+ }>;
21
+ export declare const ListConnectionProfiles: (pluginID: string) => CancellablePromise<ConnectionProfile[]>;
22
+ export declare const SaveConnectionProfile: (pluginID: string, connection: Connection) => CancellablePromise<ConnectionProfileResult>;
23
+ export declare const ImportConnectionProfile: (pluginID: string, id: string) => CancellablePromise<ConnectionProfileResult>;
24
+ export declare const ResetConnectionProfile: (pluginID: string, id: string) => CancellablePromise<ConnectionProfileResult>;
25
+ export declare const RemoveConnection: (pluginID: string, id: string) => CancellablePromise<void>;
26
+ export declare const GetResourceGroups: (pluginID: string, route: AccessRoute) => CancellablePromise<ResourceGroup[]>;
27
+ export declare const GetResourceDefinition: (pluginID: string, route: AccessRoute, type: string) => CancellablePromise<ResourceDefinition>;
28
+ export declare const GetEditorSchemas: (pluginID: string, route: AccessRoute) => CancellablePromise<EditorSchema[]>;
29
+ export declare const GetRelationships: (pluginID: string, route: AccessRoute, type: string) => CancellablePromise<RelationshipDescriptor[]>;
30
+ export declare const ResolveRelationships: (pluginID: string, request: GetRequest) => CancellablePromise<ResolvedRelationship[]>;
31
+ export declare const GetHealth: (pluginID: string, request: GetRequest, body: Value) => CancellablePromise<ResourceHealth | null>;
32
+ export declare const GetResourceEvents: (pluginID: string, request: GetRequest, limit: number) => CancellablePromise<ResourceEvent[]>;
33
+ export declare const GetActions: (pluginID: string, route: AccessRoute, type: string) => CancellablePromise<ActionDescriptor[]>;
34
+ export declare const StreamAction: (pluginID: string, request: ActionRequest) => CancellablePromise<string>;
35
+ export interface ActionEventDTO {
36
+ type: string;
37
+ data?: Value;
38
+ error?: AppError;
39
+ }
40
+ export interface ActionSnapshot {
41
+ sequence: number;
42
+ event: ActionEventDTO;
43
+ terminal: boolean;
44
+ }
45
+ export declare const AttachStreamAction: (handleID: string) => CancellablePromise<ActionSnapshot>;
46
+ export declare const CancelStreamAction: (handleID: string) => CancellablePromise<void>;
47
+ export declare const StartConnectionWatch: (pluginID: string, targets: readonly ReadTarget[]) => CancellablePromise<void>;
48
+ export declare const StopConnectionWatch: (pluginID: string, route: AccessRoute) => CancellablePromise<void>;
49
+ export declare const GetWatchState: (pluginID: string, route: AccessRoute) => CancellablePromise<WatchConnectionSummary | null>;
50
+ export declare const EnsureResourceWatch: (pluginID: string, target: ReadTarget) => CancellablePromise<void>;
51
+ export declare const StopResourceWatch: (pluginID: string, route: AccessRoute, type: string) => CancellablePromise<void>;
52
+ export declare const RestartResourceWatch: (pluginID: string, target: ReadTarget) => CancellablePromise<void>;
53
+ export declare const IsResourceWatchRunning: (pluginID: string, route: AccessRoute, type: string) => CancellablePromise<boolean>;
54
+ export declare const SubscribeResource: (pluginID: string, request: HostSubscriptionRequest) => CancellablePromise<void>;
55
+ export declare const UnsubscribeResource: (pluginID: string, request: HostSubscriptionRequest) => CancellablePromise<void>;
56
+ export declare const ScopeValues: (pluginID: string, route: AccessRoute, dimension: string) => CancellablePromise<string[]>;
57
+ export { CheckConnection, GetConnection, ListAllConnections, ListConnections, ListPlugins, LoadConnections, StartConnection, StopConnection, HasPlugin, } from '../../bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/servicewrapper';
@@ -0,0 +1,204 @@
1
+ import { ActionDescriptor, Schema } from './ancillary';
2
+ export interface ScopeEntry {
3
+ dimension: string;
4
+ value: string;
5
+ }
6
+ export interface ResourceAddress {
7
+ provider: string;
8
+ authority: string;
9
+ type: string;
10
+ scope: readonly ScopeEntry[];
11
+ id: string;
12
+ }
13
+ export interface AccessRoute {
14
+ connection: string;
15
+ }
16
+ export interface ResourceReference {
17
+ address: ResourceAddress;
18
+ incarnation?: string;
19
+ }
20
+ export type ScopeConstraint = {
21
+ dimension: string;
22
+ match: 'any';
23
+ } | {
24
+ dimension: string;
25
+ match: 'oneOf';
26
+ values: readonly string[];
27
+ };
28
+ export type QueryScope = readonly ScopeConstraint[];
29
+ /** Exact scalar intent survives transport. Integers never pass through JS number. */
30
+ export type Value = {
31
+ kind: 'null';
32
+ } | {
33
+ kind: 'bool';
34
+ value: boolean;
35
+ } | {
36
+ kind: 'string';
37
+ value: string;
38
+ } | {
39
+ kind: 'int64';
40
+ value: string;
41
+ } | {
42
+ kind: 'uint64';
43
+ value: string;
44
+ } | {
45
+ kind: 'double';
46
+ value: number;
47
+ } | {
48
+ kind: 'timestamp';
49
+ value: string;
50
+ } | {
51
+ kind: 'list';
52
+ value: readonly Value[];
53
+ } | {
54
+ kind: 'map';
55
+ value: {
56
+ readonly [key: string]: Value;
57
+ };
58
+ };
59
+ export interface SchemaBinding {
60
+ state: string;
61
+ /** Only for unavailable state: known SDK error code, at most 64 ASCII uppercase/underscore bytes. Never a backend message. */
62
+ unavailableReason?: string;
63
+ revision?: string;
64
+ dialect?: string;
65
+ root?: string;
66
+ documentRef?: SchemaDocumentReference;
67
+ document?: unknown;
68
+ validation: string;
69
+ unvalidated: readonly string[];
70
+ }
71
+ export interface SchemaDocumentReference {
72
+ id: string;
73
+ revision: string;
74
+ }
75
+ export interface SchemaDocument {
76
+ reference: SchemaDocumentReference;
77
+ dialect: string;
78
+ document: unknown;
79
+ }
80
+ export interface Representation {
81
+ id: string;
82
+ revision: string;
83
+ schema: SchemaBinding;
84
+ }
85
+ export interface Dimension {
86
+ name: string;
87
+ allowEmpty: boolean;
88
+ }
89
+ export type Operation = 'enumerate' | 'get' | 'nativeQuery' | 'update' | 'create' | 'mutationUpdate' | 'delete' | 'action';
90
+ export interface ResourceCapability {
91
+ operation: Operation;
92
+ scope: QueryScope;
93
+ guarantee?: string;
94
+ }
95
+ /** Declared native query input; capability and source-page coverage remain independent. */
96
+ export interface NativeQueryDescriptor {
97
+ language: string;
98
+ description?: string;
99
+ inputSchema: Schema;
100
+ }
101
+ export interface ResourceType {
102
+ type: string;
103
+ displayName: string;
104
+ identityDimensions: readonly Dimension[];
105
+ queryDimensions: readonly Dimension[];
106
+ representations: readonly Representation[];
107
+ defaultRepresentation?: string;
108
+ modelRepresentation?: string;
109
+ nativeQueries?: readonly NativeQueryDescriptor[];
110
+ capabilities: readonly ResourceCapability[];
111
+ nativeAuthorityHint?: NativeAuthorityHint;
112
+ }
113
+ export interface CatalogRequest {
114
+ route: AccessRoute;
115
+ }
116
+ /** Provider metadata never grants authority or permission to share identity. */
117
+ export interface NativeAuthorityHint {
118
+ scheme: string;
119
+ id: string;
120
+ continuity: 'connectionLocal' | 'stableNative';
121
+ }
122
+ export interface Catalog {
123
+ provider: string;
124
+ types: readonly ResourceType[];
125
+ revision: string;
126
+ coverage: Coverage;
127
+ }
128
+ export interface ReadTarget {
129
+ route: AccessRoute;
130
+ provider: string;
131
+ authority: string;
132
+ type: string;
133
+ scope: QueryScope;
134
+ representation: string;
135
+ }
136
+ export interface GetRequest {
137
+ route: AccessRoute;
138
+ reference: ResourceReference;
139
+ representation: string;
140
+ }
141
+ export interface EnumerateRequest {
142
+ target: ReadTarget;
143
+ pageSize: number;
144
+ cursor?: string;
145
+ }
146
+ export interface NativeQueryRequest {
147
+ target: ReadTarget;
148
+ language: string;
149
+ query: Value;
150
+ pageSize: number;
151
+ cursor?: string;
152
+ }
153
+ export interface Coverage {
154
+ kind: string;
155
+ paths: readonly string[];
156
+ reason?: string;
157
+ }
158
+ export interface Count {
159
+ kind: string;
160
+ value?: string;
161
+ }
162
+ export interface Record {
163
+ reference: ResourceReference;
164
+ body: Value;
165
+ representation: Representation;
166
+ coverage: Coverage;
167
+ sourceRevision?: string;
168
+ }
169
+ /** Bounded native acquisition page. Its cursor is not a host query cursor. */
170
+ export interface SourcePage {
171
+ records: readonly Record[];
172
+ nextCursor?: string;
173
+ count: Count;
174
+ coverage: Coverage;
175
+ consistency: string;
176
+ sourceRevision?: string;
177
+ }
178
+ export interface MutationRequest {
179
+ route: AccessRoute;
180
+ reference: ResourceReference;
181
+ operation: string;
182
+ input: Value;
183
+ expectedRevision?: string;
184
+ }
185
+ /** A type target selects query scope without inventing an instance address. */
186
+ export interface TypeActionTarget {
187
+ provider: string;
188
+ authority: string;
189
+ type: string;
190
+ scope: QueryScope;
191
+ }
192
+ export type ActionRequest = {
193
+ route: AccessRoute;
194
+ action: string;
195
+ input: Value;
196
+ /** Retained advertised metadata; omission supplies no descriptor expectation. */
197
+ expectedDescriptor?: ActionDescriptor;
198
+ } & ({
199
+ reference: ResourceReference;
200
+ typeTarget?: never;
201
+ } | {
202
+ reference?: never;
203
+ typeTarget: TypeActionTarget;
204
+ });
@@ -0,0 +1,7 @@
1
+ import { CancellablePromise } from '@wailsio/runtime';
2
+ import { AccessRoute, ResourceReference } from './domain';
3
+ import { DependencyTree, GraphEdge, Subgraph } from './graph';
4
+ export declare function GetRelated(pluginID: string, reference: ResourceReference, route: AccessRoute, direction: string, relationshipType: string | null): CancellablePromise<GraphEdge[]>;
5
+ export declare function GetRelationshipChain(pluginID: string, reference: ResourceReference, route: AccessRoute, relationshipType: string, maxDepth: number): CancellablePromise<GraphEdge[][]>;
6
+ export declare function GetDependencyTree(pluginID: string, reference: ResourceReference, route: AccessRoute, maxDepth: number): CancellablePromise<DependencyTree | null>;
7
+ export declare function GetSubgraph(pluginID: string, reference: ResourceReference, route: AccessRoute, upDepth: number, downDepth: number): CancellablePromise<Subgraph | null>;
@@ -0,0 +1,35 @@
1
+ import { AccessRoute, ResourceReference } from './domain';
2
+ /** Host graph identity keeps the access route separate from resource identity. */
3
+ export interface GraphNode {
4
+ /** Opaque canonical key issued by the host; never construct this in the UI. */
5
+ key: string;
6
+ pluginId: string;
7
+ reference: ResourceReference;
8
+ route: AccessRoute;
9
+ }
10
+ export interface GraphEdge {
11
+ source: GraphNode;
12
+ target: GraphNode;
13
+ type: string;
14
+ label: string;
15
+ }
16
+ export interface DependencyNode {
17
+ edge: GraphEdge;
18
+ children: DependencyNode[];
19
+ }
20
+ export interface DependencyTree {
21
+ root: GraphNode;
22
+ children: DependencyNode[];
23
+ }
24
+ export interface SubgraphNode {
25
+ node: GraphNode;
26
+ depth: number;
27
+ }
28
+ export interface Subgraph {
29
+ root: GraphNode;
30
+ nodes: SubgraphNode[];
31
+ edges: GraphEdge[];
32
+ truncated: boolean;
33
+ }
34
+ /** Compare structured canonical identity without manufacturing host keys. */
35
+ export declare function sameGraphNode(a: Omit<GraphNode, 'key'>, b: Omit<GraphNode, 'key'>): boolean;
@@ -0,0 +1,129 @@
1
+ import { AccessRoute, Count, EnumerateRequest, GetRequest, NativeQueryRequest, QueryScope, ReadTarget, Record as ResourceRecord, ResourceReference, ScopeEntry, SourcePage } from './domain';
2
+ import { ResourceMetadata, WatchState, WatchStateEvent } from '../../types/watch';
3
+ import { Connection } from '../../bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
4
+ import { AppError } from '../../errors/types';
5
+ /** Keys come from the host. Neither routes nor display fields mint identity. */
6
+ export interface HostRecord {
7
+ key: string;
8
+ addressKey: string;
9
+ targetId: string;
10
+ record: ResourceRecord;
11
+ route: AccessRoute;
12
+ }
13
+ export interface HostSourcePage {
14
+ records: readonly HostRecord[];
15
+ sourcePage: Omit<SourcePage, 'records'>;
16
+ }
17
+ /** Client cache overlay; sourcePage remains immutable native acquisition metadata. */
18
+ export interface ResourceView extends HostSourcePage {
19
+ view?: {
20
+ guarantee: 'bestEffort';
21
+ count: Count;
22
+ sourceRevision?: string;
23
+ membershipStale: boolean;
24
+ };
25
+ }
26
+ export interface HostWatchStateEvent extends WatchStateEvent {
27
+ pluginID: string;
28
+ }
29
+ /** Native client readiness, not network health. UNKNOWN is not disconnected. */
30
+ export type NativeConnectionReadiness = 'UNKNOWN' | 'DISCONNECTED' | 'PENDING' | 'CONNECTED' | 'FAILED';
31
+ export interface HostConnectionState {
32
+ connection: Connection;
33
+ readiness: NativeConnectionReadiness;
34
+ readinessError?: AppError;
35
+ resources: {
36
+ [type: string]: WatchState;
37
+ };
38
+ resourceCounts: {
39
+ [type: string]: Count;
40
+ };
41
+ totalResources: number;
42
+ syncedCount: number;
43
+ errorCount: number;
44
+ lastSyncTime?: string;
45
+ }
46
+ export interface ConnectionProfile {
47
+ id: string;
48
+ /** absent is returned only after removing a manual profile without native fallback. */
49
+ source: 'native' | 'manual' | 'override' | 'disabled' | 'review' | 'absent';
50
+ connection?: Connection;
51
+ /** Membership in effective discovery, not whether a native client is connected. */
52
+ active: boolean;
53
+ }
54
+ export interface ConnectionProfileResult {
55
+ applied: boolean;
56
+ profile: ConnectionProfile;
57
+ }
58
+ export interface HostGetRequest {
59
+ targetId: string;
60
+ request: GetRequest;
61
+ }
62
+ export interface HostEnumerateRequest {
63
+ targetId: string;
64
+ request: EnumerateRequest;
65
+ }
66
+ export interface HostNativeQueryRequest {
67
+ targetId: string;
68
+ request: NativeQueryRequest;
69
+ }
70
+ export interface HostSubscriptionRequest {
71
+ targetId: string;
72
+ target: ReadTarget;
73
+ }
74
+ export interface HostWatchAddPayload {
75
+ route: AccessRoute;
76
+ record: HostRecord;
77
+ metadata: ResourceMetadata;
78
+ guarantee: 'bestEffort';
79
+ }
80
+ export interface HostWatchUpdatePayload {
81
+ route: AccessRoute;
82
+ record: HostRecord;
83
+ metadata: ResourceMetadata;
84
+ guarantee: 'bestEffort';
85
+ }
86
+ export interface HostWatchDeletePayload {
87
+ route: AccessRoute;
88
+ reference: ResourceReference;
89
+ key: string;
90
+ addressKey: string;
91
+ targetId: string;
92
+ lastKnown?: HostRecord;
93
+ guarantee: 'bestEffort';
94
+ }
95
+ export interface AuthorityDisclosure {
96
+ continuity: string;
97
+ limitations: readonly string[];
98
+ }
99
+ export interface ResolveTargetRequest {
100
+ route: AccessRoute;
101
+ type: string;
102
+ /** Omission requests only the provider's explicit catalog default. */
103
+ representation?: string;
104
+ /** Missing declared dimensions become explicit any within this admitted route. */
105
+ scope?: QueryScope;
106
+ }
107
+ export interface ResolvedResourceTarget {
108
+ targetId: string;
109
+ target: ReadTarget;
110
+ authority: AuthorityDisclosure;
111
+ catalogRevision: string;
112
+ }
113
+ export interface ResolveReferenceRequest {
114
+ route: AccessRoute;
115
+ type: string;
116
+ scope: readonly ScopeEntry[];
117
+ id: string;
118
+ incarnation?: string;
119
+ representation?: string;
120
+ }
121
+ export interface ResolvedResourceReference {
122
+ reference: ResourceReference;
123
+ route: AccessRoute;
124
+ key: string;
125
+ addressKey: string;
126
+ targetId: string;
127
+ representation: string;
128
+ authority: AuthorityDisclosure;
129
+ }
@@ -0,0 +1,2 @@
1
+ /** Transport encoding only: canonical DTOs remain unchanged, including double -0. */
2
+ export declare function encodeRequestJSON(input: unknown, routing?: readonly string[]): string;
@@ -0,0 +1,9 @@
1
+ import { Value } from './domain';
2
+ /** Presentation projection only: exact safe integers are numbers; wider integers stay bigint. */
3
+ export declare function valueToJSON(value: Value): unknown;
4
+ /** Convert authored values. Unsafe integer numbers must be supplied as bigint. */
5
+ export declare function jsonToValue(input: unknown): Value;
6
+ /** JSON editor text preserves integer literals without stringifying them. */
7
+ export declare function valueToJSONText(value: Value): string;
8
+ /** Parse editor JSON without routing integer lexemes through JS number. */
9
+ export declare function jsonTextToValue(text: string): Value;
@@ -1,6 +1,10 @@
1
- /** Shared keys for native ListResult/GetResult snapshots, never display labels or search text. */
1
+ import { ReadTarget } from './resource/v2/domain';
2
+ import { HostEnumerateRequest, HostGetRequest, HostNativeQueryRequest } from './resource/v2/host';
3
+ /** React Query partitions include route and representation, not display fields. */
2
4
  export declare const resourceQueryKeys: {
3
- scope: (pluginId: string, connectionId: string, resourceKey: string) => readonly [string, string, string];
4
- list: (pluginId: string, connectionId: string, resourceKey: string, namespaces?: readonly string[]) => readonly [string, string, string, readonly string[], "list"];
5
- resource: (pluginId: string, connectionId: string, resourceKey: string, resourceId: string, namespace?: string) => readonly [string, string, string, string, string];
5
+ all: (pluginID: string) => readonly [string, "resource-v2"];
6
+ scope: (pluginID: string, target: ReadTarget) => readonly [string, "resource-v2", "target", ReadTarget];
7
+ list: (pluginID: string, request?: HostEnumerateRequest) => readonly [string, "resource-v2", "enumerate", HostEnumerateRequest | undefined];
8
+ nativeQuery: (pluginID: string, request?: HostNativeQueryRequest) => readonly [string, "resource-v2", "native-query", HostNativeQueryRequest | undefined];
9
+ resource: (pluginID: string, request?: HostGetRequest) => readonly [string, "resource-v2", "get", HostGetRequest | undefined];
6
10
  };
package/dist/runtime.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-BVi9X4oU.cjs"),d=require("./events-DnLqUWri.cjs"),A=require("./calls-Bg_uMVc9.cjs"),w=n.newRuntimeCaller(n.objectNames.Application),_=0,M=1,C=2;function j(){return w(_)}function O(){return w(M)}function W(){return w(C)}const T=Object.freeze(Object.defineProperty({__proto__:null,Hide:j,Quit:W,Show:O},Symbol.toStringTag,{value:"Module"})),p=n.newRuntimeCaller(n.objectNames.Clipboard),D=0,E=1;function R(t){return p(D,{text:t})}function L(){return p(E)}const x=Object.freeze(Object.defineProperty({__proto__:null,SetText:R,Text:L},Symbol.toStringTag,{value:"Module"}));n.hasDOM&&(window._wails=window._wails||{});const P=n.newRuntimeCaller(n.objectNames.Dialog),I=0,B=1,G=2,k=3,q=4,z=5;function s(t,e={}){return P(t,e)}function F(t){return s(I,t)}function $(t){return s(B,t)}function Q(t){return s(G,t)}function y(t){return s(k,t)}function N(t){var e;return(e=s(q,t))!==null&&e!==void 0?e:[]}function Y(t){return s(z,t)}const H=Object.freeze(Object.defineProperty({__proto__:null,Error:Q,Info:F,OpenFile:N,Question:y,SaveFile:Y,Warning:$},Symbol.toStringTag,{value:"Module"})),u=n.newRuntimeCaller(n.objectNames.Screens),U=0,J=1,K=2,V=3,X=4;function Z(){return u(U)}function tt(){return u(J)}function et(){return u(K)}function nt(t){return u(V,{id:t})}function ot(t){return u(X,{index:t})}const rt=Object.freeze(Object.defineProperty({__proto__:null,GetAll:Z,GetByID:nt,GetByIndex:ot,GetCurrent:et,GetPrimary:tt},Symbol.toStringTag,{value:"Module"}));function it(t,e=null){d.Emit(t,e)}function lt(t,e){const o=n.thisWindow.Get(t),r=o[e];if(typeof r!="function"){console.error(`Window method '${e}' not found`);return}try{r.call(o)}catch(i){console.error(`Error calling window method '${e}': `,i)}}function h(t){const e=t.currentTarget;function o(i="Yes"){if(i!=="Yes")return;const a=e.getAttribute("wml-event")||e.getAttribute("data-wml-event"),f=e.getAttribute("wml-target-window")||e.getAttribute("data-wml-target-window")||"",b=e.getAttribute("wml-window")||e.getAttribute("data-wml-window"),m=e.getAttribute("wml-openurl")||e.getAttribute("data-wml-openurl");a!==null&&it(a),b!==null&&lt(f,b),m!==null&&d.OpenURL(m)}const r=e.getAttribute("wml-confirm")||e.getAttribute("data-wml-confirm");r?y({Title:"Confirm",Message:r,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(o):o()}const g=Symbol("controller"),c=Symbol("triggerMap"),l=Symbol("elementCount");class st{constructor(){this[g]=new AbortController}set(e,o){return{signal:this[g].signal}}reset(){this[g].abort(),this[g]=new AbortController}}class ct{constructor(){this[c]=new WeakMap,this[l]=0}set(e,o){return this[c].has(e)||this[l]++,this[c].set(e,o),{}}reset(){if(!(this[l]<=0)){for(const e of document.body.querySelectorAll("*")){if(this[l]<=0)break;const o=this[c].get(e);o!=null&&this[l]--;for(const r of o||[])e.removeEventListener(r,h)}this[c]=new WeakMap,this[l]=0}}}const S=n.canAbortListeners()?new st:new ct;function ut(t){const e=/\S+/g,o=t.getAttribute("wml-trigger")||t.getAttribute("data-wml-trigger")||"click",r=[];let i;for(;(i=e.exec(o))!==null;)r.push(i[0]);const a=S.set(t,r);for(const f of r)t.addEventListener(f,h,a)}function at(){n.whenReady(v)}function v(){S.reset(),document.body.querySelectorAll("[wml-event], [wml-window], [wml-openurl], [data-wml-event], [data-wml-window], [data-wml-openurl]").forEach(ut)}const gt=Object.freeze(Object.defineProperty({__proto__:null,Enable:at,Reload:v},Symbol.toStringTag,{value:"Module"}));exports.Flags=n.flags;exports.System=n.system;exports.Window=n.thisWindow;exports.Browser=d.browser;exports.Events=d.events;exports.Call=A.calls;exports.Application=T;exports.Clipboard=x;exports.Dialogs=H;exports.Screens=rt;exports.WML=gt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-BVi9X4oU.cjs"),d=require("./events-DnLqUWri.cjs"),A=require("./calls-B-HP1Icv.cjs"),w=n.newRuntimeCaller(n.objectNames.Application),_=0,M=1,C=2;function j(){return w(_)}function O(){return w(M)}function W(){return w(C)}const T=Object.freeze(Object.defineProperty({__proto__:null,Hide:j,Quit:W,Show:O},Symbol.toStringTag,{value:"Module"})),p=n.newRuntimeCaller(n.objectNames.Clipboard),D=0,E=1;function R(t){return p(D,{text:t})}function L(){return p(E)}const x=Object.freeze(Object.defineProperty({__proto__:null,SetText:R,Text:L},Symbol.toStringTag,{value:"Module"}));n.hasDOM&&(window._wails=window._wails||{});const P=n.newRuntimeCaller(n.objectNames.Dialog),I=0,B=1,G=2,k=3,q=4,z=5;function s(t,e={}){return P(t,e)}function F(t){return s(I,t)}function $(t){return s(B,t)}function Q(t){return s(G,t)}function y(t){return s(k,t)}function N(t){var e;return(e=s(q,t))!==null&&e!==void 0?e:[]}function Y(t){return s(z,t)}const H=Object.freeze(Object.defineProperty({__proto__:null,Error:Q,Info:F,OpenFile:N,Question:y,SaveFile:Y,Warning:$},Symbol.toStringTag,{value:"Module"})),u=n.newRuntimeCaller(n.objectNames.Screens),U=0,J=1,K=2,V=3,X=4;function Z(){return u(U)}function tt(){return u(J)}function et(){return u(K)}function nt(t){return u(V,{id:t})}function ot(t){return u(X,{index:t})}const rt=Object.freeze(Object.defineProperty({__proto__:null,GetAll:Z,GetByID:nt,GetByIndex:ot,GetCurrent:et,GetPrimary:tt},Symbol.toStringTag,{value:"Module"}));function it(t,e=null){d.Emit(t,e)}function lt(t,e){const o=n.thisWindow.Get(t),r=o[e];if(typeof r!="function"){console.error(`Window method '${e}' not found`);return}try{r.call(o)}catch(i){console.error(`Error calling window method '${e}': `,i)}}function h(t){const e=t.currentTarget;function o(i="Yes"){if(i!=="Yes")return;const a=e.getAttribute("wml-event")||e.getAttribute("data-wml-event"),f=e.getAttribute("wml-target-window")||e.getAttribute("data-wml-target-window")||"",b=e.getAttribute("wml-window")||e.getAttribute("data-wml-window"),m=e.getAttribute("wml-openurl")||e.getAttribute("data-wml-openurl");a!==null&&it(a),b!==null&&lt(f,b),m!==null&&d.OpenURL(m)}const r=e.getAttribute("wml-confirm")||e.getAttribute("data-wml-confirm");r?y({Title:"Confirm",Message:r,Detached:!1,Buttons:[{Label:"Yes"},{Label:"No",IsDefault:!0}]}).then(o):o()}const g=Symbol("controller"),c=Symbol("triggerMap"),l=Symbol("elementCount");class st{constructor(){this[g]=new AbortController}set(e,o){return{signal:this[g].signal}}reset(){this[g].abort(),this[g]=new AbortController}}class ct{constructor(){this[c]=new WeakMap,this[l]=0}set(e,o){return this[c].has(e)||this[l]++,this[c].set(e,o),{}}reset(){if(!(this[l]<=0)){for(const e of document.body.querySelectorAll("*")){if(this[l]<=0)break;const o=this[c].get(e);o!=null&&this[l]--;for(const r of o||[])e.removeEventListener(r,h)}this[c]=new WeakMap,this[l]=0}}}const S=n.canAbortListeners()?new st:new ct;function ut(t){const e=/\S+/g,o=t.getAttribute("wml-trigger")||t.getAttribute("data-wml-trigger")||"click",r=[];let i;for(;(i=e.exec(o))!==null;)r.push(i[0]);const a=S.set(t,r);for(const f of r)t.addEventListener(f,h,a)}function at(){n.whenReady(v)}function v(){S.reset(),document.body.querySelectorAll("[wml-event], [wml-window], [wml-openurl], [data-wml-event], [data-wml-window], [data-wml-openurl]").forEach(ut)}const gt=Object.freeze(Object.defineProperty({__proto__:null,Enable:at,Reload:v},Symbol.toStringTag,{value:"Module"}));exports.Flags=n.flags;exports.System=n.system;exports.Window=n.thisWindow;exports.Browser=d.browser;exports.Events=d.events;exports.Call=A.calls;exports.Application=T;exports.Clipboard=x;exports.Dialogs=H;exports.Screens=rt;exports.WML=gt;
package/dist/runtime.js CHANGED
@@ -2,7 +2,7 @@ import { n as g, o as f, h as _, w as v, c as M, t as C } from "./index-zyAgCXOO
2
2
  import { f as At, s as _t } from "./index-zyAgCXOO.js";
3
3
  import { a as O, E as W } from "./events-uBheGmqm.js";
4
4
  import { b as Mt, e as Ct } from "./events-uBheGmqm.js";
5
- import { c as Wt } from "./calls-BvZkVSse.js";
5
+ import { c as Wt } from "./calls-DYGtxNJ6.js";
6
6
  const w = g(f.Application), D = 0, E = 1, T = 2;
7
7
  function x() {
8
8
  return w(D);