@omniviewdev/runtime 0.9.2 → 0.11.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 (121) hide show
  1. package/dist/api.cjs +1 -1
  2. package/dist/api.d.ts +8 -6
  3. package/dist/api.js +249 -117
  4. package/dist/bindings/events/index.d.ts +48 -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/backend/window/index.d.ts +3 -0
  20. package/dist/bindings/github.com/omniviewdev/omniview/backend/window/models.d.ts +190 -0
  21. package/dist/bindings/github.com/omniviewdev/omniview/backend/window/service.d.ts +83 -0
  22. package/dist/bindings/github.com/omniviewdev/omniview/internal/mcprelay/index.d.ts +3 -0
  23. package/dist/bindings/github.com/omniviewdev/omniview/internal/mcprelay/models.d.ts +178 -0
  24. package/dist/bindings/github.com/omniviewdev/omniview/internal/mcprelay/servicewrapper.d.ts +30 -0
  25. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/config/models.d.ts +27 -0
  26. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/resource/v2/index.d.ts +2 -0
  27. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/resource/v2/models.d.ts +809 -0
  28. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models.d.ts +94 -0
  29. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/exec/models.d.ts +16 -6
  30. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/index.d.ts +1 -1
  31. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/logs/models.d.ts +27 -17
  32. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/index.d.ts +1 -1
  33. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/metric/models.d.ts +47 -24
  34. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/index.d.ts +1 -1
  35. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/networker/models.d.ts +41 -20
  36. package/dist/bindings/github.com/omniviewdev/plugin-sdk/settings/models.d.ts +16 -4
  37. package/dist/{calls-Bg_uMVc9.cjs → calls-B-HP1Icv.cjs} +1 -1
  38. package/dist/{calls-BvZkVSse.js → calls-DYGtxNJ6.js} +1 -0
  39. package/dist/compat/types.d.ts +1 -1
  40. package/dist/context/drawer/RightDrawerContext.d.ts +8 -4
  41. package/dist/context/drawer/types.d.ts +11 -21
  42. package/dist/context/index.d.ts +1 -0
  43. package/dist/context/operations/OperationsContext.d.ts +5 -5
  44. package/dist/context/windows/WindowActionsContext.d.ts +31 -0
  45. package/dist/context/windows/activePageNavigator.d.ts +13 -0
  46. package/dist/context/windows/index.d.ts +2 -0
  47. package/dist/exec.d.ts +5 -0
  48. package/dist/graph-JDqyJC_i.js +10 -0
  49. package/dist/graph-wHun0Bkz.cjs +1 -0
  50. package/dist/hooks/connection/index.d.ts +2 -1
  51. package/dist/hooks/connection/useConnection.d.ts +9 -30
  52. package/dist/hooks/connection/useConnectionProfiles.d.ts +7 -0
  53. package/dist/hooks/connection/useConnectionStatus.d.ts +8 -1
  54. package/dist/hooks/connection/useConnections.d.ts +3 -2
  55. package/dist/hooks/connection/useScopeValues.d.ts +9 -0
  56. package/dist/hooks/logs/useLogSession.d.ts +4 -1
  57. package/dist/hooks/metric/useMetricStream.d.ts +6 -2
  58. package/dist/hooks/metric/useResourceMetrics.d.ts +6 -2
  59. package/dist/hooks/networker/types.d.ts +5 -2
  60. package/dist/hooks/networker/useResourcePortForwarder.d.ts +1 -1
  61. package/dist/hooks/resource/useConnectionQueryGuard.d.ts +1 -1
  62. package/dist/hooks/resource/useDependencyTree.d.ts +4 -12
  63. package/dist/hooks/resource/useEditorSchemas.d.ts +12 -7
  64. package/dist/hooks/resource/useEventBatcher.d.ts +11 -47
  65. package/dist/hooks/resource/useRelatedResources.d.ts +6 -14
  66. package/dist/hooks/resource/useResolvedResourceTarget.d.ts +162 -0
  67. package/dist/hooks/resource/useResource.d.ts +7 -58
  68. package/dist/hooks/resource/useResourceActions.d.ts +9 -58
  69. package/dist/hooks/resource/useResourceGraph.d.ts +4 -12
  70. package/dist/hooks/resource/useResourceGroups.d.ts +5 -19
  71. package/dist/hooks/resource/useResourceMutations.d.ts +5 -61
  72. package/dist/hooks/resource/useResourceSearch.d.ts +5 -34
  73. package/dist/hooks/resource/useResourceType.d.ts +6 -19
  74. package/dist/hooks/resource/useResourceTypes.d.ts +5 -20
  75. package/dist/hooks/resource/useResources.d.ts +32 -60
  76. package/dist/hooks/resource/useStreamAction.d.ts +4 -8
  77. package/dist/hooks/resource/useWatchState.d.ts +15 -22
  78. package/dist/index.cjs +4 -4
  79. package/dist/index.d.ts +6 -1
  80. package/dist/index.js +3007 -2881
  81. package/dist/logs.d.ts +14 -0
  82. package/dist/metric.d.ts +35 -0
  83. package/dist/models-Cg1YRHQm.js +583 -0
  84. package/dist/models-DSGyy8lg.cjs +1 -0
  85. package/dist/models-UwESEW2B.js +1232 -0
  86. package/dist/models-dzj-SsFZ.cjs +1 -0
  87. package/dist/models.cjs +1 -1
  88. package/dist/models.d.ts +14 -8
  89. package/dist/models.js +118 -208
  90. package/dist/networker.d.ts +31 -0
  91. package/dist/resource/v2/ancillary.d.ts +161 -0
  92. package/dist/resource/v2/client.d.ts +57 -0
  93. package/dist/resource/v2/domain.d.ts +204 -0
  94. package/dist/resource/v2/graph-client.d.ts +7 -0
  95. package/dist/resource/v2/graph.d.ts +35 -0
  96. package/dist/resource/v2/host.d.ts +129 -0
  97. package/dist/resource/v2/requestJSON.d.ts +2 -0
  98. package/dist/resource/v2/value.d.ts +9 -0
  99. package/dist/resourceQueryKeys.d.ts +8 -4
  100. package/dist/router/Link.d.ts +3 -0
  101. package/dist/runtime.cjs +1 -1
  102. package/dist/runtime.js +1 -1
  103. package/dist/search.d.ts +9 -11
  104. package/dist/servicewrapper-BOM6A8IG.cjs +1 -0
  105. package/dist/servicewrapper-Bda7yi8z.js +684 -0
  106. package/dist/types/watch.d.ts +48 -21
  107. package/dist/utils/activeSyncAggregator.d.ts +2 -2
  108. package/package.json +3 -3
  109. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/index.d.ts +0 -2
  110. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models.d.ts +0 -1199
  111. package/dist/compat/resource.d.ts +0 -4
  112. package/dist/hooks/connection/useConnectionNamespaces.d.ts +0 -21
  113. package/dist/legacyEnum-CKqyRmbX.js +0 -15
  114. package/dist/legacyEnum-DkV5yRdA.cjs +0 -1
  115. package/dist/models-CT4kHj47.js +0 -2444
  116. package/dist/models-DQl7tqts.cjs +0 -1
  117. package/dist/models-DU8pTcoZ.js +0 -142
  118. package/dist/models-KV9f8Ceh.cjs +0 -1
  119. package/dist/servicewrapper-C6SURWw1.js +0 -850
  120. package/dist/servicewrapper-COMjQHnY.cjs +0 -1
  121. package/dist/utils/resourceKey.d.ts +0 -12
