@alook/cli 0.1.11 → 0.1.12
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/index.js +40 -8
- package/dist/session-runner.js +40 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15017,6 +15017,9 @@ class Name {
|
|
|
15017
15017
|
return new SQL([this]);
|
|
15018
15018
|
}
|
|
15019
15019
|
}
|
|
15020
|
+
function isDriverValueEncoder(value) {
|
|
15021
|
+
return typeof value === "object" && value !== null && "mapToDriverValue" in value && typeof value.mapToDriverValue === "function";
|
|
15022
|
+
}
|
|
15020
15023
|
var noopDecoder = {
|
|
15021
15024
|
mapFromDriverValue: (value) => value
|
|
15022
15025
|
};
|
|
@@ -15910,6 +15913,39 @@ class PrimaryKey {
|
|
|
15910
15913
|
}
|
|
15911
15914
|
}
|
|
15912
15915
|
|
|
15916
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@4.20260702.1_@opentelemetry+api@1.9.1_@typ_5aa9492b131e5fac58fa98e88e5c0ad3/node_modules/drizzle-orm/sql/expressions/conditions.js
|
|
15917
|
+
function bindIfParam(value, column) {
|
|
15918
|
+
if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) {
|
|
15919
|
+
return new Param(value, column);
|
|
15920
|
+
}
|
|
15921
|
+
return value;
|
|
15922
|
+
}
|
|
15923
|
+
var eq = (left, right) => {
|
|
15924
|
+
return sql`${left} = ${bindIfParam(right, left)}`;
|
|
15925
|
+
};
|
|
15926
|
+
function and(...unfilteredConditions) {
|
|
15927
|
+
const conditions = unfilteredConditions.filter((c) => c !== undefined);
|
|
15928
|
+
if (conditions.length === 0) {
|
|
15929
|
+
return;
|
|
15930
|
+
}
|
|
15931
|
+
if (conditions.length === 1) {
|
|
15932
|
+
return new SQL(conditions);
|
|
15933
|
+
}
|
|
15934
|
+
return new SQL([
|
|
15935
|
+
new StringChunk("("),
|
|
15936
|
+
sql.join(conditions, new StringChunk(" and ")),
|
|
15937
|
+
new StringChunk(")")
|
|
15938
|
+
]);
|
|
15939
|
+
}
|
|
15940
|
+
function isNotNull(value) {
|
|
15941
|
+
return sql`${value} is not null`;
|
|
15942
|
+
}
|
|
15943
|
+
|
|
15944
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@4.20260702.1_@opentelemetry+api@1.9.1_@typ_5aa9492b131e5fac58fa98e88e5c0ad3/node_modules/drizzle-orm/sql/expressions/select.js
|
|
15945
|
+
function desc(column) {
|
|
15946
|
+
return sql`${column} desc`;
|
|
15947
|
+
}
|
|
15948
|
+
|
|
15913
15949
|
// ../shared/src/db/community-machine-schema.ts
|
|
15914
15950
|
init_nanoid();
|
|
15915
15951
|
|
|
@@ -17504,13 +17540,6 @@ var CommunityAgentResolveRequestSchema = exports_external.object({
|
|
|
17504
17540
|
var CommunityAgentListChannelsRequestSchema = exports_external.object({
|
|
17505
17541
|
server: exports_external.string().min(1).optional()
|
|
17506
17542
|
});
|
|
17507
|
-
var CommunityAgentCreatePostRequestSchema = exports_external.object({
|
|
17508
|
-
forum: exports_external.string().min(1),
|
|
17509
|
-
title: exports_external.string().min(1),
|
|
17510
|
-
content: CommunityAgentMessageContentSchema,
|
|
17511
|
-
attachments: exports_external.array(exports_external.string().min(1)).max(MAX_ATTACHMENTS_PER_MESSAGE).default([]),
|
|
17512
|
-
nonce: exports_external.string().min(1).max(128).optional()
|
|
17513
|
-
}).refine((d) => d.content.text.trim().length > 0 || d.attachments.length > 0, { message: "post must have text or attachments" });
|
|
17514
17543
|
var CommunityAgentListMembersRequestSchema = exports_external.object({
|
|
17515
17544
|
server: exports_external.string().min(1),
|
|
17516
17545
|
limit: exports_external.number().int().positive().optional(),
|
|
@@ -17524,7 +17553,9 @@ var CommunityAgentJoinServerRequestSchema = exports_external.object({
|
|
|
17524
17553
|
invite: exports_external.string().min(1)
|
|
17525
17554
|
});
|
|
17526
17555
|
var CommunityAgentNapRequestSchema = exports_external.object({
|
|
17527
|
-
handoff: exports_external.string().
|
|
17556
|
+
handoff: exports_external.string().refine((value) => value.trim().length > 0, {
|
|
17557
|
+
message: "handoff is required"
|
|
17558
|
+
})
|
|
17528
17559
|
});
|
|
17529
17560
|
var CommunityAgentReactAddRequestSchema = exports_external.object({
|
|
17530
17561
|
channel: exports_external.string().min(1),
|
|
@@ -17744,6 +17775,7 @@ var communityChannel = sqliteTable("community_channel", {
|
|
|
17744
17775
|
index("idx_channel_server_position").on(t.serverId, t.position),
|
|
17745
17776
|
index("idx_channel_server_last_message").on(t.serverId, t.lastMessageAt),
|
|
17746
17777
|
index("idx_channel_parent").on(t.parentChannelId),
|
|
17778
|
+
index("idx_channel_forum_created").on(t.parentChannelId, desc(t.createdAt), desc(t.id)).where(and(eq(t.type, "thread"), eq(t.archived, 0), isNotNull(t.parentMessageId))),
|
|
17747
17779
|
uniqueIndex("idx_channel_server_name").on(t.serverId, t.name).where(sql`parent_channel_id IS NULL`)
|
|
17748
17780
|
]);
|
|
17749
17781
|
var communityChannelMember = sqliteTable("community_channel_member", {
|
package/dist/session-runner.js
CHANGED
|
@@ -14926,6 +14926,9 @@ class Name {
|
|
|
14926
14926
|
return new SQL([this]);
|
|
14927
14927
|
}
|
|
14928
14928
|
}
|
|
14929
|
+
function isDriverValueEncoder(value) {
|
|
14930
|
+
return typeof value === "object" && value !== null && "mapToDriverValue" in value && typeof value.mapToDriverValue === "function";
|
|
14931
|
+
}
|
|
14929
14932
|
var noopDecoder = {
|
|
14930
14933
|
mapFromDriverValue: (value) => value
|
|
14931
14934
|
};
|
|
@@ -15819,6 +15822,39 @@ class PrimaryKey {
|
|
|
15819
15822
|
}
|
|
15820
15823
|
}
|
|
15821
15824
|
|
|
15825
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@4.20260702.1_@opentelemetry+api@1.9.1_@typ_5aa9492b131e5fac58fa98e88e5c0ad3/node_modules/drizzle-orm/sql/expressions/conditions.js
|
|
15826
|
+
function bindIfParam(value, column) {
|
|
15827
|
+
if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) {
|
|
15828
|
+
return new Param(value, column);
|
|
15829
|
+
}
|
|
15830
|
+
return value;
|
|
15831
|
+
}
|
|
15832
|
+
var eq = (left, right) => {
|
|
15833
|
+
return sql`${left} = ${bindIfParam(right, left)}`;
|
|
15834
|
+
};
|
|
15835
|
+
function and(...unfilteredConditions) {
|
|
15836
|
+
const conditions = unfilteredConditions.filter((c) => c !== undefined);
|
|
15837
|
+
if (conditions.length === 0) {
|
|
15838
|
+
return;
|
|
15839
|
+
}
|
|
15840
|
+
if (conditions.length === 1) {
|
|
15841
|
+
return new SQL(conditions);
|
|
15842
|
+
}
|
|
15843
|
+
return new SQL([
|
|
15844
|
+
new StringChunk("("),
|
|
15845
|
+
sql.join(conditions, new StringChunk(" and ")),
|
|
15846
|
+
new StringChunk(")")
|
|
15847
|
+
]);
|
|
15848
|
+
}
|
|
15849
|
+
function isNotNull(value) {
|
|
15850
|
+
return sql`${value} is not null`;
|
|
15851
|
+
}
|
|
15852
|
+
|
|
15853
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare+workers-types@4.20260702.1_@opentelemetry+api@1.9.1_@typ_5aa9492b131e5fac58fa98e88e5c0ad3/node_modules/drizzle-orm/sql/expressions/select.js
|
|
15854
|
+
function desc(column) {
|
|
15855
|
+
return sql`${column} desc`;
|
|
15856
|
+
}
|
|
15857
|
+
|
|
15822
15858
|
// ../shared/src/db/community-machine-schema.ts
|
|
15823
15859
|
init_nanoid();
|
|
15824
15860
|
|
|
@@ -17409,13 +17445,6 @@ var CommunityAgentResolveRequestSchema = exports_external.object({
|
|
|
17409
17445
|
var CommunityAgentListChannelsRequestSchema = exports_external.object({
|
|
17410
17446
|
server: exports_external.string().min(1).optional()
|
|
17411
17447
|
});
|
|
17412
|
-
var CommunityAgentCreatePostRequestSchema = exports_external.object({
|
|
17413
|
-
forum: exports_external.string().min(1),
|
|
17414
|
-
title: exports_external.string().min(1),
|
|
17415
|
-
content: CommunityAgentMessageContentSchema,
|
|
17416
|
-
attachments: exports_external.array(exports_external.string().min(1)).max(MAX_ATTACHMENTS_PER_MESSAGE).default([]),
|
|
17417
|
-
nonce: exports_external.string().min(1).max(128).optional()
|
|
17418
|
-
}).refine((d) => d.content.text.trim().length > 0 || d.attachments.length > 0, { message: "post must have text or attachments" });
|
|
17419
17448
|
var CommunityAgentListMembersRequestSchema = exports_external.object({
|
|
17420
17449
|
server: exports_external.string().min(1),
|
|
17421
17450
|
limit: exports_external.number().int().positive().optional(),
|
|
@@ -17429,7 +17458,9 @@ var CommunityAgentJoinServerRequestSchema = exports_external.object({
|
|
|
17429
17458
|
invite: exports_external.string().min(1)
|
|
17430
17459
|
});
|
|
17431
17460
|
var CommunityAgentNapRequestSchema = exports_external.object({
|
|
17432
|
-
handoff: exports_external.string().
|
|
17461
|
+
handoff: exports_external.string().refine((value) => value.trim().length > 0, {
|
|
17462
|
+
message: "handoff is required"
|
|
17463
|
+
})
|
|
17433
17464
|
});
|
|
17434
17465
|
var CommunityAgentReactAddRequestSchema = exports_external.object({
|
|
17435
17466
|
channel: exports_external.string().min(1),
|
|
@@ -17649,6 +17680,7 @@ var communityChannel = sqliteTable("community_channel", {
|
|
|
17649
17680
|
index("idx_channel_server_position").on(t.serverId, t.position),
|
|
17650
17681
|
index("idx_channel_server_last_message").on(t.serverId, t.lastMessageAt),
|
|
17651
17682
|
index("idx_channel_parent").on(t.parentChannelId),
|
|
17683
|
+
index("idx_channel_forum_created").on(t.parentChannelId, desc(t.createdAt), desc(t.id)).where(and(eq(t.type, "thread"), eq(t.archived, 0), isNotNull(t.parentMessageId))),
|
|
17652
17684
|
uniqueIndex("idx_channel_server_name").on(t.serverId, t.name).where(sql`parent_channel_id IS NULL`)
|
|
17653
17685
|
]);
|
|
17654
17686
|
var communityChannelMember = sqliteTable("community_channel_member", {
|