@agentcomms/whatsapp 0.26.0 → 0.26.2
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/THIRD_PARTY_LICENSES +2 -2
- package/dist/cli.mjs +2 -2
- package/dist/{coerce-CqGigABD.mjs → coerce-DUN95oU4.mjs} +3 -3
- package/dist/{dist-C7DG2LdL-l0mj9_dH.mjs → dist-C7DG2LdL-6QTVBgXp.mjs} +1 -1
- package/dist/index.d.mts +984 -3041
- package/dist/index.mjs +2 -10
- package/dist/{iso-USuVU_sk.mjs → iso-5-9R47LC.mjs} +59 -26
- package/dist/{mcp-DIH4cS6P-CIWWZQbz.mjs → mcp-DIH4cS6P-C1s6ZIjc.mjs} +2 -2
- package/dist/{server-ubl3VinK.mjs → server-MsyzeVCx.mjs} +4 -4
- package/dist/{src-WCy6ifGf-DXrNj-15-D0oRtifb.mjs → src-WCy6ifGf-DXrNj-15-HcB9fGcS.mjs} +2 -2
- package/dist/{stdio-B8UXEGiG.mjs → stdio-BWbiQh9h.mjs} +1 -1
- package/dist/{stdio-CyjIgrch-59zcjSEt.mjs → stdio-CRbkOCqe-BpzkpnG6.mjs} +15 -15
- package/dist/{stdio-entry-DQ1RgYGk.mjs → stdio-entry-D-WOuy3R.mjs} +1 -1
- package/dist/{sync-BwJSBi-M.mjs → sync-fDnka8og.mjs} +12 -10
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as chatKindOf, D as text, E as numeric, R as CommsError, T as kindOf, Tt as VERSION, _ as WhatsAppContext, d as composeDraft, g as visibilityUnitKey, h as statusAuthor, m as listKey, n as withCheckedCopy, p as Visibility, w as coreDataToIso, wt as PACKAGE_NAME, x as inspectSchema, y as rebuildIndex } from "./sync-
|
|
2
|
-
import { t as createWhatsAppMcpServer } from "./server-
|
|
1
|
+
import { C as chatKindOf, D as text, E as numeric, R as CommsError, T as kindOf, Tt as VERSION, _ as WhatsAppContext, d as composeDraft, g as visibilityUnitKey, h as statusAuthor, m as listKey, n as withCheckedCopy, p as Visibility, w as coreDataToIso, wt as PACKAGE_NAME, x as inspectSchema, y as rebuildIndex } from "./sync-fDnka8og.mjs";
|
|
2
|
+
import { t as createWhatsAppMcpServer } from "./server-MsyzeVCx.mjs";
|
|
3
3
|
//#region src/source/event-reader.ts
|
|
4
4
|
function rawFromMe(value) {
|
|
5
5
|
const number = numeric(value);
|
|
@@ -85,12 +85,4 @@ async function withEventSnapshot(context, input, work) {
|
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
|
-
//#region src/index.ts
|
|
89
|
-
/**
|
|
90
|
-
* The library entry of `@agentcomms/whatsapp`.
|
|
91
|
-
*
|
|
92
|
-
* Small on purpose, as the Slack package's is: the server, the draft composer, the event list-lock capability and the
|
|
93
|
-
* version. Everything else is reached through the `agent-whatsapp` command.
|
|
94
|
-
*/
|
|
95
|
-
//#endregion
|
|
96
88
|
export { PACKAGE_NAME, VERSION, Visibility, chatKindOf, composeDraft, createWhatsAppMcpServer, listKey, openWhatsAppEventOperations, statusAuthor, visibilityUnitKey, withCurrentEventVisibility, withEventSnapshot };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
1
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/util.js
|
|
2
2
|
function getEnumValues(entries) {
|
|
3
3
|
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
|
|
4
4
|
return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
|
|
@@ -323,6 +323,17 @@ function prefixIssues(path, issues) {
|
|
|
323
323
|
function unwrapMessage(message) {
|
|
324
324
|
return typeof message === "string" ? message : message?.message;
|
|
325
325
|
}
|
|
326
|
+
/** The leading size checks of `defChecks` that set an upper bound, each paired with it. */
|
|
327
|
+
function sizeCaps(defChecks) {
|
|
328
|
+
const caps = [];
|
|
329
|
+
for (const ch of defChecks ?? []) {
|
|
330
|
+
const d = ch._zod.def;
|
|
331
|
+
if (!/_(length|size)$|_equals$/.test(d.check)) break;
|
|
332
|
+
const max = d.maximum ?? d.length ?? d.size;
|
|
333
|
+
if (max >= 0) caps.push([max, ch]);
|
|
334
|
+
}
|
|
335
|
+
return caps;
|
|
336
|
+
}
|
|
326
337
|
function attachSchema(issues, start, inst) {
|
|
327
338
|
var _a;
|
|
328
339
|
for (let i = start; i < issues.length; i++) (_a = issues[i]).schema ?? (_a.schema = inst);
|
|
@@ -415,6 +426,7 @@ function hide(inst, key, value) {
|
|
|
415
426
|
return own(inst, key, value, false);
|
|
416
427
|
}
|
|
417
428
|
/** Adds members a table derives from the instance: each builds on first read and shadows as own data, and assignment shadows the same way, as when these were own properties. */
|
|
429
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
418
430
|
function derived(computes, table) {
|
|
419
431
|
for (const key in computes) {
|
|
420
432
|
const compute = computes[key];
|
|
@@ -539,7 +551,7 @@ function constantCatch(value) {
|
|
|
539
551
|
return fn;
|
|
540
552
|
}
|
|
541
553
|
//#endregion
|
|
542
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
554
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/core.js
|
|
543
555
|
var _a$1;
|
|
544
556
|
/** A special constant with type `never` */
|
|
545
557
|
const NEVER = /*@__PURE__*/ Object.freeze({ status: "aborted" });
|
|
@@ -568,6 +580,7 @@ function newError(Definition) {
|
|
|
568
580
|
}
|
|
569
581
|
return new Definition();
|
|
570
582
|
}
|
|
583
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
571
584
|
function $constructor(name, initializer, proto, params) {
|
|
572
585
|
const zodProto = {};
|
|
573
586
|
function Internals(def) {
|
|
@@ -647,7 +660,7 @@ function config(newConfig) {
|
|
|
647
660
|
return globalConfig;
|
|
648
661
|
}
|
|
649
662
|
//#endregion
|
|
650
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
663
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/errors.js
|
|
651
664
|
function _getMessage() {
|
|
652
665
|
const internals = this._zod;
|
|
653
666
|
internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
|
|
@@ -698,8 +711,7 @@ const initializer$1 = (inst, def) => {
|
|
|
698
711
|
});
|
|
699
712
|
}
|
|
700
713
|
};
|
|
701
|
-
const $ZodError = $constructor("$ZodError", initializer$1);
|
|
702
|
-
$constructor("$ZodError", initializer$1, void 0, { Parent: Error });
|
|
714
|
+
const $ZodError = /* @__PURE__ */ $constructor("$ZodError", initializer$1);
|
|
703
715
|
/** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member
|
|
704
716
|
* ("toString", "constructor") would otherwise read through to the prototype, and assigning
|
|
705
717
|
* "__proto__" would hit the setter instead of creating a key. */
|
|
@@ -763,7 +775,7 @@ function formatError(error, mapper = (issue) => issue.message) {
|
|
|
763
775
|
return fieldErrors;
|
|
764
776
|
}
|
|
765
777
|
//#endregion
|
|
766
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
778
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/parse.js
|
|
767
779
|
function finalizeParams(callee, params) {
|
|
768
780
|
return {
|
|
769
781
|
callee: params?.callee ?? callee,
|
|
@@ -966,7 +978,7 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
|
966
978
|
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
967
979
|
};
|
|
968
980
|
//#endregion
|
|
969
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
981
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/regexes.js
|
|
970
982
|
/**
|
|
971
983
|
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
972
984
|
* (timestamps embedded in the id). Use {@link cuid2} instead.
|
|
@@ -1039,7 +1051,7 @@ const _null$2 = /^null$/i;
|
|
|
1039
1051
|
const lowercase = /^[^A-Z]*$/;
|
|
1040
1052
|
const uppercase = /^[^a-z]*$/;
|
|
1041
1053
|
//#endregion
|
|
1042
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
1054
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/checks.js
|
|
1043
1055
|
const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
|
|
1044
1056
|
var _a;
|
|
1045
1057
|
inst._zod ?? (inst._zod = {});
|
|
@@ -1335,7 +1347,7 @@ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (ins
|
|
|
1335
1347
|
};
|
|
1336
1348
|
});
|
|
1337
1349
|
//#endregion
|
|
1338
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
1350
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/doc.js
|
|
1339
1351
|
var Doc = class {
|
|
1340
1352
|
constructor(args = [], closed = {}) {
|
|
1341
1353
|
this.content = [];
|
|
@@ -1369,14 +1381,14 @@ var Doc = class {
|
|
|
1369
1381
|
}
|
|
1370
1382
|
};
|
|
1371
1383
|
//#endregion
|
|
1372
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
1384
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/versions.js
|
|
1373
1385
|
const version = {
|
|
1374
1386
|
major: 4,
|
|
1375
1387
|
minor: 6,
|
|
1376
|
-
patch:
|
|
1388
|
+
patch: 7
|
|
1377
1389
|
};
|
|
1378
1390
|
//#endregion
|
|
1379
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
1391
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/schemas.js
|
|
1380
1392
|
const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
|
|
1381
1393
|
var _a;
|
|
1382
1394
|
inst ?? (inst = {});
|
|
@@ -1893,6 +1905,26 @@ const $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def) => {
|
|
|
1893
1905
|
return payload;
|
|
1894
1906
|
};
|
|
1895
1907
|
});
|
|
1908
|
+
function capSize(inst, size) {
|
|
1909
|
+
const caps = sizeCaps(inst._zod.def.checks);
|
|
1910
|
+
if (!caps.length) return;
|
|
1911
|
+
const cap = Math.min(...caps.map((c) => c[0]));
|
|
1912
|
+
const parse = inst._zod.parse;
|
|
1913
|
+
inst._zod.parse = (payload, ctx) => {
|
|
1914
|
+
const n = size(payload.value);
|
|
1915
|
+
if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
|
|
1916
|
+
for (const [max, ch] of sizeCaps(inst._zod.def.checks)) if (n > max && ch._zod.def.when(payload)) {
|
|
1917
|
+
const start = payload.issues.length;
|
|
1918
|
+
ch._zod.check(payload);
|
|
1919
|
+
payload.issues[start].continue = false;
|
|
1920
|
+
attachSchema(payload.issues, start, inst);
|
|
1921
|
+
return payload;
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
return parse(payload, ctx);
|
|
1925
|
+
};
|
|
1926
|
+
}
|
|
1927
|
+
const arraySize = (input) => Array.isArray(input) ? input.length : -1;
|
|
1896
1928
|
function handleArrayResult(result, final, index) {
|
|
1897
1929
|
if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
|
|
1898
1930
|
final.value[index] = result.value;
|
|
@@ -1930,6 +1962,7 @@ const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => {
|
|
|
1930
1962
|
if (proms.length) return Promise.all(proms).then(() => payload);
|
|
1931
1963
|
return payload;
|
|
1932
1964
|
};
|
|
1965
|
+
capSize(inst, arraySize);
|
|
1933
1966
|
});
|
|
1934
1967
|
function handlePropertyResult(result, final, key, input, optin, optout) {
|
|
1935
1968
|
const isPresent = key in input;
|
|
@@ -2038,7 +2071,7 @@ const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
|
|
|
2038
2071
|
}
|
|
2039
2072
|
return propValues;
|
|
2040
2073
|
});
|
|
2041
|
-
const isObject$
|
|
2074
|
+
const isObject$1 = isObject;
|
|
2042
2075
|
const catchall = def.catchall;
|
|
2043
2076
|
let value;
|
|
2044
2077
|
const memo = globalConfig.memoizer;
|
|
@@ -2046,7 +2079,7 @@ const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
|
|
|
2046
2079
|
inst._zod.parse = (payload, ctx) => {
|
|
2047
2080
|
value ?? (value = _normalized.value);
|
|
2048
2081
|
const input = payload.value;
|
|
2049
|
-
if (!isObject$
|
|
2082
|
+
if (!isObject$1(input)) {
|
|
2050
2083
|
payload.issues.push({
|
|
2051
2084
|
expected: "object",
|
|
2052
2085
|
code: "invalid_type",
|
|
@@ -2176,7 +2209,7 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
2176
2209
|
return doc.compile();
|
|
2177
2210
|
};
|
|
2178
2211
|
let fastpass;
|
|
2179
|
-
const isObject$
|
|
2212
|
+
const isObject$2 = isObject;
|
|
2180
2213
|
const jit = !globalConfig.jitless;
|
|
2181
2214
|
const fastEnabled = jit && allowsEval.value;
|
|
2182
2215
|
const catchall = def.catchall;
|
|
@@ -2184,7 +2217,7 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
|
|
|
2184
2217
|
inst._zod.parse = (payload, ctx) => {
|
|
2185
2218
|
value ?? (value = _normalized.value);
|
|
2186
2219
|
const input = payload.value;
|
|
2187
|
-
if (!isObject$
|
|
2220
|
+
if (!isObject$2(input)) {
|
|
2188
2221
|
payload.issues.push({
|
|
2189
2222
|
expected: "object",
|
|
2190
2223
|
code: "invalid_type",
|
|
@@ -2848,7 +2881,7 @@ function handleRefineResult(result, payload, input, inst) {
|
|
|
2848
2881
|
}
|
|
2849
2882
|
}
|
|
2850
2883
|
//#endregion
|
|
2851
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
2884
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/memoizer.js
|
|
2852
2885
|
var $ZodCyclicError = class extends Error {
|
|
2853
2886
|
constructor() {
|
|
2854
2887
|
super(`Cannot parse a reference cycle that closes through a transform`);
|
|
@@ -3101,7 +3134,7 @@ function isBackEdge(ctx, value) {
|
|
|
3101
3134
|
return backEdges !== void 0 && isRef(value) && backEdges.has(value);
|
|
3102
3135
|
}
|
|
3103
3136
|
//#endregion
|
|
3104
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
3137
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/locales/en.js
|
|
3105
3138
|
const error = () => {
|
|
3106
3139
|
const Sizable = {
|
|
3107
3140
|
string: {
|
|
@@ -3209,7 +3242,7 @@ function en_default() {
|
|
|
3209
3242
|
return { localeError: error() };
|
|
3210
3243
|
}
|
|
3211
3244
|
//#endregion
|
|
3212
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
3245
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/registries.js
|
|
3213
3246
|
var _a;
|
|
3214
3247
|
var $ZodRegistry = class {
|
|
3215
3248
|
constructor() {
|
|
@@ -3256,7 +3289,7 @@ function registry() {
|
|
|
3256
3289
|
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
3257
3290
|
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
3258
3291
|
//#endregion
|
|
3259
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
3292
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/api.js
|
|
3260
3293
|
function snapshotChecks(def) {
|
|
3261
3294
|
if (def.checks) def.checks = [...def.checks];
|
|
3262
3295
|
return def;
|
|
@@ -3785,7 +3818,7 @@ function _check(fn, params) {
|
|
|
3785
3818
|
return ch;
|
|
3786
3819
|
}
|
|
3787
3820
|
//#endregion
|
|
3788
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
3821
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/to-json-schema.js
|
|
3789
3822
|
function assignProps(target, ...sources) {
|
|
3790
3823
|
for (const source of sources) for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProp(target, key, source[key]);
|
|
3791
3824
|
return target;
|
|
@@ -4229,7 +4262,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
|
|
|
4229
4262
|
return finalize(ctx, schema);
|
|
4230
4263
|
};
|
|
4231
4264
|
//#endregion
|
|
4232
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
4265
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/core/json-schema-processors.js
|
|
4233
4266
|
const narrowMin = (agg, key, value) => {
|
|
4234
4267
|
if (agg[key] === void 0 || value > agg[key]) agg[key] = value;
|
|
4235
4268
|
};
|
|
@@ -4875,7 +4908,7 @@ function toJSONSchema(input, params) {
|
|
|
4875
4908
|
return finalize(ctx, input);
|
|
4876
4909
|
}
|
|
4877
4910
|
//#endregion
|
|
4878
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
4911
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/errors.js
|
|
4879
4912
|
const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
4880
4913
|
function _lazyMethod(proto, key, make) {
|
|
4881
4914
|
Object.defineProperty(proto, key, {
|
|
@@ -4925,7 +4958,7 @@ const initializer = (inst, issues) => {
|
|
|
4925
4958
|
};
|
|
4926
4959
|
const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
|
|
4927
4960
|
//#endregion
|
|
4928
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
4961
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/parse.js
|
|
4929
4962
|
const parse = /* @__PURE__ */ _parse(ZodRealError);
|
|
4930
4963
|
const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
|
|
4931
4964
|
const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
|
|
@@ -4939,7 +4972,7 @@ const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
|
|
|
4939
4972
|
const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
|
|
4940
4973
|
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
|
|
4941
4974
|
//#endregion
|
|
4942
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
4975
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/schemas.js
|
|
4943
4976
|
function _ensureDefaultLocale() {
|
|
4944
4977
|
if (!globalConfig.localeError) config(en_default());
|
|
4945
4978
|
}
|
|
@@ -5882,7 +5915,7 @@ function preprocess(fn, schema) {
|
|
|
5882
5915
|
});
|
|
5883
5916
|
}
|
|
5884
5917
|
//#endregion
|
|
5885
|
-
//#region ../../node_modules/.pnpm/zod@4.6.
|
|
5918
|
+
//#region ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/classic/iso.js
|
|
5886
5919
|
function datetime(params) {
|
|
5887
5920
|
return /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);
|
|
5888
5921
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as unknown, E as toJSONSchema, O as NEVER, S as union, T as safeParse, _ as optional, a as _null, c as boolean, d as intersection, f as lazy, g as object, h as number, i as _enum, l as discriminatedUnion, m as looseObject, n as datetime, o as any, p as literal, s as array, t as date, u as email, v as preprocess, w as url, x as string, y as record } from "./iso-
|
|
2
|
-
import { n as ZodIssueCode, t as number$1 } from "./coerce-
|
|
1
|
+
import { C as unknown, E as toJSONSchema, O as NEVER, S as union, T as safeParse, _ as optional, a as _null, c as boolean, d as intersection, f as lazy, g as object, h as number, i as _enum, l as discriminatedUnion, m as looseObject, n as datetime, o as any, p as literal, s as array, t as date, u as email, v as preprocess, w as url, x as string, y as record } from "./iso-5-9R47LC.mjs";
|
|
2
|
+
import { n as ZodIssueCode, t as number$1 } from "./coerce-DUN95oU4.mjs";
|
|
3
3
|
import process$1 from "node:process";
|
|
4
4
|
//#region ../../node_modules/.pnpm/@modelcontextprotocol+server@2.3.1/node_modules/@modelcontextprotocol/server/dist/chunk-Br0eD_fh.mjs
|
|
5
5
|
var __create = Object.create;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { I as strictToolArguments, Tt as VERSION, V as UNTRUSTED_NOTICE, _ as WhatsAppContext, a as CHAT_KINDS, c as searchMessages, f as draftMessage, gt as toCommsError, o as listChats, r as whatsappStatus, s as readChat, t as syncAccount, yt as updateToolNotice } from "./sync-
|
|
2
|
-
import { c as boolean, h as number, x as string } from "./iso-
|
|
3
|
-
import { t as McpServer } from "./mcp-DIH4cS6P-
|
|
1
|
+
import { I as strictToolArguments, Tt as VERSION, V as UNTRUSTED_NOTICE, _ as WhatsAppContext, a as CHAT_KINDS, c as searchMessages, f as draftMessage, gt as toCommsError, o as listChats, r as whatsappStatus, s as readChat, t as syncAccount, yt as updateToolNotice } from "./sync-fDnka8og.mjs";
|
|
2
|
+
import { c as boolean, h as number, x as string } from "./iso-5-9R47LC.mjs";
|
|
3
|
+
import { t as McpServer } from "./mcp-DIH4cS6P-C1s6ZIjc.mjs";
|
|
4
4
|
//#region src/mcp/server.ts
|
|
5
5
|
async function buildInstructions(context) {
|
|
6
6
|
let names = [];
|
|
@@ -213,7 +213,7 @@ async function createWhatsAppMcpServer(options = {}) {
|
|
|
213
213
|
return {
|
|
214
214
|
server,
|
|
215
215
|
async connectStdio() {
|
|
216
|
-
const { StdioServerTransport } = await import("./stdio-
|
|
216
|
+
const { StdioServerTransport } = await import("./stdio-BWbiQh9h.mjs");
|
|
217
217
|
await server.connect(new StdioServerTransport());
|
|
218
218
|
}
|
|
219
219
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as unknown, E as toJSONSchema, O as NEVER, S as union, T as safeParse, _ as optional, a as _null, c as boolean, d as intersection, f as lazy, g as object, h as number, i as _enum, l as discriminatedUnion, m as looseObject, n as datetime, o as any, p as literal, s as array, t as date, u as email, v as preprocess, w as url, x as string, y as record } from "./iso-
|
|
2
|
-
import { n as ZodIssueCode, t as number$1 } from "./coerce-
|
|
1
|
+
import { C as unknown, E as toJSONSchema, O as NEVER, S as union, T as safeParse, _ as optional, a as _null, c as boolean, d as intersection, f as lazy, g as object, h as number, i as _enum, l as discriminatedUnion, m as looseObject, n as datetime, o as any, p as literal, s as array, t as date, u as email, v as preprocess, w as url, x as string, y as record } from "./iso-5-9R47LC.mjs";
|
|
2
|
+
import { n as ZodIssueCode, t as number$1 } from "./coerce-DUN95oU4.mjs";
|
|
3
3
|
const SUPPORTED_PROTOCOL_VERSIONS = [
|
|
4
4
|
"2025-11-25",
|
|
5
5
|
"2025-06-18",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as serializeMessage, n as process, r as ReadBuffer } from "./mcp-DIH4cS6P-
|
|
1
|
+
import { i as serializeMessage, n as process, r as ReadBuffer } from "./mcp-DIH4cS6P-C1s6ZIjc.mjs";
|
|
2
2
|
//#region ../../node_modules/.pnpm/@modelcontextprotocol+server@2.3.1/node_modules/@modelcontextprotocol/server/dist/stdio.mjs
|
|
3
3
|
/**
|
|
4
4
|
* Marks a stdout `'error'` listener that a closed transport left attached purely to
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as ReadBuffer, c as SdkErrorCode, k as serializeMessage, s as SdkError } from "./src-WCy6ifGf-DXrNj-15-
|
|
1
|
+
import { a as ReadBuffer, c as SdkErrorCode, k as serializeMessage, s as SdkError } from "./src-WCy6ifGf-DXrNj-15-HcB9fGcS.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import process$1 from "node:process";
|
|
4
4
|
import { PassThrough } from "node:stream";
|
|
5
|
-
//#region ../core/dist/stdio-
|
|
5
|
+
//#region ../core/dist/stdio-CRbkOCqe.mjs
|
|
6
6
|
var __create = Object.create;
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
9
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
10
|
var __getProtoOf = Object.getPrototypeOf;
|
|
11
11
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
12
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
13
13
|
var __copyProps = (to, from, except, desc) => {
|
|
14
14
|
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
15
|
key = keys[i];
|
|
@@ -28,7 +28,7 @@ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
|
28
28
|
var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
29
29
|
module.exports = isexe;
|
|
30
30
|
isexe.sync = sync;
|
|
31
|
-
var fs
|
|
31
|
+
var fs = __require("fs");
|
|
32
32
|
function checkPathExt(path, options) {
|
|
33
33
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
34
34
|
if (!pathext) return true;
|
|
@@ -45,25 +45,25 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
45
45
|
return checkPathExt(path, options);
|
|
46
46
|
}
|
|
47
47
|
function isexe(path, options, cb) {
|
|
48
|
-
fs
|
|
48
|
+
fs.stat(path, function(er, stat) {
|
|
49
49
|
cb(er, er ? false : checkStat(stat, path, options));
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
function sync(path, options) {
|
|
53
|
-
return checkStat(fs
|
|
53
|
+
return checkStat(fs.statSync(path), path, options);
|
|
54
54
|
}
|
|
55
55
|
}));
|
|
56
56
|
var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
57
57
|
module.exports = isexe;
|
|
58
58
|
isexe.sync = sync;
|
|
59
|
-
var fs
|
|
59
|
+
var fs = __require("fs");
|
|
60
60
|
function isexe(path, options, cb) {
|
|
61
|
-
fs
|
|
61
|
+
fs.stat(path, function(er, stat) {
|
|
62
62
|
cb(er, er ? false : checkStat(stat, options));
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
function sync(path, options) {
|
|
66
|
-
return checkStat(fs
|
|
66
|
+
return checkStat(fs.statSync(path), options);
|
|
67
67
|
}
|
|
68
68
|
function checkStat(stat, options) {
|
|
69
69
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -123,7 +123,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
123
123
|
}));
|
|
124
124
|
var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
125
125
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
126
|
-
const path
|
|
126
|
+
const path = __require("path");
|
|
127
127
|
const COLON = isWindows ? ";" : ":";
|
|
128
128
|
const isexe = require_isexe();
|
|
129
129
|
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
@@ -154,7 +154,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
154
154
|
if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
|
|
155
155
|
const ppRaw = pathEnv[i];
|
|
156
156
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
157
|
-
const pCmd = path
|
|
157
|
+
const pCmd = path.join(pathPart, cmd);
|
|
158
158
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
159
159
|
resolve(subStep(p, i, 0));
|
|
160
160
|
});
|
|
@@ -178,7 +178,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
178
178
|
for (let i = 0; i < pathEnv.length; i++) {
|
|
179
179
|
const ppRaw = pathEnv[i];
|
|
180
180
|
const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
|
|
181
|
-
const pCmd = path
|
|
181
|
+
const pCmd = path.join(pathPart, cmd);
|
|
182
182
|
const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
|
|
183
183
|
for (let j = 0; j < pathExt.length; j++) {
|
|
184
184
|
const cur = p + pathExt[j];
|
|
@@ -207,7 +207,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
207
207
|
module.exports.default = pathKey;
|
|
208
208
|
}));
|
|
209
209
|
var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
210
|
-
const path
|
|
210
|
+
const path = __require("path");
|
|
211
211
|
const which = require_which();
|
|
212
212
|
const getPathKey = require_path_key();
|
|
213
213
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
|
@@ -222,12 +222,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
222
222
|
try {
|
|
223
223
|
resolved = which.sync(parsed.command, {
|
|
224
224
|
path: env[getPathKey({ env })],
|
|
225
|
-
pathExt: withoutPathExt ? path
|
|
225
|
+
pathExt: withoutPathExt ? path.delimiter : void 0
|
|
226
226
|
});
|
|
227
227
|
} catch (e) {} finally {
|
|
228
228
|
if (shouldSwitchCwd) process.chdir(cwd);
|
|
229
229
|
}
|
|
230
|
-
if (resolved) resolved = path
|
|
230
|
+
if (resolved) resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
|
|
231
231
|
return resolved;
|
|
232
232
|
}
|
|
233
233
|
function resolveCommand(parsed) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createWhatsAppMcpServer } from "./server-
|
|
1
|
+
import { t as createWhatsAppMcpServer } from "./server-MsyzeVCx.mjs";
|
|
2
2
|
//#region src/mcp/stdio-entry.ts
|
|
3
3
|
/**
|
|
4
4
|
* Starting the stdio server. On stdio, stdout is the protocol, so the console is redirected to stderr first — the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as unknown, S as union, b as strictObject, c as boolean, g as object, h as number, i as _enum, l as discriminatedUnion, m as looseObject, n as datetime, p as literal, s as array, x as string, y as record } from "./iso-
|
|
1
|
+
import { C as unknown, S as union, b as strictObject, c as boolean, g as object, h as number, i as _enum, l as discriminatedUnion, m as looseObject, n as datetime, p as literal, s as array, x as string, y as record } from "./iso-5-9R47LC.mjs";
|
|
2
2
|
import { access, chmod, constants, link, lstat, mkdir, open, readFile, readdir, readlink, realpath, rename, rm, stat, unlink, utimes } from "node:fs/promises";
|
|
3
3
|
import path, { basename, delimiter, dirname, isAbsolute, join, posix, relative, resolve, sep, win32 } from "node:path";
|
|
4
4
|
import { domainToASCII, fileURLToPath, pathToFileURL } from "node:url";
|
|
@@ -11,7 +11,7 @@ import { execFile, spawn } from "node:child_process";
|
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/version.ts
|
|
13
13
|
/** The package version, read from package.json at build time. */
|
|
14
|
-
const VERSION$2 = "0.26.
|
|
14
|
+
const VERSION$2 = "0.26.2";
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/caller.ts
|
|
17
17
|
/** This package's name, as its manifest has it. */
|
|
@@ -28,7 +28,7 @@ const CALLER = Object.freeze({
|
|
|
28
28
|
packageName: PACKAGE_NAME
|
|
29
29
|
});
|
|
30
30
|
//#endregion
|
|
31
|
-
//#region ../core/dist/update-check-
|
|
31
|
+
//#region ../core/dist/update-check-5wgoI9Yt.mjs
|
|
32
32
|
/**
|
|
33
33
|
* Every failure a user or an agent can act on carries a specific, stable code from this registry, a message, an
|
|
34
34
|
* optional one-line hint and structured `details`. The code decides the process exit status; agents and skills branch
|
|
@@ -5303,8 +5303,8 @@ async function mergeIntoJsonConfig(path, client, name, entry) {
|
|
|
5303
5303
|
}
|
|
5304
5304
|
/** Starts the server exactly as a client would, and completes the handshake. */
|
|
5305
5305
|
async function verifyEntry(entry, product) {
|
|
5306
|
-
const { Client } = await import("./dist-C7DG2LdL-
|
|
5307
|
-
const { StdioClientTransport } = await import("./stdio-
|
|
5306
|
+
const { Client } = await import("./dist-C7DG2LdL-6QTVBgXp.mjs");
|
|
5307
|
+
const { StdioClientTransport } = await import("./stdio-CRbkOCqe-BpzkpnG6.mjs");
|
|
5308
5308
|
const client = new Client({
|
|
5309
5309
|
name: `${product.binary}-install-check`,
|
|
5310
5310
|
version: product.version
|
|
@@ -12026,7 +12026,7 @@ function folding(platform) {
|
|
|
12026
12026
|
return platform === "win32" ? (text) => text.toLowerCase() : (text) => text;
|
|
12027
12027
|
}
|
|
12028
12028
|
/** The package version, read from package.json at build time. */
|
|
12029
|
-
const VERSION = "0.26.
|
|
12029
|
+
const VERSION = "0.26.2";
|
|
12030
12030
|
/**
|
|
12031
12031
|
* The command a person is told to run for one of this suite's own CLIs (design 2026-10-04, D1 and D5; CUE-403).
|
|
12032
12032
|
*
|
|
@@ -15720,7 +15720,7 @@ function serverPruneChange(core, env, request, own) {
|
|
|
15720
15720
|
};
|
|
15721
15721
|
const { packageName, version } = ownProduct(request.channel, own) ?? {
|
|
15722
15722
|
packageName: serverFacts(request.channel).packageName,
|
|
15723
|
-
version: "0.26.
|
|
15723
|
+
version: "0.26.2"
|
|
15724
15724
|
};
|
|
15725
15725
|
const product = {
|
|
15726
15726
|
packageName,
|
|
@@ -16260,7 +16260,7 @@ function commandDecisionLine(core, decision, channel, platform) {
|
|
|
16260
16260
|
}
|
|
16261
16261
|
channelServer("core").packageName;
|
|
16262
16262
|
//#endregion
|
|
16263
|
-
//#region ../core/dist/tool-arguments-
|
|
16263
|
+
//#region ../core/dist/tool-arguments-C78lgSoS.mjs
|
|
16264
16264
|
const APPLIED = Symbol.for("agentcomms.strictToolArguments");
|
|
16265
16265
|
const TARGET = "draft-2020-12";
|
|
16266
16266
|
/**
|
|
@@ -16696,8 +16696,6 @@ new Set([
|
|
|
16696
16696
|
"cseuckr csksc56011987 euc-kr iso-ir-149 korean ks_c_5601-1987 ks_c_5601-1989 ksc5601 ksc_5601",
|
|
16697
16697
|
"windows-949",
|
|
16698
16698
|
"csiso2022kr hz-gb-2312 iso-2022-cn iso-2022-cn-ext iso-2022-kr replacement",
|
|
16699
|
-
"unicodefffe utf-16be",
|
|
16700
|
-
"csunicode iso-10646-ucs-2 ucs-2 unicode unicodefeff utf-16 utf-16le",
|
|
16701
16699
|
"x-user-defined"
|
|
16702
16700
|
].join(" ").split(" "));
|
|
16703
16701
|
new TextDecoder();
|
|
@@ -16705,6 +16703,10 @@ const ENCODED_WORD_PATTERN = "=\\?([^?\\s]+)\\?([QqBb])\\?([^?]*)\\?=";
|
|
|
16705
16703
|
new RegExp(ENCODED_WORD_PATTERN, "g");
|
|
16706
16704
|
new RegExp(`^(?:${ENCODED_WORD_PATTERN}\\s*)+$`);
|
|
16707
16705
|
new TextDecoder("utf-8", { ignoreBOM: true });
|
|
16706
|
+
//#endregion
|
|
16707
|
+
//#region ../../node_modules/.pnpm/postal-mime@4.1.4/node_modules/postal-mime/dist/esm/text-format.js
|
|
16708
|
+
const hexByte = (value) => value.toString(16).toUpperCase().padStart(2, "0");
|
|
16709
|
+
Array.from({ length: 256 }, (_, byte) => "%" + hexByte(byte));
|
|
16708
16710
|
new Uint8Array([10]);
|
|
16709
16711
|
//#endregion
|
|
16710
16712
|
//#region ../../node_modules/.pnpm/deepmerge-ts@8.0.2/node_modules/deepmerge-ts/dist/index.mjs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentcomms/whatsapp",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"description": "WhatsApp for coding agents, read-only: list, read and search the chats WhatsApp for Mac keeps on this Mac, and draft replies as links the person sends. No network client; it never sends.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@agentcomms/core": "0.26.
|
|
37
|
+
"@agentcomms/core": "0.26.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@modelcontextprotocol/client": "2.3.1",
|
|
41
41
|
"@modelcontextprotocol/server": "^2.3.1",
|
|
42
42
|
"commander": "^15.0.0",
|
|
43
|
-
"zod": "^4.6.
|
|
43
|
+
"zod": "^4.6.7"
|
|
44
44
|
},
|
|
45
45
|
"agentcomms": {
|
|
46
46
|
"contract": 1,
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"typecheck": "tsc -p tsconfig.json",
|
|
99
99
|
"test": "node --experimental-strip-types --disable-warning=ExperimentalWarning --test --test-timeout=600000 \"test/**/*.test.ts\""
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "c3fbb731e23401ea56862349d3c1e596be53ed11"
|
|
102
102
|
}
|