@code0-tech/tucana 0.0.70 → 0.0.72
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/aquila.cjs.js +1 -1
- package/dist/aquila.es.js +195 -194
- package/dist/pb/_generated/shared.flow_pb.d.ts +41 -6
- package/dist/pb/_generated/velorum.generate_pb.client.d.ts +35 -0
- package/dist/pb/_generated/velorum.generate_pb.d.ts +120 -0
- package/dist/pb/_generated/velorum.info_pb.client.d.ts +27 -0
- package/dist/pb/_generated/velorum.info_pb.d.ts +89 -0
- package/dist/pb/velorum.d.ts +4 -0
- package/dist/rpc-interceptor-DOeBkZHU.cjs +1 -0
- package/dist/{rpc-interceptor-DpAjfIVk.js → rpc-interceptor-az_TTCBK.js} +1 -1
- package/dist/sagittarius.cjs.js +1 -1
- package/dist/sagittarius.es.js +214 -213
- package/dist/shared.cjs.js +1 -1
- package/dist/shared.es.js +4 -3
- package/dist/shared.flow_pb-C4ewDq2u.js +957 -0
- package/dist/shared.flow_pb-DrDw61IF.cjs +1 -0
- package/dist/shared.function_pb-BErnwHWO.cjs +2 -0
- package/dist/shared.function_pb-e1jkWYE_.js +2655 -0
- package/dist/shared.runtime_usage_pb-CSRup69H.cjs +1 -0
- package/dist/shared.runtime_usage_pb-Hn8yNrjw.js +1779 -0
- package/dist/velorum.cjs.js +1 -0
- package/dist/velorum.d.ts +2 -0
- package/dist/velorum.es.js +419 -0
- package/package.json +9 -3
- package/dist/rpc-interceptor-4ZNqeHp7.cjs +0 -1
- package/dist/shared.flow_pb-CAu-uZAs.cjs +0 -1
- package/dist/shared.flow_pb-YdrVU_yH.js +0 -877
- package/dist/shared.runtime_usage_pb-6pp995qK.cjs +0 -2
- package/dist/shared.runtime_usage_pb-Qa9pCiee.js +0 -4430
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./shared.function_pb-BErnwHWO.cjs`),t=require(`./shared.flow_pb-DrDw61IF.cjs`),n=require(`./rpc-interceptor-DOeBkZHU.cjs`);var r=new class extends e.v{constructor(){super(`velorum.PromptRequest`,[{no:1,name:`prompt`,kind:`scalar`,T:9},{no:2,name:`project_id`,kind:`scalar`,T:3,L:0},{no:3,name:`model_identifier`,kind:`scalar`,T:9},{no:4,name:`functions`,kind:`message`,repeat:2,T:()=>e.t},{no:5,name:`data_types`,kind:`message`,repeat:2,T:()=>e.p},{no:6,name:`flow_types`,kind:`message`,repeat:2,T:()=>e.r}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.prompt=``,n.projectId=0n,n.modelIdentifier=``,n.functions=[],n.dataTypes=[],n.flowTypes=[],t!==void 0&&e.y(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.prompt=t.string();break;case 2:a.projectId=t.int64().toBigInt();break;case 3:a.modelIdentifier=t.string();break;case 4:a.functions.push(e.t.internalBinaryRead(t,t.uint32(),r));break;case 5:a.dataTypes.push(e.p.internalBinaryRead(t,t.uint32(),r));break;case 6:a.flowTypes.push(e.r.internalBinaryRead(t,t.uint32(),r));break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.S.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){t.prompt!==``&&n.tag(1,e.C.LengthDelimited).string(t.prompt),t.projectId!==0n&&n.tag(2,e.C.Varint).int64(t.projectId),t.modelIdentifier!==``&&n.tag(3,e.C.LengthDelimited).string(t.modelIdentifier);for(let i=0;i<t.functions.length;i++)e.t.internalBinaryWrite(t.functions[i],n.tag(4,e.C.LengthDelimited).fork(),r).join();for(let i=0;i<t.dataTypes.length;i++)e.p.internalBinaryWrite(t.dataTypes[i],n.tag(5,e.C.LengthDelimited).fork(),r).join();for(let i=0;i<t.flowTypes.length;i++)e.r.internalBinaryWrite(t.flowTypes[i],n.tag(6,e.C.LengthDelimited).fork(),r).join();let i=r.writeUnknownFields;return i!==!1&&(i==1?e.S.onWrite:i)(this.typeName,t,n),n}},i=new class extends e.v{constructor(){super(`velorum.FlowRequest`,[{no:1,name:`prompt`,kind:`scalar`,T:9},{no:2,name:`flow`,kind:`message`,T:()=>t.a},{no:3,name:`project_id`,kind:`scalar`,T:3,L:0},{no:4,name:`model_identifier`,kind:`scalar`,T:9},{no:5,name:`functions`,kind:`message`,repeat:2,T:()=>e.t},{no:6,name:`data_types`,kind:`message`,repeat:2,T:()=>e.p},{no:7,name:`flow_types`,kind:`message`,repeat:2,T:()=>e.r}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.prompt=``,n.projectId=0n,n.modelIdentifier=``,n.functions=[],n.dataTypes=[],n.flowTypes=[],t!==void 0&&e.y(this,n,t),n}internalBinaryRead(n,r,i,a){let o=a??this.create(),s=n.pos+r;for(;n.pos<s;){let[r,a]=n.tag();switch(r){case 1:o.prompt=n.string();break;case 2:o.flow=t.a.internalBinaryRead(n,n.uint32(),i,o.flow);break;case 3:o.projectId=n.int64().toBigInt();break;case 4:o.modelIdentifier=n.string();break;case 5:o.functions.push(e.t.internalBinaryRead(n,n.uint32(),i));break;case 6:o.dataTypes.push(e.p.internalBinaryRead(n,n.uint32(),i));break;case 7:o.flowTypes.push(e.r.internalBinaryRead(n,n.uint32(),i));break;default:let s=i.readUnknownField;if(s===`throw`)throw new globalThis.Error(`Unknown field ${r} (wire type ${a}) for ${this.typeName}`);let c=n.skip(a);s!==!1&&(s===!0?e.S.onRead:s)(this.typeName,o,r,a,c)}}return o}internalBinaryWrite(n,r,i){n.prompt!==``&&r.tag(1,e.C.LengthDelimited).string(n.prompt),n.flow&&t.a.internalBinaryWrite(n.flow,r.tag(2,e.C.LengthDelimited).fork(),i).join(),n.projectId!==0n&&r.tag(3,e.C.Varint).int64(n.projectId),n.modelIdentifier!==``&&r.tag(4,e.C.LengthDelimited).string(n.modelIdentifier);for(let t=0;t<n.functions.length;t++)e.t.internalBinaryWrite(n.functions[t],r.tag(5,e.C.LengthDelimited).fork(),i).join();for(let t=0;t<n.dataTypes.length;t++)e.p.internalBinaryWrite(n.dataTypes[t],r.tag(6,e.C.LengthDelimited).fork(),i).join();for(let t=0;t<n.flowTypes.length;t++)e.r.internalBinaryWrite(n.flowTypes[t],r.tag(7,e.C.LengthDelimited).fork(),i).join();let a=i.writeUnknownFields;return a!==!1&&(a==1?e.S.onWrite:a)(this.typeName,n,r),r}},a=new class extends e.v{constructor(){super(`velorum.FlowResponse`,[{no:1,name:`flow`,kind:`message`,T:()=>t.a},{no:2,name:`cached_until`,kind:`scalar`,T:3,L:0},{no:3,name:`usage`,kind:`scalar`,T:3,L:0}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.cachedUntil=0n,n.usage=0n,t!==void 0&&e.y(this,n,t),n}internalBinaryRead(n,r,i,a){let o=a??this.create(),s=n.pos+r;for(;n.pos<s;){let[r,a]=n.tag();switch(r){case 1:o.flow=t.a.internalBinaryRead(n,n.uint32(),i,o.flow);break;case 2:o.cachedUntil=n.int64().toBigInt();break;case 3:o.usage=n.int64().toBigInt();break;default:let s=i.readUnknownField;if(s===`throw`)throw new globalThis.Error(`Unknown field ${r} (wire type ${a}) for ${this.typeName}`);let c=n.skip(a);s!==!1&&(s===!0?e.S.onRead:s)(this.typeName,o,r,a,c)}}return o}internalBinaryWrite(n,r,i){n.flow&&t.a.internalBinaryWrite(n.flow,r.tag(1,e.C.LengthDelimited).fork(),i).join(),n.cachedUntil!==0n&&r.tag(2,e.C.Varint).int64(n.cachedUntil),n.usage!==0n&&r.tag(3,e.C.Varint).int64(n.usage);let a=i.writeUnknownFields;return a!==!1&&(a==1?e.S.onWrite:a)(this.typeName,n,r),r}},o=new n.n(`velorum.GenerateService`,[{name:`Prompt`,options:{},I:r,O:a},{name:`Flow`,options:{},I:i,O:a}]),s=class{constructor(e){this._transport=e,this.typeName=o.typeName,this.methods=o.methods,this.options=o.options}prompt(e,t){let r=this.methods[0],i=this._transport.mergeOptions(t);return n.t(`unary`,this._transport,r,i,e)}flow(e,t){let r=this.methods[1],i=this._transport.mergeOptions(t);return n.t(`unary`,this._transport,r,i,e)}},c=function(e){return e[e.UNKNOWN=0]=`UNKNOWN`,e[e.EXPLAIN=1]=`EXPLAIN`,e[e.GENERATE=2]=`GENERATE`,e}({}),l=new class extends e.v{constructor(){super(`velorum.ModelsRequest`,[])}create(t){let n=globalThis.Object.create(this.messagePrototype);return t!==void 0&&e.y(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.S.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){let i=r.writeUnknownFields;return i!==!1&&(i==1?e.S.onWrite:i)(this.typeName,t,n),n}},u=new class extends e.v{constructor(){super(`velorum.Model`,[{no:1,name:`identifier`,kind:`scalar`,T:9},{no:2,name:`name`,kind:`scalar`,T:9},{no:3,name:`token_cost`,kind:`scalar`,T:2},{no:4,name:`type`,kind:`enum`,repeat:1,T:()=>[`velorum.Model.ModelType`,c]}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.identifier=``,n.name=``,n.tokenCost=0,n.type=[],t!==void 0&&e.y(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.identifier=t.string();break;case 2:a.name=t.string();break;case 3:a.tokenCost=t.float();break;case 4:if(i===e.C.LengthDelimited)for(let e=t.int32()+t.pos;t.pos<e;)a.type.push(t.int32());else a.type.push(t.int32());break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.S.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){if(t.identifier!==``&&n.tag(1,e.C.LengthDelimited).string(t.identifier),t.name!==``&&n.tag(2,e.C.LengthDelimited).string(t.name),t.tokenCost!==0&&n.tag(3,e.C.Bit32).float(t.tokenCost),t.type.length){n.tag(4,e.C.LengthDelimited).fork();for(let e=0;e<t.type.length;e++)n.int32(t.type[e]);n.join()}let i=r.writeUnknownFields;return i!==!1&&(i==1?e.S.onWrite:i)(this.typeName,t,n),n}},d=new class extends e.v{constructor(){super(`velorum.ModelsResponse`,[{no:1,name:`models`,kind:`message`,repeat:2,T:()=>u}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.models=[],t!==void 0&&e.y(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.models.push(u.internalBinaryRead(t,t.uint32(),r));break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.S.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){for(let i=0;i<t.models.length;i++)u.internalBinaryWrite(t.models[i],n.tag(1,e.C.LengthDelimited).fork(),r).join();let i=r.writeUnknownFields;return i!==!1&&(i==1?e.S.onWrite:i)(this.typeName,t,n),n}},f=new n.n(`velorum.InfoService`,[{name:`Models`,options:{},I:l,O:d}]),p=class{constructor(e){this._transport=e,this.typeName=f.typeName,this.methods=f.methods,this.options=f.options}models(e,t){let r=this.methods[0],i=this._transport.mergeOptions(t);return n.t(`unary`,this._transport,r,i,e)}};exports.FlowRequest=i,exports.FlowResponse=a,exports.GenerateService=o,exports.GenerateServiceClient=s,exports.InfoService=f,exports.InfoServiceClient=p,exports.Model=u,exports.Model_ModelType=c,exports.ModelsRequest=l,exports.ModelsResponse=d,exports.PromptRequest=r;
|
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import { C as e, S as t, p as n, r, t as i, v as a, y as o } from "./shared.function_pb-e1jkWYE_.js";
|
|
2
|
+
import { a as s } from "./shared.flow_pb-C4ewDq2u.js";
|
|
3
|
+
import { n as c, t as l } from "./rpc-interceptor-az_TTCBK.js";
|
|
4
|
+
var u = new class extends a {
|
|
5
|
+
constructor() {
|
|
6
|
+
super("velorum.PromptRequest", [
|
|
7
|
+
{
|
|
8
|
+
no: 1,
|
|
9
|
+
name: "prompt",
|
|
10
|
+
kind: "scalar",
|
|
11
|
+
T: 9
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
no: 2,
|
|
15
|
+
name: "project_id",
|
|
16
|
+
kind: "scalar",
|
|
17
|
+
T: 3,
|
|
18
|
+
L: 0
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
no: 3,
|
|
22
|
+
name: "model_identifier",
|
|
23
|
+
kind: "scalar",
|
|
24
|
+
T: 9
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
no: 4,
|
|
28
|
+
name: "functions",
|
|
29
|
+
kind: "message",
|
|
30
|
+
repeat: 2,
|
|
31
|
+
T: () => i
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
no: 5,
|
|
35
|
+
name: "data_types",
|
|
36
|
+
kind: "message",
|
|
37
|
+
repeat: 2,
|
|
38
|
+
T: () => n
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
no: 6,
|
|
42
|
+
name: "flow_types",
|
|
43
|
+
kind: "message",
|
|
44
|
+
repeat: 2,
|
|
45
|
+
T: () => r
|
|
46
|
+
}
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
create(e) {
|
|
50
|
+
let t = globalThis.Object.create(this.messagePrototype);
|
|
51
|
+
return t.prompt = "", t.projectId = 0n, t.modelIdentifier = "", t.functions = [], t.dataTypes = [], t.flowTypes = [], e !== void 0 && o(this, t, e), t;
|
|
52
|
+
}
|
|
53
|
+
internalBinaryRead(e, a, o, s) {
|
|
54
|
+
let c = s ?? this.create(), l = e.pos + a;
|
|
55
|
+
for (; e.pos < l;) {
|
|
56
|
+
let [a, s] = e.tag();
|
|
57
|
+
switch (a) {
|
|
58
|
+
case 1:
|
|
59
|
+
c.prompt = e.string();
|
|
60
|
+
break;
|
|
61
|
+
case 2:
|
|
62
|
+
c.projectId = e.int64().toBigInt();
|
|
63
|
+
break;
|
|
64
|
+
case 3:
|
|
65
|
+
c.modelIdentifier = e.string();
|
|
66
|
+
break;
|
|
67
|
+
case 4:
|
|
68
|
+
c.functions.push(i.internalBinaryRead(e, e.uint32(), o));
|
|
69
|
+
break;
|
|
70
|
+
case 5:
|
|
71
|
+
c.dataTypes.push(n.internalBinaryRead(e, e.uint32(), o));
|
|
72
|
+
break;
|
|
73
|
+
case 6:
|
|
74
|
+
c.flowTypes.push(r.internalBinaryRead(e, e.uint32(), o));
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
let l = o.readUnknownField;
|
|
78
|
+
if (l === "throw") throw new globalThis.Error(`Unknown field ${a} (wire type ${s}) for ${this.typeName}`);
|
|
79
|
+
let u = e.skip(s);
|
|
80
|
+
l !== !1 && (l === !0 ? t.onRead : l)(this.typeName, c, a, s, u);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return c;
|
|
84
|
+
}
|
|
85
|
+
internalBinaryWrite(a, o, s) {
|
|
86
|
+
a.prompt !== "" && o.tag(1, e.LengthDelimited).string(a.prompt), a.projectId !== 0n && o.tag(2, e.Varint).int64(a.projectId), a.modelIdentifier !== "" && o.tag(3, e.LengthDelimited).string(a.modelIdentifier);
|
|
87
|
+
for (let t = 0; t < a.functions.length; t++) i.internalBinaryWrite(a.functions[t], o.tag(4, e.LengthDelimited).fork(), s).join();
|
|
88
|
+
for (let t = 0; t < a.dataTypes.length; t++) n.internalBinaryWrite(a.dataTypes[t], o.tag(5, e.LengthDelimited).fork(), s).join();
|
|
89
|
+
for (let t = 0; t < a.flowTypes.length; t++) r.internalBinaryWrite(a.flowTypes[t], o.tag(6, e.LengthDelimited).fork(), s).join();
|
|
90
|
+
let c = s.writeUnknownFields;
|
|
91
|
+
return c !== !1 && (c == 1 ? t.onWrite : c)(this.typeName, a, o), o;
|
|
92
|
+
}
|
|
93
|
+
}(), d = new class extends a {
|
|
94
|
+
constructor() {
|
|
95
|
+
super("velorum.FlowRequest", [
|
|
96
|
+
{
|
|
97
|
+
no: 1,
|
|
98
|
+
name: "prompt",
|
|
99
|
+
kind: "scalar",
|
|
100
|
+
T: 9
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
no: 2,
|
|
104
|
+
name: "flow",
|
|
105
|
+
kind: "message",
|
|
106
|
+
T: () => s
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
no: 3,
|
|
110
|
+
name: "project_id",
|
|
111
|
+
kind: "scalar",
|
|
112
|
+
T: 3,
|
|
113
|
+
L: 0
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
no: 4,
|
|
117
|
+
name: "model_identifier",
|
|
118
|
+
kind: "scalar",
|
|
119
|
+
T: 9
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
no: 5,
|
|
123
|
+
name: "functions",
|
|
124
|
+
kind: "message",
|
|
125
|
+
repeat: 2,
|
|
126
|
+
T: () => i
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
no: 6,
|
|
130
|
+
name: "data_types",
|
|
131
|
+
kind: "message",
|
|
132
|
+
repeat: 2,
|
|
133
|
+
T: () => n
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
no: 7,
|
|
137
|
+
name: "flow_types",
|
|
138
|
+
kind: "message",
|
|
139
|
+
repeat: 2,
|
|
140
|
+
T: () => r
|
|
141
|
+
}
|
|
142
|
+
]);
|
|
143
|
+
}
|
|
144
|
+
create(e) {
|
|
145
|
+
let t = globalThis.Object.create(this.messagePrototype);
|
|
146
|
+
return t.prompt = "", t.projectId = 0n, t.modelIdentifier = "", t.functions = [], t.dataTypes = [], t.flowTypes = [], e !== void 0 && o(this, t, e), t;
|
|
147
|
+
}
|
|
148
|
+
internalBinaryRead(e, a, o, c) {
|
|
149
|
+
let l = c ?? this.create(), u = e.pos + a;
|
|
150
|
+
for (; e.pos < u;) {
|
|
151
|
+
let [a, c] = e.tag();
|
|
152
|
+
switch (a) {
|
|
153
|
+
case 1:
|
|
154
|
+
l.prompt = e.string();
|
|
155
|
+
break;
|
|
156
|
+
case 2:
|
|
157
|
+
l.flow = s.internalBinaryRead(e, e.uint32(), o, l.flow);
|
|
158
|
+
break;
|
|
159
|
+
case 3:
|
|
160
|
+
l.projectId = e.int64().toBigInt();
|
|
161
|
+
break;
|
|
162
|
+
case 4:
|
|
163
|
+
l.modelIdentifier = e.string();
|
|
164
|
+
break;
|
|
165
|
+
case 5:
|
|
166
|
+
l.functions.push(i.internalBinaryRead(e, e.uint32(), o));
|
|
167
|
+
break;
|
|
168
|
+
case 6:
|
|
169
|
+
l.dataTypes.push(n.internalBinaryRead(e, e.uint32(), o));
|
|
170
|
+
break;
|
|
171
|
+
case 7:
|
|
172
|
+
l.flowTypes.push(r.internalBinaryRead(e, e.uint32(), o));
|
|
173
|
+
break;
|
|
174
|
+
default:
|
|
175
|
+
let u = o.readUnknownField;
|
|
176
|
+
if (u === "throw") throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);
|
|
177
|
+
let d = e.skip(c);
|
|
178
|
+
u !== !1 && (u === !0 ? t.onRead : u)(this.typeName, l, a, c, d);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return l;
|
|
182
|
+
}
|
|
183
|
+
internalBinaryWrite(a, o, c) {
|
|
184
|
+
a.prompt !== "" && o.tag(1, e.LengthDelimited).string(a.prompt), a.flow && s.internalBinaryWrite(a.flow, o.tag(2, e.LengthDelimited).fork(), c).join(), a.projectId !== 0n && o.tag(3, e.Varint).int64(a.projectId), a.modelIdentifier !== "" && o.tag(4, e.LengthDelimited).string(a.modelIdentifier);
|
|
185
|
+
for (let t = 0; t < a.functions.length; t++) i.internalBinaryWrite(a.functions[t], o.tag(5, e.LengthDelimited).fork(), c).join();
|
|
186
|
+
for (let t = 0; t < a.dataTypes.length; t++) n.internalBinaryWrite(a.dataTypes[t], o.tag(6, e.LengthDelimited).fork(), c).join();
|
|
187
|
+
for (let t = 0; t < a.flowTypes.length; t++) r.internalBinaryWrite(a.flowTypes[t], o.tag(7, e.LengthDelimited).fork(), c).join();
|
|
188
|
+
let l = c.writeUnknownFields;
|
|
189
|
+
return l !== !1 && (l == 1 ? t.onWrite : l)(this.typeName, a, o), o;
|
|
190
|
+
}
|
|
191
|
+
}(), f = new class extends a {
|
|
192
|
+
constructor() {
|
|
193
|
+
super("velorum.FlowResponse", [
|
|
194
|
+
{
|
|
195
|
+
no: 1,
|
|
196
|
+
name: "flow",
|
|
197
|
+
kind: "message",
|
|
198
|
+
T: () => s
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
no: 2,
|
|
202
|
+
name: "cached_until",
|
|
203
|
+
kind: "scalar",
|
|
204
|
+
T: 3,
|
|
205
|
+
L: 0
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
no: 3,
|
|
209
|
+
name: "usage",
|
|
210
|
+
kind: "scalar",
|
|
211
|
+
T: 3,
|
|
212
|
+
L: 0
|
|
213
|
+
}
|
|
214
|
+
]);
|
|
215
|
+
}
|
|
216
|
+
create(e) {
|
|
217
|
+
let t = globalThis.Object.create(this.messagePrototype);
|
|
218
|
+
return t.cachedUntil = 0n, t.usage = 0n, e !== void 0 && o(this, t, e), t;
|
|
219
|
+
}
|
|
220
|
+
internalBinaryRead(e, n, r, i) {
|
|
221
|
+
let a = i ?? this.create(), o = e.pos + n;
|
|
222
|
+
for (; e.pos < o;) {
|
|
223
|
+
let [n, i] = e.tag();
|
|
224
|
+
switch (n) {
|
|
225
|
+
case 1:
|
|
226
|
+
a.flow = s.internalBinaryRead(e, e.uint32(), r, a.flow);
|
|
227
|
+
break;
|
|
228
|
+
case 2:
|
|
229
|
+
a.cachedUntil = e.int64().toBigInt();
|
|
230
|
+
break;
|
|
231
|
+
case 3:
|
|
232
|
+
a.usage = e.int64().toBigInt();
|
|
233
|
+
break;
|
|
234
|
+
default:
|
|
235
|
+
let o = r.readUnknownField;
|
|
236
|
+
if (o === "throw") throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);
|
|
237
|
+
let c = e.skip(i);
|
|
238
|
+
o !== !1 && (o === !0 ? t.onRead : o)(this.typeName, a, n, i, c);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return a;
|
|
242
|
+
}
|
|
243
|
+
internalBinaryWrite(n, r, i) {
|
|
244
|
+
n.flow && s.internalBinaryWrite(n.flow, r.tag(1, e.LengthDelimited).fork(), i).join(), n.cachedUntil !== 0n && r.tag(2, e.Varint).int64(n.cachedUntil), n.usage !== 0n && r.tag(3, e.Varint).int64(n.usage);
|
|
245
|
+
let a = i.writeUnknownFields;
|
|
246
|
+
return a !== !1 && (a == 1 ? t.onWrite : a)(this.typeName, n, r), r;
|
|
247
|
+
}
|
|
248
|
+
}(), p = new c("velorum.GenerateService", [{
|
|
249
|
+
name: "Prompt",
|
|
250
|
+
options: {},
|
|
251
|
+
I: u,
|
|
252
|
+
O: f
|
|
253
|
+
}, {
|
|
254
|
+
name: "Flow",
|
|
255
|
+
options: {},
|
|
256
|
+
I: d,
|
|
257
|
+
O: f
|
|
258
|
+
}]), m = class {
|
|
259
|
+
constructor(e) {
|
|
260
|
+
this._transport = e, this.typeName = p.typeName, this.methods = p.methods, this.options = p.options;
|
|
261
|
+
}
|
|
262
|
+
prompt(e, t) {
|
|
263
|
+
let n = this.methods[0], r = this._transport.mergeOptions(t);
|
|
264
|
+
return l("unary", this._transport, n, r, e);
|
|
265
|
+
}
|
|
266
|
+
flow(e, t) {
|
|
267
|
+
let n = this.methods[1], r = this._transport.mergeOptions(t);
|
|
268
|
+
return l("unary", this._transport, n, r, e);
|
|
269
|
+
}
|
|
270
|
+
}, h = /* @__PURE__ */ function(e) {
|
|
271
|
+
return e[e.UNKNOWN = 0] = "UNKNOWN", e[e.EXPLAIN = 1] = "EXPLAIN", e[e.GENERATE = 2] = "GENERATE", e;
|
|
272
|
+
}({}), g = new class extends a {
|
|
273
|
+
constructor() {
|
|
274
|
+
super("velorum.ModelsRequest", []);
|
|
275
|
+
}
|
|
276
|
+
create(e) {
|
|
277
|
+
let t = globalThis.Object.create(this.messagePrototype);
|
|
278
|
+
return e !== void 0 && o(this, t, e), t;
|
|
279
|
+
}
|
|
280
|
+
internalBinaryRead(e, n, r, i) {
|
|
281
|
+
let a = i ?? this.create(), o = e.pos + n;
|
|
282
|
+
for (; e.pos < o;) {
|
|
283
|
+
let [n, i] = e.tag();
|
|
284
|
+
switch (n) {
|
|
285
|
+
default:
|
|
286
|
+
let o = r.readUnknownField;
|
|
287
|
+
if (o === "throw") throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);
|
|
288
|
+
let s = e.skip(i);
|
|
289
|
+
o !== !1 && (o === !0 ? t.onRead : o)(this.typeName, a, n, i, s);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
return a;
|
|
293
|
+
}
|
|
294
|
+
internalBinaryWrite(e, n, r) {
|
|
295
|
+
let i = r.writeUnknownFields;
|
|
296
|
+
return i !== !1 && (i == 1 ? t.onWrite : i)(this.typeName, e, n), n;
|
|
297
|
+
}
|
|
298
|
+
}(), _ = new class extends a {
|
|
299
|
+
constructor() {
|
|
300
|
+
super("velorum.Model", [
|
|
301
|
+
{
|
|
302
|
+
no: 1,
|
|
303
|
+
name: "identifier",
|
|
304
|
+
kind: "scalar",
|
|
305
|
+
T: 9
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
no: 2,
|
|
309
|
+
name: "name",
|
|
310
|
+
kind: "scalar",
|
|
311
|
+
T: 9
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
no: 3,
|
|
315
|
+
name: "token_cost",
|
|
316
|
+
kind: "scalar",
|
|
317
|
+
T: 2
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
no: 4,
|
|
321
|
+
name: "type",
|
|
322
|
+
kind: "enum",
|
|
323
|
+
repeat: 1,
|
|
324
|
+
T: () => ["velorum.Model.ModelType", h]
|
|
325
|
+
}
|
|
326
|
+
]);
|
|
327
|
+
}
|
|
328
|
+
create(e) {
|
|
329
|
+
let t = globalThis.Object.create(this.messagePrototype);
|
|
330
|
+
return t.identifier = "", t.name = "", t.tokenCost = 0, t.type = [], e !== void 0 && o(this, t, e), t;
|
|
331
|
+
}
|
|
332
|
+
internalBinaryRead(n, r, i, a) {
|
|
333
|
+
let o = a ?? this.create(), s = n.pos + r;
|
|
334
|
+
for (; n.pos < s;) {
|
|
335
|
+
let [r, a] = n.tag();
|
|
336
|
+
switch (r) {
|
|
337
|
+
case 1:
|
|
338
|
+
o.identifier = n.string();
|
|
339
|
+
break;
|
|
340
|
+
case 2:
|
|
341
|
+
o.name = n.string();
|
|
342
|
+
break;
|
|
343
|
+
case 3:
|
|
344
|
+
o.tokenCost = n.float();
|
|
345
|
+
break;
|
|
346
|
+
case 4:
|
|
347
|
+
if (a === e.LengthDelimited) for (let e = n.int32() + n.pos; n.pos < e;) o.type.push(n.int32());
|
|
348
|
+
else o.type.push(n.int32());
|
|
349
|
+
break;
|
|
350
|
+
default:
|
|
351
|
+
let s = i.readUnknownField;
|
|
352
|
+
if (s === "throw") throw new globalThis.Error(`Unknown field ${r} (wire type ${a}) for ${this.typeName}`);
|
|
353
|
+
let c = n.skip(a);
|
|
354
|
+
s !== !1 && (s === !0 ? t.onRead : s)(this.typeName, o, r, a, c);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return o;
|
|
358
|
+
}
|
|
359
|
+
internalBinaryWrite(n, r, i) {
|
|
360
|
+
if (n.identifier !== "" && r.tag(1, e.LengthDelimited).string(n.identifier), n.name !== "" && r.tag(2, e.LengthDelimited).string(n.name), n.tokenCost !== 0 && r.tag(3, e.Bit32).float(n.tokenCost), n.type.length) {
|
|
361
|
+
r.tag(4, e.LengthDelimited).fork();
|
|
362
|
+
for (let e = 0; e < n.type.length; e++) r.int32(n.type[e]);
|
|
363
|
+
r.join();
|
|
364
|
+
}
|
|
365
|
+
let a = i.writeUnknownFields;
|
|
366
|
+
return a !== !1 && (a == 1 ? t.onWrite : a)(this.typeName, n, r), r;
|
|
367
|
+
}
|
|
368
|
+
}(), v = new class extends a {
|
|
369
|
+
constructor() {
|
|
370
|
+
super("velorum.ModelsResponse", [{
|
|
371
|
+
no: 1,
|
|
372
|
+
name: "models",
|
|
373
|
+
kind: "message",
|
|
374
|
+
repeat: 2,
|
|
375
|
+
T: () => _
|
|
376
|
+
}]);
|
|
377
|
+
}
|
|
378
|
+
create(e) {
|
|
379
|
+
let t = globalThis.Object.create(this.messagePrototype);
|
|
380
|
+
return t.models = [], e !== void 0 && o(this, t, e), t;
|
|
381
|
+
}
|
|
382
|
+
internalBinaryRead(e, n, r, i) {
|
|
383
|
+
let a = i ?? this.create(), o = e.pos + n;
|
|
384
|
+
for (; e.pos < o;) {
|
|
385
|
+
let [n, i] = e.tag();
|
|
386
|
+
switch (n) {
|
|
387
|
+
case 1:
|
|
388
|
+
a.models.push(_.internalBinaryRead(e, e.uint32(), r));
|
|
389
|
+
break;
|
|
390
|
+
default:
|
|
391
|
+
let o = r.readUnknownField;
|
|
392
|
+
if (o === "throw") throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);
|
|
393
|
+
let s = e.skip(i);
|
|
394
|
+
o !== !1 && (o === !0 ? t.onRead : o)(this.typeName, a, n, i, s);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
return a;
|
|
398
|
+
}
|
|
399
|
+
internalBinaryWrite(n, r, i) {
|
|
400
|
+
for (let t = 0; t < n.models.length; t++) _.internalBinaryWrite(n.models[t], r.tag(1, e.LengthDelimited).fork(), i).join();
|
|
401
|
+
let a = i.writeUnknownFields;
|
|
402
|
+
return a !== !1 && (a == 1 ? t.onWrite : a)(this.typeName, n, r), r;
|
|
403
|
+
}
|
|
404
|
+
}(), y = new c("velorum.InfoService", [{
|
|
405
|
+
name: "Models",
|
|
406
|
+
options: {},
|
|
407
|
+
I: g,
|
|
408
|
+
O: v
|
|
409
|
+
}]), b = class {
|
|
410
|
+
constructor(e) {
|
|
411
|
+
this._transport = e, this.typeName = y.typeName, this.methods = y.methods, this.options = y.options;
|
|
412
|
+
}
|
|
413
|
+
models(e, t) {
|
|
414
|
+
let n = this.methods[0], r = this._transport.mergeOptions(t);
|
|
415
|
+
return l("unary", this._transport, n, r, e);
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
//#endregion
|
|
419
|
+
export { d as FlowRequest, f as FlowResponse, p as GenerateService, m as GenerateServiceClient, y as InfoService, b as InfoServiceClient, _ as Model, h as Model_ModelType, g as ModelsRequest, v as ModelsResponse, u as PromptRequest };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code0-tech/tucana",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.72",
|
|
4
4
|
"description": "Code0 GRPC Protocol",
|
|
5
5
|
"homepage": "https://github.com/code0-tech/tucana#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -10,15 +10,16 @@
|
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/code0-tech/tucana.git"
|
|
12
12
|
},
|
|
13
|
-
"license": "
|
|
13
|
+
"license": "MIT",
|
|
14
14
|
"author": "",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "vite build",
|
|
18
18
|
"generate:aquila": "protoc --ts_opt=add_pb_suffix --ts_opt=generate_dependencies --ts_out=pb/_generated --proto_path=../../proto/aquila --proto_path=../../proto/shared ../../proto/aquila/*.proto",
|
|
19
19
|
"generate:sagittarius": "protoc --ts_opt=add_pb_suffix --ts_opt=generate_dependencies --ts_out=pb/_generated --proto_path=../../proto/sagittarius --proto_path=../../proto/shared ../../proto/sagittarius/*.proto",
|
|
20
|
+
"generate:velorum": "protoc --ts_opt=add_pb_suffix --ts_opt=generate_dependencies --ts_out=pb/_generated --proto_path=../../proto/velorum --proto_path=../../proto/shared ../../proto/velorum/*.proto",
|
|
20
21
|
"generate:shared": "protoc --ts_opt=add_pb_suffix --ts_opt=generate_dependencies --ts_out=pb/_generated --proto_path=../../proto/shared ../../proto/shared/*.proto",
|
|
21
|
-
"generate": "npm run clean && npm run generate:shared && npm run generate:sagittarius && npm run generate:aquila && npm run generate:exports",
|
|
22
|
+
"generate": "npm run clean && npm run generate:shared && npm run generate:sagittarius && npm run generate:aquila && npm run generate:velorum && npm run generate:exports",
|
|
22
23
|
"generate:exports": "node scripts/generateExports.mjs",
|
|
23
24
|
"clean": "rm -rf pb/_generated/*.js && rm -rf pb/_generated/*.ts && rm -rf helpers/*.js"
|
|
24
25
|
},
|
|
@@ -52,6 +53,11 @@
|
|
|
52
53
|
"import": "./dist/sagittarius.es.js",
|
|
53
54
|
"require": "./dist/sagittarius.cjs.js"
|
|
54
55
|
},
|
|
56
|
+
"./velorum": {
|
|
57
|
+
"types": "./dist/velorum.d.ts",
|
|
58
|
+
"import": "./dist/velorum.es.js",
|
|
59
|
+
"require": "./dist/velorum.cjs.js"
|
|
60
|
+
},
|
|
55
61
|
"./helpers": {
|
|
56
62
|
"types": "./dist/helpers.d.ts",
|
|
57
63
|
"import": "./dist/helpers.es.js",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./shared.runtime_usage_pb-6pp995qK.cjs`);function t(t,n){let r=t;return r.service=n,r.localName=r.localName??e.K(r.name),r.serverStreaming=!!r.serverStreaming,r.clientStreaming=!!r.clientStreaming,r.options=r.options??{},r.idempotency=r.idempotency??void 0,r}var n=class{constructor(e,n,r){this.typeName=e,this.methods=n.map(e=>t(e,this)),this.options=r??{}}};function r(t,n,r,i,a){if(t==`unary`){let e=(e,t,r)=>n.unary(e,t,r);for(let t of(i.interceptors??[]).filter(e=>e.interceptUnary).reverse()){let n=e;e=(e,r,i)=>t.interceptUnary(n,e,r,i)}return e(r,a,i)}if(t==`serverStreaming`){let e=(e,t,r)=>n.serverStreaming(e,t,r);for(let t of(i.interceptors??[]).filter(e=>e.interceptServerStreaming).reverse()){let n=e;e=(e,r,i)=>t.interceptServerStreaming(n,e,r,i)}return e(r,a,i)}if(t==`clientStreaming`){let e=(e,t)=>n.clientStreaming(e,t);for(let t of(i.interceptors??[]).filter(e=>e.interceptClientStreaming).reverse()){let n=e;e=(e,r)=>t.interceptClientStreaming(n,e,r)}return e(r,i)}if(t==`duplex`){let e=(e,t)=>n.duplex(e,t);for(let t of(i.interceptors??[]).filter(e=>e.interceptDuplex).reverse()){let n=e;e=(e,r)=>t.interceptDuplex(n,e,r)}return e(r,i)}e.q(t)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./shared.runtime_usage_pb-6pp995qK.cjs`);var t=new class extends e.W{constructor(){super(`shared.ValidationFlow`,[{no:1,name:`flow_id`,kind:`scalar`,T:3,L:0},{no:2,name:`project_id`,kind:`scalar`,T:3,L:0},{no:3,name:`type`,kind:`scalar`,T:9},{no:4,name:`data_types`,kind:`message`,repeat:2,T:()=>e.V},{no:5,name:`settings`,kind:`message`,repeat:2,T:()=>r},{no:6,name:`starting_node_id`,kind:`scalar`,T:3,L:0},{no:7,name:`node_functions`,kind:`message`,repeat:2,T:()=>i},{no:8,name:`project_slug`,kind:`scalar`,T:9},{no:9,name:`disable_reason`,kind:`scalar`,opt:!0,T:9},{no:10,name:`signature`,kind:`scalar`,T:9}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.flowId=0n,n.projectId=0n,n.type=``,n.dataTypes=[],n.settings=[],n.startingNodeId=0n,n.nodeFunctions=[],n.projectSlug=``,n.signature=``,t!==void 0&&e.G(this,n,t),n}internalBinaryRead(t,n,a,o){let s=o??this.create(),c=t.pos+n;for(;t.pos<c;){let[n,o]=t.tag();switch(n){case 1:s.flowId=t.int64().toBigInt();break;case 2:s.projectId=t.int64().toBigInt();break;case 3:s.type=t.string();break;case 4:s.dataTypes.push(e.V.internalBinaryRead(t,t.uint32(),a));break;case 5:s.settings.push(r.internalBinaryRead(t,t.uint32(),a));break;case 6:s.startingNodeId=t.int64().toBigInt();break;case 7:s.nodeFunctions.push(i.internalBinaryRead(t,t.uint32(),a));break;case 8:s.projectSlug=t.string();break;case 9:s.disableReason=t.string();break;case 10:s.signature=t.string();break;default:let c=a.readUnknownField;if(c===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${o}) for ${this.typeName}`);let l=t.skip(o);c!==!1&&(c===!0?e.J.onRead:c)(this.typeName,s,n,o,l)}}return s}internalBinaryWrite(t,n,a){t.flowId!==0n&&n.tag(1,e.Y.Varint).int64(t.flowId),t.projectId!==0n&&n.tag(2,e.Y.Varint).int64(t.projectId),t.type!==``&&n.tag(3,e.Y.LengthDelimited).string(t.type);for(let r=0;r<t.dataTypes.length;r++)e.V.internalBinaryWrite(t.dataTypes[r],n.tag(4,e.Y.LengthDelimited).fork(),a).join();for(let i=0;i<t.settings.length;i++)r.internalBinaryWrite(t.settings[i],n.tag(5,e.Y.LengthDelimited).fork(),a).join();t.startingNodeId!==0n&&n.tag(6,e.Y.Varint).int64(t.startingNodeId);for(let r=0;r<t.nodeFunctions.length;r++)i.internalBinaryWrite(t.nodeFunctions[r],n.tag(7,e.Y.LengthDelimited).fork(),a).join();t.projectSlug!==``&&n.tag(8,e.Y.LengthDelimited).string(t.projectSlug),t.disableReason!==void 0&&n.tag(9,e.Y.LengthDelimited).string(t.disableReason),t.signature!==``&&n.tag(10,e.Y.LengthDelimited).string(t.signature);let o=a.writeUnknownFields;return o!==!1&&(o==1?e.J.onWrite:o)(this.typeName,t,n),n}},n=new class extends e.W{constructor(){super(`shared.ExecutionFlow`,[{no:1,name:`flow_id`,kind:`scalar`,T:3,L:0},{no:5,name:`project_id`,kind:`scalar`,T:3,L:0},{no:2,name:`starting_node_id`,kind:`scalar`,T:3,L:0},{no:4,name:`node_functions`,kind:`message`,repeat:2,T:()=>i},{no:3,name:`input_value`,kind:`message`,T:()=>e.I}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.flowId=0n,n.projectId=0n,n.startingNodeId=0n,n.nodeFunctions=[],t!==void 0&&e.G(this,n,t),n}internalBinaryRead(t,n,r,a){let o=a??this.create(),s=t.pos+n;for(;t.pos<s;){let[n,a]=t.tag();switch(n){case 1:o.flowId=t.int64().toBigInt();break;case 5:o.projectId=t.int64().toBigInt();break;case 2:o.startingNodeId=t.int64().toBigInt();break;case 4:o.nodeFunctions.push(i.internalBinaryRead(t,t.uint32(),r));break;case 3:o.inputValue=e.I.internalBinaryRead(t,t.uint32(),r,o.inputValue);break;default:let s=r.readUnknownField;if(s===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${a}) for ${this.typeName}`);let c=t.skip(a);s!==!1&&(s===!0?e.J.onRead:s)(this.typeName,o,n,a,c)}}return o}internalBinaryWrite(t,n,r){t.flowId!==0n&&n.tag(1,e.Y.Varint).int64(t.flowId),t.startingNodeId!==0n&&n.tag(2,e.Y.Varint).int64(t.startingNodeId),t.inputValue&&e.I.internalBinaryWrite(t.inputValue,n.tag(3,e.Y.LengthDelimited).fork(),r).join();for(let a=0;a<t.nodeFunctions.length;a++)i.internalBinaryWrite(t.nodeFunctions[a],n.tag(4,e.Y.LengthDelimited).fork(),r).join();t.projectId!==0n&&n.tag(5,e.Y.Varint).int64(t.projectId);let a=r.writeUnknownFields;return a!==!1&&(a==1?e.J.onWrite:a)(this.typeName,t,n),n}},r=new class extends e.W{constructor(){super(`shared.FlowSetting`,[{no:1,name:`database_id`,kind:`scalar`,T:3,L:0},{no:2,name:`flow_setting_id`,kind:`scalar`,T:9},{no:3,name:`value`,kind:`message`,T:()=>e.I},{no:4,name:`cast`,kind:`scalar`,opt:!0,T:9}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.databaseId=0n,n.flowSettingId=``,t!==void 0&&e.G(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.databaseId=t.int64().toBigInt();break;case 2:a.flowSettingId=t.string();break;case 3:a.value=e.I.internalBinaryRead(t,t.uint32(),r,a.value);break;case 4:a.cast=t.string();break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.J.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){t.databaseId!==0n&&n.tag(1,e.Y.Varint).int64(t.databaseId),t.flowSettingId!==``&&n.tag(2,e.Y.LengthDelimited).string(t.flowSettingId),t.value&&e.I.internalBinaryWrite(t.value,n.tag(3,e.Y.LengthDelimited).fork(),r).join(),t.cast!==void 0&&n.tag(4,e.Y.LengthDelimited).string(t.cast);let i=r.writeUnknownFields;return i!==!1&&(i==1?e.J.onWrite:i)(this.typeName,t,n),n}},i=new class extends e.W{constructor(){super(`shared.NodeFunction`,[{no:1,name:`database_id`,kind:`scalar`,T:3,L:0},{no:2,name:`runtime_function_id`,kind:`scalar`,T:9},{no:3,name:`parameters`,kind:`message`,repeat:2,T:()=>o},{no:4,name:`next_node_id`,kind:`scalar`,opt:!0,T:3,L:0},{no:5,name:`definition_source`,kind:`scalar`,T:9}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.databaseId=0n,n.runtimeFunctionId=``,n.parameters=[],n.definitionSource=``,t!==void 0&&e.G(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),s=t.pos+n;for(;t.pos<s;){let[n,i]=t.tag();switch(n){case 1:a.databaseId=t.int64().toBigInt();break;case 2:a.runtimeFunctionId=t.string();break;case 3:a.parameters.push(o.internalBinaryRead(t,t.uint32(),r));break;case 4:a.nextNodeId=t.int64().toBigInt();break;case 5:a.definitionSource=t.string();break;default:let s=r.readUnknownField;if(s===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let c=t.skip(i);s!==!1&&(s===!0?e.J.onRead:s)(this.typeName,a,n,i,c)}}return a}internalBinaryWrite(t,n,r){t.databaseId!==0n&&n.tag(1,e.Y.Varint).int64(t.databaseId),t.runtimeFunctionId!==``&&n.tag(2,e.Y.LengthDelimited).string(t.runtimeFunctionId);for(let i=0;i<t.parameters.length;i++)o.internalBinaryWrite(t.parameters[i],n.tag(3,e.Y.LengthDelimited).fork(),r).join();t.nextNodeId!==void 0&&n.tag(4,e.Y.Varint).int64(t.nextNodeId),t.definitionSource!==``&&n.tag(5,e.Y.LengthDelimited).string(t.definitionSource);let i=r.writeUnknownFields;return i!==!1&&(i==1?e.J.onWrite:i)(this.typeName,t,n),n}},a=new class extends e.W{constructor(){super(`shared.NodeValue`,[{no:1,name:`literal_value`,kind:`message`,oneof:`value`,T:()=>e.I},{no:2,name:`reference_value`,kind:`message`,oneof:`value`,T:()=>s},{no:3,name:`sub_flow`,kind:`message`,oneof:`value`,T:()=>c}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.value={oneofKind:void 0},t!==void 0&&e.G(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.value={oneofKind:`literalValue`,literalValue:e.I.internalBinaryRead(t,t.uint32(),r,a.value.literalValue)};break;case 2:a.value={oneofKind:`referenceValue`,referenceValue:s.internalBinaryRead(t,t.uint32(),r,a.value.referenceValue)};break;case 3:a.value={oneofKind:`subFlow`,subFlow:c.internalBinaryRead(t,t.uint32(),r,a.value.subFlow)};break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let l=t.skip(i);o!==!1&&(o===!0?e.J.onRead:o)(this.typeName,a,n,i,l)}}return a}internalBinaryWrite(t,n,r){t.value.oneofKind===`literalValue`&&e.I.internalBinaryWrite(t.value.literalValue,n.tag(1,e.Y.LengthDelimited).fork(),r).join(),t.value.oneofKind===`referenceValue`&&s.internalBinaryWrite(t.value.referenceValue,n.tag(2,e.Y.LengthDelimited).fork(),r).join(),t.value.oneofKind===`subFlow`&&c.internalBinaryWrite(t.value.subFlow,n.tag(3,e.Y.LengthDelimited).fork(),r).join();let i=r.writeUnknownFields;return i!==!1&&(i==1?e.J.onWrite:i)(this.typeName,t,n),n}},o=new class extends e.W{constructor(){super(`shared.NodeParameter`,[{no:1,name:`database_id`,kind:`scalar`,T:3,L:0},{no:2,name:`runtime_parameter_id`,kind:`scalar`,T:9},{no:3,name:`value`,kind:`message`,T:()=>a},{no:4,name:`cast`,kind:`scalar`,opt:!0,T:9}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.databaseId=0n,n.runtimeParameterId=``,t!==void 0&&e.G(this,n,t),n}internalBinaryRead(t,n,r,i){let o=i??this.create(),s=t.pos+n;for(;t.pos<s;){let[n,i]=t.tag();switch(n){case 1:o.databaseId=t.int64().toBigInt();break;case 2:o.runtimeParameterId=t.string();break;case 3:o.value=a.internalBinaryRead(t,t.uint32(),r,o.value);break;case 4:o.cast=t.string();break;default:let s=r.readUnknownField;if(s===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let c=t.skip(i);s!==!1&&(s===!0?e.J.onRead:s)(this.typeName,o,n,i,c)}}return o}internalBinaryWrite(t,n,r){t.databaseId!==0n&&n.tag(1,e.Y.Varint).int64(t.databaseId),t.runtimeParameterId!==``&&n.tag(2,e.Y.LengthDelimited).string(t.runtimeParameterId),t.value&&a.internalBinaryWrite(t.value,n.tag(3,e.Y.LengthDelimited).fork(),r).join(),t.cast!==void 0&&n.tag(4,e.Y.LengthDelimited).string(t.cast);let i=r.writeUnknownFields;return i!==!1&&(i==1?e.J.onWrite:i)(this.typeName,t,n),n}},s=new class extends e.W{constructor(){super(`shared.ReferenceValue`,[{no:1,name:`flow_input`,kind:`message`,oneof:`target`,T:()=>u},{no:2,name:`node_id`,kind:`scalar`,oneof:`target`,T:3,L:0},{no:3,name:`input_type`,kind:`message`,oneof:`target`,T:()=>d},{no:4,name:`paths`,kind:`message`,repeat:2,T:()=>f}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.target={oneofKind:void 0},n.paths=[],t!==void 0&&e.G(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.target={oneofKind:`flowInput`,flowInput:u.internalBinaryRead(t,t.uint32(),r,a.target.flowInput)};break;case 2:a.target={oneofKind:`nodeId`,nodeId:t.int64().toBigInt()};break;case 3:a.target={oneofKind:`inputType`,inputType:d.internalBinaryRead(t,t.uint32(),r,a.target.inputType)};break;case 4:a.paths.push(f.internalBinaryRead(t,t.uint32(),r));break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.J.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){t.target.oneofKind===`flowInput`&&u.internalBinaryWrite(t.target.flowInput,n.tag(1,e.Y.LengthDelimited).fork(),r).join(),t.target.oneofKind===`nodeId`&&n.tag(2,e.Y.Varint).int64(t.target.nodeId),t.target.oneofKind===`inputType`&&d.internalBinaryWrite(t.target.inputType,n.tag(3,e.Y.LengthDelimited).fork(),r).join();for(let i=0;i<t.paths.length;i++)f.internalBinaryWrite(t.paths[i],n.tag(4,e.Y.LengthDelimited).fork(),r).join();let i=r.writeUnknownFields;return i!==!1&&(i==1?e.J.onWrite:i)(this.typeName,t,n),n}},c=new class extends e.W{constructor(){super(`shared.SubFlow`,[{no:1,name:`starting_node_id`,kind:`scalar`,oneof:`executionReference`,T:3,L:0},{no:2,name:`function_identifier`,kind:`scalar`,oneof:`executionReference`,T:9},{no:3,name:`signature`,kind:`scalar`,T:9},{no:4,name:`settings`,kind:`message`,repeat:2,T:()=>l}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.executionReference={oneofKind:void 0},n.signature=``,n.settings=[],t!==void 0&&e.G(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.executionReference={oneofKind:`startingNodeId`,startingNodeId:t.int64().toBigInt()};break;case 2:a.executionReference={oneofKind:`functionIdentifier`,functionIdentifier:t.string()};break;case 3:a.signature=t.string();break;case 4:a.settings.push(l.internalBinaryRead(t,t.uint32(),r));break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.J.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){t.executionReference.oneofKind===`startingNodeId`&&n.tag(1,e.Y.Varint).int64(t.executionReference.startingNodeId),t.executionReference.oneofKind===`functionIdentifier`&&n.tag(2,e.Y.LengthDelimited).string(t.executionReference.functionIdentifier),t.signature!==``&&n.tag(3,e.Y.LengthDelimited).string(t.signature);for(let i=0;i<t.settings.length;i++)l.internalBinaryWrite(t.settings[i],n.tag(4,e.Y.LengthDelimited).fork(),r).join();let i=r.writeUnknownFields;return i!==!1&&(i==1?e.J.onWrite:i)(this.typeName,t,n),n}},l=new class extends e.W{constructor(){super(`shared.SubFlowSetting`,[{no:1,name:`identifier`,kind:`scalar`,T:9},{no:2,name:`default_value`,kind:`message`,T:()=>e.I},{no:3,name:`optional`,kind:`scalar`,opt:!0,T:8},{no:4,name:`hidden`,kind:`scalar`,opt:!0,T:8}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.identifier=``,t!==void 0&&e.G(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.identifier=t.string();break;case 2:a.defaultValue=e.I.internalBinaryRead(t,t.uint32(),r,a.defaultValue);break;case 3:a.optional=t.bool();break;case 4:a.hidden=t.bool();break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.J.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){t.identifier!==``&&n.tag(1,e.Y.LengthDelimited).string(t.identifier),t.defaultValue&&e.I.internalBinaryWrite(t.defaultValue,n.tag(2,e.Y.LengthDelimited).fork(),r).join(),t.optional!==void 0&&n.tag(3,e.Y.Varint).bool(t.optional),t.hidden!==void 0&&n.tag(4,e.Y.Varint).bool(t.hidden);let i=r.writeUnknownFields;return i!==!1&&(i==1?e.J.onWrite:i)(this.typeName,t,n),n}},u=new class extends e.W{constructor(){super(`shared.FlowInput`,[])}create(t){let n=globalThis.Object.create(this.messagePrototype);return t!==void 0&&e.G(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.J.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){let i=r.writeUnknownFields;return i!==!1&&(i==1?e.J.onWrite:i)(this.typeName,t,n),n}},d=new class extends e.W{constructor(){super(`shared.InputType`,[{no:1,name:`node_id`,kind:`scalar`,T:3,L:0},{no:2,name:`parameter_index`,kind:`scalar`,T:3,L:0},{no:3,name:`input_index`,kind:`scalar`,T:3,L:0}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.nodeId=0n,n.parameterIndex=0n,n.inputIndex=0n,t!==void 0&&e.G(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.nodeId=t.int64().toBigInt();break;case 2:a.parameterIndex=t.int64().toBigInt();break;case 3:a.inputIndex=t.int64().toBigInt();break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.J.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){t.nodeId!==0n&&n.tag(1,e.Y.Varint).int64(t.nodeId),t.parameterIndex!==0n&&n.tag(2,e.Y.Varint).int64(t.parameterIndex),t.inputIndex!==0n&&n.tag(3,e.Y.Varint).int64(t.inputIndex);let i=r.writeUnknownFields;return i!==!1&&(i==1?e.J.onWrite:i)(this.typeName,t,n),n}},f=new class extends e.W{constructor(){super(`shared.ReferencePath`,[{no:1,name:`path`,kind:`scalar`,opt:!0,T:9},{no:2,name:`array_index`,kind:`scalar`,opt:!0,T:3,L:0}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return t!==void 0&&e.G(this,n,t),n}internalBinaryRead(t,n,r,i){let a=i??this.create(),o=t.pos+n;for(;t.pos<o;){let[n,i]=t.tag();switch(n){case 1:a.path=t.string();break;case 2:a.arrayIndex=t.int64().toBigInt();break;default:let o=r.readUnknownField;if(o===`throw`)throw new globalThis.Error(`Unknown field ${n} (wire type ${i}) for ${this.typeName}`);let s=t.skip(i);o!==!1&&(o===!0?e.J.onRead:o)(this.typeName,a,n,i,s)}}return a}internalBinaryWrite(t,n,r){t.path!==void 0&&n.tag(1,e.Y.LengthDelimited).string(t.path),t.arrayIndex!==void 0&&n.tag(2,e.Y.Varint).int64(t.arrayIndex);let i=r.writeUnknownFields;return i!==!1&&(i==1?e.J.onWrite:i)(this.typeName,t,n),n}},p=new class extends e.W{constructor(){super(`shared.Flows`,[{no:1,name:`flows`,kind:`message`,repeat:2,T:()=>t}])}create(t){let n=globalThis.Object.create(this.messagePrototype);return n.flows=[],t!==void 0&&e.G(this,n,t),n}internalBinaryRead(n,r,i,a){let o=a??this.create(),s=n.pos+r;for(;n.pos<s;){let[r,a]=n.tag();switch(r){case 1:o.flows.push(t.internalBinaryRead(n,n.uint32(),i));break;default:let s=i.readUnknownField;if(s===`throw`)throw new globalThis.Error(`Unknown field ${r} (wire type ${a}) for ${this.typeName}`);let c=n.skip(a);s!==!1&&(s===!0?e.J.onRead:s)(this.typeName,o,r,a,c)}}return o}internalBinaryWrite(n,r,i){for(let a=0;a<n.flows.length;a++)t.internalBinaryWrite(n.flows[a],r.tag(1,e.Y.LengthDelimited).fork(),i).join();let a=i.writeUnknownFields;return a!==!1&&(a==1?e.J.onWrite:a)(this.typeName,n,r),r}};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return s}});
|