@rubytech/create-maxy-code 0.1.498 → 0.1.500
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/package.json +1 -1
- package/payload/platform/lib/active-rules/dist/index.d.ts +3 -7
- package/payload/platform/lib/active-rules/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/active-rules/dist/index.js +20 -52
- package/payload/platform/lib/active-rules/dist/index.js.map +1 -1
- package/payload/platform/lib/active-rules/src/index.test.ts +35 -69
- package/payload/platform/lib/active-rules/src/index.ts +17 -58
- package/payload/platform/plugins/admin/PLUGIN.md +1 -1
- package/payload/platform/plugins/admin/hooks/__tests__/admin-authoring-observer.test.sh +135 -0
- package/payload/platform/plugins/admin/hooks/__tests__/prompt-optimiser-directive.test.sh +11 -2
- package/payload/platform/plugins/admin/hooks/prompt-optimiser-directive.sh +6 -3
- package/payload/platform/plugins/admin/mcp/dist/index.js +52 -107
- package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/admin/mcp/dist/skill-resolution.d.ts +8 -4
- package/payload/platform/plugins/admin/mcp/dist/skill-resolution.d.ts.map +1 -1
- package/payload/platform/plugins/admin/mcp/dist/skill-resolution.js +67 -50
- package/payload/platform/plugins/admin/mcp/dist/skill-resolution.js.map +1 -1
- package/payload/platform/plugins/admin/mcp/dist/store-skill-core.d.ts +33 -0
- package/payload/platform/plugins/admin/mcp/dist/store-skill-core.d.ts.map +1 -0
- package/payload/platform/plugins/admin/mcp/dist/store-skill-core.js +122 -0
- package/payload/platform/plugins/admin/mcp/dist/store-skill-core.js.map +1 -0
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +11 -5
- package/payload/platform/plugins/contacts/.claude-plugin/plugin.json +1 -1
- package/payload/platform/plugins/contacts/PLUGIN.md +1 -1
- package/payload/platform/plugins/contacts/mcp/dist/index.js +3 -12
- package/payload/platform/plugins/contacts/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/contacts/mcp/dist/tools/__tests__/contact-lookup.test.js +105 -2
- package/payload/platform/plugins/contacts/mcp/dist/tools/__tests__/contact-lookup.test.js.map +1 -1
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-lookup.d.ts +11 -1
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-lookup.d.ts.map +1 -1
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-lookup.js +56 -4
- package/payload/platform/plugins/contacts/mcp/dist/tools/contact-lookup.js.map +1 -1
- package/payload/platform/plugins/docs/references/contacts-guide.md +2 -0
- package/payload/platform/plugins/docs/references/internals.md +2 -2
- package/payload/platform/plugins/docs/references/outlook-guide.md +4 -0
- package/payload/platform/plugins/docs/references/plugins-guide.md +2 -2
- package/payload/platform/plugins/email/mcp/dist/__tests__/compose-signature.test.d.ts +2 -0
- package/payload/platform/plugins/email/mcp/dist/__tests__/compose-signature.test.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/__tests__/compose-signature.test.js +53 -0
- package/payload/platform/plugins/email/mcp/dist/__tests__/compose-signature.test.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/__tests__/signature.test.d.ts +2 -0
- package/payload/platform/plugins/email/mcp/dist/__tests__/signature.test.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/__tests__/signature.test.js +50 -0
- package/payload/platform/plugins/email/mcp/dist/__tests__/signature.test.js.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/compose.d.ts.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/lib/compose.js +15 -2
- package/payload/platform/plugins/email/mcp/dist/lib/compose.js.map +1 -1
- package/payload/platform/plugins/email/mcp/dist/lib/signature.d.ts +29 -0
- package/payload/platform/plugins/email/mcp/dist/lib/signature.d.ts.map +1 -0
- package/payload/platform/plugins/email/mcp/dist/lib/signature.js +55 -0
- package/payload/platform/plugins/email/mcp/dist/lib/signature.js.map +1 -0
- package/payload/platform/plugins/email/references/email-reference.md +10 -0
- package/payload/platform/plugins/email/skills/email-composition/SKILL.md +9 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-read-active-rules.test.js +10 -9
- package/payload/platform/plugins/memory/mcp/dist/tools/__tests__/profile-read-active-rules.test.js.map +1 -1
- package/payload/platform/plugins/memory/skills/conversational-memory/SKILL.md +2 -0
- package/payload/platform/plugins/memory/skills/preference-audit/SKILL.md +16 -0
- package/payload/platform/plugins/outlook/skills/outlook/SKILL.md +6 -0
- package/payload/platform/plugins/prompt-optimiser/skills/prompt-optimiser/SKILL.md +1 -1
- package/payload/platform/plugins/prompt-optimiser/skills/prompt-optimiser/__tests__/restatement-ladder.test.sh +2 -1
- package/payload/platform/services/claude-session-manager/dist/index.js +26 -1
- package/payload/platform/services/claude-session-manager/dist/index.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.d.ts +19 -19
- package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.js +28 -34
- package/payload/platform/services/claude-session-manager/dist/preference-reconciliation-audit.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/skill-registration-drift.d.ts +15 -0
- package/payload/platform/services/claude-session-manager/dist/skill-registration-drift.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/skill-registration-drift.js +61 -0
- package/payload/platform/services/claude-session-manager/dist/skill-registration-drift.js.map +1 -1
- package/payload/platform/templates/agents/admin/IDENTITY.md +1 -1
- package/payload/server/public/assets/{AdminLoginScreens-Ce5aBBWF.js → AdminLoginScreens-CKg_Dlpv.js} +1 -1
- package/payload/server/public/assets/{admin-BWb8me-E.js → admin-wtSUU5N0.js} +1 -1
- package/payload/server/public/assets/chat-DRuIxGtE.js +1 -0
- package/payload/server/public/assets/data-BdZCvyvN.js +1 -0
- package/payload/server/public/assets/{operator-icJwMkZF.js → operator-DglDYmdV.js} +1 -1
- package/payload/server/public/assets/{page-iG57nKOg.js → page-C-5sTAE-.js} +2 -2
- package/payload/server/public/assets/{page-DUgrGrJp.js → page-C8G5p4jr.js} +1 -1
- package/payload/server/public/assets/{public-CkOumzpf.js → public-DqJjXR4p.js} +1 -1
- package/payload/server/public/assets/{useVoiceRecorder-Cu6zvuFx.js → useVoiceRecorder-Cj-VZDKO.js} +1 -1
- package/payload/server/public/chat.html +3 -3
- package/payload/server/public/data.html +3 -3
- package/payload/server/public/index.html +4 -4
- package/payload/server/public/operator.html +4 -4
- package/payload/server/public/public.html +3 -3
- package/payload/server/server.js +89 -63
- package/payload/server/public/assets/chat-qtOiJX-Y.js +0 -1
- package/payload/server/public/assets/data-BjqC4hyM.js +0 -1
package/payload/server/server.js
CHANGED
|
@@ -144,47 +144,18 @@ var require_dist = __commonJS({
|
|
|
144
144
|
"../lib/active-rules/dist/index.js"(exports) {
|
|
145
145
|
"use strict";
|
|
146
146
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
147
|
-
exports.
|
|
148
|
-
exports.cosine = cosine;
|
|
149
|
-
exports.deconflictBySubject = deconflictBySubject;
|
|
147
|
+
exports.ACTIVE_CANDIDATE_FLOOR = exports.SAME_SUBJECT_COSINE = void 0;
|
|
150
148
|
exports.formatStandingRulesBlock = formatStandingRulesBlock2;
|
|
151
149
|
exports.resolveOwnerUserId = resolveOwnerUserId2;
|
|
152
150
|
exports.queryActiveRuleCandidates = queryActiveRuleCandidates;
|
|
153
151
|
exports.resolveActiveRules = resolveActiveRules2;
|
|
154
152
|
exports.activeRuleSet = activeRuleSet;
|
|
155
153
|
exports.SAME_SUBJECT_COSINE = 0.85;
|
|
156
|
-
exports.INJECTION_RULE_CAP = 12;
|
|
157
154
|
exports.ACTIVE_CANDIDATE_FLOOR = 0.4;
|
|
158
|
-
|
|
159
|
-
function cosine(a, b) {
|
|
160
|
-
if (!a.length || !b.length || a.length !== b.length)
|
|
161
|
-
return 0;
|
|
162
|
-
let dot = 0;
|
|
163
|
-
let na = 0;
|
|
164
|
-
let nb = 0;
|
|
165
|
-
for (let i = 0; i < a.length; i++) {
|
|
166
|
-
dot += a[i] * b[i];
|
|
167
|
-
na += a[i] * a[i];
|
|
168
|
-
nb += b[i] * b[i];
|
|
169
|
-
}
|
|
170
|
-
if (na === 0 || nb === 0)
|
|
171
|
-
return 0;
|
|
172
|
-
return dot / (Math.sqrt(na) * Math.sqrt(nb));
|
|
173
|
-
}
|
|
174
|
-
function deconflictBySubject(records, cosineThreshold = exports.SAME_SUBJECT_COSINE) {
|
|
175
|
-
const winners = [];
|
|
176
|
-
for (const r of records) {
|
|
177
|
-
const emb = r.embedding;
|
|
178
|
-
const isDup = Array.isArray(emb) && emb.length > 0 && winners.some((w) => Array.isArray(w.embedding) && w.embedding.length > 0 && cosine(emb, w.embedding) >= cosineThreshold);
|
|
179
|
-
if (!isDup)
|
|
180
|
-
winners.push(r);
|
|
181
|
-
}
|
|
182
|
-
return winners.map(({ embedding: _embedding, ...rest }) => rest);
|
|
183
|
-
}
|
|
184
|
-
function formatStandingRulesBlock2(rules, cap = exports.INJECTION_RULE_CAP) {
|
|
155
|
+
function formatStandingRulesBlock2(rules) {
|
|
185
156
|
if (rules.length === 0)
|
|
186
157
|
return "";
|
|
187
|
-
const lines = rules.
|
|
158
|
+
const lines = rules.map((r) => `- ${r.value}`);
|
|
188
159
|
return `## Standing rules
|
|
189
160
|
${lines.join("\n")}`;
|
|
190
161
|
}
|
|
@@ -209,7 +180,6 @@ ${lines.join("\n")}`;
|
|
|
209
180
|
pref.key AS key, pref.value AS value, pref.confidence AS confidence,
|
|
210
181
|
pref.observedAt AS observedAt, pref.embedding AS embedding
|
|
211
182
|
ORDER BY pref.confidence DESC, pref.observedAt DESC
|
|
212
|
-
LIMIT ${exports.ACTIVE_CANDIDATE_LIMIT}
|
|
213
183
|
`, { accountId, ownerUserId, floor: exports.ACTIVE_CANDIDATE_FLOOR });
|
|
214
184
|
return result.records.map((r) => ({
|
|
215
185
|
preferenceId: r.get("preferenceId"),
|
|
@@ -236,12 +206,13 @@ ${lines.join("\n")}`;
|
|
|
236
206
|
async function queryActiveRuleCandidates(session, accountId) {
|
|
237
207
|
return (await resolveCandidates(session, accountId)).candidates;
|
|
238
208
|
}
|
|
239
|
-
async function resolveActiveRules2(session, accountId
|
|
209
|
+
async function resolveActiveRules2(session, accountId) {
|
|
240
210
|
const { candidates, ownerUserId, source } = await resolveCandidates(session, accountId);
|
|
241
|
-
|
|
211
|
+
const rules = candidates.map(({ embedding: _embedding, ...rest }) => rest);
|
|
212
|
+
return { rules, ownerUserId, source };
|
|
242
213
|
}
|
|
243
|
-
async function activeRuleSet(session, accountId
|
|
244
|
-
return (await resolveActiveRules2(session, accountId
|
|
214
|
+
async function activeRuleSet(session, accountId) {
|
|
215
|
+
return (await resolveActiveRules2(session, accountId)).rules;
|
|
245
216
|
}
|
|
246
217
|
}
|
|
247
218
|
});
|
|
@@ -7581,7 +7552,7 @@ function createScheduleInjectRoutes(deps) {
|
|
|
7581
7552
|
}
|
|
7582
7553
|
|
|
7583
7554
|
// server/index.ts
|
|
7584
|
-
var
|
|
7555
|
+
var import_dist8 = __toESM(require_dist(), 1);
|
|
7585
7556
|
|
|
7586
7557
|
// app/lib/whatsapp/socket-resolution-error.ts
|
|
7587
7558
|
function formatPresentKeys(presentKeys) {
|
|
@@ -11651,7 +11622,8 @@ function unwrapChannel(text) {
|
|
|
11651
11622
|
}
|
|
11652
11623
|
return source ? { text: inner, source } : { text: inner };
|
|
11653
11624
|
}
|
|
11654
|
-
var COMPOSED_ADMIN_FRAME = /^(?:## Standing rules\n[\s\S]*?\n\n)?## Context\n([\s\S]*)\n\n## Instruction\n[\s\S]*$/;
|
|
11625
|
+
var COMPOSED_ADMIN_FRAME = /^(?:## Scheduled automation \(platform-verified\)\n[\s\S]*?\n\n)?(?:## Standing rules\n[\s\S]*?\n\n)?## Context\n([\s\S]*)\n\n## Instruction\n[\s\S]*$/;
|
|
11626
|
+
var SCHEDULED_MARKER_PREFIX = "## Scheduled automation (platform-verified)\n";
|
|
11655
11627
|
var UPLOAD_ANNOTATION = /(?:\n\n)?\[The operator uploaded \d+ file\(s\): [\s\S]*\]$/;
|
|
11656
11628
|
function rawFromComposedAdminFrame(text) {
|
|
11657
11629
|
const context = text.match(COMPOSED_ADMIN_FRAME)?.[1];
|
|
@@ -11667,6 +11639,7 @@ function uploadCountOf(text) {
|
|
|
11667
11639
|
function operatorInboundTurn(u, ts) {
|
|
11668
11640
|
const rawBody = rawFromComposedAdminFrame(u.text);
|
|
11669
11641
|
const uploadCount = uploadCountOf(u.text);
|
|
11642
|
+
const scheduled = rawBody !== void 0 && u.text.startsWith(SCHEDULED_MARKER_PREFIX);
|
|
11670
11643
|
const text = rawBody === void 0 ? u.text.replace(PUBLIC_UPLOAD_ANNOTATION, "") : u.text;
|
|
11671
11644
|
return {
|
|
11672
11645
|
kind: "operator-inbound",
|
|
@@ -11674,7 +11647,8 @@ function operatorInboundTurn(u, ts) {
|
|
|
11674
11647
|
ts,
|
|
11675
11648
|
...u.source ? { source: u.source } : {},
|
|
11676
11649
|
...rawBody !== void 0 ? { rawBody } : {},
|
|
11677
|
-
...uploadCount !== void 0 ? { uploadCount } : {}
|
|
11650
|
+
...uploadCount !== void 0 ? { uploadCount } : {},
|
|
11651
|
+
...scheduled ? { scheduled: true } : {}
|
|
11678
11652
|
};
|
|
11679
11653
|
}
|
|
11680
11654
|
function asString(content) {
|
|
@@ -12200,6 +12174,23 @@ function tagAndMergeInstallConversations(perAccount) {
|
|
|
12200
12174
|
}
|
|
12201
12175
|
return all.sort((x, y) => (y.lastMessageAt ?? "").localeCompare(x.lastMessageAt ?? ""));
|
|
12202
12176
|
}
|
|
12177
|
+
function dropHouseRowsOwnedBySubAccount(rows, subManagerPhones) {
|
|
12178
|
+
return rows.filter((r) => {
|
|
12179
|
+
if (r.isHouse !== true || r.source !== "store" || r.senderId == null) return true;
|
|
12180
|
+
let owner = null;
|
|
12181
|
+
for (const [subId, phones] of subManagerPhones) {
|
|
12182
|
+
if (counterpartyBoundToSubAccount(phones, r.senderId)) {
|
|
12183
|
+
owner = subId;
|
|
12184
|
+
break;
|
|
12185
|
+
}
|
|
12186
|
+
}
|
|
12187
|
+
if (owner === null) return true;
|
|
12188
|
+
const subHasOwnRow = rows.some(
|
|
12189
|
+
(o) => o.isHouse !== true && o.accountId === owner && o.source === "store" && o.senderId != null && counterpartyBoundToSubAccount([o.senderId], r.senderId)
|
|
12190
|
+
);
|
|
12191
|
+
return !subHasOwnRow;
|
|
12192
|
+
});
|
|
12193
|
+
}
|
|
12203
12194
|
app5.get("/conversations-all", requireAdminSession, async (c) => {
|
|
12204
12195
|
const cacheKey = c.var.cacheKey;
|
|
12205
12196
|
const caller2 = getAccountIdForSession(cacheKey) ?? null;
|
|
@@ -12273,10 +12264,21 @@ app5.get("/conversations-all", requireAdminSession, async (c) => {
|
|
|
12273
12264
|
const storeRows = buildStoreConversationRows(account.accountId, readConversationSummaries(account.accountId));
|
|
12274
12265
|
perAccount.push({ isHouse, rows: [...named, ...storeRows] });
|
|
12275
12266
|
}
|
|
12276
|
-
const
|
|
12267
|
+
const houseAccount = validAccounts.find((a) => a.accountId === houseId) ?? null;
|
|
12268
|
+
const subManagerPhones = /* @__PURE__ */ new Map();
|
|
12269
|
+
if (houseAccount) {
|
|
12270
|
+
const managers = readAccountManagers(houseAccount.accountDir);
|
|
12271
|
+
for (const a of validAccounts) {
|
|
12272
|
+
if (houseIds.has(a.accountId)) continue;
|
|
12273
|
+
const phones = managerPhonesForAccount(managers, a.accountId);
|
|
12274
|
+
if (phones.length > 0) subManagerPhones.set(a.accountId, phones);
|
|
12275
|
+
}
|
|
12276
|
+
}
|
|
12277
|
+
const merged = tagAndMergeInstallConversations(perAccount);
|
|
12278
|
+
const conversations = dropHouseRowsOwnedBySubAccount(merged, subManagerPhones);
|
|
12277
12279
|
const houseRows = conversations.filter((r) => r.isHouse).length;
|
|
12278
12280
|
console.log(
|
|
12279
|
-
`[wa-reader] op=conversations-all accounts=${validAccounts.length} rows=${conversations.length} house=${houseRows} sub=${conversations.length - houseRows}`
|
|
12281
|
+
`[wa-reader] op=conversations-all accounts=${validAccounts.length} rows=${conversations.length} house=${houseRows} sub=${conversations.length - houseRows} deduped=${merged.length - conversations.length}`
|
|
12280
12282
|
);
|
|
12281
12283
|
return c.json({ conversations });
|
|
12282
12284
|
});
|
|
@@ -16822,7 +16824,7 @@ function parseSkillPathsFromFrontmatter(fm) {
|
|
|
16822
16824
|
}
|
|
16823
16825
|
return out;
|
|
16824
16826
|
}
|
|
16825
|
-
function listPluginDirs() {
|
|
16827
|
+
function listPluginDirs(accountPluginsDir) {
|
|
16826
16828
|
const out = /* @__PURE__ */ new Map();
|
|
16827
16829
|
const platformPlugins = resolve22(PLATFORM_ROOT, "plugins");
|
|
16828
16830
|
if (existsSync30(platformPlugins)) {
|
|
@@ -16851,8 +16853,38 @@ function listPluginDirs() {
|
|
|
16851
16853
|
}
|
|
16852
16854
|
}
|
|
16853
16855
|
}
|
|
16856
|
+
if (accountPluginsDir && existsSync30(accountPluginsDir)) {
|
|
16857
|
+
try {
|
|
16858
|
+
for (const name of readdirSync22(accountPluginsDir)) {
|
|
16859
|
+
if (out.has(name)) continue;
|
|
16860
|
+
const dir = join33(accountPluginsDir, name);
|
|
16861
|
+
try {
|
|
16862
|
+
if (statSync13(dir).isDirectory()) out.set(name, dir);
|
|
16863
|
+
} catch {
|
|
16864
|
+
}
|
|
16865
|
+
}
|
|
16866
|
+
} catch {
|
|
16867
|
+
}
|
|
16868
|
+
}
|
|
16854
16869
|
return out;
|
|
16855
16870
|
}
|
|
16871
|
+
function accountPluginsDirFor(accountId) {
|
|
16872
|
+
return resolve22(PLATFORM_ROOT, "..", "data/accounts", accountId, "plugins");
|
|
16873
|
+
}
|
|
16874
|
+
function listAccountPluginNames(accountPluginsDir) {
|
|
16875
|
+
if (!existsSync30(accountPluginsDir)) return [];
|
|
16876
|
+
try {
|
|
16877
|
+
return readdirSync22(accountPluginsDir).filter((name) => {
|
|
16878
|
+
try {
|
|
16879
|
+
return statSync13(join33(accountPluginsDir, name)).isDirectory();
|
|
16880
|
+
} catch {
|
|
16881
|
+
return false;
|
|
16882
|
+
}
|
|
16883
|
+
});
|
|
16884
|
+
} catch {
|
|
16885
|
+
return [];
|
|
16886
|
+
}
|
|
16887
|
+
}
|
|
16856
16888
|
function readEnabledPlugins(accountId) {
|
|
16857
16889
|
const accountFile = resolve22(PLATFORM_ROOT, "..", "data/accounts", accountId, "account.json");
|
|
16858
16890
|
if (!existsSync30(accountFile)) return /* @__PURE__ */ new Set();
|
|
@@ -16878,10 +16910,13 @@ function readFrontmatter(path3) {
|
|
|
16878
16910
|
}
|
|
16879
16911
|
function computeActivePlugins(accountId) {
|
|
16880
16912
|
const enabled = readEnabledPlugins(accountId);
|
|
16881
|
-
|
|
16882
|
-
const
|
|
16913
|
+
const accountPluginsDir = accountPluginsDirFor(accountId);
|
|
16914
|
+
const accountPluginNames = listAccountPluginNames(accountPluginsDir);
|
|
16915
|
+
const emitNames = Array.from(/* @__PURE__ */ new Set([...enabled, ...accountPluginNames])).sort();
|
|
16916
|
+
if (emitNames.length === 0) return [];
|
|
16917
|
+
const pluginDirs = listPluginDirs(accountPluginsDir);
|
|
16883
16918
|
const out = [];
|
|
16884
|
-
for (const name of
|
|
16919
|
+
for (const name of emitNames) {
|
|
16885
16920
|
const dir = pluginDirs.get(name);
|
|
16886
16921
|
if (!dir) continue;
|
|
16887
16922
|
const fm = readFrontmatter(join33(dir, "PLUGIN.md"));
|
|
@@ -16935,7 +16970,7 @@ function computeSpecialistDomains(accountId) {
|
|
|
16935
16970
|
} catch {
|
|
16936
16971
|
return [];
|
|
16937
16972
|
}
|
|
16938
|
-
const pluginDirs = listPluginDirs();
|
|
16973
|
+
const pluginDirs = listPluginDirs(accountPluginsDirFor(accountId));
|
|
16939
16974
|
const descByPlugin = /* @__PURE__ */ new Map();
|
|
16940
16975
|
const resolveDesc = (qualified) => {
|
|
16941
16976
|
if (!qualified.startsWith("mcp__")) return void 0;
|
|
@@ -26642,9 +26677,6 @@ var InboundHub = class {
|
|
|
26642
26677
|
}
|
|
26643
26678
|
};
|
|
26644
26679
|
|
|
26645
|
-
// app/lib/whatsapp/gateway/wa-gateway.ts
|
|
26646
|
-
var import_dist7 = __toESM(require_dist(), 1);
|
|
26647
|
-
|
|
26648
26680
|
// node_modules/hono/dist/utils/stream.js
|
|
26649
26681
|
var StreamingApi = class {
|
|
26650
26682
|
writer;
|
|
@@ -27060,7 +27092,7 @@ var WaGateway = class {
|
|
|
27060
27092
|
const injected = res.block ? (res.block.match(/^- /gm) ?? []).length : 0;
|
|
27061
27093
|
const owner8 = res.ownerUserId ? res.ownerUserId.slice(0, 8) : "-";
|
|
27062
27094
|
console.error(
|
|
27063
|
-
`[preference-inject] op=inject channel=wa accountId=${input.effectiveAccountId} injected=${injected} owner=${owner8} source=${res.source}
|
|
27095
|
+
`[preference-inject] op=inject channel=wa accountId=${input.effectiveAccountId} injected=${injected} owner=${owner8} source=${res.source}`
|
|
27064
27096
|
);
|
|
27065
27097
|
}
|
|
27066
27098
|
this.hub.deliver(
|
|
@@ -27340,9 +27372,6 @@ var InboundHub2 = class {
|
|
|
27340
27372
|
}
|
|
27341
27373
|
};
|
|
27342
27374
|
|
|
27343
|
-
// app/lib/webchat/gateway/webchat-gateway.ts
|
|
27344
|
-
var import_dist8 = __toESM(require_dist(), 1);
|
|
27345
|
-
|
|
27346
27375
|
// app/lib/webchat/gateway/routes.ts
|
|
27347
27376
|
function createWebchatChannelRoutes(deps) {
|
|
27348
27377
|
const app66 = new Hono();
|
|
@@ -27821,7 +27850,7 @@ var WebchatGateway = class _WebchatGateway {
|
|
|
27821
27850
|
const injected = res.block ? (res.block.match(/^- /gm) ?? []).length : 0;
|
|
27822
27851
|
const owner8 = res.ownerUserId ? res.ownerUserId.slice(0, 8) : "-";
|
|
27823
27852
|
console.error(
|
|
27824
|
-
`[preference-inject] op=inject channel=web accountId=${input.accountId} injected=${injected} owner=${owner8} source=${res.source}
|
|
27853
|
+
`[preference-inject] op=inject channel=web accountId=${input.accountId} injected=${injected} owner=${owner8} source=${res.source}`
|
|
27825
27854
|
);
|
|
27826
27855
|
}
|
|
27827
27856
|
this.hub.deliver(
|
|
@@ -28525,9 +28554,6 @@ var InboundHub3 = class {
|
|
|
28525
28554
|
}
|
|
28526
28555
|
};
|
|
28527
28556
|
|
|
28528
|
-
// app/lib/telegram/gateway/telegram-gateway.ts
|
|
28529
|
-
var import_dist9 = __toESM(require_dist(), 1);
|
|
28530
|
-
|
|
28531
28557
|
// app/lib/telegram/gateway/routes.ts
|
|
28532
28558
|
function createTelegramChannelRoutes(deps) {
|
|
28533
28559
|
const app66 = new Hono();
|
|
@@ -28701,7 +28727,7 @@ var TelegramGateway = class {
|
|
|
28701
28727
|
const injected = res.block ? (res.block.match(/^- /gm) ?? []).length : 0;
|
|
28702
28728
|
const owner8 = res.ownerUserId ? res.ownerUserId.slice(0, 8) : "-";
|
|
28703
28729
|
console.error(
|
|
28704
|
-
`[preference-inject] op=inject channel=tg accountId=${input.accountId} injected=${injected} owner=${owner8} source=${res.source}
|
|
28730
|
+
`[preference-inject] op=inject channel=tg accountId=${input.accountId} injected=${injected} owner=${owner8} source=${res.source}`
|
|
28705
28731
|
);
|
|
28706
28732
|
}
|
|
28707
28733
|
this.hub.deliver(
|
|
@@ -29070,11 +29096,11 @@ async function firePublicSessionEndReview(input) {
|
|
|
29070
29096
|
}
|
|
29071
29097
|
|
|
29072
29098
|
// app/lib/whatsapp/inbound/resolve-client-graph-owner.ts
|
|
29073
|
-
var
|
|
29099
|
+
var import_dist7 = __toESM(require_dist(), 1);
|
|
29074
29100
|
async function resolveClientOwnerUserId(accountId, deps = {}) {
|
|
29075
29101
|
const listAccounts = deps.listAccounts ?? listValidAccounts;
|
|
29076
29102
|
const getSession4 = deps.getSession ?? getSession;
|
|
29077
|
-
const resolveOwner2 = deps.resolveOwner ??
|
|
29103
|
+
const resolveOwner2 = deps.resolveOwner ?? import_dist7.resolveOwnerUserId;
|
|
29078
29104
|
const role = listAccounts().find((a) => a.accountId === accountId)?.config.role;
|
|
29079
29105
|
if (role !== "client") return null;
|
|
29080
29106
|
const session = getSession4();
|
|
@@ -29536,8 +29562,8 @@ var webchatFileFollowers = /* @__PURE__ */ new Map();
|
|
|
29536
29562
|
async function fetchAccountStandingRules(accountId) {
|
|
29537
29563
|
const session = getSession();
|
|
29538
29564
|
try {
|
|
29539
|
-
const res = await (0,
|
|
29540
|
-
return { block: (0,
|
|
29565
|
+
const res = await (0, import_dist8.resolveActiveRules)(session, accountId);
|
|
29566
|
+
return { block: (0, import_dist8.formatStandingRulesBlock)(res.rules), ownerUserId: res.ownerUserId, source: res.source };
|
|
29541
29567
|
} catch (err) {
|
|
29542
29568
|
console.error(
|
|
29543
29569
|
`[preference-inject] op=fetch-failed accountId=${accountId} error=${err instanceof Error ? err.message : String(err)}`
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as e,U as t}from"./useSubAccountSwitcher-Bc7XHr0L.js";import"./useVoiceRecorder-Cu6zvuFx.js";import"./AdminShell-BFVVkWFC.js";import{n}from"./page-iG57nKOg.js";import"./useCopyFeedback-DHCtz8qX.js";var r=t(),i=e();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as e,U as t}from"./useSubAccountSwitcher-Bc7XHr0L.js";import"./useVoiceRecorder-Cu6zvuFx.js";import{t as n}from"./page-DUgrGrJp.js";import"./graph-labels-DykmXYHA.js";var r=t(),i=e();(0,r.createRoot)(document.getElementById(`root`)).render((0,i.jsx)(n,{}));
|