@@ -1,28 +1,55 @@
1
- import { WatchState as GeneratedWatchState } from '../bindings/github.com/omniviewdev/plugin-sdk/pkg/v1/resource/models';
2
- /** Carries both the v3 member names and the ones plugins were built against. */
3
- export declare const WatchState: typeof GeneratedWatchState;
4
- export type WatchState = GeneratedWatchState;
5
- /**
6
- * WatchStateEvent is emitted when a resource's watch state changes.
7
- * Matches Go type: plugin-sdk/pkg/v1/resource.WatchStateEvent
8
- */
1
+ import { AccessRoute, Count, QueryScope, Record as ResourceRecord, ResourceReference } from '../resource/v2/domain';
2
+ import { ResourceOperationError } from '../resource/v2/ancillary';
3
+ export declare enum WatchState {
4
+ WatchStateIdle = 0,
5
+ WatchStateSyncing = 1,
6
+ WatchStateSynced = 2,
7
+ WatchStateError = 3,
8
+ WatchStateStopped = 4,
9
+ WatchStateFailed = 5,
10
+ WatchStateForbidden = 6,
11
+ WatchStateSkipped = 7
12
+ }
13
+ export declare enum SyncPolicy {
14
+ SyncOnConnect = 0,
15
+ SyncOnFirstQuery = 1,
16
+ SyncNever = 2
17
+ }
9
18
  export interface WatchStateEvent {
10
- pluginId: string;
11
- connection: string;
12
- resourceKey: string;
19
+ route: AccessRoute;
20
+ type: string;
13
21
  state: WatchState;
14
- resourceCount: number;
22
+ count: Count;
23
+ error?: ResourceOperationError;
15
24
  message?: string;
16
- errorCode?: string;
25
+ guarantee: 'bestEffort';
17
26
  }
