@alook/daemon 0.1.48 → 0.1.50
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/cli/index.js +470 -380
- package/dist/index.js +470 -380
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -8173,15 +8173,14 @@ function createPiSessionDependencies(ctx, loadSdk = loadPiSdkModule) {
|
|
|
8173
8173
|
},
|
|
8174
8174
|
async createAgentSession(opts) {
|
|
8175
8175
|
const sdk = await loadSdk();
|
|
8176
|
-
const
|
|
8176
|
+
const modelRuntime = await sdk.ModelRuntime.create();
|
|
8177
8177
|
const runtimeConfig = ctx.config.runtimeConfig;
|
|
8178
8178
|
const provider = runtimeConfig && "provider" in runtimeConfig ? runtimeConfig.provider : undefined;
|
|
8179
8179
|
if (provider?.kind === "builtin") {
|
|
8180
|
-
|
|
8180
|
+
await modelRuntime.setRuntimeApiKey(provider.providerId, provider.apiKey);
|
|
8181
8181
|
}
|
|
8182
|
-
const modelRegistry = sdk.ModelRegistry.create(authStorage);
|
|
8183
8182
|
const parsed = parseModelString(opts.model);
|
|
8184
|
-
const model = parsed ?
|
|
8183
|
+
const model = parsed ? modelRuntime.getModel(parsed.provider, parsed.id) : undefined;
|
|
8185
8184
|
const cwd = opts.cwd;
|
|
8186
8185
|
const requestedSessionId = opts.sessionId;
|
|
8187
8186
|
let sessionManager;
|
|
@@ -8200,8 +8199,7 @@ function createPiSessionDependencies(ctx, loadSdk = loadPiSdkModule) {
|
|
|
8200
8199
|
cwd,
|
|
8201
8200
|
model,
|
|
8202
8201
|
thinkingLevel: opts.thinkingLevel,
|
|
8203
|
-
|
|
8204
|
-
modelRegistry,
|
|
8202
|
+
modelRuntime,
|
|
8205
8203
|
sessionManager,
|
|
8206
8204
|
customTools: [bashTool]
|
|
8207
8205
|
});
|
|
@@ -8436,9 +8434,8 @@ class PiDriver {
|
|
|
8436
8434
|
try {
|
|
8437
8435
|
const reasoning = await Promise.race([
|
|
8438
8436
|
this.loadSdk().then(async (sdk) => {
|
|
8439
|
-
const
|
|
8440
|
-
|
|
8441
|
-
return parsePiModelCatalog(await registry.getAvailable());
|
|
8437
|
+
const modelRuntime = await sdk.ModelRuntime.create();
|
|
8438
|
+
return parsePiModelCatalog(await modelRuntime.getAvailable());
|
|
8442
8439
|
}),
|
|
8443
8440
|
new Promise((resolve4) => {
|
|
8444
8441
|
timer = setTimeout(() => resolve4(undefined), PI_MODEL_PROBE_TIMEOUT_MS);
|
|
@@ -11565,10 +11562,31 @@ function reduceManager(state, event) {
|
|
|
11565
11562
|
return withAgent(state, event.agentId, (a) => a ?? freshAgent(event.agentId), []);
|
|
11566
11563
|
case "wake":
|
|
11567
11564
|
return onWake(state, event.agentId, event.message);
|
|
11568
|
-
case "spawned":
|
|
11565
|
+
case "spawned": {
|
|
11566
|
+
const existing = state.agents[event.agentId];
|
|
11567
|
+
if (!existing || existing.status !== "starting")
|
|
11568
|
+
return { state, effects: [] };
|
|
11569
|
+
const agent = clone(existing);
|
|
11570
|
+
enterStable(agent, "running");
|
|
11571
|
+
syncExecutionProjection(agent);
|
|
11572
|
+
const mode = leaseIsWorking(agent.execution.lease) || agent.pendingAdmissions.length > 0 ? "busy" : "idle";
|
|
11573
|
+
const messages = drainInbox(agent);
|
|
11574
|
+
return commit(state, agent, messages.map((message) => ({ type: "send", agentId: event.agentId, message, mode })));
|
|
11575
|
+
}
|
|
11576
|
+
case "queue_delivery":
|
|
11569
11577
|
return mutate(state, event.agentId, (a) => {
|
|
11570
|
-
|
|
11578
|
+
const queuedById = new Map(a.inbox.filter((message) => message.id).map((message) => [message.id, message]));
|
|
11579
|
+
const restoredIds = new Set;
|
|
11580
|
+
const messages = event.messages.filter((message) => {
|
|
11581
|
+
if (message.id && restoredIds.has(message.id))
|
|
11582
|
+
return false;
|
|
11583
|
+
if (message.id)
|
|
11584
|
+
restoredIds.add(message.id);
|
|
11585
|
+
return true;
|
|
11586
|
+
}).map((message) => message.id ? queuedById.get(message.id) ?? message : message);
|
|
11587
|
+
a.inbox = [...messages, ...a.inbox.filter((message) => !message.id || !restoredIds.has(message.id))];
|
|
11571
11588
|
syncExecutionProjection(a);
|
|
11589
|
+
a.idleSince = null;
|
|
11572
11590
|
});
|
|
11573
11591
|
case "backend_session":
|
|
11574
11592
|
return mutate(state, event.agentId, (a) => {
|
|
@@ -11909,14 +11927,14 @@ function onTurnCompleted(state, agentId, sessionInstanceId, nowMs, turnId, endRe
|
|
|
11909
11927
|
agent.stalledSessionId = null;
|
|
11910
11928
|
syncExecutionProjection(agent);
|
|
11911
11929
|
const clearEffects = clearedStallSessionId === null ? [] : [{ type: "clear_stall_recovery", agentId, sessionId: clearedStallSessionId }];
|
|
11912
|
-
if (agent.inbox.length > 0 && !agent.resetting) {
|
|
11930
|
+
if (agent.status === "running" && agent.inbox.length > 0 && !agent.resetting) {
|
|
11913
11931
|
const messages = drainInbox(agent);
|
|
11914
11932
|
return commit(state, agent, [
|
|
11915
11933
|
...clearEffects,
|
|
11916
11934
|
...messages.map((queued) => ({ type: "send", agentId, message: queued, mode: "idle" }))
|
|
11917
11935
|
]);
|
|
11918
11936
|
}
|
|
11919
|
-
agent.idleSince = nowMs;
|
|
11937
|
+
agent.idleSince = agent.status === "running" && !agent.resetting ? nowMs : null;
|
|
11920
11938
|
return commit(state, agent, clearEffects);
|
|
11921
11939
|
}
|
|
11922
11940
|
function onTurnToolLifecycle(state, event, lifecycle) {
|
|
@@ -13440,8 +13458,34 @@ class AgentProcessManager {
|
|
|
13440
13458
|
}
|
|
13441
13459
|
}
|
|
13442
13460
|
}
|
|
13443
|
-
|
|
13444
|
-
|
|
13461
|
+
const completed = new Set;
|
|
13462
|
+
const deferSends = (agentId) => {
|
|
13463
|
+
const remaining = effects.filter((candidate) => candidate.type === "send" && !completed.has(candidate) && (agentId === undefined || candidate.agentId === agentId));
|
|
13464
|
+
for (const id of new Set(remaining.map((candidate) => candidate.agentId))) {
|
|
13465
|
+
const batch = remaining.filter((candidate) => candidate.agentId === id);
|
|
13466
|
+
batch.forEach((candidate) => completed.add(candidate));
|
|
13467
|
+
this.dispatch({
|
|
13468
|
+
type: "queue_delivery",
|
|
13469
|
+
agentId: id,
|
|
13470
|
+
messages: batch.map((candidate) => candidate.message)
|
|
13471
|
+
});
|
|
13472
|
+
}
|
|
13473
|
+
};
|
|
13474
|
+
try {
|
|
13475
|
+
for (const effect of effects) {
|
|
13476
|
+
if (completed.has(effect))
|
|
13477
|
+
continue;
|
|
13478
|
+
if (effect.type === "send" && !this.canSend(effect.agentId)) {
|
|
13479
|
+
deferSends(effect.agentId);
|
|
13480
|
+
continue;
|
|
13481
|
+
}
|
|
13482
|
+
this.applyEffect(effect);
|
|
13483
|
+
completed.add(effect);
|
|
13484
|
+
}
|
|
13485
|
+
} catch (error) {
|
|
13486
|
+
deferSends();
|
|
13487
|
+
throw error;
|
|
13488
|
+
}
|
|
13445
13489
|
return effects;
|
|
13446
13490
|
}
|
|
13447
13491
|
deriveActivitySnapshot(state) {
|
|
@@ -13473,6 +13517,26 @@ ${this.opts.wakePromptFooter}` : text2;
|
|
|
13473
13517
|
stampNow(text2) {
|
|
13474
13518
|
return this.opts.stampWakePromptTime ? `[${nowLocalISO()}] ${text2}` : text2;
|
|
13475
13519
|
}
|
|
13520
|
+
prepareDelivery(message) {
|
|
13521
|
+
return {
|
|
13522
|
+
...message,
|
|
13523
|
+
preparedInput: message.preparedInput ?? {
|
|
13524
|
+
id: message.id,
|
|
13525
|
+
kind: "user",
|
|
13526
|
+
text: this.stampNow(this.withFooter(message.text)),
|
|
13527
|
+
sequence: message.seq
|
|
13528
|
+
}
|
|
13529
|
+
};
|
|
13530
|
+
}
|
|
13531
|
+
canSend(agentId) {
|
|
13532
|
+
const session = this.sessions.get(agentId);
|
|
13533
|
+
const owner = this.activeSpawnState.get(agentId);
|
|
13534
|
+
const agent = this.state.agents[agentId];
|
|
13535
|
+
if (!session || !owner || owner.session !== session || owner.torndown || owner.superseded || agent?.status !== "running" || agent.resetting || agent.execution.sessionInstanceId !== session.sessionInstanceId)
|
|
13536
|
+
return false;
|
|
13537
|
+
const driverState = session.snapshot().state;
|
|
13538
|
+
return driverState !== "stopping" && driverState !== "closed";
|
|
13539
|
+
}
|
|
13476
13540
|
beginPendingDelivery(owner, commandId, message, mode, span, requeueOnFailure = true) {
|
|
13477
13541
|
const sessionInstanceId = owner.sessionInstanceId;
|
|
13478
13542
|
if (!sessionInstanceId || owner.pendingDeliverySpans.has(commandId))
|
|
@@ -13532,18 +13596,15 @@ ${this.opts.wakePromptFooter}` : text2;
|
|
|
13532
13596
|
break;
|
|
13533
13597
|
case "send": {
|
|
13534
13598
|
const session = this.sessions.get(effect.agentId);
|
|
13535
|
-
|
|
13536
|
-
|
|
13537
|
-
|
|
13538
|
-
|
|
13539
|
-
sequence: effect.message.seq
|
|
13540
|
-
};
|
|
13541
|
-
if (session) {
|
|
13599
|
+
if (session && this.canSend(effect.agentId)) {
|
|
13600
|
+
const message = this.prepareDelivery(effect.message);
|
|
13601
|
+
effect.message = message;
|
|
13602
|
+
const input = message.preparedInput;
|
|
13542
13603
|
const owner = this.activeSpawnState.get(effect.agentId);
|
|
13543
13604
|
const exactOwner = owner?.session === session ? owner : undefined;
|
|
13544
13605
|
const associatedSpan = exactOwner ? effect.mode === "idle" ? this.openTurn(exactOwner) : exactOwner.activeSpan : null;
|
|
13545
13606
|
if (exactOwner)
|
|
13546
|
-
this.beginPendingDelivery(exactOwner, input.id,
|
|
13607
|
+
this.beginPendingDelivery(exactOwner, input.id, message, effect.mode, associatedSpan);
|
|
13547
13608
|
let sent;
|
|
13548
13609
|
try {
|
|
13549
13610
|
sent = session.send(input);
|
|
@@ -13752,9 +13813,11 @@ ${this.opts.wakePromptFooter}` : text2;
|
|
|
13752
13813
|
this.log.info("agent session ended", { agentId, sessionId, reason });
|
|
13753
13814
|
}
|
|
13754
13815
|
doSpawn(agentId, messages, resumeSessionId) {
|
|
13755
|
-
const [
|
|
13756
|
-
if (!
|
|
13816
|
+
const [initial, ...pending] = messages;
|
|
13817
|
+
if (!initial)
|
|
13757
13818
|
throw new Error(`AgentProcessManager: spawn for ${agentId} has no command`);
|
|
13819
|
+
this.dispatch({ type: "queue_delivery", agentId, messages: pending });
|
|
13820
|
+
const first = this.prepareDelivery(initial);
|
|
13758
13821
|
const prompt = this.withFooter(first.text);
|
|
13759
13822
|
const driver = this.opts.driverFor(agentId, this.runtimeConfigs.get(agentId));
|
|
13760
13823
|
this.liveBackendIds.set(agentId, driver.id);
|
|
@@ -13958,12 +14021,7 @@ ${this.opts.wakePromptFooter}` : text2;
|
|
|
13958
14021
|
this.beginPendingDelivery(state, commandId, first, "idle", startedSpan, false);
|
|
13959
14022
|
let startResult;
|
|
13960
14023
|
try {
|
|
13961
|
-
startResult = session.start(
|
|
13962
|
-
id: commandId,
|
|
13963
|
-
kind: "user",
|
|
13964
|
-
text: this.stampNow(prompt),
|
|
13965
|
-
sequence: first.seq
|
|
13966
|
-
});
|
|
14024
|
+
startResult = session.start(first.preparedInput);
|
|
13967
14025
|
this.markPendingDeliveryObserved(state, commandId);
|
|
13968
14026
|
} catch (error) {
|
|
13969
14027
|
this.settlePendingDelivery(state, commandId);
|
|
@@ -13971,7 +14029,7 @@ ${this.opts.wakePromptFooter}` : text2;
|
|
|
13971
14029
|
throw error;
|
|
13972
14030
|
}
|
|
13973
14031
|
startResult.then((receipt) => {
|
|
13974
|
-
if (this.sessions.get(agentId) !== session || state.torndown)
|
|
14032
|
+
if (this.sessions.get(agentId) !== session || state.torndown || state.superseded || this.activeSpawnState.get(agentId) !== state)
|
|
13975
14033
|
return;
|
|
13976
14034
|
if (receipt?.status === "rejected") {
|
|
13977
14035
|
this.settlePendingDelivery(state, commandId);
|
|
@@ -13980,44 +14038,16 @@ ${this.opts.wakePromptFooter}` : text2;
|
|
|
13980
14038
|
session.stop({ reason: "shutdown", forceAfterMs: SESSION_STOP_GRACE_MS2 });
|
|
13981
14039
|
return;
|
|
13982
14040
|
}
|
|
13983
|
-
|
|
13984
|
-
|
|
13985
|
-
|
|
13986
|
-
|
|
13987
|
-
|
|
13988
|
-
|
|
13989
|
-
|
|
13990
|
-
|
|
13991
|
-
|
|
13992
|
-
|
|
13993
|
-
id: message.id,
|
|
13994
|
-
kind: "user",
|
|
13995
|
-
text: this.stampNow(this.withFooter(message.text)),
|
|
13996
|
-
sequence: message.seq
|
|
13997
|
-
});
|
|
13998
|
-
this.markPendingDeliveryObserved(state, message.id);
|
|
13999
|
-
queuedReceipt = await queuedResult;
|
|
14000
|
-
} catch (error) {
|
|
14001
|
-
this.settlePendingDelivery(state, message.id);
|
|
14002
|
-
if (!state.torndown && this.sessions.get(agentId) === session && this.activeSpawnState.get(agentId) === state) {
|
|
14003
|
-
this.emitErrorAudit(agentId, "runtime", "send_failed", String(error));
|
|
14004
|
-
session.stop({ reason: "shutdown", forceAfterMs: SESSION_STOP_GRACE_MS2 });
|
|
14005
|
-
}
|
|
14006
|
-
return;
|
|
14007
|
-
}
|
|
14008
|
-
if (state.torndown || this.sessions.get(agentId) !== session || this.activeSpawnState.get(agentId) !== state) {
|
|
14009
|
-
return;
|
|
14010
|
-
}
|
|
14011
|
-
if (queuedReceipt.status === "rejected") {
|
|
14012
|
-
if (!state.pendingDeliverySpans.has(message.id))
|
|
14013
|
-
return;
|
|
14014
|
-
this.settlePendingDelivery(state, message.id);
|
|
14015
|
-
this.emitErrorAudit(agentId, "runtime", queuedReceipt.error?.code ?? queuedReceipt.reason, queuedReceipt.error?.message ?? `Delivery rejected (${queuedReceipt.reason})`);
|
|
14016
|
-
session.stop({ reason: "shutdown", forceAfterMs: SESSION_STOP_GRACE_MS2 });
|
|
14017
|
-
return;
|
|
14018
|
-
}
|
|
14019
|
-
}
|
|
14020
|
-
})().catch((error) => this.emitErrorAudit(agentId, "runtime", "send_failed", String(error)));
|
|
14041
|
+
const driverState = session.snapshot().state;
|
|
14042
|
+
if (this.state.agents[agentId]?.status !== "starting" || driverState === "stopping" || driverState === "closed")
|
|
14043
|
+
return;
|
|
14044
|
+
try {
|
|
14045
|
+
this.dispatch({ type: "spawned", agentId, nowMs: this.now() }, state);
|
|
14046
|
+
} catch (error) {
|
|
14047
|
+
this.emitErrorAudit(agentId, "runtime", "send_failed", String(error));
|
|
14048
|
+
session.stop({ reason: "shutdown", forceAfterMs: SESSION_STOP_GRACE_MS2 });
|
|
14049
|
+
return;
|
|
14050
|
+
}
|
|
14021
14051
|
if (state.hasEstablished || state.hasReportedSpawnFailure)
|
|
14022
14052
|
return;
|
|
14023
14053
|
state.handshakeTimer = setTimeout(() => {
|
|
@@ -33725,7 +33755,7 @@ __export(exports_community_machine_schema, {
|
|
|
33725
33755
|
DIAGNOSTIC_REPORT_FAILURE_CODES: () => DIAGNOSTIC_REPORT_FAILURE_CODES
|
|
33726
33756
|
});
|
|
33727
33757
|
|
|
33728
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
33758
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/entity.js
|
|
33729
33759
|
var entityKind = Symbol.for("drizzle:entityKind");
|
|
33730
33760
|
var hasOwnEntityKind = Symbol.for("drizzle:hasOwnEntityKind");
|
|
33731
33761
|
function is(value, type) {
|
|
@@ -33750,7 +33780,7 @@ function is(value, type) {
|
|
|
33750
33780
|
return false;
|
|
33751
33781
|
}
|
|
33752
33782
|
|
|
33753
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
33783
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/column.js
|
|
33754
33784
|
class Column {
|
|
33755
33785
|
constructor(table, config2) {
|
|
33756
33786
|
this.table = table;
|
|
@@ -33800,7 +33830,7 @@ class Column {
|
|
|
33800
33830
|
}
|
|
33801
33831
|
}
|
|
33802
33832
|
|
|
33803
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
33833
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/column-builder.js
|
|
33804
33834
|
class ColumnBuilder {
|
|
33805
33835
|
static [entityKind] = "ColumnBuilder";
|
|
33806
33836
|
config;
|
|
@@ -33856,20 +33886,20 @@ class ColumnBuilder {
|
|
|
33856
33886
|
}
|
|
33857
33887
|
}
|
|
33858
33888
|
|
|
33859
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
33889
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/table.utils.js
|
|
33860
33890
|
var TableName = Symbol.for("drizzle:Name");
|
|
33861
33891
|
|
|
33862
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
33892
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/tracing-utils.js
|
|
33863
33893
|
function iife(fn, ...args) {
|
|
33864
33894
|
return fn(...args);
|
|
33865
33895
|
}
|
|
33866
33896
|
|
|
33867
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
33897
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/pg-core/unique-constraint.js
|
|
33868
33898
|
function uniqueKeyName(table, columns) {
|
|
33869
33899
|
return `${table[TableName]}_${columns.join("_")}_unique`;
|
|
33870
33900
|
}
|
|
33871
33901
|
|
|
33872
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
33902
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/pg-core/columns/common.js
|
|
33873
33903
|
class PgColumn extends Column {
|
|
33874
33904
|
constructor(table, config2) {
|
|
33875
33905
|
if (!config2.uniqueName) {
|
|
@@ -33918,7 +33948,7 @@ class ExtraConfigColumn extends PgColumn {
|
|
|
33918
33948
|
}
|
|
33919
33949
|
}
|
|
33920
33950
|
|
|
33921
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
33951
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/pg-core/columns/enum.js
|
|
33922
33952
|
class PgEnumObjectColumn extends PgColumn {
|
|
33923
33953
|
static [entityKind] = "PgEnumObjectColumn";
|
|
33924
33954
|
enum;
|
|
@@ -33948,7 +33978,7 @@ class PgEnumColumn extends PgColumn {
|
|
|
33948
33978
|
}
|
|
33949
33979
|
}
|
|
33950
33980
|
|
|
33951
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
33981
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/subquery.js
|
|
33952
33982
|
class Subquery {
|
|
33953
33983
|
static [entityKind] = "Subquery";
|
|
33954
33984
|
constructor(sql, fields2, alias, isWith = false, usedTables = []) {
|
|
@@ -33963,10 +33993,10 @@ class Subquery {
|
|
|
33963
33993
|
}
|
|
33964
33994
|
}
|
|
33965
33995
|
|
|
33966
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
33967
|
-
var version2 = "0.45.
|
|
33996
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/version.js
|
|
33997
|
+
var version2 = "0.45.4";
|
|
33968
33998
|
|
|
33969
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
33999
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/tracing.js
|
|
33970
34000
|
var otel;
|
|
33971
34001
|
var rawTracer;
|
|
33972
34002
|
var tracer = {
|
|
@@ -33993,10 +34023,10 @@ var tracer = {
|
|
|
33993
34023
|
}
|
|
33994
34024
|
};
|
|
33995
34025
|
|
|
33996
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34026
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/view-common.js
|
|
33997
34027
|
var ViewBaseConfig = Symbol.for("drizzle:ViewBaseConfig");
|
|
33998
34028
|
|
|
33999
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34029
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/table.js
|
|
34000
34030
|
var Schema = Symbol.for("drizzle:Schema");
|
|
34001
34031
|
var Columns = Symbol.for("drizzle:Columns");
|
|
34002
34032
|
var ExtraConfigColumns = Symbol.for("drizzle:ExtraConfigColumns");
|
|
@@ -34034,7 +34064,7 @@ class Table {
|
|
|
34034
34064
|
}
|
|
34035
34065
|
}
|
|
34036
34066
|
|
|
34037
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34067
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sql/sql.js
|
|
34038
34068
|
function isSQLWrapper(value) {
|
|
34039
34069
|
return value !== null && value !== undefined && typeof value.getSQL === "function";
|
|
34040
34070
|
}
|
|
@@ -34397,7 +34427,7 @@ Subquery.prototype.getSQL = function() {
|
|
|
34397
34427
|
return new SQL([this]);
|
|
34398
34428
|
};
|
|
34399
34429
|
|
|
34400
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34430
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/alias.js
|
|
34401
34431
|
class ColumnAliasProxyHandler {
|
|
34402
34432
|
constructor(table) {
|
|
34403
34433
|
this.table = table;
|
|
@@ -34453,12 +34483,12 @@ class TableAliasProxyHandler {
|
|
|
34453
34483
|
}
|
|
34454
34484
|
}
|
|
34455
34485
|
|
|
34456
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34486
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/alias.js
|
|
34457
34487
|
function alias(table, alias2) {
|
|
34458
34488
|
return new Proxy(table, new TableAliasProxyHandler(alias2, false));
|
|
34459
34489
|
}
|
|
34460
34490
|
|
|
34461
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34491
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/checks.js
|
|
34462
34492
|
class CheckBuilder {
|
|
34463
34493
|
constructor(name, value) {
|
|
34464
34494
|
this.name = name;
|
|
@@ -34485,7 +34515,7 @@ function check2(name, value) {
|
|
|
34485
34515
|
return new CheckBuilder(name, value);
|
|
34486
34516
|
}
|
|
34487
34517
|
|
|
34488
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34518
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/utils.js
|
|
34489
34519
|
function getColumnNameAndConfig(a, b) {
|
|
34490
34520
|
return {
|
|
34491
34521
|
name: typeof a === "string" && a.length > 0 ? a : "",
|
|
@@ -34494,7 +34524,7 @@ function getColumnNameAndConfig(a, b) {
|
|
|
34494
34524
|
}
|
|
34495
34525
|
var textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder;
|
|
34496
34526
|
|
|
34497
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34527
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/foreign-keys.js
|
|
34498
34528
|
class ForeignKeyBuilder {
|
|
34499
34529
|
static [entityKind] = "SQLiteForeignKeyBuilder";
|
|
34500
34530
|
reference;
|
|
@@ -34562,7 +34592,7 @@ function foreignKey(config2) {
|
|
|
34562
34592
|
return new ForeignKeyBuilder(mappedConfig);
|
|
34563
34593
|
}
|
|
34564
34594
|
|
|
34565
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34595
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/unique-constraint.js
|
|
34566
34596
|
function uniqueKeyName2(table, columns) {
|
|
34567
34597
|
return `${table[TableName]}_${columns.join("_")}_unique`;
|
|
34568
34598
|
}
|
|
@@ -34607,7 +34637,7 @@ class UniqueConstraint {
|
|
|
34607
34637
|
}
|
|
34608
34638
|
}
|
|
34609
34639
|
|
|
34610
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34640
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/columns/common.js
|
|
34611
34641
|
class SQLiteColumnBuilder extends ColumnBuilder {
|
|
34612
34642
|
static [entityKind] = "SQLiteColumnBuilder";
|
|
34613
34643
|
foreignKeyConfigs = [];
|
|
@@ -34658,7 +34688,7 @@ class SQLiteColumn extends Column {
|
|
|
34658
34688
|
static [entityKind] = "SQLiteColumn";
|
|
34659
34689
|
}
|
|
34660
34690
|
|
|
34661
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34691
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/columns/blob.js
|
|
34662
34692
|
class SQLiteBigIntBuilder extends SQLiteColumnBuilder {
|
|
34663
34693
|
static [entityKind] = "SQLiteBigIntBuilder";
|
|
34664
34694
|
constructor(name) {
|
|
@@ -34746,7 +34776,7 @@ function blob(a, b) {
|
|
|
34746
34776
|
return new SQLiteBlobBufferBuilder(name);
|
|
34747
34777
|
}
|
|
34748
34778
|
|
|
34749
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34779
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/columns/custom.js
|
|
34750
34780
|
class SQLiteCustomColumnBuilder extends SQLiteColumnBuilder {
|
|
34751
34781
|
static [entityKind] = "SQLiteCustomColumnBuilder";
|
|
34752
34782
|
constructor(name, fieldConfig, customTypeParams) {
|
|
@@ -34787,7 +34817,7 @@ function customType(customTypeParams) {
|
|
|
34787
34817
|
};
|
|
34788
34818
|
}
|
|
34789
34819
|
|
|
34790
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34820
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/columns/integer.js
|
|
34791
34821
|
class SQLiteBaseIntegerBuilder extends SQLiteColumnBuilder {
|
|
34792
34822
|
static [entityKind] = "SQLiteBaseIntegerBuilder";
|
|
34793
34823
|
constructor(name, dataType, columnType) {
|
|
@@ -34889,7 +34919,7 @@ function integer2(a, b) {
|
|
|
34889
34919
|
return new SQLiteIntegerBuilder(name);
|
|
34890
34920
|
}
|
|
34891
34921
|
|
|
34892
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34922
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/columns/numeric.js
|
|
34893
34923
|
class SQLiteNumericBuilder extends SQLiteColumnBuilder {
|
|
34894
34924
|
static [entityKind] = "SQLiteNumericBuilder";
|
|
34895
34925
|
constructor(name) {
|
|
@@ -34959,7 +34989,7 @@ function numeric(a, b) {
|
|
|
34959
34989
|
return mode === "number" ? new SQLiteNumericNumberBuilder(name) : mode === "bigint" ? new SQLiteNumericBigIntBuilder(name) : new SQLiteNumericBuilder(name);
|
|
34960
34990
|
}
|
|
34961
34991
|
|
|
34962
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
34992
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/columns/real.js
|
|
34963
34993
|
class SQLiteRealBuilder extends SQLiteColumnBuilder {
|
|
34964
34994
|
static [entityKind] = "SQLiteRealBuilder";
|
|
34965
34995
|
constructor(name) {
|
|
@@ -34980,7 +35010,7 @@ function real(name) {
|
|
|
34980
35010
|
return new SQLiteRealBuilder(name ?? "");
|
|
34981
35011
|
}
|
|
34982
35012
|
|
|
34983
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
35013
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/columns/text.js
|
|
34984
35014
|
class SQLiteTextBuilder extends SQLiteColumnBuilder {
|
|
34985
35015
|
static [entityKind] = "SQLiteTextBuilder";
|
|
34986
35016
|
constructor(name, config2) {
|
|
@@ -35035,7 +35065,7 @@ function text2(a, b = {}) {
|
|
|
35035
35065
|
return new SQLiteTextBuilder(name, config2);
|
|
35036
35066
|
}
|
|
35037
35067
|
|
|
35038
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
35068
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/columns/all.js
|
|
35039
35069
|
function getSQLiteColumnBuilders() {
|
|
35040
35070
|
return {
|
|
35041
35071
|
blob,
|
|
@@ -35047,7 +35077,7 @@ function getSQLiteColumnBuilders() {
|
|
|
35047
35077
|
};
|
|
35048
35078
|
}
|
|
35049
35079
|
|
|
35050
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
35080
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/table.js
|
|
35051
35081
|
var InlineForeignKeys = Symbol.for("drizzle:SQLiteInlineForeignKeys");
|
|
35052
35082
|
|
|
35053
35083
|
class SQLiteTable extends Table {
|
|
@@ -35081,7 +35111,7 @@ var sqliteTable = (name, columns, extraConfig) => {
|
|
|
35081
35111
|
return sqliteTableBase(name, columns, extraConfig);
|
|
35082
35112
|
};
|
|
35083
35113
|
|
|
35084
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
35114
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/indexes.js
|
|
35085
35115
|
class IndexBuilderOn {
|
|
35086
35116
|
constructor(name, unique2) {
|
|
35087
35117
|
this.name = name;
|
|
@@ -35127,7 +35157,7 @@ function uniqueIndex(name) {
|
|
|
35127
35157
|
return new IndexBuilderOn(name, true);
|
|
35128
35158
|
}
|
|
35129
35159
|
|
|
35130
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
35160
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sqlite-core/primary-keys.js
|
|
35131
35161
|
function primaryKey(...config2) {
|
|
35132
35162
|
if (config2[0].columns) {
|
|
35133
35163
|
return new PrimaryKeyBuilder(config2[0].columns, config2[0].name);
|
|
@@ -35162,7 +35192,7 @@ class PrimaryKey {
|
|
|
35162
35192
|
}
|
|
35163
35193
|
}
|
|
35164
35194
|
|
|
35165
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
35195
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sql/expressions/conditions.js
|
|
35166
35196
|
function bindIfParam(value, column) {
|
|
35167
35197
|
if (isDriverValueEncoder(column) && !isSQLWrapper(value) && !is(value, Param) && !is(value, Placeholder) && !is(value, Column) && !is(value, Table) && !is(value, View)) {
|
|
35168
35198
|
return new Param(value, column);
|
|
@@ -35190,7 +35220,7 @@ function isNotNull(value) {
|
|
|
35190
35220
|
return sql`${value} is not null`;
|
|
35191
35221
|
}
|
|
35192
35222
|
|
|
35193
|
-
// ../../node_modules/.pnpm/drizzle-orm@0.45.
|
|
35223
|
+
// ../../node_modules/.pnpm/drizzle-orm@0.45.4_@cloudflare+workers-types@5.20261009.1_@opentelemetry+api@1.9.1_@typ_2c5bdbc2e285e95e03f6fc3b5df79b2b/node_modules/drizzle-orm/sql/expressions/select.js
|
|
35194
35224
|
function desc(column) {
|
|
35195
35225
|
return sql`${column} desc`;
|
|
35196
35226
|
}
|
|
@@ -37577,30 +37607,288 @@ function writeStatusFile(path14, snapshot) {
|
|
|
37577
37607
|
renameSync3(tmp, path14);
|
|
37578
37608
|
} catch {}
|
|
37579
37609
|
}
|
|
37580
|
-
// ../shared/src/community-
|
|
37610
|
+
// ../shared/src/community-contract.ts
|
|
37611
|
+
var COMMUNITY_RESOURCE_CONTRACT_VERSION = 3;
|
|
37612
|
+
|
|
37613
|
+
// ../shared/src/community-friend-approval.ts
|
|
37614
|
+
var profile = exports_external.strictObject({
|
|
37615
|
+
id: exports_external.string(),
|
|
37616
|
+
name: exports_external.string(),
|
|
37617
|
+
discriminator: exports_external.string(),
|
|
37618
|
+
image: exports_external.string().nullable(),
|
|
37619
|
+
avatarVersion: exports_external.number().int().nonnegative()
|
|
37620
|
+
});
|
|
37621
|
+
var FriendApprovalPayloadSchema = exports_external.strictObject({
|
|
37622
|
+
friendshipId: exports_external.string(),
|
|
37623
|
+
status: exports_external.enum(["pending", "approved", "denied", "superseded", "cancelled"]),
|
|
37624
|
+
waitingOn: exports_external.enum(["you", "other-owner", "addressee"]).nullable(),
|
|
37625
|
+
otherProfile: profile,
|
|
37626
|
+
botProfile: profile,
|
|
37627
|
+
waitingOnProfile: profile.nullable().optional()
|
|
37628
|
+
});
|
|
37629
|
+
|
|
37630
|
+
// ../shared/src/community-resources.ts
|
|
37581
37631
|
var id = exports_external.string().min(1);
|
|
37582
|
-
var
|
|
37583
|
-
|
|
37632
|
+
var nullableId = id.nullable();
|
|
37633
|
+
var legacyArchivedSchema = exports_external.union([exports_external.boolean(), exports_external.literal(0), exports_external.literal(1)]).transform((value) => value === true || value === 1);
|
|
37634
|
+
var CommunityChannelResourceSchema = exports_external.strictObject({
|
|
37635
|
+
id,
|
|
37636
|
+
type: exports_external.enum(["text", "forum", "thread", "dm"]),
|
|
37637
|
+
serverId: nullableId,
|
|
37638
|
+
categoryId: nullableId,
|
|
37639
|
+
name: exports_external.string().nullable(),
|
|
37640
|
+
topic: exports_external.string(),
|
|
37641
|
+
parentChannelId: nullableId,
|
|
37642
|
+
parentMessageId: nullableId,
|
|
37643
|
+
creatorId: nullableId,
|
|
37644
|
+
position: exports_external.number(),
|
|
37645
|
+
archived: exports_external.boolean(),
|
|
37646
|
+
createdAt: exports_external.string(),
|
|
37647
|
+
lastMessageAt: exports_external.string().nullable(),
|
|
37648
|
+
messageCount: exports_external.number().int().nonnegative()
|
|
37649
|
+
});
|
|
37650
|
+
var CommunityChannelIdentitySchema = CommunityChannelResourceSchema.pick({
|
|
37651
|
+
id: true,
|
|
37652
|
+
type: true,
|
|
37653
|
+
serverId: true,
|
|
37654
|
+
name: true,
|
|
37655
|
+
parentChannelId: true,
|
|
37656
|
+
parentMessageId: true,
|
|
37657
|
+
creatorId: true,
|
|
37658
|
+
archived: true,
|
|
37659
|
+
lastMessageAt: true,
|
|
37660
|
+
createdAt: true
|
|
37661
|
+
}).partial({ createdAt: true }).strip();
|
|
37662
|
+
var legacyChannelIdentitySchema = CommunityChannelIdentitySchema.extend({
|
|
37663
|
+
archived: legacyArchivedSchema,
|
|
37664
|
+
parentChannelId: nullableId.default(null),
|
|
37665
|
+
parentMessageId: nullableId.default(null),
|
|
37666
|
+
creatorId: nullableId.default(null),
|
|
37667
|
+
lastMessageAt: CommunityChannelResourceSchema.shape.lastMessageAt.default(null)
|
|
37668
|
+
});
|
|
37669
|
+
var CommunityAccessDecisionSchema = exports_external.strictObject({
|
|
37584
37670
|
channelId: id,
|
|
37585
|
-
|
|
37586
|
-
|
|
37671
|
+
canRead: exports_external.boolean(),
|
|
37672
|
+
canSend: exports_external.boolean(),
|
|
37673
|
+
canCreateDiscussion: exports_external.boolean()
|
|
37674
|
+
});
|
|
37675
|
+
var CommunityLegacyMessageAttachmentSchema = exports_external.strictObject({
|
|
37676
|
+
kind: exports_external.enum(["image", "file"]),
|
|
37677
|
+
name: exports_external.string(),
|
|
37678
|
+
url: exports_external.string(),
|
|
37679
|
+
thumbnailUrl: exports_external.string().optional(),
|
|
37680
|
+
contentType: exports_external.string().optional(),
|
|
37681
|
+
size: exports_external.string().optional(),
|
|
37682
|
+
sizeBytes: exports_external.number().nonnegative().optional(),
|
|
37683
|
+
width: exports_external.number().nonnegative().optional(),
|
|
37684
|
+
height: exports_external.number().nonnegative().optional()
|
|
37685
|
+
});
|
|
37686
|
+
var CommunityMessageAttachmentSchema = exports_external.strictObject({
|
|
37687
|
+
id,
|
|
37688
|
+
name: exports_external.string(),
|
|
37689
|
+
url: exports_external.string(),
|
|
37690
|
+
thumbnailUrl: exports_external.string().nullable(),
|
|
37691
|
+
contentType: exports_external.string().nullable(),
|
|
37692
|
+
sizeBytes: exports_external.number().int().nonnegative().nullable(),
|
|
37693
|
+
width: exports_external.number().int().nonnegative().nullable(),
|
|
37694
|
+
height: exports_external.number().int().nonnegative().nullable()
|
|
37695
|
+
});
|
|
37696
|
+
var CommunityMessagePreviewAttachmentSchema = CommunityMessageAttachmentSchema.partial().required({ name: true, url: true });
|
|
37697
|
+
var CommunityResourceProfileSchema = exports_external.strictObject({
|
|
37698
|
+
id,
|
|
37699
|
+
name: exports_external.string(),
|
|
37700
|
+
discriminator: exports_external.string().min(1).nullable(),
|
|
37701
|
+
avatar: exports_external.string().nullable(),
|
|
37702
|
+
avatarVersion: exports_external.number().int().nonnegative(),
|
|
37703
|
+
aboutMe: exports_external.string().optional(),
|
|
37704
|
+
bannerColor: exports_external.string().nullable().optional(),
|
|
37705
|
+
kind: exports_external.enum(["human", "bot"]).optional(),
|
|
37706
|
+
ownerUserId: nullableId.optional(),
|
|
37707
|
+
ownerHandle: exports_external.string().nullable().optional(),
|
|
37708
|
+
mutualServers: exports_external.number().int().nonnegative().optional(),
|
|
37709
|
+
ownedByViewer: exports_external.boolean().optional(),
|
|
37710
|
+
statusEmoji: exports_external.string().nullable().optional(),
|
|
37711
|
+
statusText: exports_external.string().nullable().optional()
|
|
37712
|
+
});
|
|
37713
|
+
var CommunityMessageThreadParticipantSchema = CommunityResourceProfileSchema.pick({ id: true, name: true, avatar: true, avatarVersion: true });
|
|
37714
|
+
var messageThreadSchema = exports_external.strictObject({
|
|
37715
|
+
id,
|
|
37716
|
+
name: CommunityChannelResourceSchema.shape.name,
|
|
37717
|
+
messageCount: CommunityChannelResourceSchema.shape.messageCount,
|
|
37718
|
+
lastReplyAt: CommunityChannelResourceSchema.shape.lastMessageAt.optional(),
|
|
37719
|
+
tags: exports_external.array(exports_external.string()).optional(),
|
|
37720
|
+
preview: exports_external.string().optional(),
|
|
37721
|
+
participants: exports_external.array(CommunityMessageThreadParticipantSchema).optional(),
|
|
37722
|
+
participantCount: exports_external.number().int().nonnegative().optional()
|
|
37723
|
+
});
|
|
37724
|
+
var legacyMessageThreadSchema = messageThreadSchema.extend({
|
|
37725
|
+
name: exports_external.string(),
|
|
37726
|
+
lastReplyAt: exports_external.string().optional(),
|
|
37727
|
+
participants: exports_external.array(CommunityMessageThreadParticipantSchema.extend({ avatar: exports_external.string() })).optional()
|
|
37728
|
+
});
|
|
37729
|
+
var messageThreadPreviewSchema = messageThreadSchema.partial().required({ id: true }).extend({
|
|
37730
|
+
participants: exports_external.array(CommunityMessageThreadParticipantSchema.partial().required({ id: true })).optional()
|
|
37731
|
+
});
|
|
37732
|
+
var CommunityMessageResourceSchema = exports_external.strictObject({
|
|
37733
|
+
id,
|
|
37734
|
+
channelId: id,
|
|
37735
|
+
seq: exports_external.number().int().nonnegative(),
|
|
37736
|
+
authorId: id,
|
|
37737
|
+
createdAt: exports_external.string(),
|
|
37738
|
+
type: exports_external.enum(["chat", "system"]),
|
|
37739
|
+
content: exports_external.string(),
|
|
37740
|
+
replyToId: nullableId,
|
|
37741
|
+
clientNonce: exports_external.string().nullable(),
|
|
37742
|
+
attachments: exports_external.array(CommunityMessageAttachmentSchema),
|
|
37743
|
+
systemKind: exports_external.literal("thread").optional(),
|
|
37744
|
+
authorName: exports_external.string().optional(),
|
|
37745
|
+
authorAvatar: exports_external.string().nullable().optional(),
|
|
37746
|
+
authorAvatarVersion: exports_external.number().int().nonnegative().optional(),
|
|
37747
|
+
mentionType: exports_external.literal("everyone").nullable().optional(),
|
|
37748
|
+
replyTo: exports_external.strictObject({
|
|
37749
|
+
id,
|
|
37750
|
+
authorId: id.optional(),
|
|
37751
|
+
authorName: exports_external.string(),
|
|
37752
|
+
text: exports_external.string(),
|
|
37753
|
+
deleted: exports_external.boolean().optional()
|
|
37754
|
+
}).optional(),
|
|
37755
|
+
embeds: exports_external.array(exports_external.unknown()).optional(),
|
|
37756
|
+
reactions: exports_external.array(exports_external.strictObject({
|
|
37757
|
+
emoji: exports_external.string(),
|
|
37758
|
+
count: exports_external.number().int().nonnegative(),
|
|
37759
|
+
me: exports_external.boolean(),
|
|
37760
|
+
userIds: exports_external.array(id)
|
|
37761
|
+
})).optional(),
|
|
37762
|
+
thread: messageThreadSchema.optional(),
|
|
37763
|
+
approval: FriendApprovalPayloadSchema.optional()
|
|
37764
|
+
});
|
|
37765
|
+
var CommunityMessagePreviewSchema = CommunityMessageResourceSchema.partial().required({
|
|
37766
|
+
id: true,
|
|
37767
|
+
type: true
|
|
37768
|
+
}).extend({ attachments: exports_external.array(CommunityMessagePreviewAttachmentSchema).optional(), thread: messageThreadPreviewSchema.optional() });
|
|
37769
|
+
var CommunityReadStateResourceSchema = exports_external.strictObject({
|
|
37770
|
+
channelId: id,
|
|
37771
|
+
lastReadMessageId: nullableId,
|
|
37772
|
+
lastReadAt: exports_external.string().nullable(),
|
|
37773
|
+
lastReadSeq: exports_external.number().int().nonnegative()
|
|
37774
|
+
});
|
|
37775
|
+
var CommunityMemberRelationSchema = exports_external.strictObject({
|
|
37776
|
+
channelId: id,
|
|
37777
|
+
userId: id,
|
|
37778
|
+
relation: exports_external.enum(["access", "notify"]),
|
|
37779
|
+
source: exports_external.string(),
|
|
37780
|
+
isCreator: exports_external.boolean(),
|
|
37781
|
+
role: exports_external.string().nullable(),
|
|
37782
|
+
memberId: nullableId
|
|
37783
|
+
});
|
|
37784
|
+
var CommunityPageSchema = exports_external.strictObject({
|
|
37785
|
+
olderCursor: exports_external.string().nullable(),
|
|
37786
|
+
newerCursor: exports_external.string().nullable(),
|
|
37787
|
+
hasMoreOlder: exports_external.boolean(),
|
|
37788
|
+
hasMoreNewer: exports_external.boolean(),
|
|
37789
|
+
latestSeq: exports_external.number().int().nonnegative()
|
|
37790
|
+
});
|
|
37791
|
+
var envelope = { contractVersion: exports_external.literal(COMMUNITY_RESOURCE_CONTRACT_VERSION), channelId: id };
|
|
37792
|
+
var CommunityChannelReadSchema = exports_external.strictObject({ ...envelope, channel: CommunityChannelResourceSchema, access: CommunityAccessDecisionSchema });
|
|
37793
|
+
var CommunityMessagesReadSchema = exports_external.strictObject({
|
|
37794
|
+
...envelope,
|
|
37795
|
+
messages: exports_external.array(CommunityMessageResourceSchema),
|
|
37796
|
+
page: CommunityPageSchema,
|
|
37797
|
+
surfaceReceipt: exports_external.strictObject({ channelId: id, surfaceKind: exports_external.enum(["channel", "forum", "thread", "dm"]) })
|
|
37798
|
+
});
|
|
37799
|
+
var CommunityMessagePostedSchema = CommunityMessagesReadSchema.pick({ contractVersion: true, channelId: true }).extend({
|
|
37800
|
+
message: CommunityMessageResourceSchema,
|
|
37801
|
+
deduped: exports_external.boolean(),
|
|
37802
|
+
threadId: id.optional()
|
|
37803
|
+
});
|
|
37804
|
+
var CommunityMessageReadSchema = CommunityMessagePostedSchema.omit({ deduped: true, threadId: true });
|
|
37805
|
+
var CommunityReadStateReadSchema = exports_external.strictObject({ ...envelope, readState: CommunityReadStateResourceSchema });
|
|
37806
|
+
var CommunityMembersReadSchema = exports_external.strictObject({ ...envelope, relation: exports_external.enum(["access", "notify"]), members: exports_external.array(CommunityMemberRelationSchema), profiles: exports_external.array(CommunityResourceProfileSchema) });
|
|
37807
|
+
var CommunityThreadsReadSchema = exports_external.strictObject({
|
|
37808
|
+
...envelope,
|
|
37809
|
+
channel: CommunityChannelResourceSchema,
|
|
37810
|
+
threads: exports_external.array(CommunityChannelResourceSchema),
|
|
37811
|
+
included: exports_external.strictObject({
|
|
37812
|
+
messages: exports_external.array(CommunityMessageResourceSchema),
|
|
37813
|
+
members: exports_external.array(CommunityMemberRelationSchema),
|
|
37814
|
+
profiles: exports_external.array(CommunityResourceProfileSchema),
|
|
37815
|
+
tags: exports_external.array(exports_external.strictObject({ messageId: id, tag: exports_external.string() })),
|
|
37816
|
+
participantCounts: exports_external.array(exports_external.strictObject({ channelId: id, count: exports_external.number().int().nonnegative() }))
|
|
37817
|
+
}),
|
|
37818
|
+
page: exports_external.strictObject({ nextCursor: exports_external.string().nullable(), hasMore: exports_external.boolean() })
|
|
37819
|
+
});
|
|
37820
|
+
var CommunityReadAdvanceSchema = exports_external.strictObject({ ...envelope, changed: exports_external.boolean(), targetSeq: exports_external.number().int().nonnegative(), revision: exports_external.number().int().nonnegative() });
|
|
37821
|
+
var CommunityReadErrorSchema = exports_external.strictObject({ contractVersion: exports_external.literal(COMMUNITY_RESOURCE_CONTRACT_VERSION), error: exports_external.strictObject({
|
|
37822
|
+
code: exports_external.enum(["invalid_input", "invalid_reply_target", "unauthenticated", "not_found", "not_allowed", "blocked", "idempotency_conflict", "rate_limited", "temporarily_unavailable"]),
|
|
37823
|
+
message: exports_external.string(),
|
|
37824
|
+
retryable: exports_external.boolean()
|
|
37825
|
+
}) });
|
|
37826
|
+
var legacyProfileSchema = CommunityResourceProfileSchema.pick({
|
|
37827
|
+
id: true,
|
|
37828
|
+
name: true,
|
|
37829
|
+
avatar: true,
|
|
37830
|
+
avatarVersion: true
|
|
37831
|
+
}).extend({ discriminator: exports_external.string().nullable(), statusEmoji: exports_external.string().nullable(), statusText: exports_external.string() });
|
|
37832
|
+
var CommunityLegacyMessageResourceSchema = CommunityMessageResourceSchema.extend({ authorAvatar: exports_external.string().optional(), attachments: exports_external.array(CommunityLegacyMessageAttachmentSchema), thread: legacyMessageThreadSchema.optional() });
|
|
37833
|
+
var legacyEnvelope = { contractVersion: exports_external.literal(2), channelId: id };
|
|
37834
|
+
var legacyReadSchemas = {
|
|
37835
|
+
channel: CommunityChannelReadSchema.extend(legacyEnvelope),
|
|
37836
|
+
messages: CommunityMessagesReadSchema.extend({ ...legacyEnvelope, messages: exports_external.array(CommunityLegacyMessageResourceSchema) }),
|
|
37837
|
+
readState: CommunityReadStateReadSchema.extend(legacyEnvelope),
|
|
37838
|
+
members: CommunityMembersReadSchema.extend({ ...legacyEnvelope, profiles: exports_external.array(legacyProfileSchema) }),
|
|
37839
|
+
threads: CommunityThreadsReadSchema.extend({ ...legacyEnvelope, included: CommunityThreadsReadSchema.shape.included.extend({
|
|
37840
|
+
messages: exports_external.array(CommunityLegacyMessageResourceSchema),
|
|
37841
|
+
profiles: exports_external.array(legacyProfileSchema)
|
|
37842
|
+
}) }),
|
|
37843
|
+
readAdvance: CommunityReadAdvanceSchema.extend(legacyEnvelope),
|
|
37844
|
+
error: CommunityReadErrorSchema.extend({ contractVersion: exports_external.literal(2) })
|
|
37845
|
+
};
|
|
37846
|
+
var legacyChannelResourcePreviewSchema = CommunityChannelResourceSchema.partial().strip().extend({
|
|
37847
|
+
archived: legacyArchivedSchema.optional()
|
|
37848
|
+
});
|
|
37849
|
+
var legacyChannelResourceSchema = CommunityChannelResourceSchema.strip().extend({
|
|
37850
|
+
topic: CommunityChannelResourceSchema.shape.topic.nullish().transform((value) => value ?? ""),
|
|
37851
|
+
position: CommunityChannelResourceSchema.shape.position.nullish().transform((value) => value ?? 0),
|
|
37852
|
+
messageCount: CommunityChannelResourceSchema.shape.messageCount.nullish().transform((value) => value ?? 0),
|
|
37853
|
+
categoryId: nullableId.default(null),
|
|
37854
|
+
parentChannelId: nullableId.default(null),
|
|
37855
|
+
parentMessageId: nullableId.default(null),
|
|
37856
|
+
creatorId: nullableId.default(null),
|
|
37857
|
+
lastMessageAt: CommunityChannelResourceSchema.shape.lastMessageAt.default(null),
|
|
37858
|
+
archived: legacyArchivedSchema
|
|
37859
|
+
});
|
|
37860
|
+
var legacyMessageResourceSchema = CommunityLegacyMessageResourceSchema.strip().extend({
|
|
37861
|
+
channelId: id.optional(),
|
|
37862
|
+
replyToId: nullableId.optional(),
|
|
37863
|
+
clientNonce: CommunityMessageResourceSchema.shape.clientNonce.default(null),
|
|
37864
|
+
attachments: CommunityLegacyMessageResourceSchema.shape.attachments.default([]),
|
|
37865
|
+
embeds: CommunityMessageResourceSchema.shape.embeds.nullable().transform((value) => value ?? undefined)
|
|
37866
|
+
});
|
|
37867
|
+
|
|
37868
|
+
// ../shared/src/community-attention.ts
|
|
37869
|
+
var id2 = exports_external.string().min(1);
|
|
37870
|
+
var AttentionScopeSchema = exports_external.strictObject({
|
|
37871
|
+
scopeId: id2,
|
|
37872
|
+
channelId: id2,
|
|
37873
|
+
serverId: id2.nullable().optional(),
|
|
37874
|
+
parentChannelId: id2.nullable().optional(),
|
|
37587
37875
|
ordinaryUnread: exports_external.boolean(),
|
|
37588
37876
|
lastUnreadSeq: exports_external.number().int().nonnegative(),
|
|
37589
37877
|
lastAttentionSeq: exports_external.number().int().nonnegative().nullable().optional(),
|
|
37590
37878
|
attentionCount: exports_external.number().int().nonnegative()
|
|
37591
37879
|
});
|
|
37592
37880
|
var AttentionItemSchema = exports_external.strictObject({
|
|
37593
|
-
id,
|
|
37881
|
+
id: id2,
|
|
37594
37882
|
kind: exports_external.enum(["mention", "reply", "friend_request", "forum_post"]),
|
|
37595
|
-
sourceId:
|
|
37596
|
-
scopeId:
|
|
37597
|
-
messageId:
|
|
37598
|
-
actorUserId:
|
|
37883
|
+
sourceId: id2,
|
|
37884
|
+
scopeId: id2.nullable().optional(),
|
|
37885
|
+
messageId: id2.nullable().optional(),
|
|
37886
|
+
actorUserId: id2.nullable().optional(),
|
|
37599
37887
|
createdAt: exports_external.string(),
|
|
37600
|
-
childChannelId:
|
|
37888
|
+
childChannelId: id2.optional(),
|
|
37601
37889
|
openerSeq: exports_external.number().int().nonnegative().optional(),
|
|
37602
37890
|
readTarget: exports_external.strictObject({
|
|
37603
|
-
channelId:
|
|
37891
|
+
channelId: id2,
|
|
37604
37892
|
seq: exports_external.number().int().nonnegative()
|
|
37605
37893
|
}).optional()
|
|
37606
37894
|
}).superRefine((item, ctx) => {
|
|
@@ -37630,26 +37918,30 @@ var AttentionItemSchema = exports_external.strictObject({
|
|
|
37630
37918
|
}
|
|
37631
37919
|
});
|
|
37632
37920
|
var AttentionIncludedServerSchema = exports_external.strictObject({
|
|
37633
|
-
id,
|
|
37921
|
+
id: id2,
|
|
37634
37922
|
name: exports_external.string(),
|
|
37635
37923
|
discriminator: exports_external.string()
|
|
37636
37924
|
});
|
|
37637
|
-
var AttentionIncludedChannelSchema =
|
|
37638
|
-
id,
|
|
37639
|
-
serverId:
|
|
37640
|
-
name:
|
|
37641
|
-
type:
|
|
37642
|
-
parentChannelId:
|
|
37643
|
-
parentMessageId:
|
|
37644
|
-
creatorId:
|
|
37645
|
-
archived:
|
|
37646
|
-
lastMessageAt:
|
|
37925
|
+
var AttentionIncludedChannelSchema = CommunityChannelResourceSchema.pick({
|
|
37926
|
+
id: true,
|
|
37927
|
+
serverId: true,
|
|
37928
|
+
name: true,
|
|
37929
|
+
type: true,
|
|
37930
|
+
parentChannelId: true,
|
|
37931
|
+
parentMessageId: true,
|
|
37932
|
+
creatorId: true,
|
|
37933
|
+
archived: true,
|
|
37934
|
+
lastMessageAt: true
|
|
37935
|
+
}).extend({
|
|
37936
|
+
serverId: CommunityChannelResourceSchema.shape.serverId.unwrap(),
|
|
37937
|
+
name: CommunityChannelResourceSchema.shape.name.unwrap(),
|
|
37938
|
+
type: CommunityChannelResourceSchema.shape.type.extract(["text", "forum", "thread"]),
|
|
37647
37939
|
openerSeq: exports_external.number().int().nonnegative().optional(),
|
|
37648
37940
|
openerUnread: exports_external.boolean().optional()
|
|
37649
37941
|
});
|
|
37650
37942
|
var AttentionIncludedDmSchema = exports_external.strictObject({
|
|
37651
|
-
id,
|
|
37652
|
-
userId:
|
|
37943
|
+
id: id2,
|
|
37944
|
+
userId: id2,
|
|
37653
37945
|
name: exports_external.string(),
|
|
37654
37946
|
discriminator: exports_external.string(),
|
|
37655
37947
|
avatar: exports_external.string(),
|
|
@@ -37658,22 +37950,21 @@ var AttentionIncludedDmSchema = exports_external.strictObject({
|
|
|
37658
37950
|
lastUnreadSeq: exports_external.number().int().nonnegative()
|
|
37659
37951
|
});
|
|
37660
37952
|
var AttentionIncludedProfileSchema = exports_external.strictObject({
|
|
37661
|
-
userId: id,
|
|
37662
|
-
name:
|
|
37953
|
+
userId: CommunityResourceProfileSchema.shape.id,
|
|
37954
|
+
...CommunityResourceProfileSchema.pick({ name: true, discriminator: true, avatar: true, avatarVersion: true }).shape,
|
|
37663
37955
|
discriminator: exports_external.string(),
|
|
37664
|
-
avatar: exports_external.string()
|
|
37665
|
-
avatarVersion: exports_external.number().int().nonnegative()
|
|
37666
|
-
});
|
|
37667
|
-
var AttentionIncludedMessageSchema = exports_external.strictObject({
|
|
37668
|
-
id,
|
|
37669
|
-
channelId: id,
|
|
37670
|
-
type: exports_external.enum(["chat", "system"]),
|
|
37671
|
-
authorId: id.optional(),
|
|
37672
|
-
authorName: exports_external.string().optional(),
|
|
37673
|
-
seq: exports_external.number().int().nonnegative(),
|
|
37674
|
-
createdAt: exports_external.string(),
|
|
37675
|
-
content: exports_external.string()
|
|
37956
|
+
avatar: exports_external.string()
|
|
37676
37957
|
});
|
|
37958
|
+
var AttentionIncludedMessageSchema = CommunityMessagePreviewSchema.pick({
|
|
37959
|
+
id: true,
|
|
37960
|
+
channelId: true,
|
|
37961
|
+
type: true,
|
|
37962
|
+
authorId: true,
|
|
37963
|
+
authorName: true,
|
|
37964
|
+
seq: true,
|
|
37965
|
+
createdAt: true,
|
|
37966
|
+
content: true
|
|
37967
|
+
}).required({ channelId: true, seq: true, createdAt: true, content: true });
|
|
37677
37968
|
var AttentionIncludedSchema = exports_external.strictObject({
|
|
37678
37969
|
servers: exports_external.array(AttentionIncludedServerSchema),
|
|
37679
37970
|
channels: exports_external.array(AttentionIncludedChannelSchema),
|
|
@@ -37699,7 +37990,7 @@ var AccountAttentionSnapshotSchema = exports_external.strictObject({
|
|
|
37699
37990
|
const serverById = new Map(snapshot.included.servers.map((server) => [server.id, server]));
|
|
37700
37991
|
const channelById = new Map(snapshot.included.channels.map((channel2) => [channel2.id, channel2]));
|
|
37701
37992
|
const dmById = new Map(snapshot.included.dms.map((dm) => [dm.id, dm]));
|
|
37702
|
-
const profileById = new Map(snapshot.included.profiles.map((
|
|
37993
|
+
const profileById = new Map(snapshot.included.profiles.map((profile2) => [profile2.userId, profile2]));
|
|
37703
37994
|
const messageById = new Map(snapshot.included.messages.map((message2) => [message2.id, message2]));
|
|
37704
37995
|
const rejectDuplicates = (values, kind) => {
|
|
37705
37996
|
const seen = new Set;
|
|
@@ -37712,7 +38003,7 @@ var AccountAttentionSnapshotSchema = exports_external.strictObject({
|
|
|
37712
38003
|
rejectDuplicates(snapshot.included.servers.map((server) => server.id), "server");
|
|
37713
38004
|
rejectDuplicates(snapshot.included.channels.map((channel2) => channel2.id), "channel");
|
|
37714
38005
|
rejectDuplicates(snapshot.included.dms.map((dm) => dm.id), "dm");
|
|
37715
|
-
rejectDuplicates(snapshot.included.profiles.map((
|
|
38006
|
+
rejectDuplicates(snapshot.included.profiles.map((profile2) => profile2.userId), "profile");
|
|
37716
38007
|
rejectDuplicates(snapshot.included.messages.map((message2) => message2.id), "message");
|
|
37717
38008
|
for (const scope of snapshot.scopes) {
|
|
37718
38009
|
if (scope.serverId) {
|
|
@@ -38523,15 +38814,15 @@ var CommunityMachineRuntimeListSchema = exports_external.array(CommunityMachineR
|
|
|
38523
38814
|
var CommunityRunningAgentListSchema = exports_external.array(exports_external.string()).transform((list) => {
|
|
38524
38815
|
const seen = new Set;
|
|
38525
38816
|
const out = [];
|
|
38526
|
-
for (const
|
|
38527
|
-
if (seen.has(
|
|
38817
|
+
for (const id3 of list) {
|
|
38818
|
+
if (seen.has(id3))
|
|
38528
38819
|
continue;
|
|
38529
|
-
seen.add(
|
|
38530
|
-
out.push(
|
|
38820
|
+
seen.add(id3);
|
|
38821
|
+
out.push(id3);
|
|
38531
38822
|
}
|
|
38532
38823
|
return out;
|
|
38533
38824
|
});
|
|
38534
|
-
var CommunityMachineSummarySchema = exports_external.
|
|
38825
|
+
var CommunityMachineSummarySchema = exports_external.strictObject({
|
|
38535
38826
|
id: exports_external.string(),
|
|
38536
38827
|
hostname: exports_external.string(),
|
|
38537
38828
|
displayName: exports_external.string(),
|
|
@@ -38541,8 +38832,8 @@ var CommunityMachineSummarySchema = exports_external.object({
|
|
|
38541
38832
|
daemonVersion: exports_external.string(),
|
|
38542
38833
|
lastSeenAt: exports_external.string().nullable(),
|
|
38543
38834
|
status: exports_external.enum(["online", "offline"]),
|
|
38544
|
-
availableRuntimes: exports_external.array(CommunityMachineRuntimeSchema
|
|
38545
|
-
lastRuntimeError: exports_external.
|
|
38835
|
+
availableRuntimes: exports_external.array(CommunityMachineRuntimeSchema.strict()),
|
|
38836
|
+
lastRuntimeError: exports_external.strictObject({
|
|
38546
38837
|
requested: exports_external.string(),
|
|
38547
38838
|
available: exports_external.array(exports_external.string()),
|
|
38548
38839
|
at: exports_external.string()
|
|
@@ -39482,203 +39773,6 @@ var AGENT_UNREAD_CHANNEL_CHUNK_SIZE = maxInParams(13);
|
|
|
39482
39773
|
|
|
39483
39774
|
// ../shared/src/db/queries/community/mention.ts
|
|
39484
39775
|
var MENTION_INSERT_MAX_ROWS = maxRowsPerInsert(5);
|
|
39485
|
-
// ../shared/src/community-friend-approval.ts
|
|
39486
|
-
var profile = exports_external.strictObject({
|
|
39487
|
-
id: exports_external.string(),
|
|
39488
|
-
name: exports_external.string(),
|
|
39489
|
-
discriminator: exports_external.string(),
|
|
39490
|
-
image: exports_external.string().nullable(),
|
|
39491
|
-
avatarVersion: exports_external.number().int().nonnegative()
|
|
39492
|
-
});
|
|
39493
|
-
var FriendApprovalPayloadSchema = exports_external.strictObject({
|
|
39494
|
-
friendshipId: exports_external.string(),
|
|
39495
|
-
status: exports_external.enum(["pending", "approved", "denied", "superseded", "cancelled"]),
|
|
39496
|
-
waitingOn: exports_external.enum(["you", "other-owner", "addressee"]).nullable(),
|
|
39497
|
-
otherProfile: profile,
|
|
39498
|
-
botProfile: profile,
|
|
39499
|
-
waitingOnProfile: profile.nullable().optional()
|
|
39500
|
-
});
|
|
39501
|
-
|
|
39502
|
-
// ../shared/src/community-contract.ts
|
|
39503
|
-
var COMMUNITY_CONTRACT_VERSION = 2;
|
|
39504
|
-
|
|
39505
|
-
// ../shared/src/community-resources.ts
|
|
39506
|
-
var id2 = exports_external.string().min(1);
|
|
39507
|
-
var nullableId = id2.nullable();
|
|
39508
|
-
var legacyArchivedSchema = exports_external.union([exports_external.boolean(), exports_external.literal(0), exports_external.literal(1)]).transform((value) => value === true || value === 1);
|
|
39509
|
-
var CommunityChannelResourceSchema = exports_external.strictObject({
|
|
39510
|
-
id: id2,
|
|
39511
|
-
type: exports_external.enum(["text", "forum", "thread", "dm"]),
|
|
39512
|
-
serverId: nullableId,
|
|
39513
|
-
categoryId: nullableId,
|
|
39514
|
-
name: exports_external.string().nullable(),
|
|
39515
|
-
topic: exports_external.string(),
|
|
39516
|
-
parentChannelId: nullableId,
|
|
39517
|
-
parentMessageId: nullableId,
|
|
39518
|
-
creatorId: nullableId,
|
|
39519
|
-
position: exports_external.number(),
|
|
39520
|
-
archived: exports_external.boolean(),
|
|
39521
|
-
createdAt: exports_external.string(),
|
|
39522
|
-
lastMessageAt: exports_external.string().nullable(),
|
|
39523
|
-
messageCount: exports_external.number().int().nonnegative()
|
|
39524
|
-
});
|
|
39525
|
-
var CommunityChannelIdentitySchema = CommunityChannelResourceSchema.pick({
|
|
39526
|
-
id: true,
|
|
39527
|
-
type: true,
|
|
39528
|
-
serverId: true,
|
|
39529
|
-
name: true,
|
|
39530
|
-
parentChannelId: true,
|
|
39531
|
-
parentMessageId: true,
|
|
39532
|
-
creatorId: true,
|
|
39533
|
-
archived: true,
|
|
39534
|
-
lastMessageAt: true,
|
|
39535
|
-
createdAt: true
|
|
39536
|
-
}).partial({ createdAt: true }).strip();
|
|
39537
|
-
var legacyChannelIdentitySchema = CommunityChannelIdentitySchema.extend({
|
|
39538
|
-
archived: legacyArchivedSchema,
|
|
39539
|
-
parentChannelId: nullableId.default(null),
|
|
39540
|
-
parentMessageId: nullableId.default(null),
|
|
39541
|
-
creatorId: nullableId.default(null),
|
|
39542
|
-
lastMessageAt: CommunityChannelResourceSchema.shape.lastMessageAt.default(null)
|
|
39543
|
-
});
|
|
39544
|
-
var CommunityAccessDecisionSchema = exports_external.strictObject({
|
|
39545
|
-
channelId: id2,
|
|
39546
|
-
canRead: exports_external.boolean(),
|
|
39547
|
-
canSend: exports_external.boolean(),
|
|
39548
|
-
canCreateDiscussion: exports_external.boolean()
|
|
39549
|
-
});
|
|
39550
|
-
var CommunityMessageAttachmentSchema = exports_external.strictObject({
|
|
39551
|
-
kind: exports_external.enum(["image", "file"]),
|
|
39552
|
-
name: exports_external.string(),
|
|
39553
|
-
url: exports_external.string(),
|
|
39554
|
-
thumbnailUrl: exports_external.string().optional(),
|
|
39555
|
-
contentType: exports_external.string().optional(),
|
|
39556
|
-
size: exports_external.string().optional(),
|
|
39557
|
-
sizeBytes: exports_external.number().nonnegative().optional(),
|
|
39558
|
-
width: exports_external.number().nonnegative().optional(),
|
|
39559
|
-
height: exports_external.number().nonnegative().optional()
|
|
39560
|
-
});
|
|
39561
|
-
var CommunityMessageResourceSchema = exports_external.strictObject({
|
|
39562
|
-
id: id2,
|
|
39563
|
-
channelId: id2,
|
|
39564
|
-
seq: exports_external.number().int().nonnegative(),
|
|
39565
|
-
authorId: id2,
|
|
39566
|
-
createdAt: exports_external.string(),
|
|
39567
|
-
type: exports_external.enum(["chat", "system"]),
|
|
39568
|
-
content: exports_external.string(),
|
|
39569
|
-
replyToId: nullableId,
|
|
39570
|
-
clientNonce: exports_external.string().nullable(),
|
|
39571
|
-
attachments: exports_external.array(CommunityMessageAttachmentSchema),
|
|
39572
|
-
systemKind: exports_external.literal("thread").optional(),
|
|
39573
|
-
authorName: exports_external.string().optional(),
|
|
39574
|
-
authorAvatar: exports_external.string().optional(),
|
|
39575
|
-
authorAvatarVersion: exports_external.number().int().nonnegative().optional(),
|
|
39576
|
-
mentionType: exports_external.literal("everyone").nullable().optional(),
|
|
39577
|
-
replyTo: exports_external.strictObject({
|
|
39578
|
-
id: id2,
|
|
39579
|
-
authorId: id2.optional(),
|
|
39580
|
-
authorName: exports_external.string(),
|
|
39581
|
-
text: exports_external.string(),
|
|
39582
|
-
deleted: exports_external.boolean().optional()
|
|
39583
|
-
}).optional(),
|
|
39584
|
-
embeds: exports_external.array(exports_external.unknown()).optional(),
|
|
39585
|
-
reactions: exports_external.array(exports_external.strictObject({
|
|
39586
|
-
emoji: exports_external.string(),
|
|
39587
|
-
count: exports_external.number().int().nonnegative(),
|
|
39588
|
-
me: exports_external.boolean(),
|
|
39589
|
-
userIds: exports_external.array(id2)
|
|
39590
|
-
})).optional(),
|
|
39591
|
-
thread: exports_external.strictObject({
|
|
39592
|
-
id: id2,
|
|
39593
|
-
name: exports_external.string(),
|
|
39594
|
-
messageCount: exports_external.number().int().nonnegative(),
|
|
39595
|
-
lastReplyAt: exports_external.string().optional(),
|
|
39596
|
-
tags: exports_external.array(exports_external.string()).optional(),
|
|
39597
|
-
preview: exports_external.string().optional(),
|
|
39598
|
-
participants: exports_external.array(exports_external.strictObject({ id: id2, name: exports_external.string(), avatar: exports_external.string(), avatarVersion: exports_external.number().int().nonnegative() })).optional(),
|
|
39599
|
-
participantCount: exports_external.number().int().nonnegative().optional()
|
|
39600
|
-
}).optional(),
|
|
39601
|
-
approval: FriendApprovalPayloadSchema.optional()
|
|
39602
|
-
});
|
|
39603
|
-
var CommunityReadStateResourceSchema = exports_external.strictObject({
|
|
39604
|
-
channelId: id2,
|
|
39605
|
-
lastReadMessageId: nullableId,
|
|
39606
|
-
lastReadAt: exports_external.string().nullable(),
|
|
39607
|
-
lastReadSeq: exports_external.number().int().nonnegative()
|
|
39608
|
-
});
|
|
39609
|
-
var CommunityMemberRelationSchema = exports_external.strictObject({
|
|
39610
|
-
channelId: id2,
|
|
39611
|
-
userId: id2,
|
|
39612
|
-
relation: exports_external.enum(["access", "notify"]),
|
|
39613
|
-
source: exports_external.string(),
|
|
39614
|
-
isCreator: exports_external.boolean(),
|
|
39615
|
-
role: exports_external.string().nullable(),
|
|
39616
|
-
memberId: nullableId
|
|
39617
|
-
});
|
|
39618
|
-
var CommunityResourceProfileSchema = exports_external.strictObject({
|
|
39619
|
-
id: id2,
|
|
39620
|
-
name: exports_external.string(),
|
|
39621
|
-
discriminator: exports_external.string().nullable(),
|
|
39622
|
-
avatar: exports_external.string().nullable(),
|
|
39623
|
-
avatarVersion: exports_external.number().int().nonnegative(),
|
|
39624
|
-
statusEmoji: exports_external.string().nullable(),
|
|
39625
|
-
statusText: exports_external.string()
|
|
39626
|
-
});
|
|
39627
|
-
var CommunityPageSchema = exports_external.strictObject({
|
|
39628
|
-
olderCursor: exports_external.string().nullable(),
|
|
39629
|
-
newerCursor: exports_external.string().nullable(),
|
|
39630
|
-
hasMoreOlder: exports_external.boolean(),
|
|
39631
|
-
hasMoreNewer: exports_external.boolean(),
|
|
39632
|
-
latestSeq: exports_external.number().int().nonnegative()
|
|
39633
|
-
});
|
|
39634
|
-
var envelope = { contractVersion: exports_external.literal(COMMUNITY_CONTRACT_VERSION), channelId: id2 };
|
|
39635
|
-
var CommunityChannelReadSchema = exports_external.strictObject({ ...envelope, channel: CommunityChannelResourceSchema, access: CommunityAccessDecisionSchema });
|
|
39636
|
-
var CommunityMessagesReadSchema = exports_external.strictObject({
|
|
39637
|
-
...envelope,
|
|
39638
|
-
messages: exports_external.array(CommunityMessageResourceSchema),
|
|
39639
|
-
page: CommunityPageSchema,
|
|
39640
|
-
surfaceReceipt: exports_external.strictObject({ channelId: id2, surfaceKind: exports_external.enum(["channel", "forum", "thread", "dm"]) })
|
|
39641
|
-
});
|
|
39642
|
-
var CommunityReadStateReadSchema = exports_external.strictObject({ ...envelope, readState: CommunityReadStateResourceSchema });
|
|
39643
|
-
var CommunityMembersReadSchema = exports_external.strictObject({ ...envelope, relation: exports_external.enum(["access", "notify"]), members: exports_external.array(CommunityMemberRelationSchema), profiles: exports_external.array(CommunityResourceProfileSchema) });
|
|
39644
|
-
var CommunityThreadsReadSchema = exports_external.strictObject({
|
|
39645
|
-
...envelope,
|
|
39646
|
-
channel: CommunityChannelResourceSchema,
|
|
39647
|
-
threads: exports_external.array(CommunityChannelResourceSchema),
|
|
39648
|
-
included: exports_external.strictObject({
|
|
39649
|
-
messages: exports_external.array(CommunityMessageResourceSchema),
|
|
39650
|
-
members: exports_external.array(CommunityMemberRelationSchema),
|
|
39651
|
-
profiles: exports_external.array(CommunityResourceProfileSchema),
|
|
39652
|
-
tags: exports_external.array(exports_external.strictObject({ messageId: id2, tag: exports_external.string() })),
|
|
39653
|
-
participantCounts: exports_external.array(exports_external.strictObject({ channelId: id2, count: exports_external.number().int().nonnegative() }))
|
|
39654
|
-
}),
|
|
39655
|
-
page: exports_external.strictObject({ nextCursor: exports_external.string().nullable(), hasMore: exports_external.boolean() })
|
|
39656
|
-
});
|
|
39657
|
-
var CommunityReadAdvanceSchema = exports_external.strictObject({ ...envelope, changed: exports_external.boolean(), targetSeq: exports_external.number().int().nonnegative(), revision: exports_external.number().int().nonnegative() });
|
|
39658
|
-
var CommunityReadErrorSchema = exports_external.strictObject({ contractVersion: exports_external.literal(COMMUNITY_CONTRACT_VERSION), error: exports_external.strictObject({
|
|
39659
|
-
code: exports_external.enum(["invalid_input", "invalid_reply_target", "unauthenticated", "not_found", "not_allowed", "blocked", "idempotency_conflict", "rate_limited", "temporarily_unavailable"]),
|
|
39660
|
-
message: exports_external.string(),
|
|
39661
|
-
retryable: exports_external.boolean()
|
|
39662
|
-
}) });
|
|
39663
|
-
var legacyChannelResourceSchema = CommunityChannelResourceSchema.strip().extend({
|
|
39664
|
-
topic: CommunityChannelResourceSchema.shape.topic.nullish().transform((value) => value ?? ""),
|
|
39665
|
-
position: CommunityChannelResourceSchema.shape.position.nullish().transform((value) => value ?? 0),
|
|
39666
|
-
messageCount: CommunityChannelResourceSchema.shape.messageCount.nullish().transform((value) => value ?? 0),
|
|
39667
|
-
categoryId: nullableId.default(null),
|
|
39668
|
-
parentChannelId: nullableId.default(null),
|
|
39669
|
-
parentMessageId: nullableId.default(null),
|
|
39670
|
-
creatorId: nullableId.default(null),
|
|
39671
|
-
lastMessageAt: CommunityChannelResourceSchema.shape.lastMessageAt.default(null),
|
|
39672
|
-
archived: legacyArchivedSchema
|
|
39673
|
-
});
|
|
39674
|
-
var legacyMessageResourceSchema = CommunityMessageResourceSchema.strip().extend({
|
|
39675
|
-
channelId: id2.optional(),
|
|
39676
|
-
replyToId: nullableId.optional(),
|
|
39677
|
-
clientNonce: CommunityMessageResourceSchema.shape.clientNonce.default(null),
|
|
39678
|
-
attachments: CommunityMessageResourceSchema.shape.attachments.default([]),
|
|
39679
|
-
embeds: CommunityMessageResourceSchema.shape.embeds.nullable().transform((value) => value ?? undefined)
|
|
39680
|
-
});
|
|
39681
|
-
|
|
39682
39776
|
// ../shared/src/community-ws-events.ts
|
|
39683
39777
|
var string4 = exports_external.string();
|
|
39684
39778
|
var nullableString = string4.nullable();
|
|
@@ -39708,6 +39802,7 @@ var messageSchema = CommunityMessageResourceSchema.pick({
|
|
|
39708
39802
|
seq: exports_external.number(),
|
|
39709
39803
|
authorId: string4,
|
|
39710
39804
|
authorName: string4,
|
|
39805
|
+
authorAvatar: string4.optional(),
|
|
39711
39806
|
authorAvatarVersion: CommunityMessageResourceSchema.shape.authorAvatarVersion.unwrap(),
|
|
39712
39807
|
replyToId: nullableString.optional(),
|
|
39713
39808
|
replyTo: CommunityMessageResourceSchema.shape.replyTo.unwrap().extend({
|
|
@@ -39717,7 +39812,7 @@ var messageSchema = CommunityMessageResourceSchema.pick({
|
|
|
39717
39812
|
attachments: exports_external.array(messageAttachmentSchema).optional(),
|
|
39718
39813
|
clientNonce: string4.optional()
|
|
39719
39814
|
});
|
|
39720
|
-
var
|
|
39815
|
+
var CommunityLegacyMessageCreateSchema = exports_external.strictObject({
|
|
39721
39816
|
type: exports_external.literal("community:message.create"),
|
|
39722
39817
|
channelId: string4,
|
|
39723
39818
|
serverId: string4.optional(),
|
|
@@ -40029,29 +40124,9 @@ var communityProfileUpdateSchema = exports_external.strictObject({
|
|
|
40029
40124
|
kind: exports_external.enum(["human", "bot"]),
|
|
40030
40125
|
ownerUserId: nullableString
|
|
40031
40126
|
});
|
|
40032
|
-
var machineRuntimeSchema = CommunityMachineRuntimeSchema.strict();
|
|
40033
|
-
var CommunityMachineSummarySchema2 = exports_external.strictObject({
|
|
40034
|
-
id: string4,
|
|
40035
|
-
hostname: string4,
|
|
40036
|
-
displayName: string4,
|
|
40037
|
-
platform: string4,
|
|
40038
|
-
arch: string4,
|
|
40039
|
-
osRelease: string4,
|
|
40040
|
-
daemonVersion: string4,
|
|
40041
|
-
lastSeenAt: nullableString,
|
|
40042
|
-
status: exports_external.enum(["online", "offline"]),
|
|
40043
|
-
availableRuntimes: exports_external.array(machineRuntimeSchema),
|
|
40044
|
-
lastRuntimeError: exports_external.strictObject({
|
|
40045
|
-
requested: string4,
|
|
40046
|
-
available: exports_external.array(string4),
|
|
40047
|
-
at: string4
|
|
40048
|
-
}).optional(),
|
|
40049
|
-
createdAt: string4,
|
|
40050
|
-
updatedAt: string4
|
|
40051
|
-
});
|
|
40052
40127
|
var communityMachineCreatedSchema = exports_external.strictObject({
|
|
40053
40128
|
type: exports_external.literal("community:machine.created"),
|
|
40054
|
-
machine:
|
|
40129
|
+
machine: CommunityMachineSummarySchema,
|
|
40055
40130
|
tokenId: string4
|
|
40056
40131
|
});
|
|
40057
40132
|
var communityMachineStatusSchema = exports_external.strictObject({
|
|
@@ -40062,7 +40137,7 @@ var communityMachineStatusSchema = exports_external.strictObject({
|
|
|
40062
40137
|
});
|
|
40063
40138
|
var communityMachineUpdatedSchema = exports_external.strictObject({
|
|
40064
40139
|
type: exports_external.literal("community:machine.updated"),
|
|
40065
|
-
machine:
|
|
40140
|
+
machine: CommunityMachineSummarySchema
|
|
40066
40141
|
});
|
|
40067
40142
|
var communityMachineRemovedSchema = exports_external.strictObject({
|
|
40068
40143
|
type: exports_external.literal("community:machine.removed"),
|
|
@@ -40078,8 +40153,7 @@ var communityBotAuditEventSchema = exports_external.strictObject({
|
|
|
40078
40153
|
launchId: nullableString.optional(),
|
|
40079
40154
|
createdAt: string4
|
|
40080
40155
|
}).refine((event) => Object.prototype.hasOwnProperty.call(event, "payload"));
|
|
40081
|
-
var
|
|
40082
|
-
communityMessageCreateSchema,
|
|
40156
|
+
var commonCommunityEventSchemas = [
|
|
40083
40157
|
communityMessageUpdatedSchema,
|
|
40084
40158
|
communityMessageEditedSchema,
|
|
40085
40159
|
communityReactionAddSchema,
|
|
@@ -40088,12 +40162,8 @@ var CommunityWsEventDiscriminatedSchema = exports_external.discriminatedUnion("t
|
|
|
40088
40162
|
communityPinRemoveSchema,
|
|
40089
40163
|
communityTypingStartSchema,
|
|
40090
40164
|
communityTypingStopSchema,
|
|
40091
|
-
communityChildChannelCreateSchema,
|
|
40092
|
-
communityChildChannelUpdateSchema,
|
|
40093
40165
|
communityServerUpdateSchema,
|
|
40094
40166
|
communityServerDeleteSchema,
|
|
40095
|
-
communityChannelCreateSchema,
|
|
40096
|
-
communityChannelUpdateSchema,
|
|
40097
40167
|
communityChannelDeleteSchema,
|
|
40098
40168
|
communityChannelReorderSchema,
|
|
40099
40169
|
communityChannelMemberAddSchema,
|
|
@@ -40118,15 +40188,34 @@ var CommunityWsEventDiscriminatedSchema = exports_external.discriminatedUnion("t
|
|
|
40118
40188
|
communityInboxChangedSchema,
|
|
40119
40189
|
communityPresenceUpdateSchema,
|
|
40120
40190
|
communityStatusUpdateSchema,
|
|
40121
|
-
communityIdentityUpdateSchema,
|
|
40122
|
-
communityProfileUpdateSchema,
|
|
40123
40191
|
communityMachineCreatedSchema,
|
|
40124
40192
|
communityMachineStatusSchema,
|
|
40125
40193
|
communityMachineUpdatedSchema,
|
|
40126
40194
|
communityMachineRemovedSchema,
|
|
40127
40195
|
communityBotAuditEventSchema
|
|
40196
|
+
];
|
|
40197
|
+
var CommunityWsEventDiscriminatedSchema = exports_external.discriminatedUnion("type", [
|
|
40198
|
+
...commonCommunityEventSchemas,
|
|
40199
|
+
CommunityLegacyMessageCreateSchema,
|
|
40200
|
+
communityChildChannelCreateSchema,
|
|
40201
|
+
communityChannelCreateSchema,
|
|
40202
|
+
communityChildChannelUpdateSchema,
|
|
40203
|
+
communityChannelUpdateSchema,
|
|
40204
|
+
communityIdentityUpdateSchema,
|
|
40205
|
+
communityProfileUpdateSchema
|
|
40206
|
+
]);
|
|
40207
|
+
var CommunityResourceWsEventDiscriminatedSchema = exports_external.discriminatedUnion("type", [
|
|
40208
|
+
...commonCommunityEventSchemas,
|
|
40209
|
+
CommunityLegacyMessageCreateSchema.extend({ message: CommunityMessageResourceSchema.required({ authorName: true, authorAvatarVersion: true }) }).refine((event) => event.message.channelId === event.channelId),
|
|
40210
|
+
communityChildChannelCreateSchema.extend({ channel: CommunityChannelResourceSchema.extend({ type: exports_external.literal("thread") }) }).refine((event) => event.channel.parentChannelId === event.parentChannelId && (event.parentMessageId === undefined || event.parentMessageId === event.channel.parentMessageId)),
|
|
40211
|
+
communityChannelCreateSchema.extend({ channel: CommunityChannelResourceSchema.extend({ type: channelTypeSchema }) }).refine((event) => event.channel.serverId === event.serverId),
|
|
40212
|
+
communityChildChannelUpdateSchema.extend({ changes: CommunityChannelResourceSchema.pick({ name: true, archived: true, lastMessageAt: true, messageCount: true }).partial().extend({ tags: exports_external.array(string4).nullable().optional() }) }),
|
|
40213
|
+
communityChannelUpdateSchema.extend({ changes: CommunityChannelResourceSchema.pick({ name: true, topic: true, categoryId: true, type: true }).partial().extend({ type: channelTypeSchema.optional() }) }),
|
|
40214
|
+
communityIdentityUpdateSchema.extend({ avatar: CommunityResourceProfileSchema.shape.avatar, avatarVersion: CommunityResourceProfileSchema.shape.avatarVersion.refine((version3) => version3 > 0) }),
|
|
40215
|
+
CommunityResourceProfileSchema.pick({ name: true, discriminator: true, aboutMe: true, bannerColor: true, kind: true, ownerUserId: true }).required().extend({ type: exports_external.literal("community:profile.update"), userId: string4 })
|
|
40128
40216
|
]);
|
|
40129
40217
|
var CommunityWsEventSchema = CommunityWsEventDiscriminatedSchema.transform((event) => event);
|
|
40218
|
+
var CommunityResourceWsEventSchema = CommunityResourceWsEventDiscriminatedSchema.transform((event) => event);
|
|
40130
40219
|
var WS_EVENTS = {
|
|
40131
40220
|
MESSAGE_CREATE: "community:message.create",
|
|
40132
40221
|
MESSAGE_UPDATED: "community:message.updated",
|
|
@@ -40210,6 +40299,7 @@ var memberAddedSchema = exports_external.strictObject({
|
|
|
40210
40299
|
channelId: exports_external.string().min(1)
|
|
40211
40300
|
});
|
|
40212
40301
|
var batchShape = exports_external.strictObject({
|
|
40302
|
+
communityContract: exports_external.literal(3).optional(),
|
|
40213
40303
|
messageId: exports_external.string().min(1),
|
|
40214
40304
|
messageEvent: exports_external.unknown(),
|
|
40215
40305
|
contentUserIds: targetList,
|