@omniviewdev/runtime 0.27.3 → 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.
Files changed (41) hide show
  1. package/dist/activity/ActivityCard.d.ts +8 -0
  2. package/dist/activity/ActivityProvider.d.ts +6 -0
  3. package/dist/activity/ActivitySurfaces.d.ts +8 -0
  4. package/dist/activity/NotificationCenter.d.ts +2 -0
  5. package/dist/activity/client.d.ts +25 -0
  6. package/dist/activity/context.d.ts +51 -0
  7. package/dist/activity/index.d.ts +8 -0
  8. package/dist/activity/store.d.ts +32 -0
  9. package/dist/{hooks/snackbar/NotificationCenter.styles.d.ts → activity/styles.d.ts} +60 -34
  10. package/dist/activity/types.d.ts +163 -0
  11. package/dist/api.cjs +1 -1
  12. package/dist/api.js +1 -1
  13. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/activity/frontendservice.d.ts +27 -0
  14. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/activity/index.d.ts +2 -0
  15. package/dist/bindings/github.com/omniviewdev/omniview/backend/pkg/plugin/resource/models.d.ts +1 -0
  16. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/activity/index.d.ts +1 -0
  17. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/activity/models.d.ts +114 -0
  18. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/resource/v2/index.d.ts +2 -2
  19. package/dist/bindings/github.com/omniviewdev/plugin-sdk/pkg/resource/v2/models.d.ts +91 -1
  20. package/dist/context/index.d.ts +0 -1
  21. package/dist/errors/index.d.ts +1 -1
  22. package/dist/errors/parseAppError.d.ts +8 -33
  23. package/dist/hooks/connection/useConnections.d.ts +3 -3
  24. package/dist/hooks/exec/useNativeExec.d.ts +1 -1
  25. package/dist/hooks/index.d.ts +0 -2
  26. package/dist/hooks/networker/useResourcePortForwarder.d.ts +3 -3
  27. package/dist/hooks/resource/index.d.ts +0 -1
  28. package/dist/index.cjs +5 -4
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +3300 -2836
  31. package/dist/resource/v2/ancillary.d.ts +2 -0
  32. package/dist/resource/v2/client.d.ts +2 -0
  33. package/dist/{service-CDYj21m9.js → service-BohjVV8G.js} +5 -7
  34. package/dist/service-Dm78ll2_.cjs +1 -0
  35. package/package.json +3 -3
  36. package/dist/context/operations/OperationsContext.d.ts +0 -27
  37. package/dist/hooks/operations/useOperations.d.ts +0 -1
  38. package/dist/hooks/resource/useStreamAction.d.ts +0 -14
  39. package/dist/hooks/snackbar/index.d.ts +0 -1
  40. package/dist/hooks/snackbar/useSnackbar.d.ts +0 -26
  41. package/dist/service-DO0Rrm3E.cjs +0 -1
@@ -1,5 +1,6 @@
1
1
  import { AccessRoute, ResourceReference, ScopeEntry, Value } from './domain';
2
2
  import { Connection } from '../../bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
3
+ import { ActivityPresentation } from '../../activity/types';
3
4
  /** Ancillary transport traits; finite support comes only from the qualified catalog. */
4
5
  export type Feature = 'connections' | 'connectionBrowser' | 'connectionOverlay' | 'scopeValues' | 'presentation' | 'editorSchemas' | 'schemaDocuments' | 'relationships' | 'health' | 'actionCatalog' | 'streamingActions' | 'sourceSessions';