18
- /**
19
- * WatchConnectionSummary provides an aggregate view of all watch states for a connection.
20
- */
21
27
  export interface WatchConnectionSummary {
22
- connection: string;
28
+ route: AccessRoute;
23
29
  resources: Record<string, WatchState>;
24
- resourceCounts: Record<string, number>;
25
- totalResources: number;
26
- syncedCount: number;
27
- errorCount: number;
30
+ resourceCounts: Record<string, Count>;
31
+ scope: QueryScope;
32
+ guarantee: 'bestEffort';
33
+ }
34
+ export interface ResourceMetadata {
35
+ labels?: Record<string, string>;
36
+ createdAt?: string;
37
+ }
38
+ export interface WatchAddPayload {
39
+ route: AccessRoute;
40
+ record: ResourceRecord;
41
+ metadata: ResourceMetadata;
42
+ guarantee: 'bestEffort';
43
+ }
44
+ export interface WatchUpdatePayload {
45
+ route: AccessRoute;
46
+ record: ResourceRecord;
47
+ metadata: ResourceMetadata;
48
+ guarantee: 'bestEffort';
49
+ }
50
+ export interface WatchDeletePayload {
51
+ route: AccessRoute;
52
+ reference: ResourceReference;
53
+ lastKnown?: ResourceRecord;
54
+ guarantee: 'bestEffort';
28
55
  }
@@ -29,6 +29,6 @@ export declare function hasActiveSyncing(syncs: ActiveSync[]): boolean;
29
29
  /** Compute aggregate progress across multiple syncs (watched resources only) */
30
30
  export declare function aggregateProgress(syncs: ActiveSync[]): number;
31
31
  /** Build a tracker key from an event */
32
- export declare function trackerKey(event: WatchStateEvent): string;
32
+ export declare function trackerKey(pluginID: string, event: WatchStateEvent): string;
33
33
  /** Update a trackers map with a new event, returning the updated tracker */
34
- export declare function updateTracker(trackers: Map<string, ResourceTracker>, event: WatchStateEvent): ResourceTracker;
34
+ export declare function updateTracker(trackers: Map<string, ResourceTracker>, pluginID: string, event: WatchStateEvent): ResourceTracker;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Omniview",
3
3
  "license": "AGPL-3.0-only",
4
4
  "name": "@omniviewdev/runtime",
5
- "version": "0.9.2",
5
+ "version": "0.11.0",
6
6
  "description": "Runtime shared library for Omniview",
7
7
  "sideEffects": false,
8
8
  "type": "module",
@@ -52,7 +52,7 @@
52
52
  "omniview"
53
53
  ],
54
54
  "devDependencies": {
55
- "@omniviewdev/base-ui": "~0.8.0",
55
+ "@omniviewdev/base-ui": "~0.9.0",
56
56
  "@tanstack/react-query": "5.105.0",
57
57
  "@types/node": "26.6.5",
58
58
  "@types/react": "19.3.0",
@@ -68,7 +68,7 @@
68
68
  "@typescript/native": "npm:typescript@7.0.2"
69
69
  },
70
70
  "peerDependencies": {
71
- "@omniviewdev/base-ui": "~0.8.0",
71
+ "@omniviewdev/base-ui": "~0.9.0",
72
72
  "@tanstack/react-query": "^5.105.0",
73
73
  "react": "^19.3.1",
74
74
  "react-dom": "^19.3.1",
@@ -1,2 +0,0 @@
1
- export { ActionDescriptor, ActionInput, ActionResult, ActionScope, ColumnDefinition, CreateInput, CreateResult, DeleteInput, DeleteResult, EdgeDirection, EditorSchema, EventSeverity, FilterExpression, FilterField, FilterFieldType, FilterLogic, FilterOperator, FilterPredicate, FindInput, FindResult, GetInput, GetResult, HealthCondition, HealthStatus, ListInput, ListResult, OrderField, PaginationParams, RelationshipDescriptor, RelationshipExtractor, RelationshipType, ResolvedRelationship, ResourceCapabilities, ResourceDefinition, ResourceEvent, ResourceGroup, ResourceHealth, ResourceLink, ResourceMeta, ResourceRef, ScaleHint, ScaleLevel, UpdateInput, UpdateResult, WatchConnectionSummary, WatchScope, WatchState, WatchStateEvent } from './models.js';
2
- export type { Schema } from './models.js';