@omniviewdev/runtime 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var b=Object.defineProperty;var w=(t,e,i)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var r=(t,e,i)=>w(t,typeof e!="symbol"?e+"":e,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./graphservice-Cb7rr7SB.cjs"),a=require("./index-D_aIcqH0.cjs"),n=require("./calls-DZctVyoQ.cjs"),u=require("./models-8-4Ny_ft.cjs");function B(t){return n.ByID(3503478684,t)}const F=Object.freeze(Object.defineProperty({__proto__:null,DetectLanguage:B},Symbol.toStringTag,{value:"Module"}));function T(t,e){return n.ByID(2691208406,t,e)}function O(t,e){return n.ByID(3932965591,t,e)}function _(t,e){return n.ByID(1686862755,t,e)}function j(t,e,i){return n.ByID(3705442919,t,e,i)}function A(t){return n.ByID(3024854267,t)}function C(t){return n.ByID(3423289677,t)}function E(t){return n.ByID(158417611,t)}function L(t){return n.ByID(3413815733,t)}function M(t,e){return n.ByID(2047870999,t,e)}const N=Object.freeze(Object.defineProperty({__proto__:null,Debug:T,Error:O,Info:_,Log:j,ReadLog:A,ReportStartupReady:C,StartTail:E,StopTail:L,Warn:M},Symbol.toStringTag,{value:"Module"}));function k(t,e){return n.ByID(712656304,t,e).then(i=>W(i))}function P(t){return n.ByID(4153226260,t).then(e=>l(e))}function R(t){return n.ByID(1859413816,t)}function G(){return n.ByID(2707386443).then(t=>Z(t))}function J(t){return n.ByID(2381063937,t)}function x(t){return n.ByID(123659362,t).then(e=>l(e))}function q(t){return n.ByID(709599671,t).then(e=>l(e))}function z(t,e){return n.ByID(2105869281,t,e).then(i=>l(i))}function U(t){return n.ByID(1371062537,t)}const V=u.LogEntry.createFrom,W=a.Array(V),l=u.DevServerState.createFrom,Z=a.Array(l),H=Object.freeze(Object.defineProperty({__proto__:null,GetDevServerLogs:k,GetDevServerState:P,IsManaged:R,ListDevServerStates:G,RebuildPlugin:J,RestartDevServer:x,StartDevServer:q,StartDevServerForPath:z,StopDevServer:U},Symbol.toStringTag,{value:"Module"}));function K(t,e){return n.ByID(1867216983,t,e).then(i=>S(i))}function Q(){return n.ByID(3418650705).then(t=>te(t))}function X(t,e){return n.ByID(4138610615,t,e).then(i=>S(i))}function Y(t){return n.ByID(3055914536,t)}function $(t){return n.ByID(1502487629,t)}const ee=u.LogEntry$1.createFrom,S=a.Array(ee),te=a.Array(a.Any),re=Object.freeze(Object.defineProperty({__proto__:null,GetLogs:K,ListStreams:Q,SearchLogs:X,Subscribe:Y,Unsubscribe:$},Symbol.toStringTag,{value:"Module"}));class p{constructor(e={}){r(this,"browser");r(this,"vite");r(this,"hmr");r(this,"mcp");r(this,"control");r(this,"health");"browser"in e||(this.browser=null),"vite"in e||(this.vite=null),"hmr"in e||(this.hmr=null),"mcp"in e||(this.mcp=null),"control"in e||(this.control=null),"health"in e||(this.health=null),Object.assign(this,e)}static createFrom(e={}){let i=typeof e=="string"?JSON.parse(e):e;return new p(i)}}class y{constructor(e={}){r(this,"code");r(this,"message");r(this,"details");"code"in e||(this.code=""),"message"in e||(this.message=""),Object.assign(this,e)}static createFrom(e={}){const i=ne;let o=typeof e=="string"?JSON.parse(e):e;return"details"in o&&(o.details=i(o.details)),new y(o)}}class h{constructor(e={}){r(this,"schemaVersion");r(this,"workspaceID");r(this,"instanceID");r(this,"generation");r(this,"kind");r(this,"channel");r(this,"displayName");r(this,"stateRoot");r(this,"process");r(this,"version");r(this,"commit");r(this,"repositories");r(this,"endpoints");r(this,"plugins");r(this,"readiness");r(this,"lastError");r(this,"startedAt");"schemaVersion"in e||(this.schemaVersion=0),"workspaceID"in e||(this.workspaceID=""),"instanceID"in e||(this.instanceID=""),"generation"in e||(this.generation=""),"kind"in e||(this.kind=""),"channel"in e||(this.channel=""),"displayName"in e||(this.displayName=""),"stateRoot"in e||(this.stateRoot=""),"process"in e||(this.process=new f),"version"in e||(this.version=""),"commit"in e||(this.commit=""),"repositories"in e||(this.repositories=[]),"endpoints"in e||(this.endpoints=new p),"plugins"in e||(this.plugins=[]),"readiness"in e||(this.readiness=""),"startedAt"in e||(this.startedAt="0001-01-01T00:00:00.000Z"),Object.assign(this,e)}static createFrom(e={}){const i=ie,o=ae,m=oe,v=le,I=D;let s=typeof e=="string"?JSON.parse(e):e;return"process"in s&&(s.process=i(s.process)),"repositories"in s&&(s.repositories=o(s.repositories)),"endpoints"in s&&(s.endpoints=m(s.endpoints)),"plugins"in s&&(s.plugins=v(s.plugins)),"lastError"in s&&(s.lastError=I(s.lastError)),new h(s)}}class d{constructor(e={}){r(this,"id");r(this,"version");r(this,"source");r(this,"generation");r(this,"mode");r(this,"buildStatus");r(this,"viteStatus");r(this,"rpcStatus");r(this,"controllerStatus");r(this,"operationID");r(this,"lastError");"id"in e||(this.id=""),"version"in e||(this.version=""),"source"in e||(this.source=""),"generation"in e||(this.generation=""),"mode"in e||(this.mode=""),"buildStatus"in e||(this.buildStatus=""),"viteStatus"in e||(this.viteStatus=""),"rpcStatus"in e||(this.rpcStatus=""),"controllerStatus"in e||(this.controllerStatus=""),Object.assign(this,e)}static createFrom(e={}){const i=D;let o=typeof e=="string"?JSON.parse(e):e;return"lastError"in o&&(o.lastError=i(o.lastError)),new d(o)}}class f{constructor(e={}){r(this,"pid");r(this,"startIdentity");r(this,"executable");r(this,"workspaceID");r(this,"generation");r(this,"role");r(this,"source");"pid"in e||(this.pid=0),"startIdentity"in e||(this.startIdentity=""),"executable"in e||(this.executable=""),"workspaceID"in e||(this.workspaceID=""),"generation"in e||(this.generation=""),"role"in e||(this.role=""),Object.assign(this,e)}static createFrom(e={}){let i=typeof e=="string"?JSON.parse(e):e;return new f(i)}}class g{constructor(e={}){r(this,"id");r(this,"path");r(this,"ref");r(this,"commit");"id"in e||(this.id=""),"path"in e||(this.path=""),"ref"in e||(this.ref=""),"commit"in e||(this.commit=""),Object.assign(this,e)}static createFrom(e={}){let i=typeof e=="string"?JSON.parse(e):e;return new g(i)}}const ne=a.Map(a.Any,a.Any),ie=f.createFrom,se=g.createFrom,ae=a.Array(se),oe=p.createFrom,ce=d.createFrom,le=a.Array(ce),pe=y.createFrom,D=a.Nullable(pe);function fe(){return n.ByID(678226073).then(t=>ge(t))}function ue(){return n.ByID(1706570792)}function ye(t){return n.ByID(2957909098,t).then(e=>Se(e))}function he(t){return n.ByID(473489213,t)}function de(t,e){return n.ByID(3778694836,t,e)}const ge=h.createFrom,Se=a.Array(a.Any);exports.DataClient=c.servicewrapper$9;exports.ExecClient=c.servicewrapper;exports.GraphClient=c.graphservice;exports.LogsClient=c.servicewrapper$7;exports.MetricClient=c.servicewrapper$8;exports.NetworkerClient=c.servicewrapper$1;exports.PluginManager=c.servicewrapper$2;exports.ResourceClient=c.servicewrapper$3;exports.SettingsClient=c.servicewrapper$4;exports.SettingsProvider=c.servicewrapper$5;exports.UIClient=c.servicewrapper$6;exports.DevServerManager=H;exports.DiagnosticsClient=N;exports.GetInstanceInfo=fe;exports.GetOperatingSystem=ue;exports.OpenFileSelectionDialog=ye;exports.PluginLogManager=re;exports.SaveFileDialog=he;exports.UtilsClient=F;exports.WriteFileContent=de;
1
+ "use strict";var b=Object.defineProperty;var w=(t,e,i)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var r=(t,e,i)=>w(t,typeof e!="symbol"?e+"":e,i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./graphservice-CWIVejHl.cjs"),a=require("./index-D_aIcqH0.cjs"),n=require("./calls-DUhq86Ki.cjs"),u=require("./models-8-4Ny_ft.cjs");function B(t){return n.ByID(3503478684,t)}const F=Object.freeze(Object.defineProperty({__proto__:null,DetectLanguage:B},Symbol.toStringTag,{value:"Module"}));function T(t,e){return n.ByID(2691208406,t,e)}function O(t,e){return n.ByID(3932965591,t,e)}function _(t,e){return n.ByID(1686862755,t,e)}function j(t,e,i){return n.ByID(3705442919,t,e,i)}function A(t){return n.ByID(3024854267,t)}function C(t){return n.ByID(3423289677,t)}function E(t){return n.ByID(158417611,t)}function L(t){return n.ByID(3413815733,t)}function M(t,e){return n.ByID(2047870999,t,e)}const N=Object.freeze(Object.defineProperty({__proto__:null,Debug:T,Error:O,Info:_,Log:j,ReadLog:A,ReportStartupReady:C,StartTail:E,StopTail:L,Warn:M},Symbol.toStringTag,{value:"Module"}));function k(t,e){return n.ByID(712656304,t,e).then(i=>W(i))}function P(t){return n.ByID(4153226260,t).then(e=>l(e))}function R(t){return n.ByID(1859413816,t)}function G(){return n.ByID(2707386443).then(t=>Z(t))}function J(t){return n.ByID(2381063937,t)}function x(t){return n.ByID(123659362,t).then(e=>l(e))}function q(t){return n.ByID(709599671,t).then(e=>l(e))}function z(t,e){return n.ByID(2105869281,t,e).then(i=>l(i))}function U(t){return n.ByID(1371062537,t)}const V=u.LogEntry.createFrom,W=a.Array(V),l=u.DevServerState.createFrom,Z=a.Array(l),H=Object.freeze(Object.defineProperty({__proto__:null,GetDevServerLogs:k,GetDevServerState:P,IsManaged:R,ListDevServerStates:G,RebuildPlugin:J,RestartDevServer:x,StartDevServer:q,StartDevServerForPath:z,StopDevServer:U},Symbol.toStringTag,{value:"Module"}));function K(t,e){return n.ByID(1867216983,t,e).then(i=>S(i))}function Q(){return n.ByID(3418650705).then(t=>te(t))}function X(t,e){return n.ByID(4138610615,t,e).then(i=>S(i))}function Y(t){return n.ByID(3055914536,t)}function $(t){return n.ByID(1502487629,t)}const ee=u.LogEntry$1.createFrom,S=a.Array(ee),te=a.Array(a.Any),re=Object.freeze(Object.defineProperty({__proto__:null,GetLogs:K,ListStreams:Q,SearchLogs:X,Subscribe:Y,Unsubscribe:$},Symbol.toStringTag,{value:"Module"}));class p{constructor(e={}){r(this,"browser");r(this,"vite");r(this,"hmr");r(this,"mcp");r(this,"control");r(this,"health");"browser"in e||(this.browser=null),"vite"in e||(this.vite=null),"hmr"in e||(this.hmr=null),"mcp"in e||(this.mcp=null),"control"in e||(this.control=null),"health"in e||(this.health=null),Object.assign(this,e)}static createFrom(e={}){let i=typeof e=="string"?JSON.parse(e):e;return new p(i)}}class y{constructor(e={}){r(this,"code");r(this,"message");r(this,"details");"code"in e||(this.code=""),"message"in e||(this.message=""),Object.assign(this,e)}static createFrom(e={}){const i=ne;let o=typeof e=="string"?JSON.parse(e):e;return"details"in o&&(o.details=i(o.details)),new y(o)}}class h{constructor(e={}){r(this,"schemaVersion");r(this,"workspaceID");r(this,"instanceID");r(this,"generation");r(this,"kind");r(this,"channel");r(this,"displayName");r(this,"stateRoot");r(this,"process");r(this,"version");r(this,"commit");r(this,"repositories");r(this,"endpoints");r(this,"plugins");r(this,"readiness");r(this,"lastError");r(this,"startedAt");"schemaVersion"in e||(this.schemaVersion=0),"workspaceID"in e||(this.workspaceID=""),"instanceID"in e||(this.instanceID=""),"generation"in e||(this.generation=""),"kind"in e||(this.kind=""),"channel"in e||(this.channel=""),"displayName"in e||(this.displayName=""),"stateRoot"in e||(this.stateRoot=""),"process"in e||(this.process=new f),"version"in e||(this.version=""),"commit"in e||(this.commit=""),"repositories"in e||(this.repositories=[]),"endpoints"in e||(this.endpoints=new p),"plugins"in e||(this.plugins=[]),"readiness"in e||(this.readiness=""),"startedAt"in e||(this.startedAt="0001-01-01T00:00:00.000Z"),Object.assign(this,e)}static createFrom(e={}){const i=ie,o=ae,m=oe,v=le,I=D;let s=typeof e=="string"?JSON.parse(e):e;return"process"in s&&(s.process=i(s.process)),"repositories"in s&&(s.repositories=o(s.repositories)),"endpoints"in s&&(s.endpoints=m(s.endpoints)),"plugins"in s&&(s.plugins=v(s.plugins)),"lastError"in s&&(s.lastError=I(s.lastError)),new h(s)}}class d{constructor(e={}){r(this,"id");r(this,"version");r(this,"source");r(this,"generation");r(this,"mode");r(this,"buildStatus");r(this,"viteStatus");r(this,"rpcStatus");r(this,"controllerStatus");r(this,"operationID");r(this,"lastError");"id"in e||(this.id=""),"version"in e||(this.version=""),"source"in e||(this.source=""),"generation"in e||(this.generation=""),"mode"in e||(this.mode=""),"buildStatus"in e||(this.buildStatus=""),"viteStatus"in e||(this.viteStatus=""),"rpcStatus"in e||(this.rpcStatus=""),"controllerStatus"in e||(this.controllerStatus=""),Object.assign(this,e)}static createFrom(e={}){const i=D;let o=typeof e=="string"?JSON.parse(e):e;return"lastError"in o&&(o.lastError=i(o.lastError)),new d(o)}}class f{constructor(e={}){r(this,"pid");r(this,"startIdentity");r(this,"executable");r(this,"workspaceID");r(this,"generation");r(this,"role");r(this,"source");"pid"in e||(this.pid=0),"startIdentity"in e||(this.startIdentity=""),"executable"in e||(this.executable=""),"workspaceID"in e||(this.workspaceID=""),"generation"in e||(this.generation=""),"role"in e||(this.role=""),Object.assign(this,e)}static createFrom(e={}){let i=typeof e=="string"?JSON.parse(e):e;return new f(i)}}class g{constructor(e={}){r(this,"id");r(this,"path");r(this,"ref");r(this,"commit");"id"in e||(this.id=""),"path"in e||(this.path=""),"ref"in e||(this.ref=""),"commit"in e||(this.commit=""),Object.assign(this,e)}static createFrom(e={}){let i=typeof e=="string"?JSON.parse(e):e;return new g(i)}}const ne=a.Map(a.Any,a.Any),ie=f.createFrom,se=g.createFrom,ae=a.Array(se),oe=p.createFrom,ce=d.createFrom,le=a.Array(ce),pe=y.createFrom,D=a.Nullable(pe);function fe(){return n.ByID(678226073).then(t=>ge(t))}function ue(){return n.ByID(1706570792)}function ye(t){return n.ByID(2957909098,t).then(e=>Se(e))}function he(t){return n.ByID(473489213,t)}function de(t,e){return n.ByID(3778694836,t,e)}const ge=h.createFrom,Se=a.Array(a.Any);exports.DataClient=c.servicewrapper$9;exports.ExecClient=c.servicewrapper;exports.GraphClient=c.graphservice;exports.LogsClient=c.servicewrapper$7;exports.MetricClient=c.servicewrapper$8;exports.NetworkerClient=c.servicewrapper$1;exports.PluginManager=c.servicewrapper$2;exports.ResourceClient=c.servicewrapper$3;exports.SettingsClient=c.servicewrapper$4;exports.SettingsProvider=c.servicewrapper$5;exports.UIClient=c.servicewrapper$6;exports.DevServerManager=H;exports.DiagnosticsClient=N;exports.GetInstanceInfo=fe;exports.GetOperatingSystem=ue;exports.OpenFileSelectionDialog=ye;exports.PluginLogManager=re;exports.SaveFileDialog=he;exports.UtilsClient=F;exports.WriteFileContent=de;
package/dist/api.js CHANGED
@@ -1,9 +1,9 @@
1
1
  var D = Object.defineProperty;
2
2
  var F = (e, t, r) => t in e ? D(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var n = (e, t, r) => F(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { a4 as jt, W as Et, _ as Lt, a2 as Ct, a3 as Nt, X as Mt, Y as kt, Z as Pt, $ as Rt, a0 as xt, a1 as At } from "./graphservice-DloOtC_7.js";
4
+ import { a6 as jt, Y as Et, a0 as Lt, a4 as Ct, a5 as Nt, Z as Mt, _ as kt, $ as Pt, a1 as Rt, a2 as xt, a3 as At } from "./graphservice-BKFw5MxQ.js";
5
5
  import { A as o, a as l, N as T, M as O } from "./index-D2mKAO8s.js";
6
- import { B as i } from "./calls-BmUnjINC.js";
6
+ import { B as i } from "./calls-C1yoW06C.js";
7
7
  import { D as w, L as I, a as _ } from "./models-BlTzZkmp.js";
8
8
  function j(e) {
9
9
  return i(3503478684, e);
@@ -52,7 +52,7 @@ const yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
52
52
  Warn: x
53
53
  }, Symbol.toStringTag, { value: "Module" }));
54
54
  function A(e, t) {
55
- return i(712656304, e, t).then((r) => Y(r));
55
+ return i(712656304, e, t).then((r) => q(r));
56
56
  }
57
57
  function G(e) {
58
58
  return i(4153226260, e).then((t) => c(t));
@@ -61,7 +61,7 @@ function J(e) {
61
61
  return i(1859413816, e);
62
62
  }
63
63
  function z() {
64
- return i(2707386443).then((e) => q(e));
64
+ return i(2707386443).then((e) => H(e));
65
65
  }
66
66
  function U(e) {
67
67
  return i(2381063937, e);
@@ -69,16 +69,16 @@ function U(e) {
69
69
  function V(e) {
70
70
  return i(123659362, e).then((t) => c(t));
71
71
  }
72
- function W(e) {
72
+ function B(e) {
73
73
  return i(709599671, e).then((t) => c(t));
74
74
  }
75
- function B(e, t) {
75
+ function W(e, t) {
76
76
  return i(2105869281, e, t).then((r) => c(r));
77
77
  }
78
78
  function Z(e) {
79
79
  return i(1371062537, e);
80
80
  }
81
- const X = I.createFrom, Y = o(X), c = w.createFrom, q = o(c), vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
81
+ const Y = I.createFrom, q = o(Y), c = w.createFrom, H = o(c), vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
82
82
  __proto__: null,
83
83
  GetDevServerLogs: A,
84
84
  GetDevServerState: G,
@@ -86,17 +86,17 @@ const X = I.createFrom, Y = o(X), c = w.createFrom, q = o(c), vt = /* @__PURE__
86
86
  ListDevServerStates: z,
87
87
  RebuildPlugin: U,
88
88
  RestartDevServer: V,
89
- StartDevServer: W,
90
- StartDevServerForPath: B,
89
+ StartDevServer: B,
90
+ StartDevServerForPath: W,
91
91
  StopDevServer: Z
92
92
  }, Symbol.toStringTag, { value: "Module" }));
93
- function H(e, t) {
93
+ function K(e, t) {
94
94
  return i(1867216983, e, t).then((r) => m(r));
95
95
  }
96
- function K() {
96
+ function Q() {
97
97
  return i(3418650705).then((e) => nt(e));
98
98
  }
99
- function Q(e, t) {
99
+ function X(e, t) {
100
100
  return i(4138610615, e, t).then((r) => m(r));
101
101
  }
102
102
  function $(e) {
@@ -107,9 +107,9 @@ function tt(e) {
107
107
  }
108
108
  const et = _.createFrom, m = o(et), nt = o(l), bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
109
109
  __proto__: null,
110
- GetLogs: H,
111
- ListStreams: K,
112
- SearchLogs: Q,
110
+ GetLogs: K,
111
+ ListStreams: Q,
112
+ SearchLogs: X,
113
113
  Subscribe: $,
114
114
  Unsubscribe: tt
115
115
  }, Symbol.toStringTag, { value: "Module" }));
@@ -0,0 +1 @@
1
+ export { Action, AppError, Location } from './models.js';
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Action represents a frontend-renderable action button that can be attached
3
+ * to structured errors. The frontend maps each action type to a concrete UI
4
+ * behaviour (navigation, retry, opening a URL, or clipboard copy).
5
+ */
6
+ export declare class Action {
7
+ /**
8
+ * "navigate", "retry", "open-url", "copy"
9
+ */
10
+ "type": string;
11
+ "label": string;
12
+ "target"?: string;
13
+ /** Creates a new Action instance. */
14
+ constructor($$source?: Partial<Action>);
15
+ /**
16
+ * Creates a new Action instance from a string or object.
17
+ */
18
+ static createFrom($$source?: any): Action;
19
+ }
20
+ /**
21
+ * AppError is a structured error type based on RFC 7807 Problem Details.
22
+ * Its Error() method returns a JSON string so the structured fields survive
23
+ * the Wails IPC boundary (Wails calls .Error() and sends the string to JS).
24
+ */
25
+ export declare class AppError {
26
+ "type": string;
27
+ "title": string;
28
+ "status": number;
29
+ "detail": string;
30
+ "instance"?: string;
31
+ "suggestions"?: string[];
32
+ "actions"?: Action[];
33
+ "code"?: string;
34
+ "requestId"?: string;
35
+ "recovery"?: string;
36
+ "location"?: Location | null;
37
+ /** Creates a new AppError instance. */
38
+ constructor($$source?: Partial<AppError>);
39
+ /**
40
+ * Creates a new AppError instance from a string or object.
41
+ */
42
+ static createFrom($$source?: any): AppError;
43
+ }
44
+ /**
45
+ * Location uses zero-based, half-open UTF-8 byte offsets. Only host authoring
46
+ * services may attach validated source locations; providers cannot supply them.
47
+ */
48
+ export declare class Location {
49
+ "start": number;
50
+ "end": number;
51
+ "unit": string;
52
+ /** Creates a new Location instance. */
53
+ constructor($$source?: Partial<Location>);
54
+ /**
55
+ * Creates a new Location instance from a string or object.
56
+ */
57
+ static createFrom($$source?: any): Location;
58
+ }
@@ -1,4 +1,4 @@
1
1
  import * as GraphService from "./graphservice.js";
2
2
  import * as ServiceWrapper from "./servicewrapper.js";
3
3
  export { GraphService, ServiceWrapper };
4
- export { ConnectionState, ConnectionStatusPayload } from './models.js';
4
+ export { ActionEventDTO, ActionSnapshot, ConnectionState, ConnectionStatusPayload } from './models.js';
@@ -1,5 +1,30 @@
1
+ import * as apperror$0 from "../../apperror/models.js";
1
2
  import * as types$0 from "../../../../../plugin-sdk/pkg/types/models.js";
2
3
  import * as resource$0 from "../../../../../plugin-sdk/pkg/v1/resource/models.js";
4
+ export declare class ActionEventDTO {
5
+ "type": string;
6
+ "data"?: {
7
+ [_ in string]?: any;
8
+ };
9
+ "error"?: apperror$0.AppError | null;
10
+ /** Creates a new ActionEventDTO instance. */
11
+ constructor($$source?: Partial<ActionEventDTO>);
12
+ /**
13
+ * Creates a new ActionEventDTO instance from a string or object.
14
+ */
15
+ static createFrom($$source?: any): ActionEventDTO;
16
+ }
17
+ export declare class ActionSnapshot {
18
+ "sequence": number;
19
+ "event": ActionEventDTO;
20
+ "terminal": boolean;
21
+ /** Creates a new ActionSnapshot instance. */
22
+ constructor($$source?: Partial<ActionSnapshot>);
23
+ /**
24
+ * Creates a new ActionSnapshot instance from a string or object.
25
+ */
26
+ static createFrom($$source?: any): ActionSnapshot;
27
+ }
3
28
  /**
4
29
  * ConnectionState is the full state snapshot for a single connection,
5
30
  * combining metadata, lifecycle, and watch state. Returned by GetAllConnectionStates
@@ -4,6 +4,8 @@ import * as types$0 from "../../../../../plugin-sdk/pkg/types/models.js";
4
4
  import * as resource$0 from "../../../../../plugin-sdk/pkg/v1/resource/models.js";
5
5
  import * as $models from "./models.js";
6
6
  export declare function AddConnection(pluginID: string, connection: types$0.Connection): $CancellablePromise<void>;
7
+ export declare function AttachStreamAction(handleID: string): $CancellablePromise<$models.ActionSnapshot>;
8
+ export declare function CancelStreamAction(handleID: string): $CancellablePromise<void>;
7
9
  export declare function CheckConnection(pluginID: string, connectionID: string): $CancellablePromise<types$0.ConnectionStatus>;
8
10
  export declare function Create(pluginID: string, connectionID: string, key: string, input: resource$0.CreateInput): $CancellablePromise<resource$0.CreateResult | null>;
9
11
  export declare function Delete(pluginID: string, connectionID: string, key: string, input: resource$0.DeleteInput): $CancellablePromise<resource$0.DeleteResult | null>;
@@ -1,19 +1,19 @@
1
- import { n as M, b as I, o as x, h as k, R as H } from "./index-D2mKAO8s.js";
2
- var D = Function.prototype.toString, h = typeof Reflect == "object" && Reflect !== null && Reflect.apply, g, j;
3
- if (typeof h == "function" && typeof Object.defineProperty == "function")
1
+ import { n as M, b as B, o as x, h as I, R as H } from "./index-D2mKAO8s.js";
2
+ var D = Function.prototype.toString, p = typeof Reflect == "object" && Reflect !== null && Reflect.apply, g, j;
3
+ if (typeof p == "function" && typeof Object.defineProperty == "function")
4
4
  try {
5
5
  g = Object.defineProperty({}, "length", {
6
6
  get: function() {
7
7
  throw j;
8
8
  }
9
- }), j = {}, h(function() {
9
+ }), j = {}, p(function() {
10
10
  throw 42;
11
11
  }, null, g);
12
12
  } catch (r) {
13
- r !== j && (h = null);
13
+ r !== j && (p = null);
14
14
  }
15
15
  else
16
- h = null;
16
+ p = null;
17
17
  var N = /^\s*class\b/, A = function(e) {
18
18
  try {
19
19
  var t = D.call(e);
@@ -48,7 +48,7 @@ function Y(r) {
48
48
  if (!r || typeof r != "function" && typeof r != "object")
49
49
  return !1;
50
50
  try {
51
- h(r, null, g);
51
+ p(r, null, g);
52
52
  } catch (e) {
53
53
  if (e !== j)
54
54
  return !1;
@@ -67,7 +67,7 @@ function Z(r) {
67
67
  var e = m.call(r);
68
68
  return e !== z && e !== G && !/^\[object HTML/.test(e) ? !1 : S(r);
69
69
  }
70
- const f = h ? Y : Z;
70
+ const d = p ? Y : Z;
71
71
  var w;
72
72
  class R extends Error {
73
73
  /**
@@ -127,8 +127,8 @@ class l extends Promise {
127
127
  */
128
128
  constructor(e, t) {
129
129
  let n, o;
130
- if (super((s, p) => {
131
- n = s, o = p;
130
+ if (super((a, y) => {
131
+ n = a, o = y;
132
132
  }), this.constructor[P] !== Promise)
133
133
  throw new TypeError("CancellablePromise does not support transparent subclassing. Please refrain from overriding the [Symbol.species] static property.");
134
134
  let c = {
@@ -138,8 +138,8 @@ class l extends Promise {
138
138
  get oncancelled() {
139
139
  return t ?? null;
140
140
  },
141
- set oncancelled(s) {
142
- t = s ?? void 0;
141
+ set oncancelled(a) {
142
+ t = a ?? void 0;
143
143
  }
144
144
  };
145
145
  const i = {
@@ -163,11 +163,11 @@ class l extends Promise {
163
163
  value: L(c, i)
164
164
  }
165
165
  });
166
- const a = B(c, i);
166
+ const s = k(c, i);
167
167
  try {
168
- e(U(c, i), a);
169
- } catch (s) {
170
- i.resolving ? console.log("Unhandled exception in CancellablePromise executor.", s) : a(s);
168
+ e(U(c, i), s);
169
+ } catch (a) {
170
+ i.resolving ? console.log("Unhandled exception in CancellablePromise executor.", a) : s(a);
171
171
  }
172
172
  }
173
173
  /**
@@ -293,25 +293,25 @@ class l extends Promise {
293
293
  then(e, t, n) {
294
294
  if (!(this instanceof l))
295
295
  throw new TypeError("CancellablePromise.prototype.then called on an invalid object.");
296
- if (f(e) || (e = C), f(t) || (t = F), e === C && t == F)
296
+ if (d(e) || (e = C), d(t) || (t = F), e === C && t == F)
297
297
  return new l((c) => c(this));
298
298
  const o = {};
299
299
  return this[u] = o, new l((c, i) => {
300
- super.then((a) => {
301
- var s;
302
- this[u] === o && (this[u] = null), (s = o.resolve) === null || s === void 0 || s.call(o);
300
+ super.then((s) => {
301
+ var a;
302
+ this[u] === o && (this[u] = null), (a = o.resolve) === null || a === void 0 || a.call(o);
303
303
  try {
304
- c(e(a));
305
- } catch (p) {
306
- i(p);
304
+ c(e(s));
305
+ } catch (y) {
306
+ i(y);
307
307
  }
308
- }, (a) => {
309
- var s;
310
- this[u] === o && (this[u] = null), (s = o.resolve) === null || s === void 0 || s.call(o);
308
+ }, (s) => {
309
+ var a;
310
+ this[u] === o && (this[u] = null), (a = o.resolve) === null || a === void 0 || a.call(o);
311
311
  try {
312
- c(t(a));
313
- } catch (p) {
314
- i(p);
312
+ c(t(s));
313
+ } catch (y) {
314
+ i(y);
315
315
  }
316
316
  });
317
317
  }, async (c) => {
@@ -388,7 +388,7 @@ class l extends Promise {
388
388
  finally(e, t) {
389
389
  if (!(this instanceof l))
390
390
  throw new TypeError("CancellablePromise.prototype.finally called on an invalid object.");
391
- return f(e) ? this.then((n) => l.resolve(e()).then(() => n), (n) => l.resolve(e()).then(() => {
391
+ return d(e) ? this.then((n) => l.resolve(e()).then(() => n), (n) => l.resolve(e()).then(() => {
392
392
  throw n;
393
393
  }), t) : this.then(e, e, t);
394
394
  }
@@ -527,14 +527,14 @@ function U(r, e) {
527
527
  e.settled = !0, r.reject(o);
528
528
  return;
529
529
  }
530
- if (f(n)) {
530
+ if (d(n)) {
531
531
  try {
532
532
  let i = t.cancel;
533
- if (f(i)) {
534
- const a = (s) => {
535
- Reflect.apply(i, t, [s]);
533
+ if (d(i)) {
534
+ const s = (a) => {
535
+ Reflect.apply(i, t, [a]);
536
536
  };
537
- e.reason ? L(Object.assign(Object.assign({}, r), { oncancelled: a }), e)(e.reason) : r.oncancelled = a;
537
+ e.reason ? L(Object.assign(Object.assign({}, r), { oncancelled: s }), e)(e.reason) : r.oncancelled = s;
538
538
  }
539
539
  } catch {
540
540
  }
@@ -550,7 +550,7 @@ function U(r, e) {
550
550
  get reason() {
551
551
  return this.root.reason;
552
552
  }
553
- }, c = B(r, o);
553
+ }, c = k(r, o);
554
554
  try {
555
555
  Reflect.apply(n, t, [U(r, o), c]);
556
556
  } catch (i) {
@@ -563,7 +563,7 @@ function U(r, e) {
563
563
  }
564
564
  };
565
565
  }
566
- function B(r, e) {
566
+ function k(r, e) {
567
567
  return (t) => {
568
568
  if (!e.resolving)
569
569
  if (e.resolving = !0, e.settled) {
@@ -582,7 +582,7 @@ function b(r, e, t) {
582
582
  for (const o of e) {
583
583
  let c;
584
584
  try {
585
- if (!f(o.then) || (c = o.cancel, !f(c)))
585
+ if (!d(o.then) || (c = o.cancel, !d(c)))
586
586
  continue;
587
587
  } catch {
588
588
  continue;
@@ -590,12 +590,12 @@ function b(r, e, t) {
590
590
  let i;
591
591
  try {
592
592
  i = Reflect.apply(c, o, [t]);
593
- } catch (a) {
594
- Promise.reject(new v(r, a, "Unhandled exception in cancel method."));
593
+ } catch (s) {
594
+ Promise.reject(new v(r, s, "Unhandled exception in cancel method."));
595
595
  continue;
596
596
  }
597
- i && n.push((i instanceof Promise ? i : Promise.resolve(i)).catch((a) => {
598
- Promise.reject(new v(r, a, "Unhandled rejection in cancel method."));
597
+ i && n.push((i instanceof Promise ? i : Promise.resolve(i)).catch((s) => {
598
+ Promise.reject(new v(r, s, "Unhandled rejection in cancel method."));
599
599
  }));
600
600
  }
601
601
  return Promise.all(n);
@@ -625,38 +625,38 @@ function $(r) {
625
625
  function _(r) {
626
626
  var e;
627
627
  let t = (e = r[u]) !== null && e !== void 0 ? e : {};
628
- return "promise" in t || Object.assign(t, d()), r[u] == null && (t.resolve(), r[u] = t), t.promise;
628
+ return "promise" in t || Object.assign(t, h()), r[u] == null && (t.resolve(), r[u] = t), t.promise;
629
629
  }
630
- let d = Promise.withResolvers;
631
- d && typeof d == "function" ? d = d.bind(Promise) : d = function() {
630
+ let h = Promise.withResolvers;
631
+ h && typeof h == "function" ? h = h.bind(Promise) : h = function() {
632
632
  let r, e;
633
633
  return { promise: new Promise((n, o) => {
634
634
  r = n, e = o;
635
635
  }), resolve: r, reject: e };
636
636
  };
637
- k && (window._wails = window._wails || {});
638
- const ee = M(x.Call), te = M(x.CancelCall), y = /* @__PURE__ */ new Map(), re = 0, ne = 0;
637
+ I && (window._wails = window._wails || {});
638
+ const ee = M(x.Call), te = M(x.CancelCall), f = /* @__PURE__ */ new Map(), re = 0, ne = 0;
639
639
  function oe() {
640
640
  let r;
641
641
  do
642
- r = I();
643
- while (y.has(r));
642
+ r = B();
643
+ while (f.has(r));
644
644
  return r;
645
645
  }
646
646
  function O(r) {
647
- const e = oe(), t = l.withResolvers();
648
- y.set(e, { resolve: t.resolve, reject: t.reject });
649
- const n = ee(re, Object.assign({ "call-id": e }, r));
650
- let o = !0;
651
- n.then((i) => {
652
- o = !1, y.delete(e), t.resolve(i);
653
- }, (i) => {
654
- o = !1, y.delete(e), t.reject(i);
647
+ const e = oe(), t = l.withResolvers(), n = { resolve: t.resolve, reject: t.reject };
648
+ f.set(e, n);
649
+ const o = ee(re, Object.assign({ "call-id": e }, r));
650
+ let c = !0;
651
+ o.then((s) => {
652
+ c = !1, f.get(e) === n && (f.delete(e), n.resolve(s));
653
+ }, (s) => {
654
+ c = !1, f.get(e) === n && (f.delete(e), n.reject(s));
655
655
  });
656
- const c = () => (y.delete(e), te(ne, { "call-id": e }).catch((i) => {
657
- console.error("Error while requesting binding call cancellation:", i);
656
+ const i = () => (f.delete(e), te(ne, { "call-id": e }).catch((s) => {
657
+ console.error("Error while requesting binding call cancellation:", s);
658
658
  }));
659
- return t.oncancelled = () => o ? c() : n.then(c), t.promise;
659
+ return t.oncancelled = () => c ? i() : o.then(i), t.promise;
660
660
  }
661
661
  function ce(r, ...e) {
662
662
  return O({ methodName: r, args: e });
@@ -1 +1 @@
1
- "use strict";const d=require("./index-D_aIcqH0.cjs");var M=Function.prototype.toString,p=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,S,m;if(typeof p=="function"&&typeof Object.defineProperty=="function")try{S=Object.defineProperty({},"length",{get:function(){throw m}}),m={},p(function(){throw 42},null,S)}catch(r){r!==m&&(p=null)}else p=null;var B=/^\s*class\b/,E=function(e){try{var t=M.call(e);return B.test(t)}catch{return!1}},R=function(e){try{return E(e)?!1:(M.call(e),!0)}catch{return!1}},w=Object.prototype.toString,N="[object Object]",k="[object Function]",H="[object GeneratorFunction]",q="[object HTMLAllCollection]",z="[object HTML document.all class]",G="[object HTMLCollection]",J=typeof Symbol=="function"&&!!Symbol.toStringTag,W=!(0 in[,]),O=function(){return!1};if(typeof document=="object"){var K=document.all;w.call(K)===w.call(document.all)&&(O=function(e){if((W||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=w.call(e);return(t===q||t===z||t===G||t===N)&&e("")==null}catch{}return!1})}function Q(r){if(O(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{p(r,null,S)}catch(e){if(e!==m)return!1}return!E(r)&&R(r)}function V(r){if(O(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(J)return R(r);if(E(r))return!1;var e=w.call(r);return e!==k&&e!==H&&!/^\[object HTML/.test(e)?!1:R(r)}const f=p?Q:V;var g;class A extends Error{constructor(e,t){super(e,t),this.name="CancelError"}}class b extends Error{constructor(e,t,n){super((n??"Unhandled rejection in cancelled promise.")+" Reason: "+X(t),{cause:t}),this.promise=e,this.name="CancelledRejectionError"}}const u=Symbol("barrier"),P=Symbol("cancelImpl"),C=(g=Symbol.species)!==null&&g!==void 0?g:Symbol("speciesPolyfill");class l extends Promise{constructor(e,t){let n,o;if(super((s,y)=>{n=s,o=y}),this.constructor[C]!==Promise)throw new TypeError("CancellablePromise does not support transparent subclassing. Please refrain from overriding the [Symbol.species] static property.");let c={promise:this,resolve:n,reject:o,get oncancelled(){return t??null},set oncancelled(s){t=s??void 0}};const i={get root(){return i},resolving:!1,settled:!1};Object.defineProperties(this,{[u]:{configurable:!1,enumerable:!1,writable:!0,value:null},[P]:{configurable:!1,enumerable:!1,writable:!1,value:x(c,i)}});const a=I(c,i);try{e(L(c,i),a)}catch(s){i.resolving?console.log("Unhandled exception in CancellablePromise executor.",s):a(s)}}cancel(e){return new l(t=>{Promise.all([this[P](new A("Promise cancelled.",{cause:e})),Y(this)]).then(()=>t(),()=>t())})}cancelOn(e){return e.aborted?this.cancel(e.reason):e.addEventListener("abort",()=>void this.cancel(e.reason),{capture:!0}),this}then(e,t,n){if(!(this instanceof l))throw new TypeError("CancellablePromise.prototype.then called on an invalid object.");if(f(e)||(e=D),f(t)||(t=F),e===D&&t==F)return new l(c=>c(this));const o={};return this[u]=o,new l((c,i)=>{super.then(a=>{var s;this[u]===o&&(this[u]=null),(s=o.resolve)===null||s===void 0||s.call(o);try{c(e(a))}catch(y){i(y)}},a=>{var s;this[u]===o&&(this[u]=null),(s=o.resolve)===null||s===void 0||s.call(o);try{c(t(a))}catch(y){i(y)}})},async c=>{try{return n==null?void 0:n(c)}finally{await this.cancel(c)}})}catch(e,t){return this.then(void 0,e,t)}finally(e,t){if(!(this instanceof l))throw new TypeError("CancellablePromise.prototype.finally called on an invalid object.");return f(e)?this.then(n=>l.resolve(e()).then(()=>n),n=>l.resolve(e()).then(()=>{throw n}),t):this.then(e,e,t)}static get[C](){return Promise}static all(e){let t=Array.from(e);const n=t.length===0?l.resolve(t):new l((o,c)=>{Promise.all(t).then(o,c)},o=>j(n,t,o));return n}static allSettled(e){let t=Array.from(e);const n=t.length===0?l.resolve(t):new l((o,c)=>{Promise.allSettled(t).then(o,c)},o=>j(n,t,o));return n}static any(e){let t=Array.from(e);const n=t.length===0?l.resolve(t):new l((o,c)=>{Promise.any(t).then(o,c)},o=>j(n,t,o));return n}static race(e){let t=Array.from(e);const n=new l((o,c)=>{Promise.race(t).then(o,c)},o=>j(n,t,o));return n}static cancel(e){const t=new l(()=>{});return t.cancel(e),t}static timeout(e,t){const n=new l(()=>{});return AbortSignal&&typeof AbortSignal=="function"&&AbortSignal.timeout&&typeof AbortSignal.timeout=="function"?AbortSignal.timeout(e).addEventListener("abort",()=>void n.cancel(t)):setTimeout(()=>void n.cancel(t),e),n}static sleep(e,t){return new l(n=>{setTimeout(()=>n(t),e)})}static reject(e){return new l((t,n)=>n(e))}static resolve(e){return e instanceof l?e:new l(t=>t(e))}static withResolvers(){let e={oncancelled:null};return e.promise=new l((t,n)=>{e.resolve=t,e.reject=n},t=>{var n;(n=e.oncancelled)===null||n===void 0||n.call(e,t)}),e}}function x(r,e){let t;return n=>{if(e.settled||(e.settled=!0,e.reason=n,r.reject(n),Promise.prototype.then.call(r.promise,void 0,o=>{if(o!==n)throw o})),!(!e.reason||!r.oncancelled))return t=new Promise(o=>{try{o(r.oncancelled(e.reason.cause))}catch(c){Promise.reject(new b(r.promise,c,"Unhandled exception in oncancelled callback."))}}).catch(o=>{Promise.reject(new b(r.promise,o,"Unhandled rejection in oncancelled callback."))}),r.oncancelled=null,t}}function L(r,e){return t=>{if(!e.resolving){if(e.resolving=!0,t===r.promise){if(e.settled)return;e.settled=!0,r.reject(new TypeError("A promise cannot be resolved with itself."));return}if(t!=null&&(typeof t=="object"||typeof t=="function")){let n;try{n=t.then}catch(o){e.settled=!0,r.reject(o);return}if(f(n)){try{let i=t.cancel;if(f(i)){const a=s=>{Reflect.apply(i,t,[s])};e.reason?x(Object.assign(Object.assign({},r),{oncancelled:a}),e)(e.reason):r.oncancelled=a}}catch{}const o={root:e.root,resolving:!1,get settled(){return this.root.settled},set settled(i){this.root.settled=i},get reason(){return this.root.reason}},c=I(r,o);try{Reflect.apply(n,t,[L(r,o),c])}catch(i){c(i)}return}}e.settled||(e.settled=!0,r.resolve(t))}}}function I(r,e){return t=>{if(!e.resolving)if(e.resolving=!0,e.settled){try{if(t instanceof A&&e.reason instanceof A&&Object.is(t.cause,e.reason.cause))return}catch{}Promise.reject(new b(r.promise,t))}else e.settled=!0,r.reject(t)}}function j(r,e,t){const n=[];for(const o of e){let c;try{if(!f(o.then)||(c=o.cancel,!f(c)))continue}catch{continue}let i;try{i=Reflect.apply(c,o,[t])}catch(a){Promise.reject(new b(r,a,"Unhandled exception in cancel method."));continue}i&&n.push((i instanceof Promise?i:Promise.resolve(i)).catch(a=>{Promise.reject(new b(r,a,"Unhandled rejection in cancel method."))}))}return Promise.all(n)}function D(r){return r}function F(r){throw r}function X(r){try{if(r instanceof Error||typeof r!="object"||r.toString!==Object.prototype.toString)return""+r}catch{}try{return JSON.stringify(r)}catch{}try{return Object.prototype.toString.call(r)}catch{}return"<could not convert error to string>"}function Y(r){var e;let t=(e=r[u])!==null&&e!==void 0?e:{};return"promise"in t||Object.assign(t,h()),r[u]==null&&(t.resolve(),r[u]=t),t.promise}let h=Promise.withResolvers;h&&typeof h=="function"?h=h.bind(Promise):h=function(){let r,e;return{promise:new Promise((n,o)=>{r=n,e=o}),resolve:r,reject:e}};d.hasDOM&&(window._wails=window._wails||{});const Z=d.newRuntimeCaller(d.objectNames.Call),$=d.newRuntimeCaller(d.objectNames.CancelCall),v=new Map,_=0,ee=0;function te(){let r;do r=d.nanoid();while(v.has(r));return r}function T(r){const e=te(),t=l.withResolvers();v.set(e,{resolve:t.resolve,reject:t.reject});const n=Z(_,Object.assign({"call-id":e},r));let o=!0;n.then(i=>{o=!1,v.delete(e),t.resolve(i)},i=>{o=!1,v.delete(e),t.reject(i)});const c=()=>(v.delete(e),$(ee,{"call-id":e}).catch(i=>{console.error("Error while requesting binding call cancellation:",i)}));return t.oncancelled=()=>o?c():n.then(c),t.promise}function re(r,...e){return T({methodName:r,args:e})}function U(r,...e){return T({methodID:r,args:e})}const ne=Object.freeze(Object.defineProperty({__proto__:null,ByID:U,ByName:re,Call:T,RuntimeError:d.RuntimeError},Symbol.toStringTag,{value:"Module"}));exports.ByID=U;exports.calls=ne;
1
+ "use strict";const h=require("./index-D_aIcqH0.cjs");var M=Function.prototype.toString,y=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,S,m;if(typeof y=="function"&&typeof Object.defineProperty=="function")try{S=Object.defineProperty({},"length",{get:function(){throw m}}),m={},y(function(){throw 42},null,S)}catch(r){r!==m&&(y=null)}else y=null;var k=/^\s*class\b/,E=function(e){try{var t=M.call(e);return k.test(t)}catch{return!1}},R=function(e){try{return E(e)?!1:(M.call(e),!0)}catch{return!1}},w=Object.prototype.toString,B="[object Object]",N="[object Function]",H="[object GeneratorFunction]",q="[object HTMLAllCollection]",z="[object HTML document.all class]",G="[object HTMLCollection]",J=typeof Symbol=="function"&&!!Symbol.toStringTag,W=!(0 in[,]),O=function(){return!1};if(typeof document=="object"){var K=document.all;w.call(K)===w.call(document.all)&&(O=function(e){if((W||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=w.call(e);return(t===q||t===z||t===G||t===B)&&e("")==null}catch{}return!1})}function Q(r){if(O(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{y(r,null,S)}catch(e){if(e!==m)return!1}return!E(r)&&R(r)}function V(r){if(O(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(J)return R(r);if(E(r))return!1;var e=w.call(r);return e!==N&&e!==H&&!/^\[object HTML/.test(e)?!1:R(r)}const d=y?Q:V;var g;class A extends Error{constructor(e,t){super(e,t),this.name="CancelError"}}class b extends Error{constructor(e,t,n){super((n??"Unhandled rejection in cancelled promise.")+" Reason: "+X(t),{cause:t}),this.promise=e,this.name="CancelledRejectionError"}}const u=Symbol("barrier"),P=Symbol("cancelImpl"),C=(g=Symbol.species)!==null&&g!==void 0?g:Symbol("speciesPolyfill");class l extends Promise{constructor(e,t){let n,o;if(super((a,v)=>{n=a,o=v}),this.constructor[C]!==Promise)throw new TypeError("CancellablePromise does not support transparent subclassing. Please refrain from overriding the [Symbol.species] static property.");let c={promise:this,resolve:n,reject:o,get oncancelled(){return t??null},set oncancelled(a){t=a??void 0}};const i={get root(){return i},resolving:!1,settled:!1};Object.defineProperties(this,{[u]:{configurable:!1,enumerable:!1,writable:!0,value:null},[P]:{configurable:!1,enumerable:!1,writable:!1,value:x(c,i)}});const s=I(c,i);try{e(L(c,i),s)}catch(a){i.resolving?console.log("Unhandled exception in CancellablePromise executor.",a):s(a)}}cancel(e){return new l(t=>{Promise.all([this[P](new A("Promise cancelled.",{cause:e})),Y(this)]).then(()=>t(),()=>t())})}cancelOn(e){return e.aborted?this.cancel(e.reason):e.addEventListener("abort",()=>void this.cancel(e.reason),{capture:!0}),this}then(e,t,n){if(!(this instanceof l))throw new TypeError("CancellablePromise.prototype.then called on an invalid object.");if(d(e)||(e=D),d(t)||(t=F),e===D&&t==F)return new l(c=>c(this));const o={};return this[u]=o,new l((c,i)=>{super.then(s=>{var a;this[u]===o&&(this[u]=null),(a=o.resolve)===null||a===void 0||a.call(o);try{c(e(s))}catch(v){i(v)}},s=>{var a;this[u]===o&&(this[u]=null),(a=o.resolve)===null||a===void 0||a.call(o);try{c(t(s))}catch(v){i(v)}})},async c=>{try{return n==null?void 0:n(c)}finally{await this.cancel(c)}})}catch(e,t){return this.then(void 0,e,t)}finally(e,t){if(!(this instanceof l))throw new TypeError("CancellablePromise.prototype.finally called on an invalid object.");return d(e)?this.then(n=>l.resolve(e()).then(()=>n),n=>l.resolve(e()).then(()=>{throw n}),t):this.then(e,e,t)}static get[C](){return Promise}static all(e){let t=Array.from(e);const n=t.length===0?l.resolve(t):new l((o,c)=>{Promise.all(t).then(o,c)},o=>j(n,t,o));return n}static allSettled(e){let t=Array.from(e);const n=t.length===0?l.resolve(t):new l((o,c)=>{Promise.allSettled(t).then(o,c)},o=>j(n,t,o));return n}static any(e){let t=Array.from(e);const n=t.length===0?l.resolve(t):new l((o,c)=>{Promise.any(t).then(o,c)},o=>j(n,t,o));return n}static race(e){let t=Array.from(e);const n=new l((o,c)=>{Promise.race(t).then(o,c)},o=>j(n,t,o));return n}static cancel(e){const t=new l(()=>{});return t.cancel(e),t}static timeout(e,t){const n=new l(()=>{});return AbortSignal&&typeof AbortSignal=="function"&&AbortSignal.timeout&&typeof AbortSignal.timeout=="function"?AbortSignal.timeout(e).addEventListener("abort",()=>void n.cancel(t)):setTimeout(()=>void n.cancel(t),e),n}static sleep(e,t){return new l(n=>{setTimeout(()=>n(t),e)})}static reject(e){return new l((t,n)=>n(e))}static resolve(e){return e instanceof l?e:new l(t=>t(e))}static withResolvers(){let e={oncancelled:null};return e.promise=new l((t,n)=>{e.resolve=t,e.reject=n},t=>{var n;(n=e.oncancelled)===null||n===void 0||n.call(e,t)}),e}}function x(r,e){let t;return n=>{if(e.settled||(e.settled=!0,e.reason=n,r.reject(n),Promise.prototype.then.call(r.promise,void 0,o=>{if(o!==n)throw o})),!(!e.reason||!r.oncancelled))return t=new Promise(o=>{try{o(r.oncancelled(e.reason.cause))}catch(c){Promise.reject(new b(r.promise,c,"Unhandled exception in oncancelled callback."))}}).catch(o=>{Promise.reject(new b(r.promise,o,"Unhandled rejection in oncancelled callback."))}),r.oncancelled=null,t}}function L(r,e){return t=>{if(!e.resolving){if(e.resolving=!0,t===r.promise){if(e.settled)return;e.settled=!0,r.reject(new TypeError("A promise cannot be resolved with itself."));return}if(t!=null&&(typeof t=="object"||typeof t=="function")){let n;try{n=t.then}catch(o){e.settled=!0,r.reject(o);return}if(d(n)){try{let i=t.cancel;if(d(i)){const s=a=>{Reflect.apply(i,t,[a])};e.reason?x(Object.assign(Object.assign({},r),{oncancelled:s}),e)(e.reason):r.oncancelled=s}}catch{}const o={root:e.root,resolving:!1,get settled(){return this.root.settled},set settled(i){this.root.settled=i},get reason(){return this.root.reason}},c=I(r,o);try{Reflect.apply(n,t,[L(r,o),c])}catch(i){c(i)}return}}e.settled||(e.settled=!0,r.resolve(t))}}}function I(r,e){return t=>{if(!e.resolving)if(e.resolving=!0,e.settled){try{if(t instanceof A&&e.reason instanceof A&&Object.is(t.cause,e.reason.cause))return}catch{}Promise.reject(new b(r.promise,t))}else e.settled=!0,r.reject(t)}}function j(r,e,t){const n=[];for(const o of e){let c;try{if(!d(o.then)||(c=o.cancel,!d(c)))continue}catch{continue}let i;try{i=Reflect.apply(c,o,[t])}catch(s){Promise.reject(new b(r,s,"Unhandled exception in cancel method."));continue}i&&n.push((i instanceof Promise?i:Promise.resolve(i)).catch(s=>{Promise.reject(new b(r,s,"Unhandled rejection in cancel method."))}))}return Promise.all(n)}function D(r){return r}function F(r){throw r}function X(r){try{if(r instanceof Error||typeof r!="object"||r.toString!==Object.prototype.toString)return""+r}catch{}try{return JSON.stringify(r)}catch{}try{return Object.prototype.toString.call(r)}catch{}return"<could not convert error to string>"}function Y(r){var e;let t=(e=r[u])!==null&&e!==void 0?e:{};return"promise"in t||Object.assign(t,p()),r[u]==null&&(t.resolve(),r[u]=t),t.promise}let p=Promise.withResolvers;p&&typeof p=="function"?p=p.bind(Promise):p=function(){let r,e;return{promise:new Promise((n,o)=>{r=n,e=o}),resolve:r,reject:e}};h.hasDOM&&(window._wails=window._wails||{});const Z=h.newRuntimeCaller(h.objectNames.Call),$=h.newRuntimeCaller(h.objectNames.CancelCall),f=new Map,_=0,ee=0;function te(){let r;do r=h.nanoid();while(f.has(r));return r}function T(r){const e=te(),t=l.withResolvers(),n={resolve:t.resolve,reject:t.reject};f.set(e,n);const o=Z(_,Object.assign({"call-id":e},r));let c=!0;o.then(s=>{c=!1,f.get(e)===n&&(f.delete(e),n.resolve(s))},s=>{c=!1,f.get(e)===n&&(f.delete(e),n.reject(s))});const i=()=>(f.delete(e),$(ee,{"call-id":e}).catch(s=>{console.error("Error while requesting binding call cancellation:",s)}));return t.oncancelled=()=>c?i():o.then(i),t.promise}function re(r,...e){return T({methodName:r,args:e})}function U(r,...e){return T({methodID:r,args:e})}const ne=Object.freeze(Object.defineProperty({__proto__:null,ByID:U,ByName:re,Call:T,RuntimeError:h.RuntimeError},Symbol.toStringTag,{value:"Module"}));exports.ByID=U;exports.calls=ne;
@@ -6,7 +6,7 @@ export type Operation = {
6
6
  resourceName: string;
7
7
  namespace: string;
8
8
  connectionID: string;
9
- status: 'running' | 'completed' | 'error';
9
+ status: 'running' | 'completed' | 'error' | 'cancelled';
10
10
  progress?: {
11
11
  ready: number;
12
12
  desired: number;
@@ -1,19 +1,6 @@
1
1
  import { AppError, AppErrorAction } from './types';
2
- /**
3
- * Parse any error shape from the Wails boundary into a structured AppError.
4
- *
5
- * Handles:
6
- * - JSON string from AppError.Error() → parsed into typed AppError
7
- * - Plain string from old fmt.Errorf → wrapped as internal error
8
- * - Error object → extracts .message, tries JSON parse
9
- * - null/undefined → generic "Unknown error"
10
- *
11
- * NEVER returns null.
12
- */
2
+ /** Decode actual Wails/SDK errors without exposing arbitrary raw diagnostics. */
13
3
  export declare function parseAppError(error: unknown): AppError;
14
- /**
15
- * Detects both new format (type === "omniview:cancelled") and legacy ("cancelled" string).
16
- */
17
4
  export declare function isCancelledError(error: unknown): boolean;
18
5
  /**
19
6
  * Converts an AppErrorAction into a { label, onClick } suitable for snackbar actions.
@@ -13,6 +13,14 @@ export interface AppError {
13
13
  instance?: string;
14
14
  suggestions?: string[];
15
15
  actions?: AppErrorAction[];
16
+ code?: string;
17
+ requestId?: string;
18
+ recovery?: 'correctRequest' | 'refreshContract' | 'restartQuery' | 'reconnect' | 'none';
19
+ location?: {
20
+ start: number;
21
+ end: number;
22
+ unit: 'utf8-byte';
23
+ };
16
24
  }
17
25
  /** Error type URI constants matching Go apperror/types.go. */
18
26
  export declare const ErrorTypes: {
@@ -31,10 +39,13 @@ export declare const ErrorTypes: {
31
39
  readonly RESOURCE_UNAUTHORIZED: "omniview:resource/unauthorized";
32
40
  readonly RESOURCE_CONFLICT: "omniview:resource/conflict";
33
41
  readonly RESOURCE_TIMEOUT: "omniview:resource/timeout";
42
+ readonly RESOURCE_LIMIT: "omniview:resource/limit";
43
+ readonly RESOURCE_CONTINUATION_EXPIRED: "omniview:resource/continuation-expired";
44
+ readonly RESOURCE_RESET_REQUIRED: "omniview:resource/reset-required";
45
+ readonly RESOURCE_PARTIAL: "omniview:resource/partial";
46
+ readonly RESOURCE_PROVIDER_ERROR: "omniview:resource/provider-error";
34
47
  readonly CONNECTION_NOT_FOUND: "omniview:connection/not-found";
35
48
  readonly CONNECTION_FAILED: "omniview:connection/failed";
36
- readonly RESOURCE_CONNECTION_ERROR: "omniview:resource/connection-error";
37
- readonly RESOURCE_CERTIFICATE_ERROR: "omniview:resource/certificate-error";
38
49
  readonly SESSION_NOT_FOUND: "omniview:session/not-found";
39
50
  readonly SESSION_FAILED: "omniview:session/failed";
40
51
  readonly CANCELLED: "omniview:cancelled";
@@ -365,7 +365,6 @@ export {
365
365
  f as E,
366
366
  v as O,
367
367
  g as a,
368
- F as b,
369
- R as c,
368
+ R as b,
370
369
  B as e
371
370
  };