5
6
  export interface FeatureSet {
@@ -86,6 +87,7 @@ export interface ActionEvent {
86
87
  type: string;
87
88
  data: Value;
88
89
  error?: ResourceOperationError;
90
+ activity?: ActivityPresentation;
89
91
  }
90
92
  export interface ResourceOperationError {
91
93
  code: string;
@@ -6,6 +6,7 @@ import { AppError } from '../../errors/types';
6
6
  import { ConnectionProfile, ConnectionProfileCredentials, ConnectionProfileResult, HostConnectionState, HostEnumerateRequest, HostGetRequest, HostNativeQueryRequest, HostRecord, HostSourcePage, HostSourceStates, HostSourceViewOpened, HostSourceViewRequest, ResolvedResourceReference, ResolvedResourceTarget, ResolveReferenceRequest, ResolveTargetRequest } from './host';
7
7
  import { Connection } from '../../bindings/github.com/omniviewdev/plugin-sdk/pkg/types/models';
8
8
  import { ConnectionMetadataEnvelope } from '../../connection/metadata';
9
+ import { ActivityPresentation } from '../../activity/types';
9
10
  export declare const Features: (pluginID: string) => CancellablePromise<FeatureSet>;
10
11
  export declare const GetConnectionMetadata: (pluginID: string, connectionID: string) => CancellablePromise<ConnectionMetadataEnvelope>;
11
12
  export declare const RefreshConnectionMetadata: (pluginID: string, connectionID: string) => CancellablePromise<ConnectionMetadataEnvelope>;
@@ -41,6 +42,7 @@ export interface ActionEventDTO {
41
42
  type: string;
42
43
  data?: Value;
43
44
  error?: AppError;
45
+ activity?: ActivityPresentation;
44
46
  }
45
47
  export interface ActionSnapshot {
46
48
  sequence: number;
@@ -823,13 +823,11 @@ export {
823
823
  $n as ab,
824
824
  dn as ac,
825
825
  On as ad,
826
- Gn as ae,
827
- vn as af,
828
- Pn as ag,
829
- Ln as ah,
830
- jn as ai,
831
- Mn as aj,
832
- rn as ak,
826
+ Ln as ae,
827
+ jn as af,
828
+ Mn as ag,
829
+ rn as ah,
830
+ d as ai,
833
831
  fo as b,
834
832
  uo as c,
835
833
  po as d,
@@ -0,0 +1 @@
1
+ "use strict";const o=require("./index-BVi9X4oU.cjs"),y=require("./models-R2rKpSiU.cjs"),n=require("./events-B9wlH6cT.cjs");function d(e,t=[]){let l=0;for(const s of t){if(s.length>65536)throw new RangeError("Request routing byte limit");l+=new TextEncoder().encode(JSON.stringify(s)).length+1}if(l>57344)throw new RangeError("Request routing byte limit");let D=0,b=2,B=0,S=0;const m=[],f=s=>{for(let p=0;p<s.length;p++){const u=s.charCodeAt(p);let g=u<128?1:u<2048?2:3;if(u>=55296&&u<=56319){const w=s.charCodeAt(++p);if(!(w>=56320&&w<=57343))throw new TypeError("Invalid Unicode");g=4}else if(u>=56320&&u<=57343)throw new TypeError("Invalid Unicode");if(D+=g,b+=u===34||u===92?2:g,D>33554432||b>67043328)throw new RangeError("Request JSON byte limit")}m.push(s)},h=s=>{if(s.length>33554432)throw new RangeError("Request JSON byte limit");for(let p=0;p<s.length;p++){const u=s.charCodeAt(p);if(u>=55296&&u<=56319){const g=s.charCodeAt(++p);if(!(g>=56320&&g<=57343))throw new TypeError("Invalid Unicode")}else if(u>=56320&&u<=57343)throw new TypeError("Invalid Unicode")}f(JSON.stringify(s))},a=(s,p)=>{if(++B>262144||p>64)throw new RangeError("Request JSON structural limit");if(s===null){f("null");return}if(typeof s=="string"){h(s);return}if(typeof s=="boolean"){f(s?"true":"false");return}if(typeof s=="number"){if(!Number.isFinite(s))throw new TypeError("Request numbers must be finite");f(Object.is(s,-0)?"-0":JSON.stringify(s));return}if(Array.isArray(s)){f("[");for(let u=0;u<s.length;u++){if(++S>1048576)throw new RangeError("Request JSON field limit");u&&f(","),a(s[u],p+1)}f("]");return}if(typeof s=="object"){f("{");let u=!0;for(const[g,w]of Object.entries(s))if(w!==void 0){if(++S>1048576)throw new RangeError("Request JSON field limit");u||f(","),u=!1,h(g),f(":"),a(w,p+1)}f("}");return}throw new TypeError("Unsupported request JSON value")};return a(e,0),m.join("")}function st(e){return n.ByID(93318075,e).then(t=>(t[0]=v(t[0]),t[1]=o.ByteSlice(t[1]),t))}function ut(e){return n.ByID(1353297556,e)}function at(e){return n.ByID(4182196712,e).then(t=>v(t))}function lt(e){return n.ByID(3993344525,e).then(t=>v(t))}function q(e,t){return n.ByID(1779192716,e,t).then(r=>Bt(r))}function yt(){return n.ByID(4033362541).then(e=>Dt(e))}function x(){return n.ByID(3434119522)}function pt(e){return n.ByID(2619212338,e).then(t=>U(t))}function ft(e){return n.ByID(1371268636,e).then(t=>v(t))}function ht(e){return n.ByID(3881019319,e)}function dt(){return n.ByID(3006426324).then(e=>bt(e))}function St(){return n.ByID(265791345).then(e=>It(e))}function gt(e,t,r){return n.ByID(1492965384,e,t,r)}function mt(e,t){return n.ByID(486465741,e,t)}const $t=y.Session.createFrom,v=o.Nullable($t),z=y.Handler.createFrom,Bt=o.Nullable(z),U=o.Map(o.Any,z),Dt=o.Map(o.Any,U),bt=o.Array(o.Any),It=o.Array(v);function Q(e,t,r){return n.ByName("github.com/omniviewdev/omniview/backend/pkg/plugin/exec.ServiceWrapper.CreateSession",e,t,d(r,[e,t])).then(i=>i===null?null:y.Session.createFrom(i))}function W(e,t,r){return n.ByName("github.com/omniviewdev/omniview/backend/pkg/plugin/exec.ServiceWrapper.OpenNativeSession",e,t,d(r,[e,t]))}const wt=Object.freeze(Object.defineProperty({__proto__:null,AttachSession:st,CloseSession:ut,CreateSession:Q,CreateTerminal:at,DetachSession:lt,GetHandler:q,GetHandlers:yt,GetNativeTerminalSupport:x,GetPluginHandlers:pt,GetSession:ft,HasPlugin:ht,ListPlugins:dt,ListSessions:St,OpenNativeSession:W,ResizeSession:gt,WriteSession:mt},Symbol.toStringTag,{value:"Module"}));function X(e){return n.ByID(182596922,e).then(t=>F(t))}function K(e,t,r){return n.ByID(981100722,e,t,r).then(i=>O(i))}function vt(e){return n.ByID(2157304970,e).then(t=>F(t))}function Tt(e){return n.ByID(650882,e).then(t=>Z(t))}function Pt(e){return n.ByID(3624690437,e)}function Y(){return n.ByID(2195697754).then(e=>O(e))}function Gt(){return n.ByID(167463150).then(e=>Z(e))}function Ct(e,t){return n.ByID(2090415403,e,t).then(r=>O(r))}const Rt=y.PortForwardSession.createFrom,F=o.Nullable(Rt),O=o.Array(F),Z=o.Array(o.Any);function ee(e,t,r){return n.ByName("github.com/omniviewdev/omniview/backend/pkg/plugin/networker.ServiceWrapper.StartResourcePortForwardingSession",e,t,d(r,[e,t]))}const At=Object.freeze(Object.defineProperty({__proto__:null,ClosePortForwardSession:X,FindPortForwardSessions:K,GetPortForwardSession:vt,GetSupportedPortForwardTargets:Tt,HasPlugin:Pt,ListAllPortForwardSessions:Y,ListPlugins:Gt,ListPortForwardSessions:Ct,StartResourcePortForwardingSession:ee},Symbol.toStringTag,{value:"Module"}));class _{pluginID;running;url;error;supported;pid;constructor(t={}){"pluginID"in t||(this.pluginID=""),"running"in t||(this.running=!1),"url"in t||(this.url=""),"error"in t||(this.error=""),"supported"in t||(this.supported=!1),"pid"in t||(this.pid=0),Object.assign(this,t)}static createFrom(t={}){let r=typeof t=="string"?JSON.parse(t):t;return new _(r)}}function Ft(e){return n.ByID(3150413499,e).then(t=>$(t))}function Ot(e){return n.ByID(1152913314,e).then(t=>en(t))}function te(e){return n.ByID(111194374,e).then(t=>N(t))}function _t(){return n.ByID(1083754477).then(e=>nn(e))}function Nt(e){return n.ByID(3945933305,e)}function Et(e){return n.ByID(2859775056,e).then(t=>re(t))}function Lt(e,t){return n.ByID(2209599792,e,t).then(r=>cn(r))}function Mt(e){return n.ByID(3963363730,e).then(t=>re(t))}function jt(e){return n.ByID(1357029266,e).then(t=>$(t))}function kt(){return n.ByID(2477486666).then(e=>G(e))}function Vt(){return n.ByID(976517756).then(e=>G(e))}function Ht(e){return n.ByID(1020548995,e).then(t=>G(t))}function Jt(e,t){return n.ByID(2004740384,e,t).then(r=>G(r))}function qt(){return n.ByID(873697101).then(e=>oe(e))}function xt(){return n.ByID(637134283).then(e=>un(e))}function zt(){return n.ByID(550607756).then(e=>an(e))}function Ut(e,t){return n.ByID(288660195,e,t).then(r=>$(r))}function Qt(e){return n.ByID(1771013494,e).then(t=>$(t))}function ne(e){return n.ByID(2433379724,e).then(t=>$(t))}function Wt(e,t,r){return n.ByID(2783597264,e,t,r).then(i=>oe(i))}function Xt(e,t){return n.ByID(2179374748,e,t).then(r=>$(r))}function Kt(e){return n.ByID(1369550929,e).then(t=>$(t))}function Yt(e){return n.ByID(3828800061,e).then(t=>$(t))}const $=y.PluginInfo.createFrom,Zt=y.DownloadStats.createFrom,en=o.Nullable(Zt),N=y.PluginMeta.createFrom,tn=_.createFrom,nn=o.Array(tn),rn=y.VersionInfo.createFrom,re=o.Array(rn),on=y.Review.createFrom,cn=o.Array(on),G=o.Nullable(N),sn=y.AvailablePlugin.createFrom,oe=o.Array(sn),un=o.Array(N),an=o.Array($),ln=Object.freeze(Object.defineProperty({__proto__:null,GetPlugin:Ft,GetPluginDownloadStats:Ot,GetPluginMeta:te,GetPluginProfilingStatuses:_t,GetPluginReadme:Nt,GetPluginReleaseHistory:Et,GetPluginReviews:Lt,GetPluginVersions:Mt,InstallDevPluginFromPath:jt,InstallFromPathPrompt:kt,InstallInDevMode:Vt,InstallPluginFromPath:Ht,InstallPluginVersion:Jt,ListAvailablePlugins:qt,ListPluginMetas:xt,ListPlugins:zt,LoadPlugin:Ut,ReloadPlugin:Qt,RetryFailedPlugin:ne,SearchPlugins:Wt,SetPluginEnabled:Xt,UninstallPlugin:Kt,UnlinkDevPlugin:Yt},Symbol.toStringTag,{value:"Module"}));function ie(e,t){return n.ByID(1688967279,e,t).then(r=>ye(r))}function ce(e,t){return n.ByID(950535743,e,t).then(r=>E(r))}function yn(e){return n.ByID(854008408,e)}function se(){return n.ByID(1598984489).then(e=>hn(e))}function ue(e){return n.ByID(1775572154,e).then(t=>L(t))}function pn(){return n.ByID(3217612415).then(e=>dn(e))}function fn(e){return n.ByID(2037329938,e).then(t=>L(t))}function ae(e,t){return n.ByID(3276991559,e,t).then(r=>ye(r))}function le(e,t){return n.ByID(794258089,e,t).then(r=>E(r))}const ye=y.ConnectionStatus.createFrom,E=y.Connection.createFrom,L=o.Array(E),hn=o.Map(o.Any,L),dn=o.Array(o.Any),Sn="github.com/omniviewdev/omniview/backend/pkg/plugin/resource.ServiceWrapper";function c(e,...t){return n.ByName(`${Sn}.${e}`,...t)}const gn=e=>c("Features",e),pe=(e,t)=>c("GetConnectionMetadata",e,t),fe=(e,t)=>c("RefreshConnectionMetadata",e,t),he=(e,t)=>c("Catalog",e,t),de=(e,t)=>c("Get",e,t),Se=(e,t)=>c("Enumerate",e,t),ge=(e,t)=>c("NativeQuery",e,d(t,[e])),me=(e,t)=>c("Mutate",e,d(t,[e])),$e=(e,t)=>c("Action",e,d(t,[e])),Be=(e,t)=>c("ResolveTarget",e,t),mn=(e,t)=>c("ResolveReference",e,t),$n=(e,t,r)=>c("GetSchemaDocument",e,t,r),De=()=>c("GetAllConnectionStates"),be=e=>c("ListConnectionProfiles",e),Ie=(e,t,r)=>c("SaveConnectionProfile",e,d(t,[e]),r??null),we=(e,t)=>c("ImportConnectionProfile",e,t),ve=(e,t)=>c("ResetConnectionProfile",e,t),Te=(e,t)=>c("RemoveConnection",e,t),Pe=(e,t)=>c("GetResourceGroups",e,t),Bn=(e,t,r)=>c("GetResourceDefinition",e,t,r),Ge=(e,t)=>c("GetSchemaFields",e,t),Ce=(e,t)=>c("GetEditorSchemas",e,t),Re=(e,t,r)=>c("GetEditorSchemaDocument",e,t,r),Dn=(e,t,r)=>c("GetRelationships",e,t,r),bn=(e,t)=>c("ResolveRelationships",e,t),In=(e,t,r)=>c("GetHealth",e,d({request:t,body:r},[e])),wn=(e,t,r)=>c("GetResourceEvents",e,t,r),Ae=(e,t,r)=>c("GetActions",e,t,r),vn=(e,t)=>c("StreamAction",e,d(t,[e])),Tn=e=>c("AttachStreamAction",e),Pn=e=>c("CancelStreamAction",e),Fe=(e,t)=>c("OpenSourceView",e,t),Oe=(e,t)=>c("SyncSourceView",e,t),_e=(e,t)=>c("RefreshSourceView",e,t),Ne=(e,t)=>c("CloseSourceView",e,t),Ee=(e,t)=>c("GetSourceStates",e,t),Le=(e,t)=>c("RetryConnectionSources",e,t),Me=(e,t,r)=>c("ScopeValues",e,t,r),Gn=Object.freeze(Object.defineProperty({__proto__:null,Action:$e,AttachStreamAction:Tn,CancelStreamAction:Pn,Catalog:he,CheckConnection:ie,CloseSourceView:Ne,Enumerate:Se,Features:gn,Get:de,GetActions:Ae,GetAllConnectionStates:De,GetConnection:ce,GetConnectionMetadata:pe,GetEditorSchemaDocument:Re,GetEditorSchemas:Ce,GetHealth:In,GetRelationships:Dn,GetResourceDefinition:Bn,GetResourceEvents:wn,GetResourceGroups:Pe,GetSchemaDocument:$n,GetSchemaFields:Ge,GetSourceStates:Ee,HasPlugin:yn,ImportConnectionProfile:we,ListAllConnections:se,ListConnectionProfiles:be,ListConnections:ue,ListPlugins:pn,LoadConnections:fn,Mutate:me,NativeQuery:ge,OpenSourceView:Fe,RefreshConnectionMetadata:fe,RefreshSourceView:_e,RemoveConnection:Te,ResetConnectionProfile:ve,ResolveReference:mn,ResolveRelationships:bn,ResolveTarget:Be,RetryConnectionSources:Le,SaveConnectionProfile:Ie,ScopeValues:Me,StartConnection:ae,StopConnection:le,StreamAction:vn,SyncSourceView:Oe},Symbol.toStringTag,{value:"Module"})),C="github.com/omniviewdev/omniview/backend/pkg/plugin/resource.GraphService";function je(e,t,r,i,l){return n.ByName(`${C}.GetRelated`,e,t,r,i,l)}function Cn(e,t,r,i,l){return n.ByName(`${C}.GetRelationshipChain`,e,t,r,i,l)}function ke(e,t,r,i){return n.ByName(`${C}.GetDependencyTree`,e,t,r,i)}function Ve(e,t,r,i,l){return n.ByName(`${C}.GetSubgraph`,e,t,r,i,l)}const Rn=Object.freeze(Object.defineProperty({__proto__:null,GetDependencyTree:ke,GetRelated:je,GetRelationshipChain:Cn,GetSubgraph:Ve},Symbol.toStringTag,{value:"Module"}));class M{snapshot;applied;uncertain;message;constructor(t={}){"snapshot"in t||(this.snapshot=new T),"applied"in t||(this.applied=!1),"uncertain"in t||(this.uncertain=!1),"message"in t||(this.message=""),Object.assign(this,t)}static createFrom(t={}){const r=An;let i=typeof t=="string"?JSON.parse(t):t;return"snapshot"in i&&(i.snapshot=r(i.snapshot)),new M(i)}}class R{kind;pluginId;constructor(t={}){"kind"in t||(this.kind=""),Object.assign(this,t)}static createFrom(t={}){let r=typeof t=="string"?JSON.parse(t):t;return new R(r)}}class T{scope;categories;constructor(t={}){"scope"in t||(this.scope=new R),"categories"in t||(this.categories={}),Object.assign(this,t)}static createFrom(t={}){const r=Fn,i=P;let l=typeof t=="string"?JSON.parse(t):t;return"scope"in l&&(l.scope=r(l.scope)),"categories"in l&&(l.categories=i(l.categories)),new T(l)}}const An=T.createFrom,Fn=R.createFrom;var P=function e(...t){return P===e&&(P=_n),P(...t)};const On=y.Category.createFrom,_n=o.Map(o.Any,On);function He(e,t){return n.ByID(1766083910,e,t).then(r=>Nn(r))}function Je(e){return n.ByID(3969198041,e).then(t=>En(t))}function qe(e,t,r){return n.ByID(3964153809,e,t,r).then(i=>Ln(i))}const Nn=M.createFrom,En=T.createFrom,Ln=y.ValidationResult.createFrom,Mn=Object.freeze(Object.defineProperty({__proto__:null,Commit:He,GetSnapshot:Je,Validate:qe},Symbol.toStringTag,{value:"Module"}));function jn(e){return n.ByID(2106300110,e).then(t=>Vn(t))}function xe(e){return n.ByID(765209827,e).then(t=>Hn(t))}function kn(e){return n.ByID(2355436169,e).then(t=>Ue(t))}const ze=y.ResourceComponent.createFrom,Ue=o.Array(ze),Vn=o.Map(o.Any,Ue),Hn=o.Nullable(ze),Jn=Object.freeze(Object.defineProperty({__proto__:null,GetPluginComponents:jn,GetResourceAreaComponent:xe,GetResourceComponents:kn},Symbol.toStringTag,{value:"Module"})),I=new Map,qn=1e4,H=8*1024*1024,xn=new TextEncoder,zn=100;function J(e){const t=Array.isArray(e)&&e.length===1&&typeof e[0]=="string"?e[0]:e;return typeof t=="string"?JSON.parse(t):t}function A(e,t){const r=n.On(`core/logs/lines/${e}`,i=>t.onLines(i.data));try{const i=n.On(`core/logs/event/${e}`,l=>t.onEvent(l.data));return()=>{r(),i()}}catch(i){throw r(),i}}function Un(e){if(I.has(e))throw new Error("Log session ID is already in use.");const t=[];let r=0;const i=[],l=new Map;let D=0;const b=A(e,{onLines(h){try{const a=J(h);if(!Array.isArray(a))return;for(const s of a){const p=xn.encode(JSON.stringify(s)).byteLength;for(;t.length&&(t.length>=qn||r+p>H);)r-=t.shift().bytes;p<=H&&(t.push({data:s,bytes:p}),r+=p)}}catch(a){console.error("Failed to parse log lines:",a)}},onEvent(h){try{const a=J(h),s={data:a,order:D++};a&&typeof a=="object"&&"source_id"in a&&a.source_id===""&&"type"in a&&typeof a.type=="number"&&Number.isInteger(a.type)&&a.type>=0&&a.type<=6?l.set(a.type,s):(i.push(s),i.length>zn&&i.shift())}catch(a){console.error("Failed to parse log event:",a)}}});let B;const S=()=>{clearTimeout(B),b(),I.get(e)===f&&I.delete(e),t.length=0,r=0,i.length=0,l.clear()},m=()=>{I.get(e)===f&&(B??=setTimeout(S,6e4))},f={connect(h){const a=t.map(u=>u.data),s=[...i,...l.values()].sort((u,g)=>u.order-g.order);S();const p=A(e,h);try{a.length&&h.onLines(a);for(const u of s)h.onEvent(u.data);return p}catch(u){throw p(),u}}};return I.set(e,f),{release:S,settled:m}}function Qn(e,t){return I.get(e)?.connect(t)??A(e,t)}function Qe(e){return n.ByID(2776241946,e)}function Wn(e){return n.ByID(1474987050,e).then(t=>j(t))}function Xn(e){return n.ByID(3156347865,e).then(t=>or(t))}function Kn(e){return n.ByID(1444002509,e)}function Yn(){return n.ByID(3104582886).then(e=>ir(e))}function Zn(){return n.ByID(2249742267).then(e=>cr(e))}function er(e,t){return n.ByID(1212190993,e,t)}function tr(e,t){return n.ByID(2177127885,e,t).then(r=>j(r))}const nr=y.LogSession.createFrom,j=o.Nullable(nr),rr=y.Handler$1.createFrom,or=o.Array(rr),ir=o.Array(o.Any),cr=o.Array(j);function We(e,t,r){const i=r.session_id??crypto.randomUUID(),l=d({...r,session_id:i},[e,t]),{release:D,settled:b}=Un(i);let B;const S=()=>{clearTimeout(B),D()};try{const m=n.ByName("github.com/omniviewdev/omniview/backend/pkg/plugin/logs.ServiceWrapper.CreateSession",e,t,l),f=new Error("Log session creation timed out after 120 seconds.");return B=setTimeout(()=>{m.cancel(f)},12e4),m.then(h=>{if(clearTimeout(B),!h||h.id!==i)throw D(),new Error("Log provider returned an invalid session.");return b(),h},h=>{throw S(),h?.cause===f?f:h},S)}catch(m){throw S(),m}}const sr=Object.freeze(Object.defineProperty({__proto__:null,CloseSession:Qe,CreateSession:We,GetSession:Wn,GetSupportedResources:Xn,HasPlugin:Kn,ListPlugins:Yn,ListSessions:Zn,SendCommand:er,SubscribeSessionEvents:Qn,UpdateSessionOptions:tr},Symbol.toStringTag,{value:"Module"}));class k{plugin_id;provider_id;name;icon;description;handlers;constructor(t={}){"plugin_id"in t||(this.plugin_id=""),"provider_id"in t||(this.provider_id=""),"name"in t||(this.name=""),"icon"in t||(this.icon=""),"description"in t||(this.description=""),"handlers"in t||(this.handlers=[]),Object.assign(this,t)}static createFrom(t={}){const r=ar;let i=typeof t=="string"?JSON.parse(t):t;return"handlers"in i&&(i.handlers=r(i.handlers)),new k(i)}}const ur=y.Handler$2.createFrom,ar=o.Array(ur);function Xe(){return n.ByID(3919346639).then(e=>Ze(e))}function Ke(e){return n.ByID(3953821778,e).then(t=>Ze(t))}function lr(e){return n.ByID(1815388456,e)}function yr(){return n.ByID(2730149903).then(e=>fr(e))}function Ye(e){return n.ByID(3994236150,e)}const pr=k.createFrom,Ze=o.Array(pr),fr=o.Array(o.Any);y.QueryResponse.createFrom;const V="github.com/omniviewdev/omniview/backend/pkg/plugin/metric.ServiceWrapper";function hr(e,t,r){return n.ByName(`${V}.Query`,e,t,d(r,[e,t]))}function et(e,t){return n.ByName(`${V}.QueryAll`,e,d(t,[e]))}function tt(e,t,r){return n.ByName(`${V}.Subscribe`,e,t,d(r,[e,t]))}const dr=Object.freeze(Object.defineProperty({__proto__:null,GetProviders:Xe,GetProvidersForResource:Ke,HasPlugin:lr,ListPlugins:yr,Query:hr,QueryAll:et,Subscribe:tt,Unsubscribe:Ye},Symbol.toStringTag,{value:"Module"}));function Sr(e,t){return n.ByID(3653639550,e,t)}function nt(e,t){return n.ByID(851823419,e,t)}function gr(e){return n.ByID(2991415449,e).then(t=>mr(t))}function rt(e,t,r){return n.ByID(2695679023,e,t,r)}const mr=o.Array(o.Any),$r=Object.freeze(Object.defineProperty({__proto__:null,Delete:Sr,Get:nt,Keys:gr,Set:rt},Symbol.toStringTag,{value:"Module"}));function Br(e){return n.ByID(584261046,e)}function Dr(e){return n.ByID(3098255555,e)}function br(e){return n.ByID(903698361,e)}function Ir(e,t,r){return n.ByID(1235170530,e,t,r).then(i=>Er(i))}function ot(e){return n.ByID(3199298309,e)}function wr(){return n.ByID(2119827301).then(e=>Lr(e))}function vr(e){return n.ByID(2822783534,e).then(t=>ct(t))}function Tr(){return n.ByID(1563865534)}function Pr(){return n.ByID(914742443).then(e=>jr(e))}function Gr(){return n.ByID(3392737293).then(e=>kr(e))}function Cr(e,t,r){return n.ByID(1474486628,e,t,r)}function Rr(e,t,r){return n.ByID(2366942716,e,t,r)}function Ar(e){return n.ByID(4008581935,e)}function it(e){return n.ByID(520255202,e)}function Fr(e,t,r){return n.ByID(958877691,e,t,r)}function Or(e,t,r){return n.ByID(1772958861,e,t,r)}function _r(e,t,r){return n.ByID(728919203,e,t,r)}function Nr(e,t){return n.ByID(1547965995,e,t)}const Er=y.DropResult.createFrom,Lr=y.SettingsState.createFrom,ct=o.Map(o.Any,o.Any),Mr=y.Info.createFrom,jr=o.Array(Mr),kr=o.Map(o.Any,ct),Vr=Object.freeze(Object.defineProperty({__proto__:null,BeginDrag:Br,CancelDrag:Dr,Close:br,EndDrag:Ir,Focus:ot,GetSettingsState:wr,GetState:vr,HideSettings:Tr,List:Pr,ListStates:Gr,MoveDrag:Cr,MoveToPointer:Rr,Open:Ar,OpenSettings:it,ReportViewport:Fr,RespondDrop:Or,SaveState:_r,SetSettingsLocation:Nr},Symbol.toStringTag,{value:"Module"}));exports.Action=$e;exports.Catalog=he;exports.CheckConnection=ie;exports.ClosePortForwardSession=X;exports.CloseSession=Qe;exports.CloseSourceView=Ne;exports.Commit=He;exports.CreateSession=Q;exports.CreateSession$1=We;exports.Enumerate=Se;exports.FindPortForwardSessions=K;exports.Focus=ot;exports.Get=nt;exports.Get$1=de;exports.GetActions=Ae;exports.GetAllConnectionStates=De;exports.GetConnection=ce;exports.GetConnectionMetadata=pe;exports.GetDependencyTree=ke;exports.GetEditorSchemaDocument=Re;exports.GetEditorSchemas=Ce;exports.GetHandler=q;exports.GetNativeTerminalSupport=x;exports.GetPluginMeta=te;exports.GetProviders=Xe;exports.GetProvidersForResource=Ke;exports.GetRelated=je;exports.GetResourceAreaComponent=xe;exports.GetResourceGroups=Pe;exports.GetSchemaFields=Ge;exports.GetSnapshot=Je;exports.GetSourceStates=Ee;exports.GetSubgraph=Ve;exports.ImportConnectionProfile=we;exports.ListAllConnections=se;exports.ListAllPortForwardSessions=Y;exports.ListConnectionProfiles=be;exports.ListConnections=ue;exports.Mutate=me;exports.NativeQuery=ge;exports.OpenNativeSession=W;exports.OpenSettings=it;exports.OpenSourceView=Fe;exports.QueryAll=et;exports.RefreshConnectionMetadata=fe;exports.RefreshSourceView=_e;exports.RemoveConnection=Te;exports.ResetConnectionProfile=ve;exports.ResolveTarget=Be;exports.RetryConnectionSources=Le;exports.RetryFailedPlugin=ne;exports.SaveConnectionProfile=Ie;exports.ScopeValues=Me;exports.Set=rt;exports.StartConnection=ae;exports.StartResourcePortForwardingSession=ee;exports.StopConnection=le;exports.Subscribe=tt;exports.SyncSourceView=Oe;exports.Unsubscribe=Ye;exports.Validate=qe;exports.binding=Mn;exports.client=Gn;exports.encodeRequestJSON=d;exports.exec=wt;exports.graphClient=Rn;exports.logs=sr;exports.metric=dr;exports.networker=At;exports.service=Vr;exports.servicewrapper=$r;exports.servicewrapper$1=ln;exports.servicewrapper$2=Jn;
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.27.3",
5
+ "version": "0.28.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.12.0",
55
+ "@omniviewdev/base-ui": "~0.13.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.12.0",
71
+ "@omniviewdev/base-ui": "~0.13.0",
72
72
  "@tanstack/react-query": "^5.105.0",
73
73
  "react": "^19.3.1",
74
74
  "react-dom": "^19.3.1",
@@ -1,27 +0,0 @@
1
- import { default as React } from 'react';
2
- export type BackgroundOperation = {
3
- id: string;
4
- label: string;
5
- resourceKey: string;
6
- resourceName: string;
7
- namespace?: string;
8
- connectionID: string;
9
- status: 'running' | 'completed' | 'error' | 'cancelled';
10
- progress?: {
11
- ready: number;
12
- desired: number;
13
- };
14
- message?: string;
15
- startedAt: number;
16
- completedAt?: number;
17
- };
18
- export type OperationsContextType = {
19
- operations: BackgroundOperation[];
20
- addOperation: (op: BackgroundOperation) => void;
21
- updateOperation: (id: string, updates: Partial<BackgroundOperation>) => void;
22
- removeOperation: (id: string) => void;
23
- };
24
- export declare const OperationsContext: React.Context<OperationsContextType | undefined>;
25
- export declare const OperationsProvider: React.FC<{
26
- children: React.ReactNode;
27
- }>;
@@ -1 +0,0 @@
1
- export declare const useOperations: () => import('../..').OperationsContextType;
@@ -1,14 +0,0 @@
1
- import { ActionRequest } from '../../resource/v2/domain';
2
- type UseStreamActionOptions = {
3
- pluginID?: string;
4
- };
5
- type StartStreamActionParams = {
6
- request: ActionRequest;
7
- label: string;
8
- };
9
- /** Host-ready open, listener-first attachment and owning cleanup of current actions. */
10
- export declare const useStreamAction: ({ pluginID: explicitPluginID }: UseStreamActionOptions) => {
11
- startStreamAction: ({ request, label }: StartStreamActionParams) => Promise<string>;
12
- cancelStreamAction: (handle: string) => void;
13
- };
14
- export {};
@@ -1 +0,0 @@
1
- export * from './useSnackbar';
@@ -1,26 +0,0 @@
1
- import { default as React, ReactNode } from 'react';
2
- type VariantType = 'default' | 'success' | 'error' | 'warning' | 'info';
3
- type SnackbarContextType = {
4
- notificationCount: number;
5
- showSnackbar(message: string, status: VariantType, icon?: string, details?: string): void;
6
- showSnackbar(options: ShowSnackbarOptions): void;
7
- openNotifications(): void;
8
- };
9
- type SnackbarProviderProps = {
10
- children: ReactNode;
11
- };
12
- type ShowSnackbarOptions = {
13
- message: string;
14
- status: VariantType;
15
- icon?: string;
16
- details?: string;
17
- showOnce?: boolean;
18
- autoHideDuration?: number;
19
- actions?: Array<{
20
- label: string;
21
- onClick: () => void;
22
- }>;
23
- };
24
- export declare const SnackbarProvider: React.FC<SnackbarProviderProps>;
25
- export declare const useSnackbar: () => SnackbarContextType;
26
- export default useSnackbar;
@@ -1 +0,0 @@
1
- "use strict";const o=require("./index-BVi9X4oU.cjs"),y=require("./models-R2rKpSiU.cjs"),n=require("./events-B9wlH6cT.cjs");function d(e,t=[]){let l=0;for(const s of t){if(s.length>65536)throw new RangeError("Request routing byte limit");l+=new TextEncoder().encode(JSON.stringify(s)).length+1}if(l>57344)throw new RangeError("Request routing byte limit");let D=0,b=2,B=0,S=0;const m=[],f=s=>{for(let p=0;p<s.length;p++){const u=s.charCodeAt(p);let g=u<128?1:u<2048?2:3;if(u>=55296&&u<=56319){const w=s.charCodeAt(++p);if(!(w>=56320&&w<=57343))throw new TypeError("Invalid Unicode");g=4}else if(u>=56320&&u<=57343)throw new TypeError("Invalid Unicode");if(D+=g,b+=u===34||u===92?2:g,D>33554432||b>67043328)throw new RangeError("Request JSON byte limit")}m.push(s)},h=s=>{if(s.length>33554432)throw new RangeError("Request JSON byte limit");for(let p=0;p<s.length;p++){const u=s.charCodeAt(p);if(u>=55296&&u<=56319){const g=s.charCodeAt(++p);if(!(g>=56320&&g<=57343))throw new TypeError("Invalid Unicode")}else if(u>=56320&&u<=57343)throw new TypeError("Invalid Unicode")}f(JSON.stringify(s))},a=(s,p)=>{if(++B>262144||p>64)throw new RangeError("Request JSON structural limit");if(s===null){f("null");return}if(typeof s=="string"){h(s);return}if(typeof s=="boolean"){f(s?"true":"false");return}if(typeof s=="number"){if(!Number.isFinite(s))throw new TypeError("Request numbers must be finite");f(Object.is(s,-0)?"-0":JSON.stringify(s));return}if(Array.isArray(s)){f("[");for(let u=0;u<s.length;u++){if(++S>1048576)throw new RangeError("Request JSON field limit");u&&f(","),a(s[u],p+1)}f("]");return}if(typeof s=="object"){f("{");let u=!0;for(const[g,w]of Object.entries(s))if(w!==void 0){if(++S>1048576)throw new RangeError("Request JSON field limit");u||f(","),u=!1,h(g),f(":"),a(w,p+1)}f("}");return}throw new TypeError("Unsupported request JSON value")};return a(e,0),m.join("")}function lt(e){return n.ByID(93318075,e).then(t=>(t[0]=v(t[0]),t[1]=o.ByteSlice(t[1]),t))}function yt(e){return n.ByID(1353297556,e)}function pt(e){return n.ByID(4182196712,e).then(t=>v(t))}function ft(e){return n.ByID(3993344525,e).then(t=>v(t))}function q(e,t){return n.ByID(1779192716,e,t).then(r=>It(r))}function ht(){return n.ByID(4033362541).then(e=>wt(e))}function x(){return n.ByID(3434119522)}function dt(e){return n.ByID(2619212338,e).then(t=>U(t))}function St(e){return n.ByID(1371268636,e).then(t=>v(t))}function gt(e){return n.ByID(3881019319,e)}function mt(){return n.ByID(3006426324).then(e=>vt(e))}function $t(){return n.ByID(265791345).then(e=>Tt(e))}function Bt(e,t,r){return n.ByID(1492965384,e,t,r)}function Dt(e,t){return n.ByID(486465741,e,t)}const bt=y.Session.createFrom,v=o.Nullable(bt),z=y.Handler.createFrom,It=o.Nullable(z),U=o.Map(o.Any,z),wt=o.Map(o.Any,U),vt=o.Array(o.Any),Tt=o.Array(v);function Q(e,t,r){return n.ByName("github.com/omniviewdev/omniview/backend/pkg/plugin/exec.ServiceWrapper.CreateSession",e,t,d(r,[e,t])).then(i=>i===null?null:y.Session.createFrom(i))}function W(e,t,r){return n.ByName("github.com/omniviewdev/omniview/backend/pkg/plugin/exec.ServiceWrapper.OpenNativeSession",e,t,d(r,[e,t]))}const Pt=Object.freeze(Object.defineProperty({__proto__:null,AttachSession:lt,CloseSession:yt,CreateSession:Q,CreateTerminal:pt,DetachSession:ft,GetHandler:q,GetHandlers:ht,GetNativeTerminalSupport:x,GetPluginHandlers:dt,GetSession:St,HasPlugin:gt,ListPlugins:mt,ListSessions:$t,OpenNativeSession:W,ResizeSession:Bt,WriteSession:Dt},Symbol.toStringTag,{value:"Module"}));function X(e){return n.ByID(182596922,e).then(t=>F(t))}function K(e,t,r){return n.ByID(981100722,e,t,r).then(i=>O(i))}function Gt(e){return n.ByID(2157304970,e).then(t=>F(t))}function Ct(e){return n.ByID(650882,e).then(t=>Z(t))}function At(e){return n.ByID(3624690437,e)}function Y(){return n.ByID(2195697754).then(e=>O(e))}function Rt(){return n.ByID(167463150).then(e=>Z(e))}function Ft(e,t){return n.ByID(2090415403,e,t).then(r=>O(r))}const Ot=y.PortForwardSession.createFrom,F=o.Nullable(Ot),O=o.Array(F),Z=o.Array(o.Any);function ee(e,t,r){return n.ByName("github.com/omniviewdev/omniview/backend/pkg/plugin/networker.ServiceWrapper.StartResourcePortForwardingSession",e,t,d(r,[e,t]))}const _t=Object.freeze(Object.defineProperty({__proto__:null,ClosePortForwardSession:X,FindPortForwardSessions:K,GetPortForwardSession:Gt,GetSupportedPortForwardTargets:Ct,HasPlugin:At,ListAllPortForwardSessions:Y,ListPlugins:Rt,ListPortForwardSessions:Ft,StartResourcePortForwardingSession:ee},Symbol.toStringTag,{value:"Module"}));class _{pluginID;running;url;error;supported;pid;constructor(t={}){"pluginID"in t||(this.pluginID=""),"running"in t||(this.running=!1),"url"in t||(this.url=""),"error"in t||(this.error=""),"supported"in t||(this.supported=!1),"pid"in t||(this.pid=0),Object.assign(this,t)}static createFrom(t={}){let r=typeof t=="string"?JSON.parse(t):t;return new _(r)}}function Nt(e){return n.ByID(3150413499,e).then(t=>$(t))}function Et(e){return n.ByID(1152913314,e).then(t=>rn(t))}function te(e){return n.ByID(111194374,e).then(t=>N(t))}function Lt(){return n.ByID(1083754477).then(e=>cn(e))}function Mt(e){return n.ByID(3945933305,e)}function jt(e){return n.ByID(2859775056,e).then(t=>re(t))}function kt(e,t){return n.ByID(2209599792,e,t).then(r=>an(r))}function Vt(e){return n.ByID(3963363730,e).then(t=>re(t))}function Ht(e){return n.ByID(1357029266,e).then(t=>$(t))}function Jt(){return n.ByID(2477486666).then(e=>G(e))}function qt(){return n.ByID(976517756).then(e=>G(e))}function xt(e){return n.ByID(1020548995,e).then(t=>G(t))}function zt(e,t){return n.ByID(2004740384,e,t).then(r=>G(r))}function Ut(){return n.ByID(873697101).then(e=>oe(e))}function Qt(){return n.ByID(637134283).then(e=>yn(e))}function Wt(){return n.ByID(550607756).then(e=>pn(e))}function Xt(e,t){return n.ByID(288660195,e,t).then(r=>$(r))}function Kt(e){return n.ByID(1771013494,e).then(t=>$(t))}function ne(e){return n.ByID(2433379724,e).then(t=>$(t))}function Yt(e,t,r){return n.ByID(2783597264,e,t,r).then(i=>oe(i))}function Zt(e,t){return n.ByID(2179374748,e,t).then(r=>$(r))}function en(e){return n.ByID(1369550929,e).then(t=>$(t))}function tn(e){return n.ByID(3828800061,e).then(t=>$(t))}const $=y.PluginInfo.createFrom,nn=y.DownloadStats.createFrom,rn=o.Nullable(nn),N=y.PluginMeta.createFrom,on=_.createFrom,cn=o.Array(on),sn=y.VersionInfo.createFrom,re=o.Array(sn),un=y.Review.createFrom,an=o.Array(un),G=o.Nullable(N),ln=y.AvailablePlugin.createFrom,oe=o.Array(ln),yn=o.Array(N),pn=o.Array($),fn=Object.freeze(Object.defineProperty({__proto__:null,GetPlugin:Nt,GetPluginDownloadStats:Et,GetPluginMeta:te,GetPluginProfilingStatuses:Lt,GetPluginReadme:Mt,GetPluginReleaseHistory:jt,GetPluginReviews:kt,GetPluginVersions:Vt,InstallDevPluginFromPath:Ht,InstallFromPathPrompt:Jt,InstallInDevMode:qt,InstallPluginFromPath:xt,InstallPluginVersion:zt,ListAvailablePlugins:Ut,ListPluginMetas:Qt,ListPlugins:Wt,LoadPlugin:Xt,ReloadPlugin:Kt,RetryFailedPlugin:ne,SearchPlugins:Yt,SetPluginEnabled:Zt,UninstallPlugin:en,UnlinkDevPlugin:tn},Symbol.toStringTag,{value:"Module"}));function ie(e,t){return n.ByID(1688967279,e,t).then(r=>ye(r))}function ce(e,t){return n.ByID(950535743,e,t).then(r=>E(r))}function hn(e){return n.ByID(854008408,e)}function se(){return n.ByID(1598984489).then(e=>gn(e))}function ue(e){return n.ByID(1775572154,e).then(t=>L(t))}function dn(){return n.ByID(3217612415).then(e=>mn(e))}function Sn(e){return n.ByID(2037329938,e).then(t=>L(t))}function ae(e,t){return n.ByID(3276991559,e,t).then(r=>ye(r))}function le(e,t){return n.ByID(794258089,e,t).then(r=>E(r))}const ye=y.ConnectionStatus.createFrom,E=y.Connection.createFrom,L=o.Array(E),gn=o.Map(o.Any,L),mn=o.Array(o.Any),$n="github.com/omniviewdev/omniview/backend/pkg/plugin/resource.ServiceWrapper";function c(e,...t){return n.ByName(`${$n}.${e}`,...t)}const Bn=e=>c("Features",e),pe=(e,t)=>c("GetConnectionMetadata",e,t),fe=(e,t)=>c("RefreshConnectionMetadata",e,t),he=(e,t)=>c("Catalog",e,t),de=(e,t)=>c("Get",e,t),Se=(e,t)=>c("Enumerate",e,t),ge=(e,t)=>c("NativeQuery",e,d(t,[e])),me=(e,t)=>c("Mutate",e,d(t,[e])),$e=(e,t)=>c("Action",e,d(t,[e])),Be=(e,t)=>c("ResolveTarget",e,t),Dn=(e,t)=>c("ResolveReference",e,t),bn=(e,t,r)=>c("GetSchemaDocument",e,t,r),De=()=>c("GetAllConnectionStates"),be=e=>c("ListConnectionProfiles",e),Ie=(e,t,r)=>c("SaveConnectionProfile",e,d(t,[e]),r??null),we=(e,t)=>c("ImportConnectionProfile",e,t),ve=(e,t)=>c("ResetConnectionProfile",e,t),Te=(e,t)=>c("RemoveConnection",e,t),Pe=(e,t)=>c("GetResourceGroups",e,t),In=(e,t,r)=>c("GetResourceDefinition",e,t,r),Ge=(e,t)=>c("GetSchemaFields",e,t),Ce=(e,t)=>c("GetEditorSchemas",e,t),Ae=(e,t,r)=>c("GetEditorSchemaDocument",e,t,r),wn=(e,t,r)=>c("GetRelationships",e,t,r),vn=(e,t)=>c("ResolveRelationships",e,t),Tn=(e,t,r)=>c("GetHealth",e,d({request:t,body:r},[e])),Pn=(e,t,r)=>c("GetResourceEvents",e,t,r),Re=(e,t,r)=>c("GetActions",e,t,r),Fe=(e,t)=>c("StreamAction",e,d(t,[e])),Oe=e=>c("AttachStreamAction",e),_e=e=>c("CancelStreamAction",e),Ne=(e,t)=>c("OpenSourceView",e,t),Ee=(e,t)=>c("SyncSourceView",e,t),Le=(e,t)=>c("RefreshSourceView",e,t),Me=(e,t)=>c("CloseSourceView",e,t),je=(e,t)=>c("GetSourceStates",e,t),ke=(e,t)=>c("RetryConnectionSources",e,t),Ve=(e,t,r)=>c("ScopeValues",e,t,r),Gn=Object.freeze(Object.defineProperty({__proto__:null,Action:$e,AttachStreamAction:Oe,CancelStreamAction:_e,Catalog:he,CheckConnection:ie,CloseSourceView:Me,Enumerate:Se,Features:Bn,Get:de,GetActions:Re,GetAllConnectionStates:De,GetConnection:ce,GetConnectionMetadata:pe,GetEditorSchemaDocument:Ae,GetEditorSchemas:Ce,GetHealth:Tn,GetRelationships:wn,GetResourceDefinition:In,GetResourceEvents:Pn,GetResourceGroups:Pe,GetSchemaDocument:bn,GetSchemaFields:Ge,GetSourceStates:je,HasPlugin:hn,ImportConnectionProfile:we,ListAllConnections:se,ListConnectionProfiles:be,ListConnections:ue,ListPlugins:dn,LoadConnections:Sn,Mutate:me,NativeQuery:ge,OpenSourceView:Ne,RefreshConnectionMetadata:fe,RefreshSourceView:Le,RemoveConnection:Te,ResetConnectionProfile:ve,ResolveReference:Dn,ResolveRelationships:vn,ResolveTarget:Be,RetryConnectionSources:ke,SaveConnectionProfile:Ie,ScopeValues:Ve,StartConnection:ae,StopConnection:le,StreamAction:Fe,SyncSourceView:Ee},Symbol.toStringTag,{value:"Module"})),C="github.com/omniviewdev/omniview/backend/pkg/plugin/resource.GraphService";function He(e,t,r,i,l){return n.ByName(`${C}.GetRelated`,e,t,r,i,l)}function Cn(e,t,r,i,l){return n.ByName(`${C}.GetRelationshipChain`,e,t,r,i,l)}function Je(e,t,r,i){return n.ByName(`${C}.GetDependencyTree`,e,t,r,i)}function qe(e,t,r,i,l){return n.ByName(`${C}.GetSubgraph`,e,t,r,i,l)}const An=Object.freeze(Object.defineProperty({__proto__:null,GetDependencyTree:Je,GetRelated:He,GetRelationshipChain:Cn,GetSubgraph:qe},Symbol.toStringTag,{value:"Module"}));class M{snapshot;applied;uncertain;message;constructor(t={}){"snapshot"in t||(this.snapshot=new T),"applied"in t||(this.applied=!1),"uncertain"in t||(this.uncertain=!1),"message"in t||(this.message=""),Object.assign(this,t)}static createFrom(t={}){const r=Rn;let i=typeof t=="string"?JSON.parse(t):t;return"snapshot"in i&&(i.snapshot=r(i.snapshot)),new M(i)}}class A{kind;pluginId;constructor(t={}){"kind"in t||(this.kind=""),Object.assign(this,t)}static createFrom(t={}){let r=typeof t=="string"?JSON.parse(t):t;return new A(r)}}class T{scope;categories;constructor(t={}){"scope"in t||(this.scope=new A),"categories"in t||(this.categories={}),Object.assign(this,t)}static createFrom(t={}){const r=Fn,i=P;let l=typeof t=="string"?JSON.parse(t):t;return"scope"in l&&(l.scope=r(l.scope)),"categories"in l&&(l.categories=i(l.categories)),new T(l)}}const Rn=T.createFrom,Fn=A.createFrom;var P=function e(...t){return P===e&&(P=_n),P(...t)};const On=y.Category.createFrom,_n=o.Map(o.Any,On);function xe(e,t){return n.ByID(1766083910,e,t).then(r=>Nn(r))}function ze(e){return n.ByID(3969198041,e).then(t=>En(t))}function Ue(e,t,r){return n.ByID(3964153809,e,t,r).then(i=>Ln(i))}const Nn=M.createFrom,En=T.createFrom,Ln=y.ValidationResult.createFrom,Mn=Object.freeze(Object.defineProperty({__proto__:null,Commit:xe,GetSnapshot:ze,Validate:Ue},Symbol.toStringTag,{value:"Module"}));function jn(e){return n.ByID(2106300110,e).then(t=>Vn(t))}function Qe(e){return n.ByID(765209827,e).then(t=>Hn(t))}function kn(e){return n.ByID(2355436169,e).then(t=>Xe(t))}const We=y.ResourceComponent.createFrom,Xe=o.Array(We),Vn=o.Map(o.Any,Xe),Hn=o.Nullable(We),Jn=Object.freeze(Object.defineProperty({__proto__:null,GetPluginComponents:jn,GetResourceAreaComponent:Qe,GetResourceComponents:kn},Symbol.toStringTag,{value:"Module"})),I=new Map,qn=1e4,H=8*1024*1024,xn=new TextEncoder,zn=100;function J(e){const t=Array.isArray(e)&&e.length===1&&typeof e[0]=="string"?e[0]:e;return typeof t=="string"?JSON.parse(t):t}function R(e,t){const r=n.On(`core/logs/lines/${e}`,i=>t.onLines(i.data));try{const i=n.On(`core/logs/event/${e}`,l=>t.onEvent(l.data));return()=>{r(),i()}}catch(i){throw r(),i}}function Un(e){if(I.has(e))throw new Error("Log session ID is already in use.");const t=[];let r=0;const i=[],l=new Map;let D=0;const b=R(e,{onLines(h){try{const a=J(h);if(!Array.isArray(a))return;for(const s of a){const p=xn.encode(JSON.stringify(s)).byteLength;for(;t.length&&(t.length>=qn||r+p>H);)r-=t.shift().bytes;p<=H&&(t.push({data:s,bytes:p}),r+=p)}}catch(a){console.error("Failed to parse log lines:",a)}},onEvent(h){try{const a=J(h),s={data:a,order:D++};a&&typeof a=="object"&&"source_id"in a&&a.source_id===""&&"type"in a&&typeof a.type=="number"&&Number.isInteger(a.type)&&a.type>=0&&a.type<=6?l.set(a.type,s):(i.push(s),i.length>zn&&i.shift())}catch(a){console.error("Failed to parse log event:",a)}}});let B;const S=()=>{clearTimeout(B),b(),I.get(e)===f&&I.delete(e),t.length=0,r=0,i.length=0,l.clear()},m=()=>{I.get(e)===f&&(B??=setTimeout(S,6e4))},f={connect(h){const a=t.map(u=>u.data),s=[...i,...l.values()].sort((u,g)=>u.order-g.order);S();const p=R(e,h);try{a.length&&h.onLines(a);for(const u of s)h.onEvent(u.data);return p}catch(u){throw p(),u}}};return I.set(e,f),{release:S,settled:m}}function Qn(e,t){return I.get(e)?.connect(t)??R(e,t)}function Ke(e){return n.ByID(2776241946,e)}function Wn(e){return n.ByID(1474987050,e).then(t=>j(t))}function Xn(e){return n.ByID(3156347865,e).then(t=>or(t))}function Kn(e){return n.ByID(1444002509,e)}function Yn(){return n.ByID(3104582886).then(e=>ir(e))}function Zn(){return n.ByID(2249742267).then(e=>cr(e))}function er(e,t){return n.ByID(1212190993,e,t)}function tr(e,t){return n.ByID(2177127885,e,t).then(r=>j(r))}const nr=y.LogSession.createFrom,j=o.Nullable(nr),rr=y.Handler$1.createFrom,or=o.Array(rr),ir=o.Array(o.Any),cr=o.Array(j);function Ye(e,t,r){const i=r.session_id??crypto.randomUUID(),l=d({...r,session_id:i},[e,t]),{release:D,settled:b}=Un(i);let B;const S=()=>{clearTimeout(B),D()};try{const m=n.ByName("github.com/omniviewdev/omniview/backend/pkg/plugin/logs.ServiceWrapper.CreateSession",e,t,l),f=new Error("Log session creation timed out after 120 seconds.");return B=setTimeout(()=>{m.cancel(f)},12e4),m.then(h=>{if(clearTimeout(B),!h||h.id!==i)throw D(),new Error("Log provider returned an invalid session.");return b(),h},h=>{throw S(),h?.cause===f?f:h},S)}catch(m){throw S(),m}}const sr=Object.freeze(Object.defineProperty({__proto__:null,CloseSession:Ke,CreateSession:Ye,GetSession:Wn,GetSupportedResources:Xn,HasPlugin:Kn,ListPlugins:Yn,ListSessions:Zn,SendCommand:er,SubscribeSessionEvents:Qn,UpdateSessionOptions:tr},Symbol.toStringTag,{value:"Module"}));class k{plugin_id;provider_id;name;icon;description;handlers;constructor(t={}){"plugin_id"in t||(this.plugin_id=""),"provider_id"in t||(this.provider_id=""),"name"in t||(this.name=""),"icon"in t||(this.icon=""),"description"in t||(this.description=""),"handlers"in t||(this.handlers=[]),Object.assign(this,t)}static createFrom(t={}){const r=ar;let i=typeof t=="string"?JSON.parse(t):t;return"handlers"in i&&(i.handlers=r(i.handlers)),new k(i)}}const ur=y.Handler$2.createFrom,ar=o.Array(ur);function Ze(){return n.ByID(3919346639).then(e=>nt(e))}function et(e){return n.ByID(3953821778,e).then(t=>nt(t))}function lr(e){return n.ByID(1815388456,e)}function yr(){return n.ByID(2730149903).then(e=>fr(e))}function tt(e){return n.ByID(3994236150,e)}const pr=k.createFrom,nt=o.Array(pr),fr=o.Array(o.Any);y.QueryResponse.createFrom;const V="github.com/omniviewdev/omniview/backend/pkg/plugin/metric.ServiceWrapper";function hr(e,t,r){return n.ByName(`${V}.Query`,e,t,d(r,[e,t]))}function rt(e,t){return n.ByName(`${V}.QueryAll`,e,d(t,[e]))}function ot(e,t,r){return n.ByName(`${V}.Subscribe`,e,t,d(r,[e,t]))}const dr=Object.freeze(Object.defineProperty({__proto__:null,GetProviders:Ze,GetProvidersForResource:et,HasPlugin:lr,ListPlugins:yr,Query:hr,QueryAll:rt,Subscribe:ot,Unsubscribe:tt},Symbol.toStringTag,{value:"Module"}));function Sr(e,t){return n.ByID(3653639550,e,t)}function it(e,t){return n.ByID(851823419,e,t)}function gr(e){return n.ByID(2991415449,e).then(t=>mr(t))}function ct(e,t,r){return n.ByID(2695679023,e,t,r)}const mr=o.Array(o.Any),$r=Object.freeze(Object.defineProperty({__proto__:null,Delete:Sr,Get:it,Keys:gr,Set:ct},Symbol.toStringTag,{value:"Module"}));function Br(e){return n.ByID(584261046,e)}function Dr(e){return n.ByID(3098255555,e)}function br(e){return n.ByID(903698361,e)}function Ir(e,t,r){return n.ByID(1235170530,e,t,r).then(i=>Er(i))}function st(e){return n.ByID(3199298309,e)}function wr(){return n.ByID(2119827301).then(e=>Lr(e))}function vr(e){return n.ByID(2822783534,e).then(t=>at(t))}function Tr(){return n.ByID(1563865534)}function Pr(){return n.ByID(914742443).then(e=>jr(e))}function Gr(){return n.ByID(3392737293).then(e=>kr(e))}function Cr(e,t,r){return n.ByID(1474486628,e,t,r)}function Ar(e,t,r){return n.ByID(2366942716,e,t,r)}function Rr(e){return n.ByID(4008581935,e)}function ut(e){return n.ByID(520255202,e)}function Fr(e,t,r){return n.ByID(958877691,e,t,r)}function Or(e,t,r){return n.ByID(1772958861,e,t,r)}function _r(e,t,r){return n.ByID(728919203,e,t,r)}function Nr(e,t){return n.ByID(1547965995,e,t)}const Er=y.DropResult.createFrom,Lr=y.SettingsState.createFrom,at=o.Map(o.Any,o.Any),Mr=y.Info.createFrom,jr=o.Array(Mr),kr=o.Map(o.Any,at),Vr=Object.freeze(Object.defineProperty({__proto__:null,BeginDrag:Br,CancelDrag:Dr,Close:br,EndDrag:Ir,Focus:st,GetSettingsState:wr,GetState:vr,HideSettings:Tr,List:Pr,ListStates:Gr,MoveDrag:Cr,MoveToPointer:Ar,Open:Rr,OpenSettings:ut,ReportViewport:Fr,RespondDrop:Or,SaveState:_r,SetSettingsLocation:Nr},Symbol.toStringTag,{value:"Module"}));exports.Action=$e;exports.AttachStreamAction=Oe;exports.CancelStreamAction=_e;exports.Catalog=he;exports.CheckConnection=ie;exports.ClosePortForwardSession=X;exports.CloseSession=Ke;exports.CloseSourceView=Me;exports.Commit=xe;exports.CreateSession=Q;exports.CreateSession$1=Ye;exports.Enumerate=Se;exports.FindPortForwardSessions=K;exports.Focus=st;exports.Get=it;exports.Get$1=de;exports.GetActions=Re;exports.GetAllConnectionStates=De;exports.GetConnection=ce;exports.GetConnectionMetadata=pe;exports.GetDependencyTree=Je;exports.GetEditorSchemaDocument=Ae;exports.GetEditorSchemas=Ce;exports.GetHandler=q;exports.GetNativeTerminalSupport=x;exports.GetPluginMeta=te;exports.GetProviders=Ze;exports.GetProvidersForResource=et;exports.GetRelated=He;exports.GetResourceAreaComponent=Qe;exports.GetResourceGroups=Pe;exports.GetSchemaFields=Ge;exports.GetSnapshot=ze;exports.GetSourceStates=je;exports.GetSubgraph=qe;exports.ImportConnectionProfile=we;exports.ListAllConnections=se;exports.ListAllPortForwardSessions=Y;exports.ListConnectionProfiles=be;exports.ListConnections=ue;exports.Mutate=me;exports.NativeQuery=ge;exports.OpenNativeSession=W;exports.OpenSettings=ut;exports.OpenSourceView=Ne;exports.QueryAll=rt;exports.RefreshConnectionMetadata=fe;exports.RefreshSourceView=Le;exports.RemoveConnection=Te;exports.ResetConnectionProfile=ve;exports.ResolveTarget=Be;exports.RetryConnectionSources=ke;exports.RetryFailedPlugin=ne;exports.SaveConnectionProfile=Ie;exports.ScopeValues=Ve;exports.Set=ct;exports.StartConnection=ae;exports.StartResourcePortForwardingSession=ee;exports.StopConnection=le;exports.StreamAction=Fe;exports.Subscribe=ot;exports.SyncSourceView=Ee;exports.Unsubscribe=tt;exports.Validate=Ue;exports.binding=Mn;exports.client=Gn;exports.exec=Pt;exports.graphClient=An;exports.logs=sr;exports.metric=dr;exports.networker=_t;exports.service=Vr;exports.servicewrapper=$r;exports.servicewrapper$1=fn;exports.servicewrapper$2=Jn;