exoagent 0.0.11 → 0.0.13
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/README.md +8 -11
- package/dist/code-mode.d.ts +2 -24
- package/dist/exoeval/builtins.d.ts +173 -0
- package/dist/exoeval/evaluator.d.ts +59 -0
- package/dist/exoeval/expr.d.ts +50 -0
- package/dist/exoeval/index.d.ts +6 -0
- package/dist/exoeval/scope.d.ts +13 -0
- package/dist/exoeval/tool.d.ts +44 -0
- package/dist/exoeval/utils.d.ts +9 -0
- package/dist/index.d.ts +3 -5
- package/dist/index.mjs +8128 -197
- package/dist/rpc-toolset-test-helpers.d.ts +2 -5
- package/dist/sql/builder.d.ts +6 -7
- package/dist/sql/expression.d.ts +1 -2
- package/dist/sql.mjs +61 -77
- package/dist/tool-DGs9ZxVn.js +175 -0
- package/dist/tool-wrapper.d.ts +6 -13
- package/package.json +6 -10
- package/dist/capnweb/LICENSE.txt +0 -21
- package/dist/capnweb/README.md +0 -734
- package/dist/capnweb/dist/index-workers.cjs +0 -2791
- package/dist/capnweb/dist/index-workers.cjs.map +0 -1
- package/dist/capnweb/dist/index-workers.d.cts +0 -2
- package/dist/capnweb/dist/index-workers.d.ts +0 -2
- package/dist/capnweb/dist/index-workers.js +0 -2754
- package/dist/capnweb/dist/index-workers.js.map +0 -1
- package/dist/capnweb/dist/index.cjs +0 -2768
- package/dist/capnweb/dist/index.cjs.map +0 -1
- package/dist/capnweb/dist/index.d.cts +0 -383
- package/dist/capnweb/dist/index.d.ts +0 -383
- package/dist/capnweb/dist/index.js +0 -2751
- package/dist/capnweb/dist/index.js.map +0 -1
- package/dist/capnweb/package.json +0 -59
- package/dist/capnweb-test-helpers.d.ts +0 -25
- package/dist/chunk-VBDAOXYI-BhoIkhUn.mjs +0 -831
- package/dist/code-mode-deno.d.ts +0 -13
- package/dist/code-mode-runtime.d.ts +0 -1
- package/dist/nodefs-C8H-6XZ_.mjs +0 -26
- package/dist/opfs-ahp-Dy9HQOrY.mjs +0 -367
- package/dist/rpc-toolset-BnC2BXPq.js +0 -146
- package/dist/rpc-toolset-test-helpers.d.mts +0 -254
- package/dist/rpc-toolset-test-helpers.mjs +0 -10364
- package/dist/rpc-toolset.d.ts +0 -34
- package/dist/stream-transport.d.ts +0 -11
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import * as kysely0 from "kysely";
|
|
2
|
-
import { CompiledQuery, Dialect, RawBuilder } from "kysely";
|
|
3
|
-
|
|
4
|
-
//#region packages/capnweb/dist/index.d.ts
|
|
5
|
-
|
|
6
|
-
declare const __RPC_TARGET_BRAND: '__RPC_TARGET_BRAND';
|
|
7
|
-
interface RpcTargetBranded {
|
|
8
|
-
[__RPC_TARGET_BRAND]: never;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// Types that can be used through `Stub`s
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Classes which are intended to be passed by reference and called over RPC must extend
|
|
15
|
-
* `RpcTarget`. A class which does not extend `RpcTarget` (and which doesn't have built-in support
|
|
16
|
-
* from the RPC system) cannot be passed in an RPC message at all; an exception will be thrown.
|
|
17
|
-
*
|
|
18
|
-
* Note that on Cloudflare Workers, this `RpcTarget` is an alias for the one exported from the
|
|
19
|
-
* "cloudflare:workers" module, so they can be used interchangably.
|
|
20
|
-
*/
|
|
21
|
-
interface RpcTarget extends RpcTargetBranded {}
|
|
22
|
-
declare const RpcTarget: {
|
|
23
|
-
new (): RpcTarget;
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Empty interface used as default type parameter for sessions where the other side doesn't
|
|
27
|
-
* necessarily export a main interface.
|
|
28
|
-
*/
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region src/rpc-toolset.d.ts
|
|
31
|
-
|
|
32
|
-
declare const callbackMetadataKey: unique symbol;
|
|
33
|
-
type ToolCallback<T extends (arg: any) => unknown> = T | {
|
|
34
|
-
[callbackMetadataKey]: {
|
|
35
|
-
callback: T;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
declare class RpcToolset extends RpcTarget {
|
|
39
|
-
constructor();
|
|
40
|
-
}
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region src/sql/sql.d.ts
|
|
43
|
-
type RawSql = RawBuilder<unknown>;
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region src/sql/expression.d.ts
|
|
46
|
-
type LiteralValue = number | string | boolean | null;
|
|
47
|
-
type SqlExpressionIn = LiteralValue | SqlExpression;
|
|
48
|
-
declare class SqlExpression extends RpcToolset {
|
|
49
|
-
precedence: number;
|
|
50
|
-
constructor(precedence?: number);
|
|
51
|
-
compile: () => RawSql;
|
|
52
|
-
or(expr: SqlExpression): BinaryExpression;
|
|
53
|
-
and(expr: SqlExpression): BinaryExpression;
|
|
54
|
-
not(): UnaryExpression;
|
|
55
|
-
isNull(): UnaryExpression;
|
|
56
|
-
isNotNull(): UnaryExpression;
|
|
57
|
-
'<'(expr: SqlExpression | number | string): BinaryExpression;
|
|
58
|
-
'<='(expr: SqlExpression | number | string): BinaryExpression;
|
|
59
|
-
'>'(expr: SqlExpression | number | string): BinaryExpression;
|
|
60
|
-
'>='(expr: SqlExpression | number | string): BinaryExpression;
|
|
61
|
-
'='(expr: SqlExpressionIn): BinaryExpression;
|
|
62
|
-
'<>'(expr: SqlExpressionIn): BinaryExpression;
|
|
63
|
-
'!='(expr: SqlExpressionIn): BinaryExpression;
|
|
64
|
-
'LIKE'(expr: SqlExpression | string): BinaryExpression;
|
|
65
|
-
'NOT LIKE'(expr: SqlExpression | string): BinaryExpression;
|
|
66
|
-
'+'(expr: SqlExpression | number | string): BinaryExpression;
|
|
67
|
-
'-'(expr: SqlExpression | number | string): BinaryExpression;
|
|
68
|
-
'*'(expr: SqlExpression | number | string): BinaryExpression;
|
|
69
|
-
'/'(expr: SqlExpression | number | string): BinaryExpression;
|
|
70
|
-
'%'(expr: SqlExpression | number | string): BinaryExpression;
|
|
71
|
-
asc(): OrderByValue;
|
|
72
|
-
desc(): OrderByValue;
|
|
73
|
-
}
|
|
74
|
-
declare class BinaryExpression extends SqlExpression {
|
|
75
|
-
private readonly left;
|
|
76
|
-
private readonly right;
|
|
77
|
-
private readonly operator;
|
|
78
|
-
constructor(left: SqlExpression, right: SqlExpression, operator: RawSql, precedence?: number);
|
|
79
|
-
compile: () => kysely0.RawBuilder<unknown>;
|
|
80
|
-
}
|
|
81
|
-
declare class UnaryExpression extends SqlExpression {
|
|
82
|
-
private readonly operand;
|
|
83
|
-
private readonly operator;
|
|
84
|
-
private readonly placement;
|
|
85
|
-
constructor(operand: SqlExpression, operator: RawSql, placement: 'prefix' | 'postfix', precedence?: number);
|
|
86
|
-
compile: () => kysely0.RawBuilder<unknown>;
|
|
87
|
-
}
|
|
88
|
-
declare class ColumnReferenceExpression extends SqlExpression {
|
|
89
|
-
readonly alias: string;
|
|
90
|
-
readonly column: string;
|
|
91
|
-
constructor(alias: string, column: string);
|
|
92
|
-
compile: () => kysely0.RawBuilder<unknown>;
|
|
93
|
-
}
|
|
94
|
-
declare class OrderByValue {
|
|
95
|
-
value: SqlExpression;
|
|
96
|
-
direction?: RawSql | undefined;
|
|
97
|
-
constructor(value: SqlExpression, direction?: RawSql | undefined);
|
|
98
|
-
}
|
|
99
|
-
//#endregion
|
|
100
|
-
//#region src/sql/builder.d.ts
|
|
101
|
-
type RowLikeRaw = {
|
|
102
|
-
[key: string]: SqlExpression;
|
|
103
|
-
};
|
|
104
|
-
type RowLikeRawIn = {
|
|
105
|
-
[key: string]: SqlExpressionIn;
|
|
106
|
-
};
|
|
107
|
-
type RowLike = RowLikeRaw | TableBase;
|
|
108
|
-
type RowLikeIn = RowLikeRawIn | RowLike;
|
|
109
|
-
type AsRowLike<R$1 extends RowLikeIn> = R$1 extends TableBase ? R$1 : { [key in keyof R$1]: R$1[key] extends SqlExpression ? R$1[key] : SqlExpression };
|
|
110
|
-
type NamespacedExpression<A, R$1> = (arg: A) => R$1;
|
|
111
|
-
type FromItem<N extends string, F extends RowLike> = {
|
|
112
|
-
alias: N;
|
|
113
|
-
toRowLike: () => F;
|
|
114
|
-
compile: (opts?: {
|
|
115
|
-
isSubquery?: boolean;
|
|
116
|
-
}) => RawSql;
|
|
117
|
-
onExpression?: SqlExpression;
|
|
118
|
-
};
|
|
119
|
-
type TableNamespace = {
|
|
120
|
-
[key: string]: RowLike;
|
|
121
|
-
};
|
|
122
|
-
type OrderByItem<TN extends TableNamespace> = NamespacedExpression<TN, SqlExpression | SqlExpression[] | OrderByValue | OrderByValue[] | (SqlExpression | OrderByValue)[]>;
|
|
123
|
-
type Tables<TN extends TableNamespace> = { [k in keyof TN & string]: {
|
|
124
|
-
fromItem: FromItem<k, TN[k]>;
|
|
125
|
-
joinType: 'inner' | 'left' | null;
|
|
126
|
-
on?: SqlExpression;
|
|
127
|
-
isLateral: boolean;
|
|
128
|
-
} };
|
|
129
|
-
type QueryBuilderParams<N extends string, TN extends TableNamespace, S extends RowLike> = {
|
|
130
|
-
db: Database;
|
|
131
|
-
alias: N;
|
|
132
|
-
tables: Tables<TN>;
|
|
133
|
-
selectRowLike: S;
|
|
134
|
-
whereExpression?: SqlExpression;
|
|
135
|
-
orderByExpressions?: OrderByValue[];
|
|
136
|
-
limit?: number;
|
|
137
|
-
offset?: number;
|
|
138
|
-
rawTable: TableClass<N> | undefined;
|
|
139
|
-
};
|
|
140
|
-
declare class QueryBuilder<N extends string, TN extends TableNamespace, S extends RowLike> extends RpcToolset implements FromItem<N, S> {
|
|
141
|
-
#private;
|
|
142
|
-
readonly alias: N;
|
|
143
|
-
private selectRowLike;
|
|
144
|
-
private tables;
|
|
145
|
-
private whereExpression?;
|
|
146
|
-
private orderByExpressions?;
|
|
147
|
-
private arg;
|
|
148
|
-
private rawTable;
|
|
149
|
-
constructor(params: QueryBuilderParams<N, TN, S>);
|
|
150
|
-
select<S2 extends RowLikeIn>(select: ToolCallback<(arg: TN) => S2>): QueryBuilder<N, TN, AsRowLike<S2>>;
|
|
151
|
-
where(where: ToolCallback<(arg: TN) => SqlExpressionIn>): QueryBuilder<N, TN, S>;
|
|
152
|
-
orderBy(orderBy: ToolCallback<OrderByItem<TN>>): QueryBuilder<N, TN, S>;
|
|
153
|
-
limit(limit: number): QueryBuilder<N, TN, S>;
|
|
154
|
-
offset(offset: number): QueryBuilder<N, TN, S>;
|
|
155
|
-
join<N2 extends string, F2 extends TableClass<N2>>(fromItem: F2 | NamespacedExpression<TN, F2>, on?: NamespacedExpression<TN & { [k in N2]: InstanceType<F2> }, SqlExpressionIn>): QueryBuilder<N, TN & { [k in N2]: InstanceType<F2> }, S>;
|
|
156
|
-
join<N2 extends string, F2 extends RowLike>(fromItem: FromItem<N2, F2> | NamespacedExpression<TN, FromItem<N2, F2>>, on?: NamespacedExpression<TN & { [k in N2]: F2 }, SqlExpressionIn>): QueryBuilder<N, TN & { [k in N2]: F2 }, S>;
|
|
157
|
-
execute(): Promise<{
|
|
158
|
-
results: { [key in keyof S]: unknown }[];
|
|
159
|
-
sql?: string;
|
|
160
|
-
parameters?: readonly unknown[];
|
|
161
|
-
}>;
|
|
162
|
-
private paramsForCopy;
|
|
163
|
-
toRowLike: () => S;
|
|
164
|
-
compile: (opts?: {
|
|
165
|
-
isSubquery?: boolean;
|
|
166
|
-
}) => kysely0.RawBuilder<unknown>;
|
|
167
|
-
}
|
|
168
|
-
declare class TableBase extends RpcToolset {
|
|
169
|
-
opts?: {
|
|
170
|
-
remapColumns?: boolean;
|
|
171
|
-
};
|
|
172
|
-
column: (this: InstanceType<TableClass<string>>, columnName: string) => ColumnReferenceExpression;
|
|
173
|
-
}
|
|
174
|
-
type TableClass<N extends string = string> = {
|
|
175
|
-
new (opts?: {
|
|
176
|
-
remapColumns?: boolean;
|
|
177
|
-
}): TableBase;
|
|
178
|
-
as: <T extends TableClass, N2 extends string>(this: T, alias: N2) => Omit<T, keyof TableClass> & TableClass<N2> & {
|
|
179
|
-
new (): InstanceType<T>;
|
|
180
|
-
};
|
|
181
|
-
toRowLike: <T extends TableClass>(this: T, opts?: {
|
|
182
|
-
remapColumns?: boolean;
|
|
183
|
-
}) => InstanceType<T>;
|
|
184
|
-
from: <T extends TableClass>(this: T) => QueryBuilder<N, { [k in N]: InstanceType<T> }, InstanceType<T>>;
|
|
185
|
-
on: <T extends TableClass>(this: T, on: NamespacedExpression<InstanceType<T>, SqlExpression>) => T;
|
|
186
|
-
compile: () => RawSql;
|
|
187
|
-
alias: N;
|
|
188
|
-
tableName: string;
|
|
189
|
-
onExpression?: SqlExpression;
|
|
190
|
-
};
|
|
191
|
-
declare class Database {
|
|
192
|
-
private dialect;
|
|
193
|
-
private opts?;
|
|
194
|
-
private kysely?;
|
|
195
|
-
constructor(dialect: Dialect, opts?: {
|
|
196
|
-
logQuery?: (raw: CompiledQuery) => void;
|
|
197
|
-
returnExecutedQuery?: boolean;
|
|
198
|
-
} | undefined);
|
|
199
|
-
execute(query: RawSql): Promise<{
|
|
200
|
-
results: unknown[];
|
|
201
|
-
sql?: string;
|
|
202
|
-
parameters?: readonly unknown[];
|
|
203
|
-
}>;
|
|
204
|
-
Table<N extends string>(name: N): TableClass<N>;
|
|
205
|
-
}
|
|
206
|
-
//#endregion
|
|
207
|
-
//#region src/rpc-toolset-test-helpers.d.ts
|
|
208
|
-
declare class TestToolset extends RpcToolset {
|
|
209
|
-
add(input: {
|
|
210
|
-
a: number;
|
|
211
|
-
b: number;
|
|
212
|
-
}): Promise<number>;
|
|
213
|
-
toolset2(): Promise<TestToolset2>;
|
|
214
|
-
userForId({
|
|
215
|
-
id
|
|
216
|
-
}: {
|
|
217
|
-
id: string;
|
|
218
|
-
}): Promise<typeof User>;
|
|
219
|
-
}
|
|
220
|
-
declare class TestToolset2 extends RpcToolset {
|
|
221
|
-
subtract(input: {
|
|
222
|
-
a: number;
|
|
223
|
-
b: number;
|
|
224
|
-
}): Promise<number>;
|
|
225
|
-
}
|
|
226
|
-
declare const User_base: Omit<TableClass<"users">, keyof TableClass<string>> & TableClass<"user"> & (new () => {
|
|
227
|
-
opts?: {
|
|
228
|
-
remapColumns?: boolean;
|
|
229
|
-
};
|
|
230
|
-
column: (this: InstanceType<TableClass<string>>, columnName: string) => ColumnReferenceExpression;
|
|
231
|
-
__RPC_TARGET_BRAND: never;
|
|
232
|
-
});
|
|
233
|
-
declare class User extends User_base {
|
|
234
|
-
id: ColumnReferenceExpression;
|
|
235
|
-
name: ColumnReferenceExpression;
|
|
236
|
-
email: ColumnReferenceExpression;
|
|
237
|
-
age: ColumnReferenceExpression;
|
|
238
|
-
posts(): typeof Post;
|
|
239
|
-
}
|
|
240
|
-
declare const Post_base: Omit<TableClass<"posts">, keyof TableClass<string>> & TableClass<"post"> & (new () => {
|
|
241
|
-
opts?: {
|
|
242
|
-
remapColumns?: boolean;
|
|
243
|
-
};
|
|
244
|
-
column: (this: InstanceType<TableClass<string>>, columnName: string) => ColumnReferenceExpression;
|
|
245
|
-
__RPC_TARGET_BRAND: never;
|
|
246
|
-
});
|
|
247
|
-
declare class Post extends Post_base {
|
|
248
|
-
id: ColumnReferenceExpression;
|
|
249
|
-
userId: ColumnReferenceExpression;
|
|
250
|
-
title: ColumnReferenceExpression;
|
|
251
|
-
content: ColumnReferenceExpression;
|
|
252
|
-
}
|
|
253
|
-
//#endregion
|
|
254
|
-
export { Post, TestToolset, TestToolset2, User };
|