hunter-mate 0.1.32 → 0.1.34
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/assets/extension/build-info.json +1 -1
- package/dist/assets/extension/manifest.json +3 -3
- package/dist/assets/server/main.mjs +275 -7
- package/dist/index.js +1 -1
- package/dist/web/dist/404.html +1 -1
- package/dist/web/dist/_next/static/chunks/502-4776504e89a09b68.js +32 -0
- package/dist/web/dist/_next/static/chunks/587-a93e5177e3d3ccaf.js +1 -0
- package/dist/web/dist/_next/static/chunks/606-9bac5cf9187e9901.js +1 -0
- package/dist/web/dist/_next/static/chunks/659-bf056de14f6162b6.js +1 -0
- package/dist/web/dist/_next/static/chunks/706-babd57b15a93f415.js +12 -0
- package/dist/web/dist/_next/static/chunks/865-422919f47ebce4d3.js +1 -0
- package/dist/web/dist/_next/static/chunks/882-5952b675dc02794a.js +1 -0
- package/dist/web/dist/_next/static/chunks/{935-0ec6bca7ef6e2dfc.js → 935-79d8aba674c09f7b.js} +2 -2
- package/dist/web/dist/_next/static/chunks/app/admin/data/page-31aa598c712a211d.js +1 -0
- package/dist/web/dist/_next/static/chunks/app/jobs/page-0a0ee2f8b389a147.js +1 -0
- package/dist/web/dist/_next/static/chunks/app/layout-56e9f652ec460661.js +1 -0
- package/dist/web/dist/_next/static/chunks/app/memory/page-9b20447ec495bc36.js +1 -0
- package/dist/web/dist/_next/static/chunks/app/parselog/page-a9321ca64f1272d1.js +1 -0
- package/dist/web/dist/_next/static/chunks/app/recordings/page-959163edef1ef99e.js +1 -0
- package/dist/web/dist/_next/static/chunks/app/resource-usage/page-f32cf255cec94d08.js +1 -0
- package/dist/web/dist/_next/static/chunks/app/shared/[token]/{page-7189e27de66ecb09.js → page-7666e080dadae190.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/talents/{page-426470ca404838cb.js → page-42a62dae374c5354.js} +1 -1
- package/dist/web/dist/_next/static/chunks/app/team/insights/page-4ec3304e214e7c20.js +1 -0
- package/dist/web/dist/_next/static/chunks/{main-8b470f167e9bfe73.js → main-69905dba7a812e36.js} +1 -1
- package/dist/web/dist/_next/static/chunks/{main-app-ee5c87be3671889b.js → main-app-e02edafef1318e75.js} +1 -1
- package/dist/web/dist/_next/static/chunks/pages/{_app-20aa9e4f679a6d47.js → _app-6b02259ee4822d36.js} +3 -3
- package/dist/web/dist/_next/static/css/03e3fa723e374884.css +3 -0
- package/dist/web/dist/admin/data.html +1 -1
- package/dist/web/dist/admin/data.txt +3 -3
- package/dist/web/dist/auth/verify.html +1 -1
- package/dist/web/dist/auth/verify.txt +2 -2
- package/dist/web/dist/companies.html +1 -1
- package/dist/web/dist/companies.txt +2 -2
- package/dist/web/dist/company/admin.html +1 -1
- package/dist/web/dist/company/admin.txt +2 -2
- package/dist/web/dist/entity.html +1 -1
- package/dist/web/dist/entity.txt +2 -2
- package/dist/web/dist/index.html +1 -1
- package/dist/web/dist/index.txt +2 -2
- package/dist/web/dist/jobs.html +1 -1
- package/dist/web/dist/jobs.txt +3 -3
- package/dist/web/dist/login.html +2 -2
- package/dist/web/dist/login.txt +2 -2
- package/dist/web/dist/logs.html +1 -1
- package/dist/web/dist/logs.txt +2 -2
- package/dist/web/dist/matching/jobs/placeholder/talents.html +1 -1
- package/dist/web/dist/matching/jobs/placeholder/talents.txt +2 -2
- package/dist/web/dist/matching/portraits/placeholder/jobs.html +1 -1
- package/dist/web/dist/matching/portraits/placeholder/jobs.txt +2 -2
- package/dist/web/dist/memory.html +1 -0
- package/dist/web/dist/memory.txt +7 -0
- package/dist/web/dist/parselog.html +1 -1
- package/dist/web/dist/parselog.txt +3 -3
- package/dist/web/dist/recordings.html +1 -1
- package/dist/web/dist/recordings.txt +3 -3
- package/dist/web/dist/resource-usage.html +1 -1
- package/dist/web/dist/resource-usage.txt +3 -3
- package/dist/web/dist/shared/placeholder.html +1 -1
- package/dist/web/dist/shared/placeholder.txt +3 -3
- package/dist/web/dist/snapshots/placeholder/agent-prompt.html +1 -1
- package/dist/web/dist/snapshots/placeholder/agent-prompt.txt +2 -2
- package/dist/web/dist/talents.html +1 -1
- package/dist/web/dist/talents.txt +3 -3
- package/dist/web/dist/team/insights.html +1 -1
- package/dist/web/dist/team/insights.txt +3 -3
- package/package.json +1 -1
- package/dist/web/dist/_next/static/chunks/187-48dc1acca97c62ba.js +0 -1
- package/dist/web/dist/_next/static/chunks/353-845111f2789c5a03.js +0 -12
- package/dist/web/dist/_next/static/chunks/587-a1defe5c7e3e1e1b.js +0 -1
- package/dist/web/dist/_next/static/chunks/603-0878bd28159f4fe7.js +0 -32
- package/dist/web/dist/_next/static/chunks/659-85c4e54826b8bd18.js +0 -1
- package/dist/web/dist/_next/static/chunks/865-8e1d8c34192526ed.js +0 -1
- package/dist/web/dist/_next/static/chunks/882-1bcdfd2499403efd.js +0 -1
- package/dist/web/dist/_next/static/chunks/app/admin/data/page-efbbb1ea584df5a4.js +0 -1
- package/dist/web/dist/_next/static/chunks/app/jobs/page-af06cb0c0686ebdd.js +0 -1
- package/dist/web/dist/_next/static/chunks/app/layout-e93c294bf845144d.js +0 -1
- package/dist/web/dist/_next/static/chunks/app/parselog/page-d11c8ce5545a86af.js +0 -1
- package/dist/web/dist/_next/static/chunks/app/recordings/page-4a11e105b956cd72.js +0 -1
- package/dist/web/dist/_next/static/chunks/app/resource-usage/page-9591bf89800bebb6.js +0 -1
- package/dist/web/dist/_next/static/chunks/app/team/insights/page-db663ad28356ff73.js +0 -1
- package/dist/web/dist/_next/static/css/ad396c8df7280fac.css +0 -3
- /package/dist/assets/extension/background/{service-worker.20261027115924.js → service-worker.20261028162720.js} +0 -0
- /package/dist/web/dist/_next/static/{MJuXtJSgMhtSDdWY9q8kk → Rmj7zlgoj2IjJB_RWslV8}/_buildManifest.js +0 -0
- /package/dist/web/dist/_next/static/{MJuXtJSgMhtSDdWY9q8kk → Rmj7zlgoj2IjJB_RWslV8}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"buildTime":"2026-10-
|
|
1
|
+
{"buildTime":"2026-10-28T16:27:20.304Z","version":"0.1.34"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"manifest_version": 3,
|
|
3
3
|
"minimum_chrome_version": "116",
|
|
4
4
|
"name": "__MSG_extName__",
|
|
5
|
-
"description": "[build 10-
|
|
6
|
-
"version": "0.1.
|
|
5
|
+
"description": "[build 10-28 16:27:20] __MSG_extDescription__",
|
|
6
|
+
"version": "0.1.34",
|
|
7
7
|
"default_locale": "zh_CN",
|
|
8
8
|
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAi/S88toqsiW6zleTj+V8jPUVTmrJiyDPvqTd+Cqrl/Ax9PCxaMsiXXUh2sNJh6sMj7xj0YBclCPMsI2wxIF8y4r6KnmWt49RuMg7EynvOT8fcRjxXBWGAz6hjGepWesOCMn9dgJ5IqgXP3j+Bfb+636IeW1nZxOedT25zJwJr81G4gIyc9kk+wCZPHUhQTsfNVxd8xfbxYQpcDuuVk1dDNEszeLUZGKYl9JcOQcaEQOWA4ED5avn67ZWQx5kzowB7XYtcTH0vz63cKNcK3O1iQ0hmFoohPKRWh9tNl545UQ2+mPaU6B/CNSZP2qwb+tgK7lVh5zG5qQkbaP8ZP8XaQIDAQAB",
|
|
9
9
|
"permissions": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"<all_urls>"
|
|
28
28
|
],
|
|
29
29
|
"background": {
|
|
30
|
-
"service_worker": "background/service-worker.
|
|
30
|
+
"service_worker": "background/service-worker.20261028162720.js",
|
|
31
31
|
"type": "module"
|
|
32
32
|
},
|
|
33
33
|
"content_scripts": [
|
|
@@ -3408,7 +3408,7 @@ var require_unauthorized_exception = __commonJS({
|
|
|
3408
3408
|
exports2.UnauthorizedException = void 0;
|
|
3409
3409
|
var http_status_enum_1 = require_http_status_enum();
|
|
3410
3410
|
var http_exception_1 = require_http_exception();
|
|
3411
|
-
var
|
|
3411
|
+
var UnauthorizedException5 = class extends http_exception_1.HttpException {
|
|
3412
3412
|
/**
|
|
3413
3413
|
* Instantiate an `UnauthorizedException` Exception.
|
|
3414
3414
|
*
|
|
@@ -3438,7 +3438,7 @@ var require_unauthorized_exception = __commonJS({
|
|
|
3438
3438
|
super(http_exception_1.HttpException.createBody(objectOrError, description, http_status_enum_1.HttpStatus.UNAUTHORIZED), http_status_enum_1.HttpStatus.UNAUTHORIZED, httpExceptionOptions);
|
|
3439
3439
|
}
|
|
3440
3440
|
};
|
|
3441
|
-
exports2.UnauthorizedException =
|
|
3441
|
+
exports2.UnauthorizedException = UnauthorizedException5;
|
|
3442
3442
|
}
|
|
3443
3443
|
});
|
|
3444
3444
|
|
|
@@ -185596,12 +185596,12 @@ var require_jwa = __commonJS({
|
|
|
185596
185596
|
};
|
|
185597
185597
|
}
|
|
185598
185598
|
var bufferEqual;
|
|
185599
|
-
var
|
|
185599
|
+
var timingSafeEqual2 = "timingSafeEqual" in crypto7 ? function timingSafeEqual3(a, b2) {
|
|
185600
185600
|
if (a.byteLength !== b2.byteLength) {
|
|
185601
185601
|
return false;
|
|
185602
185602
|
}
|
|
185603
185603
|
return crypto7.timingSafeEqual(a, b2);
|
|
185604
|
-
} : function
|
|
185604
|
+
} : function timingSafeEqual3(a, b2) {
|
|
185605
185605
|
if (!bufferEqual) {
|
|
185606
185606
|
bufferEqual = require_buffer_equal_constant_time();
|
|
185607
185607
|
}
|
|
@@ -185610,7 +185610,7 @@ var require_jwa = __commonJS({
|
|
|
185610
185610
|
function createHmacVerifier(bits) {
|
|
185611
185611
|
return function verify4(thing, signature, secret) {
|
|
185612
185612
|
var computedSig = createHmacSigner(bits)(thing, secret);
|
|
185613
|
-
return
|
|
185613
|
+
return timingSafeEqual2(Buffer2.from(signature), Buffer2.from(computedSig));
|
|
185614
185614
|
};
|
|
185615
185615
|
}
|
|
185616
185616
|
function createKeySigner(bits) {
|
|
@@ -220133,6 +220133,7 @@ var MemoryEntry = class MemoryEntry2 {
|
|
|
220133
220133
|
version;
|
|
220134
220134
|
corroborationUsers;
|
|
220135
220135
|
corroborationSessions;
|
|
220136
|
+
qualityScore;
|
|
220136
220137
|
createdAt;
|
|
220137
220138
|
updatedAt;
|
|
220138
220139
|
};
|
|
@@ -220196,6 +220197,10 @@ __decorate42([
|
|
|
220196
220197
|
Column({ type: "int", default: 0 }),
|
|
220197
220198
|
__metadata41("design:type", Number)
|
|
220198
220199
|
], MemoryEntry.prototype, "corroborationSessions", void 0);
|
|
220200
|
+
__decorate42([
|
|
220201
|
+
Column({ type: "float", default: 0 }),
|
|
220202
|
+
__metadata41("design:type", Number)
|
|
220203
|
+
], MemoryEntry.prototype, "qualityScore", void 0);
|
|
220199
220204
|
__decorate42([
|
|
220200
220205
|
CreateDateColumn(),
|
|
220201
220206
|
__metadata41("design:type", Date)
|
|
@@ -297292,7 +297297,7 @@ var WEB_DIST = join14(__dirname, "..", "..", "web", "dist");
|
|
|
297292
297297
|
var SharedPageMiddleware = class SharedPageMiddleware2 {
|
|
297293
297298
|
logger = new import_common97.Logger("SharedPageMiddleware");
|
|
297294
297299
|
resolveHtml(path15) {
|
|
297295
|
-
const rel = /^\/shared\/[^/]+\/?$/.test(path15) ? join14("shared", "placeholder.html") : /^\/team\/insights\/?$/.test(path15) ? join14("team", "insights.html") : null;
|
|
297300
|
+
const rel = /^\/shared\/[^/]+\/?$/.test(path15) ? join14("shared", "placeholder.html") : /^\/team\/insights\/?$/.test(path15) ? join14("team", "insights.html") : /^\/memory\/?$/.test(path15) ? "memory.html" : null;
|
|
297296
297301
|
if (!rel)
|
|
297297
297302
|
return null;
|
|
297298
297303
|
const abs = join14(WEB_DIST, rel);
|
|
@@ -309417,6 +309422,7 @@ var import_typeorm182 = __toESM(require_typeorm2(), 1);
|
|
|
309417
309422
|
// dist/.server-tsc/memory/memory.service.js
|
|
309418
309423
|
var import_common163 = __toESM(require_common(), 1);
|
|
309419
309424
|
var import_typeorm180 = __toESM(require_typeorm2(), 1);
|
|
309425
|
+
import { timingSafeEqual } from "node:crypto";
|
|
309420
309426
|
|
|
309421
309427
|
// dist/.server-tsc/memory/memory-router.js
|
|
309422
309428
|
import { createHash as createHash5 } from "node:crypto";
|
|
@@ -309439,6 +309445,23 @@ var SECRET_PATTERNS = [
|
|
|
309439
309445
|
/(password|passwd|secret|api[_-]?key|token)\s*[:=]\s*\S{8,}/i,
|
|
309440
309446
|
/-----BEGIN [A-Z ]*PRIVATE KEY-----/
|
|
309441
309447
|
];
|
|
309448
|
+
var SCRUB_PATTERNS = [
|
|
309449
|
+
{ re: /[\w.+-]+@[\w-]+\.[\w.]+/g, label: "\u90AE\u7BB1" },
|
|
309450
|
+
{ re: /(?<!\d)1[3-9]\d{9}(?!\d)/g, label: "\u624B\u673A\u53F7" },
|
|
309451
|
+
{ re: /(?:\/(?:Users|home)\/)[^\s'"'"'"'》)】\]]+/g, label: "\u673A\u5668\u7528\u6237\u8DEF\u5F84" },
|
|
309452
|
+
{ re: /https?:\/\/[^\s]*\.(?:internal|local|lan)(?::\d+)?[^\s]*/gi, label: "\u5185\u7F51\u5730\u5740" }
|
|
309453
|
+
];
|
|
309454
|
+
function scrubForSystem(content) {
|
|
309455
|
+
let text = String(content ?? "");
|
|
309456
|
+
const findings = [];
|
|
309457
|
+
for (const { re, label } of SCRUB_PATTERNS) {
|
|
309458
|
+
if (re.test(text)) {
|
|
309459
|
+
findings.push(label);
|
|
309460
|
+
text = text.replace(re, `[\u8131\u654F:${label}]`);
|
|
309461
|
+
}
|
|
309462
|
+
}
|
|
309463
|
+
return { text: text.replace(/\s+/g, " ").trim(), findings };
|
|
309464
|
+
}
|
|
309442
309465
|
var TENANT_SIGNALS = /(我们|团队|公司|客户|寻访|sop|职位|简历|liepin|linkedin|猎聘|候选人|推荐|画像|jd)/i;
|
|
309443
309466
|
var USER_SIGNALS = /(我(的|本人|自己)|my |我的机器|个人习惯|我偏好)/i;
|
|
309444
309467
|
function classifyCandidate(input) {
|
|
@@ -309787,6 +309810,182 @@ var MemoryService = MemoryService_1 = class MemoryService2 {
|
|
|
309787
309810
|
}
|
|
309788
309811
|
return { tenantId: tid, backfilled, scanned: candidates.length, promoted };
|
|
309789
309812
|
}
|
|
309813
|
+
assertSystemKey(key) {
|
|
309814
|
+
const expected = process.env.HM_SYSTEM_INGEST_KEY || "";
|
|
309815
|
+
if (!expected)
|
|
309816
|
+
throw new import_common163.ForbiddenException("\u7CFB\u7EDF\u8BB0\u5FC6\u5199\u5165\u672A\u542F\u7528(\u7F3A HM_SYSTEM_INGEST_KEY)");
|
|
309817
|
+
const a = Buffer.from(String(key ?? ""));
|
|
309818
|
+
const b2 = Buffer.from(expected);
|
|
309819
|
+
if (a.length !== b2.length || !timingSafeEqual(a, b2)) {
|
|
309820
|
+
throw new import_common163.ForbiddenException("\u7CFB\u7EDF\u8BB0\u5FC6\u51ED\u8BC1\u65E0\u6548");
|
|
309821
|
+
}
|
|
309822
|
+
}
|
|
309823
|
+
async ingestSystemCandidate(dto, key) {
|
|
309824
|
+
this.assertSystemKey(key);
|
|
309825
|
+
const decision = classifyCandidate({ content: dto.content, kind: dto.kind });
|
|
309826
|
+
if (!decision.allowed) {
|
|
309827
|
+
throw new import_common163.UnprocessableEntityException(`\u7CFB\u7EDF\u5019\u9009\u88AB\u5199\u5165\u95F8\u62D2\u7EDD:${decision.reasons.join(";")}`);
|
|
309828
|
+
}
|
|
309829
|
+
const tenants = (dto.sourceProof?.tenants ?? []).filter((t) => Number.isFinite(Number(t?.tenantId)) && Array.isArray(t?.users) && new Set(t.users.map(Number)).size >= 2);
|
|
309830
|
+
if (tenants.length < 3) {
|
|
309831
|
+
throw new import_common163.UnprocessableEntityException(`\u7CFB\u7EDF\u5019\u9009\u4F50\u8BC1\u4E0D\u8DB3:\u9700 \u22653 \u79DF\u6237 \xD7 \u6BCF\u79DF\u6237 \u22652 \u7528\u6237,\u5B9E\u6536 ${tenants.length} \u79DF\u6237`);
|
|
309832
|
+
}
|
|
309833
|
+
const scrub = scrubForSystem(dto.content);
|
|
309834
|
+
if (scrub.text.length < 8) {
|
|
309835
|
+
throw new import_common163.UnprocessableEntityException("\u8131\u654F\u540E\u5185\u5BB9\u8FC7\u77ED,\u62D2\u7EDD\u5165\u5E93");
|
|
309836
|
+
}
|
|
309837
|
+
const kind = dto.kind ?? "fact";
|
|
309838
|
+
const usersTotal = tenants.reduce((s, t) => s + new Set((t.users ?? []).map(Number)).size, 0);
|
|
309839
|
+
const qualityScore = Number((tenants.length * usersTotal * 1).toFixed(2));
|
|
309840
|
+
const contentHash2 = memoryContentHash({ scope: "system", tenantId: null, userId: null, kind, content: scrub.text });
|
|
309841
|
+
const dup = await this.repo.findOne({ where: { contentHash: contentHash2 } });
|
|
309842
|
+
if (dup) {
|
|
309843
|
+
dup.qualityScore = Math.max(dup.qualityScore ?? 0, qualityScore);
|
|
309844
|
+
dup.provenance = {
|
|
309845
|
+
...dup.provenance,
|
|
309846
|
+
sourceProof: { tenants: tenants.map((t) => ({ tenantId: Number(t.tenantId), users: t.users })) },
|
|
309847
|
+
scrubbed: scrub.findings
|
|
309848
|
+
};
|
|
309849
|
+
await this.repo.save(dup);
|
|
309850
|
+
return { existed: true, entry: dup };
|
|
309851
|
+
}
|
|
309852
|
+
const entry = await this.repo.save(this.repo.create({
|
|
309853
|
+
scope: "system",
|
|
309854
|
+
kind,
|
|
309855
|
+
content: scrub.text,
|
|
309856
|
+
contentHash: contentHash2,
|
|
309857
|
+
provenance: {
|
|
309858
|
+
createdBy: "system-distiller",
|
|
309859
|
+
sourceProof: { tenants: tenants.map((t) => ({ tenantId: Number(t.tenantId), users: t.users })) },
|
|
309860
|
+
scrubbed: scrub.findings,
|
|
309861
|
+
routeReasons: [`P3 \u7CFB\u7EDF\u5019\u9009:${tenants.length}\u79DF\u6237\xD7${usersTotal}\u7528\u6237`]
|
|
309862
|
+
},
|
|
309863
|
+
status: "candidate",
|
|
309864
|
+
qualityScore
|
|
309865
|
+
}));
|
|
309866
|
+
return { existed: false, entry };
|
|
309867
|
+
}
|
|
309868
|
+
async distill(key) {
|
|
309869
|
+
this.assertSystemKey(key);
|
|
309870
|
+
const rows = await this.repo.find({ where: { scope: "tenant", status: "active" } });
|
|
309871
|
+
const groups = /* @__PURE__ */ new Map();
|
|
309872
|
+
for (const r of rows) {
|
|
309873
|
+
const k2 = normalizeContent2(r.content).toLowerCase();
|
|
309874
|
+
if (!groups.has(k2))
|
|
309875
|
+
groups.set(k2, []);
|
|
309876
|
+
groups.get(k2).push(r);
|
|
309877
|
+
}
|
|
309878
|
+
let created = 0;
|
|
309879
|
+
let updated = 0;
|
|
309880
|
+
let skipped = 0;
|
|
309881
|
+
const distilled = [];
|
|
309882
|
+
for (const [_, group] of groups) {
|
|
309883
|
+
const tenantIds = new Set(group.map((r) => r.tenantId).filter((t) => t != null));
|
|
309884
|
+
if (tenantIds.size < 3) {
|
|
309885
|
+
skipped++;
|
|
309886
|
+
continue;
|
|
309887
|
+
}
|
|
309888
|
+
const users = /* @__PURE__ */ new Set();
|
|
309889
|
+
for (const r of group) {
|
|
309890
|
+
const creator = Number(r.provenance?.createdBy ?? 0);
|
|
309891
|
+
if (creator > 0)
|
|
309892
|
+
users.add(creator);
|
|
309893
|
+
users.add(r.userId ?? 0);
|
|
309894
|
+
}
|
|
309895
|
+
users.delete(0);
|
|
309896
|
+
const representative = [...group].sort((a, b2) => a.content.length - b2.content.length)[0];
|
|
309897
|
+
const scrub = scrubForSystem(representative.content);
|
|
309898
|
+
if (scrub.text.length < 8) {
|
|
309899
|
+
skipped++;
|
|
309900
|
+
continue;
|
|
309901
|
+
}
|
|
309902
|
+
const newest = Math.max(...group.map((r) => new Date(r.updatedAt).getTime()));
|
|
309903
|
+
const fresh = Date.now() - newest <= 30 * 864e5 ? 1 : 0.5;
|
|
309904
|
+
const qualityScore = Number((tenantIds.size * Math.max(users.size, 1) * fresh).toFixed(2));
|
|
309905
|
+
const kind = representative.kind ?? "fact";
|
|
309906
|
+
const contentHash2 = memoryContentHash({ scope: "system", tenantId: null, userId: null, kind, content: scrub.text });
|
|
309907
|
+
const dup = await this.repo.findOne({ where: { contentHash: contentHash2 } });
|
|
309908
|
+
const proof = {
|
|
309909
|
+
tenants: [...tenantIds].map((tid) => ({
|
|
309910
|
+
tenantId: tid,
|
|
309911
|
+
users: group.filter((r) => r.tenantId === tid).map((r) => Number(r.provenance?.createdBy ?? 0)).filter((u) => u > 0)
|
|
309912
|
+
})),
|
|
309913
|
+
distilledFrom: group.map((r) => r.id)
|
|
309914
|
+
};
|
|
309915
|
+
if (dup) {
|
|
309916
|
+
dup.qualityScore = Math.max(dup.qualityScore ?? 0, qualityScore);
|
|
309917
|
+
dup.provenance = { ...dup.provenance, sourceProof: proof, scrubbed: scrub.findings };
|
|
309918
|
+
await this.repo.save(dup);
|
|
309919
|
+
updated++;
|
|
309920
|
+
distilled.push(dup.id);
|
|
309921
|
+
} else {
|
|
309922
|
+
const entry = await this.repo.save(this.repo.create({
|
|
309923
|
+
scope: "system",
|
|
309924
|
+
kind,
|
|
309925
|
+
content: scrub.text,
|
|
309926
|
+
contentHash: contentHash2,
|
|
309927
|
+
provenance: { createdBy: "system-distiller", sourceProof: proof, scrubbed: scrub.findings, routeReasons: [`P3 \u84B8\u998F:${tenantIds.size}\u79DF\u6237`] },
|
|
309928
|
+
status: "candidate",
|
|
309929
|
+
qualityScore
|
|
309930
|
+
}));
|
|
309931
|
+
created++;
|
|
309932
|
+
distilled.push(entry.id);
|
|
309933
|
+
}
|
|
309934
|
+
}
|
|
309935
|
+
return { clusters: groups.size, created, updated, skipped, distilled };
|
|
309936
|
+
}
|
|
309937
|
+
async approveSystem(id, key) {
|
|
309938
|
+
this.assertSystemKey(key);
|
|
309939
|
+
const row = await this.repo.findOne({ where: { id } });
|
|
309940
|
+
if (!row)
|
|
309941
|
+
throw new import_common163.NotFoundException(`\u8BB0\u5FC6 ${id} \u4E0D\u5B58\u5728`);
|
|
309942
|
+
if (row.scope !== "system")
|
|
309943
|
+
throw new import_common163.UnprocessableEntityException("\u4EC5 system \u6761\u76EE\u53EF\u7ECF\u6B64\u901A\u9053\u5BA1\u6279");
|
|
309944
|
+
row.status = "active";
|
|
309945
|
+
row.version = (row.version ?? 1) + 1;
|
|
309946
|
+
row.provenance = { ...row.provenance, approvedAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
309947
|
+
await this.repo.save(row);
|
|
309948
|
+
return { ok: true, id: row.id, status: row.status };
|
|
309949
|
+
}
|
|
309950
|
+
async deprecateSystem(id, key) {
|
|
309951
|
+
this.assertSystemKey(key);
|
|
309952
|
+
const row = await this.repo.findOne({ where: { id } });
|
|
309953
|
+
if (!row)
|
|
309954
|
+
throw new import_common163.NotFoundException(`\u8BB0\u5FC6 ${id} \u4E0D\u5B58\u5728`);
|
|
309955
|
+
if (row.scope !== "system")
|
|
309956
|
+
throw new import_common163.UnprocessableEntityException("\u4EC5 system \u6761\u76EE\u53EF\u7ECF\u6B64\u901A\u9053\u5E9F\u5F03");
|
|
309957
|
+
row.status = "deprecated";
|
|
309958
|
+
row.version = (row.version ?? 1) + 1;
|
|
309959
|
+
await this.repo.save(row);
|
|
309960
|
+
return { ok: true, id: row.id, status: row.status };
|
|
309961
|
+
}
|
|
309962
|
+
async restoreOps(id, key) {
|
|
309963
|
+
this.assertSystemKey(key);
|
|
309964
|
+
const row = await this.repo.findOne({ where: { id } });
|
|
309965
|
+
if (!row)
|
|
309966
|
+
throw new import_common163.NotFoundException(`\u8BB0\u5FC6 ${id} \u4E0D\u5B58\u5728`);
|
|
309967
|
+
if (row.status !== "quarantined") {
|
|
309968
|
+
throw new import_common163.UnprocessableEntityException("\u4EC5 quarantined \u6761\u76EE\u53EF\u6062\u590D");
|
|
309969
|
+
}
|
|
309970
|
+
row.status = "active";
|
|
309971
|
+
row.version = (row.version ?? 1) + 1;
|
|
309972
|
+
row.provenance = { ...row.provenance, restoredAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
309973
|
+
await this.repo.save(row);
|
|
309974
|
+
return { ok: true, id: row.id, status: row.status };
|
|
309975
|
+
}
|
|
309976
|
+
async deprecateOps(id, key) {
|
|
309977
|
+
this.assertSystemKey(key);
|
|
309978
|
+
const row = await this.repo.findOne({ where: { id } });
|
|
309979
|
+
if (!row)
|
|
309980
|
+
throw new import_common163.NotFoundException(`\u8BB0\u5FC6 ${id} \u4E0D\u5B58\u5728`);
|
|
309981
|
+
if (row.status === "deprecated")
|
|
309982
|
+
return { ok: true, id: row.id, status: row.status };
|
|
309983
|
+
row.status = "deprecated";
|
|
309984
|
+
row.version = (row.version ?? 1) + 1;
|
|
309985
|
+
row.provenance = { ...row.provenance, deprecatedBy: "ops" };
|
|
309986
|
+
await this.repo.save(row);
|
|
309987
|
+
return { ok: true, id: row.id, status: row.status };
|
|
309988
|
+
}
|
|
309790
309989
|
};
|
|
309791
309990
|
MemoryService = MemoryService_1 = __decorate207([
|
|
309792
309991
|
(0, import_common163.Injectable)(),
|
|
@@ -309828,7 +310027,10 @@ var MemoryController = class MemoryController2 {
|
|
|
309828
310027
|
return this.service.search(req.user?.userId, q ?? "", limit ? Number(limit) : void 0);
|
|
309829
310028
|
}
|
|
309830
310029
|
list(req, scope, kind, status, q, limit, offset) {
|
|
309831
|
-
|
|
310030
|
+
if (!req.user?.userId) {
|
|
310031
|
+
throw new import_common164.UnauthorizedException("\u8BB0\u5FC6\u5217\u8868\u9700\u8981\u767B\u5F55(UTOKEN)");
|
|
310032
|
+
}
|
|
310033
|
+
return this.service.list(req.user.userId, {
|
|
309832
310034
|
scope,
|
|
309833
310035
|
kind,
|
|
309834
310036
|
status,
|
|
@@ -309843,6 +310045,24 @@ var MemoryController = class MemoryController2 {
|
|
|
309843
310045
|
reconcile(req) {
|
|
309844
310046
|
return this.service.reconcile();
|
|
309845
310047
|
}
|
|
310048
|
+
systemCandidate(dto, req) {
|
|
310049
|
+
return this.service.ingestSystemCandidate(dto, req.headers["x-system-key"]);
|
|
310050
|
+
}
|
|
310051
|
+
distill(req) {
|
|
310052
|
+
return this.service.distill(req.headers["x-system-key"]);
|
|
310053
|
+
}
|
|
310054
|
+
approveSystem(id, req) {
|
|
310055
|
+
return this.service.approveSystem(parseInt(id, 10), req.headers["x-system-key"]);
|
|
310056
|
+
}
|
|
310057
|
+
deprecateSystem(id, req) {
|
|
310058
|
+
return this.service.deprecateSystem(parseInt(id, 10), req.headers["x-system-key"]);
|
|
310059
|
+
}
|
|
310060
|
+
restoreOps(id, req) {
|
|
310061
|
+
return this.service.restoreOps(parseInt(id, 10), req.headers["x-system-key"]);
|
|
310062
|
+
}
|
|
310063
|
+
deprecateOps(id, req) {
|
|
310064
|
+
return this.service.deprecateOps(parseInt(id, 10), req.headers["x-system-key"]);
|
|
310065
|
+
}
|
|
309846
310066
|
update(id, dto, req) {
|
|
309847
310067
|
return this.service.update(parseInt(id, 10), dto, req.user?.userId);
|
|
309848
310068
|
}
|
|
@@ -309897,6 +310117,53 @@ __decorate208([
|
|
|
309897
310117
|
__metadata159("design:paramtypes", [Object]),
|
|
309898
310118
|
__metadata159("design:returntype", void 0)
|
|
309899
310119
|
], MemoryController.prototype, "reconcile", null);
|
|
310120
|
+
__decorate208([
|
|
310121
|
+
(0, import_common164.Post)("system-candidate"),
|
|
310122
|
+
__param91(0, (0, import_common164.Body)()),
|
|
310123
|
+
__param91(1, (0, import_common164.Request)()),
|
|
310124
|
+
__metadata159("design:type", Function),
|
|
310125
|
+
__metadata159("design:paramtypes", [Object, Object]),
|
|
310126
|
+
__metadata159("design:returntype", void 0)
|
|
310127
|
+
], MemoryController.prototype, "systemCandidate", null);
|
|
310128
|
+
__decorate208([
|
|
310129
|
+
(0, import_common164.Post)("distill"),
|
|
310130
|
+
__param91(0, (0, import_common164.Request)()),
|
|
310131
|
+
__metadata159("design:type", Function),
|
|
310132
|
+
__metadata159("design:paramtypes", [Object]),
|
|
310133
|
+
__metadata159("design:returntype", void 0)
|
|
310134
|
+
], MemoryController.prototype, "distill", null);
|
|
310135
|
+
__decorate208([
|
|
310136
|
+
(0, import_common164.Post)(":id/system-approve"),
|
|
310137
|
+
__param91(0, (0, import_common164.Param)("id")),
|
|
310138
|
+
__param91(1, (0, import_common164.Request)()),
|
|
310139
|
+
__metadata159("design:type", Function),
|
|
310140
|
+
__metadata159("design:paramtypes", [String, Object]),
|
|
310141
|
+
__metadata159("design:returntype", void 0)
|
|
310142
|
+
], MemoryController.prototype, "approveSystem", null);
|
|
310143
|
+
__decorate208([
|
|
310144
|
+
(0, import_common164.Post)(":id/system-deprecate"),
|
|
310145
|
+
__param91(0, (0, import_common164.Param)("id")),
|
|
310146
|
+
__param91(1, (0, import_common164.Request)()),
|
|
310147
|
+
__metadata159("design:type", Function),
|
|
310148
|
+
__metadata159("design:paramtypes", [String, Object]),
|
|
310149
|
+
__metadata159("design:returntype", void 0)
|
|
310150
|
+
], MemoryController.prototype, "deprecateSystem", null);
|
|
310151
|
+
__decorate208([
|
|
310152
|
+
(0, import_common164.Post)(":id/restore"),
|
|
310153
|
+
__param91(0, (0, import_common164.Param)("id")),
|
|
310154
|
+
__param91(1, (0, import_common164.Request)()),
|
|
310155
|
+
__metadata159("design:type", Function),
|
|
310156
|
+
__metadata159("design:paramtypes", [String, Object]),
|
|
310157
|
+
__metadata159("design:returntype", void 0)
|
|
310158
|
+
], MemoryController.prototype, "restoreOps", null);
|
|
310159
|
+
__decorate208([
|
|
310160
|
+
(0, import_common164.Post)(":id/deprecate"),
|
|
310161
|
+
__param91(0, (0, import_common164.Param)("id")),
|
|
310162
|
+
__param91(1, (0, import_common164.Request)()),
|
|
310163
|
+
__metadata159("design:type", Function),
|
|
310164
|
+
__metadata159("design:paramtypes", [String, Object]),
|
|
310165
|
+
__metadata159("design:returntype", void 0)
|
|
310166
|
+
], MemoryController.prototype, "deprecateOps", null);
|
|
309900
310167
|
__decorate208([
|
|
309901
310168
|
(0, import_common164.Patch)(":id"),
|
|
309902
310169
|
__param91(0, (0, import_common164.Param)("id")),
|
|
@@ -310206,6 +310473,7 @@ var AUTH_MIDDLEWARE_EXCLUDES = [
|
|
|
310206
310473
|
{ path: "company/admin", method: import_common169.RequestMethod.GET },
|
|
310207
310474
|
{ path: "admin/data", method: import_common169.RequestMethod.GET },
|
|
310208
310475
|
{ path: "team/insights", method: import_common169.RequestMethod.GET },
|
|
310476
|
+
{ path: "memory", method: import_common169.RequestMethod.GET },
|
|
310209
310477
|
{ path: "_next/(.*)", method: import_common169.RequestMethod.ALL },
|
|
310210
310478
|
{ path: "(.*).txt", method: import_common169.RequestMethod.GET },
|
|
310211
310479
|
{ path: "health", method: import_common169.RequestMethod.GET },
|
package/dist/index.js
CHANGED
|
@@ -73835,7 +73835,7 @@ function installLocalProxyBypass() {
|
|
|
73835
73835
|
// package.json
|
|
73836
73836
|
var package_default = {
|
|
73837
73837
|
name: "hunter-mate",
|
|
73838
|
-
version: "0.1.
|
|
73838
|
+
version: "0.1.34",
|
|
73839
73839
|
type: "module",
|
|
73840
73840
|
description: "HiredChina \u730E\u5934 Agent \u6570\u636E\u52A9\u624B CLI:\u4EBA\u624D\u5E93/\u5BA2\u6237/\u804C\u4F4D\u6570\u636E\u8BBF\u95EE,\u6D4F\u89C8\u5668\u5F55\u5236\u89E3\u6790\u7B80\u5386,server/\u6269\u5C55\u4E00\u81F4\u6027\u81EA\u6108",
|
|
73841
73841
|
license: "MIT",
|
package/dist/web/dist/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/
|
|
1
|
+
<!DOCTYPE html><html lang="zh-CN"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/03e3fa723e374884.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9cebd25e322e2cd7.js"/><script src="/_next/static/chunks/a7067448-3f2b194cfadb91fb.js" async=""></script><script src="/_next/static/chunks/935-79d8aba674c09f7b.js" async=""></script><script src="/_next/static/chunks/main-app-e02edafef1318e75.js" async=""></script><script src="/_next/static/chunks/502-4776504e89a09b68.js" async=""></script><script src="/_next/static/chunks/589-5bb84ab8060e960b.js" async=""></script><script src="/_next/static/chunks/431-6c54d8d0cf2bf768.js" async=""></script><script src="/_next/static/chunks/app/layout-56e9f652ec460661.js" async=""></script><meta name="robots" content="noindex"/><title>HunterMate 采集仪表盘</title><meta name="description" content="HunterMate 采集/解析/入库仪表盘"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="flex h-screen overflow-hidden bg-gray-50 text-gray-900"><div class="flex h-screen w-screen flex-col items-center justify-center bg-gray-50"><span class="hm-spinner" aria-label="加载中"></span><div class="mt-4 text-sm text-gray-400">正在加载,请稍候…</div></div><script src="/_next/static/chunks/webpack-9cebd25e322e2cd7.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/css/03e3fa723e374884.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"2:I[76939,[],\"\"]\n4:I[74268,[],\"\"]\n5:I[81050,[],\"\"]\n6:I[75946,[\"502\",\"static/chunks/502-4776504e89a09b68.js\",\"589\",\"static/chunks/589-5bb84ab8060e960b.js\",\"431\",\"static/chunks/431-6c54d8d0cf2bf768.js\",\"185\",\"static/chunks/app/layout-56e9f652ec460661.js\"],\"GateByRoute\"]\nc:I[62319,[],\"\"]\n7:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\n8:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\n9:{\"display\":\"inline-block\"}\na:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\nd:[]\n"])</script><script>self.__next_f.push([1,"0:[\"$\",\"$L2\",null,{\"buildId\":\"Rmj7zlgoj2IjJB_RWslV8\",\"assetPrefix\":\"\",\"urlParts\":[\"\",\"_not-found\"],\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L3\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null],null],null]},[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\"}]],null]},[[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/03e3fa723e374884.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"zh-CN\",\"children\":[\"$\",\"body\",null,{\"className\":\"flex h-screen overflow-hidden bg-gray-50 text-gray-900\",\"children\":[\"$\",\"$L6\",null,{\"children\":[\"$\",\"main\",null,{\"className\":\"flex-1 overflow-hidden\",\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$7\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$8\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$9\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$a\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[]}]}]}]}]}]],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lb\"],\"globalErrorComponent\":\"$c\",\"missingSlots\":\"$Wd\"}]\n"])</script><script>self.__next_f.push([1,"b:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"HunterMate 采集仪表盘\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"HunterMate 采集/解析/入库仪表盘\"}]]\n3:null\n"])</script></body></html>
|