primcli 1.55.0 → 1.56.0
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/bin/claude-pending-mail.mjs +2 -2
- package/bin/claude-wake.mjs +1 -1
- package/dist/{api-command-CQRMWPkg.js → api-command-CyWk4AU1.js} +31 -29
- package/dist/{cli-config-DGrZCUfw.js → cli-config-DMszFbGn.js} +6 -9
- package/dist/{json-output-Cf-GFeff.js → json-output-CEskSQJi.js} +1 -1
- package/dist/{listen-background-CMfxkeVP.js → listen-background--0peztKE.js} +8 -7
- package/dist/{machine-session-BYaA1qXC.js → machine-session-BP8zoOTi.js} +57 -46
- package/dist/{notify-session-BnEHEbxa.js → notify-session-ByQ8Iq4v.js} +12 -8
- package/dist/oclif/auto-signal-worker.js +3 -3
- package/dist/oclif/auto-signals.js +9 -9
- package/dist/oclif/index.js +423 -65
- package/dist/oclif/listen-supervisor.js +1 -1
- package/dist/oclif/proxy-auto-detect.js +1 -1
- package/dist/oclif/receiver-heal.js +6 -5
- package/dist/oclif/root-signup-hint.js +7 -4
- package/dist/{repeats-D2xtLium-DmtVD6ol.js → repeats-x4QM2yoG-De3MV3st.js} +92 -34
- package/dist/{scoped-chat-BrLq4dXH.js → scoped-chat-C7cpIxVS.js} +4 -3
- package/dist/{shared-mail-files-SPPcis9g.js → shared-mail-files-MwlVE90c.js} +2 -1
- package/dist/{shared-mail-watch-CWhpfJ0N.js → shared-mail-watch-DtKpsgg8.js} +1 -1
- package/dist/{signal-command-DNAhZicf.js → signal-command-KEfppb9h.js} +23 -343
- package/package.json +16 -16
- package/dist/rolldown-runtime-CNZpIYwj.js +0 -33
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { s as runBackgroundListenSupervisor } from "../listen-background
|
|
1
|
+
import { s as runBackgroundListenSupervisor } from "../listen-background--0peztKE.js";
|
|
2
2
|
export { runBackgroundListenSupervisor };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { N as agentProfileDirectory, P as agentProfileName, R as loadConnectedAgentProfile, j as AGENT_PROFILE_ENV } from "../cli-config-
|
|
2
|
-
import { d as readMailJson } from "../shared-mail-files-
|
|
3
|
-
import { _ as detectAgentRuntime, l as SESSION_UUID, t as notificationScope } from "../notify-session-
|
|
4
|
-
import { a as claimBackgroundListenRestart, n as backgroundListenRestartable, r as backgroundListenStatus } from "../listen-background
|
|
1
|
+
import { N as agentProfileDirectory, P as agentProfileName, R as loadConnectedAgentProfile, j as AGENT_PROFILE_ENV } from "../cli-config-DMszFbGn.js";
|
|
2
|
+
import { d as readMailJson } from "../shared-mail-files-MwlVE90c.js";
|
|
3
|
+
import { _ as detectAgentRuntime, l as SESSION_UUID, t as notificationScope } from "../notify-session-ByQ8Iq4v.js";
|
|
4
|
+
import { a as claimBackgroundListenRestart, n as backgroundListenRestartable, r as backgroundListenStatus } from "../listen-background--0peztKE.js";
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { spawn } from "node:child_process";
|
|
7
7
|
import { homedir } from "node:os";
|
|
@@ -10,7 +10,8 @@ import { homedir } from "node:os";
|
|
|
10
10
|
const RECEIVER_HEAL_ENV = "PRIMITIVE_RECEIVER_HEAL";
|
|
11
11
|
function activeConfigDir(env, home) {
|
|
12
12
|
if (env.PRIMITIVE_CONFIG_DIR) return env.PRIMITIVE_CONFIG_DIR;
|
|
13
|
-
|
|
13
|
+
const base = env.XDG_CONFIG_HOME || join(home, ".config");
|
|
14
|
+
return join(base, "primitive");
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Restart the selected agent profile's native receiver when it died without
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as normalizeApiBaseUrl, c as resolveConfigEnvironment, i as loadCliConfig } from "../cli-config-
|
|
1
|
+
import { S as normalizeApiBaseUrl, c as resolveConfigEnvironment, i as loadCliConfig } from "../cli-config-DMszFbGn.js";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { homedir } from "node:os";
|
|
@@ -7,7 +7,8 @@ const CREDENTIALS_FILE = "credentials.json";
|
|
|
7
7
|
const ROOT_AUTH_TIMEOUT_MS = 1e3;
|
|
8
8
|
function activeConfigDir(env, home) {
|
|
9
9
|
if (env.PRIMITIVE_CONFIG_DIR) return env.PRIMITIVE_CONFIG_DIR;
|
|
10
|
-
|
|
10
|
+
const base = env.XDG_CONFIG_HOME || join(home, ".config");
|
|
11
|
+
return join(base, "primitive");
|
|
11
12
|
}
|
|
12
13
|
function readRootCredentials(configDir) {
|
|
13
14
|
let raw;
|
|
@@ -49,7 +50,8 @@ function rootAuthLine(account) {
|
|
|
49
50
|
return `Signed in as ${account.email} (org ${account.id})\n\n`;
|
|
50
51
|
}
|
|
51
52
|
function rootRequestConfig(configDir, env) {
|
|
52
|
-
const
|
|
53
|
+
const config = loadCliConfig(configDir);
|
|
54
|
+
const currentEnvironment = resolveConfigEnvironment(config);
|
|
53
55
|
const configuredApiBaseUrl = currentEnvironment?.config.api_base_url;
|
|
54
56
|
const envApiBaseUrl = env.PRIMITIVE_API_BASE_URL?.trim();
|
|
55
57
|
if (currentEnvironment !== null && currentEnvironment.name !== "default" && !envApiBaseUrl && !configuredApiBaseUrl) return null;
|
|
@@ -107,7 +109,8 @@ function shouldShowLoggedOutSignupHint(options = {}) {
|
|
|
107
109
|
const env = options.env ?? process.env;
|
|
108
110
|
if (env.PRIMITIVE_HIDE_SIGNUP_HINT === "1") return false;
|
|
109
111
|
if (env.PRIMITIVE_API_KEY?.trim()) return false;
|
|
110
|
-
|
|
112
|
+
const configDir = activeConfigDir(env, options.home ?? homedir());
|
|
113
|
+
return !existsSync(join(configDir, CREDENTIALS_FILE));
|
|
111
114
|
}
|
|
112
115
|
function loggedOutSignupHint() {
|
|
113
116
|
return [
|
|
@@ -1,4 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
9
|
+
var __exportAll = (all, no_symbols) => {
|
|
10
|
+
let target = {};
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
|
+
return target;
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
20
|
+
key = keys[i];
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
22
|
+
get: ((k) => from[k]).bind(null, key),
|
|
23
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
29
|
+
value: mod,
|
|
30
|
+
enumerable: true
|
|
31
|
+
}) : target, mod));
|
|
32
|
+
//#endregion
|
|
2
33
|
//#region ../node_modules/.pnpm/nodemailer@10.0.15/node_modules/nodemailer/dist/esm/addressparser/index.js
|
|
3
34
|
/**
|
|
4
35
|
* Restores the quoting of a local part that was read out of a quoted string.
|
|
@@ -289,7 +320,6 @@ function _handleAddress(tokens, depth) {
|
|
|
289
320
|
default:
|
|
290
321
|
state = "text";
|
|
291
322
|
insideQuotes = false;
|
|
292
|
-
break;
|
|
293
323
|
}
|
|
294
324
|
else if (token.value) {
|
|
295
325
|
const prevPrevToken = i > 1 ? tokens[i - 2] : null;
|
|
@@ -379,8 +409,10 @@ function _handleAddress(tokens, depth) {
|
|
|
379
409
|
address: data.address || data.text || "",
|
|
380
410
|
name: data.text || data.address || ""
|
|
381
411
|
};
|
|
382
|
-
if (address.address === address.name)
|
|
383
|
-
|
|
412
|
+
if (address.address === address.name) {
|
|
413
|
+
if (/@/.test(address.address || "")) address.name = "";
|
|
414
|
+
else address.address = "";
|
|
415
|
+
}
|
|
384
416
|
addresses.push(address);
|
|
385
417
|
}
|
|
386
418
|
return addresses;
|
|
@@ -745,7 +777,7 @@ var require_isIP = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
745
777
|
module.exports.default = exports.default;
|
|
746
778
|
}));
|
|
747
779
|
//#endregion
|
|
748
|
-
//#region ../sdk-node/dist/address-parser-
|
|
780
|
+
//#region ../sdk-node/dist/address-parser-9Qyfhuo9.js
|
|
749
781
|
var import_isEmail = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
750
782
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
751
783
|
exports.default = isEmail;
|
|
@@ -920,7 +952,7 @@ function parseFromHeader(header) {
|
|
|
920
952
|
};
|
|
921
953
|
}
|
|
922
954
|
//#endregion
|
|
923
|
-
//#region ../sdk-node/dist/trust-
|
|
955
|
+
//#region ../sdk-node/dist/trust-6Kc_pEmD.js
|
|
924
956
|
/**
|
|
925
957
|
* AUTO-GENERATED - DO NOT EDIT
|
|
926
958
|
* Run `pnpm generate:validator` to regenerate.
|
|
@@ -1666,8 +1698,10 @@ function validate12(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
1666
1698
|
errors++;
|
|
1667
1699
|
} else {
|
|
1668
1700
|
errors = _errs0;
|
|
1669
|
-
if (vErrors !== null)
|
|
1670
|
-
|
|
1701
|
+
if (vErrors !== null) {
|
|
1702
|
+
if (_errs0) vErrors.length = _errs0;
|
|
1703
|
+
else vErrors = null;
|
|
1704
|
+
}
|
|
1671
1705
|
}
|
|
1672
1706
|
validate12.errors = vErrors;
|
|
1673
1707
|
return errors === 0;
|
|
@@ -2159,8 +2193,10 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2159
2193
|
errors++;
|
|
2160
2194
|
} else {
|
|
2161
2195
|
errors = _errs10;
|
|
2162
|
-
if (vErrors !== null)
|
|
2163
|
-
|
|
2196
|
+
if (vErrors !== null) {
|
|
2197
|
+
if (_errs10) vErrors.length = _errs10;
|
|
2198
|
+
else vErrors = null;
|
|
2199
|
+
}
|
|
2164
2200
|
}
|
|
2165
2201
|
}
|
|
2166
2202
|
if (data.cc !== void 0) {
|
|
@@ -2283,8 +2319,10 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2283
2319
|
errors++;
|
|
2284
2320
|
} else {
|
|
2285
2321
|
errors = _errs23;
|
|
2286
|
-
if (vErrors !== null)
|
|
2287
|
-
|
|
2322
|
+
if (vErrors !== null) {
|
|
2323
|
+
if (_errs23) vErrors.length = _errs23;
|
|
2324
|
+
else vErrors = null;
|
|
2325
|
+
}
|
|
2288
2326
|
}
|
|
2289
2327
|
}
|
|
2290
2328
|
if (data.bcc !== void 0) {
|
|
@@ -2407,8 +2445,10 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2407
2445
|
errors++;
|
|
2408
2446
|
} else {
|
|
2409
2447
|
errors = _errs36;
|
|
2410
|
-
if (vErrors !== null)
|
|
2411
|
-
|
|
2448
|
+
if (vErrors !== null) {
|
|
2449
|
+
if (_errs36) vErrors.length = _errs36;
|
|
2450
|
+
else vErrors = null;
|
|
2451
|
+
}
|
|
2412
2452
|
}
|
|
2413
2453
|
}
|
|
2414
2454
|
if (data.to_addresses !== void 0) {
|
|
@@ -2531,8 +2571,10 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2531
2571
|
errors++;
|
|
2532
2572
|
} else {
|
|
2533
2573
|
errors = _errs49;
|
|
2534
|
-
if (vErrors !== null)
|
|
2535
|
-
|
|
2574
|
+
if (vErrors !== null) {
|
|
2575
|
+
if (_errs49) vErrors.length = _errs49;
|
|
2576
|
+
else vErrors = null;
|
|
2577
|
+
}
|
|
2536
2578
|
}
|
|
2537
2579
|
}
|
|
2538
2580
|
if (data.in_reply_to !== void 0) {
|
|
@@ -2598,8 +2640,10 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2598
2640
|
errors++;
|
|
2599
2641
|
} else {
|
|
2600
2642
|
errors = _errs62;
|
|
2601
|
-
if (vErrors !== null)
|
|
2602
|
-
|
|
2643
|
+
if (vErrors !== null) {
|
|
2644
|
+
if (_errs62) vErrors.length = _errs62;
|
|
2645
|
+
else vErrors = null;
|
|
2646
|
+
}
|
|
2603
2647
|
}
|
|
2604
2648
|
}
|
|
2605
2649
|
if (data.references !== void 0) {
|
|
@@ -2665,8 +2709,10 @@ function validate15(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
2665
2709
|
errors++;
|
|
2666
2710
|
} else {
|
|
2667
2711
|
errors = _errs70;
|
|
2668
|
-
if (vErrors !== null)
|
|
2669
|
-
|
|
2712
|
+
if (vErrors !== null) {
|
|
2713
|
+
if (_errs70) vErrors.length = _errs70;
|
|
2714
|
+
else vErrors = null;
|
|
2715
|
+
}
|
|
2670
2716
|
}
|
|
2671
2717
|
}
|
|
2672
2718
|
if (data.attachments !== void 0) {
|
|
@@ -3696,8 +3742,10 @@ function validate14(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
3696
3742
|
errors++;
|
|
3697
3743
|
} else {
|
|
3698
3744
|
errors = _errs0;
|
|
3699
|
-
if (vErrors !== null)
|
|
3700
|
-
|
|
3745
|
+
if (vErrors !== null) {
|
|
3746
|
+
if (_errs0) vErrors.length = _errs0;
|
|
3747
|
+
else vErrors = null;
|
|
3748
|
+
}
|
|
3701
3749
|
}
|
|
3702
3750
|
validate14.errors = vErrors;
|
|
3703
3751
|
return errors === 0;
|
|
@@ -4310,8 +4358,10 @@ function validate23(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4310
4358
|
errors++;
|
|
4311
4359
|
} else {
|
|
4312
4360
|
errors = _errs4;
|
|
4313
|
-
if (vErrors !== null)
|
|
4314
|
-
|
|
4361
|
+
if (vErrors !== null) {
|
|
4362
|
+
if (_errs4) vErrors.length = _errs4;
|
|
4363
|
+
else vErrors = null;
|
|
4364
|
+
}
|
|
4315
4365
|
}
|
|
4316
4366
|
}
|
|
4317
4367
|
if (data.verification !== void 0) {
|
|
@@ -4671,8 +4721,10 @@ function validate27(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4671
4721
|
errors++;
|
|
4672
4722
|
} else {
|
|
4673
4723
|
errors = _errs10;
|
|
4674
|
-
if (vErrors !== null)
|
|
4675
|
-
|
|
4724
|
+
if (vErrors !== null) {
|
|
4725
|
+
if (_errs10) vErrors.length = _errs10;
|
|
4726
|
+
else vErrors = null;
|
|
4727
|
+
}
|
|
4676
4728
|
}
|
|
4677
4729
|
}
|
|
4678
4730
|
if (data.verification !== void 0) {
|
|
@@ -4986,8 +5038,10 @@ function validate22(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
4986
5038
|
errors++;
|
|
4987
5039
|
} else {
|
|
4988
5040
|
errors = _errs0;
|
|
4989
|
-
if (vErrors !== null)
|
|
4990
|
-
|
|
5041
|
+
if (vErrors !== null) {
|
|
5042
|
+
if (_errs0) vErrors.length = _errs0;
|
|
5043
|
+
else vErrors = null;
|
|
5044
|
+
}
|
|
4991
5045
|
}
|
|
4992
5046
|
validate22.errors = vErrors;
|
|
4993
5047
|
return errors === 0;
|
|
@@ -8739,8 +8793,10 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8739
8793
|
}
|
|
8740
8794
|
var _valid0 = _errs64 === errors;
|
|
8741
8795
|
errors = _errs63;
|
|
8742
|
-
if (vErrors !== null)
|
|
8743
|
-
|
|
8796
|
+
if (vErrors !== null) {
|
|
8797
|
+
if (_errs63) vErrors.length = _errs63;
|
|
8798
|
+
else vErrors = null;
|
|
8799
|
+
}
|
|
8744
8800
|
let ifClause0;
|
|
8745
8801
|
if (_valid0) {
|
|
8746
8802
|
const _errs67 = errors;
|
|
@@ -8869,8 +8925,10 @@ function validate11(data, { instancePath = "", parentData, parentDataProperty, r
|
|
|
8869
8925
|
errors++;
|
|
8870
8926
|
} else {
|
|
8871
8927
|
errors = _errs74;
|
|
8872
|
-
if (vErrors !== null)
|
|
8873
|
-
|
|
8928
|
+
if (vErrors !== null) {
|
|
8929
|
+
if (_errs74) vErrors.length = _errs74;
|
|
8930
|
+
else vErrors = null;
|
|
8931
|
+
}
|
|
8874
8932
|
}
|
|
8875
8933
|
}
|
|
8876
8934
|
if (data29.download !== void 0) {
|
|
@@ -9829,7 +9887,7 @@ function normalizeOptions(options) {
|
|
|
9829
9887
|
};
|
|
9830
9888
|
}
|
|
9831
9889
|
//#endregion
|
|
9832
|
-
//#region ../sdk-node/dist/repeats-
|
|
9890
|
+
//#region ../sdk-node/dist/repeats-x4QM2yoG.js
|
|
9833
9891
|
const UUID$3 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
9834
9892
|
const ATOM = "[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+";
|
|
9835
9893
|
const MAILBOX$1 = new RegExp(`^${ATOM}(?:\\.${ATOM})*@(?:[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)(?:\\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$`);
|
|
@@ -10611,4 +10669,4 @@ function repeatStopCommand(emailId) {
|
|
|
10611
10669
|
return `primitive repeat stop --id ${emailId.toLowerCase()}`;
|
|
10612
10670
|
}
|
|
10613
10671
|
//#endregion
|
|
10614
|
-
export { isTrustedSender as _, REPEAT_IDLE_MAX_MINUTES as a, classifySignalContent as c, parseRepeatTick as d, preparePresenceAliveEmail as f, isEmailReceivedEvent as g, sendPreparedSignal as h, REPEAT_EVERY_MAX_MINUTES as i, parseInteractionEnvelope as l, repeatStopCommand as m, MAX_PRESENCE_ENVELOPE_BYTES as n, REPEAT_MAX_SENDS_MAX as o, prepareSignalEmail as p, PRESENCE_PROBE_TEXT as r, buildRepeatStopBody as s, MAX_INTERACTION_BYTES as t, parsePresenceEnvelope as u, parseWebhookEvent as v, parseFromHeader as y };
|
|
10672
|
+
export { isTrustedSender as _, REPEAT_IDLE_MAX_MINUTES as a, __exportAll as b, classifySignalContent as c, parseRepeatTick as d, preparePresenceAliveEmail as f, isEmailReceivedEvent as g, sendPreparedSignal as h, REPEAT_EVERY_MAX_MINUTES as i, parseInteractionEnvelope as l, repeatStopCommand as m, MAX_PRESENCE_ENVELOPE_BYTES as n, REPEAT_MAX_SENDS_MAX as o, prepareSignalEmail as p, PRESENCE_PROBE_TEXT as r, buildRepeatStopBody as s, MAX_INTERACTION_BYTES as t, parsePresenceEnvelope as u, parseWebhookEvent as v, parseFromHeader as y };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as isTrustedSender, c as classifySignalContent } from "./repeats-
|
|
1
|
+
import { _ as isTrustedSender, c as classifySignalContent } from "./repeats-x4QM2yoG-De3MV3st.js";
|
|
2
2
|
//#region src/oclif/presence-provenance.ts
|
|
3
3
|
function readPresenceProjection(detail) {
|
|
4
4
|
if (!detail || typeof detail !== "object") return null;
|
|
@@ -60,10 +60,11 @@ function isScopedChatReply(detail, params) {
|
|
|
60
60
|
}
|
|
61
61
|
function scopedChatSenderTrust(detail, peer) {
|
|
62
62
|
const sender = address(peer);
|
|
63
|
-
|
|
63
|
+
const evidence = { email: {
|
|
64
64
|
auth: detail.auth,
|
|
65
65
|
headers: { from: detail.from_header }
|
|
66
|
-
} }
|
|
66
|
+
} };
|
|
67
|
+
return isTrustedSender(evidence, {
|
|
67
68
|
sender,
|
|
68
69
|
domain: sender.slice(sender.lastIndexOf("@") + 1)
|
|
69
70
|
});
|
|
@@ -127,7 +127,8 @@ function removeOwner(path, owner) {
|
|
|
127
127
|
}
|
|
128
128
|
function acquireListenLock(directory, scope) {
|
|
129
129
|
privateDirectory(directory);
|
|
130
|
-
const
|
|
130
|
+
const key = createHash("sha256").update(scope).digest("hex");
|
|
131
|
+
const path = join(directory, `${key}.lock`);
|
|
131
132
|
const owner = `${process.pid}-${randomUUID()}`;
|
|
132
133
|
const candidate = mkdtempSync(join(directory, ".claim-"));
|
|
133
134
|
chmodSync(candidate, 448);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as acquireListenLock, a as mailLockBusy, b as listenProcessIdentity, c as mailTime, d as readMailJson, f as removeMailFile, h as writeMailJson, i as mailId, n as invalidSharedMail, o as mailObject, s as mailString, v as compareListenProcessIdentity } from "./shared-mail-files-
|
|
1
|
+
import { _ as acquireListenLock, a as mailLockBusy, b as listenProcessIdentity, c as mailTime, d as readMailJson, f as removeMailFile, h as writeMailJson, i as mailId, n as invalidSharedMail, o as mailObject, s as mailString, v as compareListenProcessIdentity } from "./shared-mail-files-MwlVE90c.js";
|
|
2
2
|
import { watch } from "node:fs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { join } from "node:path";
|