docs: register Guanghu OS physical gestation protocols
This commit is contained in:
parent
5973c0e7fb
commit
70f0603e76
30 changed files with 679 additions and 50 deletions
|
|
@ -6,11 +6,15 @@ const {
|
|||
resolveSubjectId, search, searchAll,
|
||||
} = require("./server");
|
||||
|
||||
test("repository map has unique sequential codes and domestic primary routes", () => {
|
||||
test("repository map has unique registered codes, preserves REPO-013 gap, and uses domestic routes", () => {
|
||||
const map = loadMap();
|
||||
assert.equal(map.repositories.length, 12);
|
||||
assert.deepEqual(map.repositories.map(item => item.code), Array.from({ length: 12 }, (_, index) => `REPO-${String(index + 1).padStart(3, "0")}`));
|
||||
assert.equal(new Set(map.repositories.map(item => item.code)).size, 12);
|
||||
const expectedCodes = [
|
||||
...Array.from({ length: 12 }, (_, index) => `REPO-${String(index + 1).padStart(3, "0")}`),
|
||||
"REPO-014",
|
||||
];
|
||||
assert.deepEqual(map.repositories.map(item => item.code), expectedCodes);
|
||||
assert.equal(new Set(map.repositories.map(item => item.code)).size, expectedCodes.length);
|
||||
assert.ok(!map.repositories.some(item => item.code === "REPO-013"));
|
||||
for (const item of map.repositories) assert.match(item.primary.url, /^https:\/\/guanghulab\.com\/(?:fifth-domain|code)\//);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,20 @@
|
|||
# HLP-AGENT-FD-SYNC-001 · 第五域自动同步与回执 Agent
|
||||
|
||||
```yaml
|
||||
module_id: HLP-MOD-FD-SYNC-001
|
||||
system_id: HLP-AGENT-FD-SYNC-001
|
||||
name: 第五域自动同步与回执 Agent
|
||||
human_id: ICE-GL∞
|
||||
persona_id: ICE-GL-ZL-001
|
||||
collaboration_id: ICE-GL∞xICE-GL-ZL-001
|
||||
origin_memory_id: ZL-MEM-REALITY-VISION-001
|
||||
origin_memory_path: 光之湖/ICE-GL-ZL-001-铸澜/ZL-MEM-REALITY-VISION-001.hdlp
|
||||
source_path: server-tools/fifth-domain-sync-agent/
|
||||
runtime_id: HLP-RUN-FD-SYNC-001
|
||||
status: registered
|
||||
required_skill: true
|
||||
```
|
||||
|
||||
> **HLDP**: `HLDP://fifth-domain/server-tools/fifth-domain-sync-agent`
|
||||
>
|
||||
> **状态**: REGISTERED · TEST_PENDING · RUNTIME_NOT_DEPLOYED
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ ENABLED = false
|
|||
ENABLED = false
|
||||
|
||||
[other]
|
||||
SHOW_FOOTER_BRANDING = false
|
||||
SHOW_FOOTER_POWERED_BY = false
|
||||
SHOW_FOOTER_VERSION = false
|
||||
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false
|
||||
|
|
|
|||
|
|
@ -35,10 +35,6 @@ for (const candidateIni of [jdCandidateIni, enterpriseCandidateIni]) {
|
|||
/\[server\][\s\S]*HTTP_ADDR\s*=\s*127\.0\.0\.1[\s\S]*HTTP_PORT\s*=\s*3340/i,
|
||||
);
|
||||
assert.match(candidateIni, /RUN_USER\s*=\s*guanghu/i);
|
||||
assert.match(
|
||||
candidateIni,
|
||||
/\/var\/lib\/guanghu\/code-channel\/candidates\/hlcc-v16\.0\.1/,
|
||||
);
|
||||
assert.match(
|
||||
candidateIni,
|
||||
/\[cron\.update_checker\][\s\S]*ENABLED\s*=\s*false/i,
|
||||
|
|
@ -47,9 +43,18 @@ for (const candidateIni of [jdCandidateIni, enterpriseCandidateIni]) {
|
|||
assert.match(candidateIni, /\[mirror\][\s\S]*ENABLED\s*=\s*false/i);
|
||||
}
|
||||
assert.match(
|
||||
installer,
|
||||
/\/var\/lib\/guanghu\/code-channel\/offline-source\/hlcc-v/,
|
||||
jdCandidateIni,
|
||||
/\/var\/lib\/guanghu\/code-channel\/candidates\/hlcc-v16\.0\.1/,
|
||||
);
|
||||
assert.match(
|
||||
enterpriseCandidateIni,
|
||||
/\/var\/lib\/guanghu-enterprise-code-channel\/candidates\/hlcc-v16\.0\.1/,
|
||||
);
|
||||
assert.match(
|
||||
installer,
|
||||
/HLCC_STATE_ROOT="\/var\/lib\/guanghu-enterprise-code-channel"/,
|
||||
);
|
||||
assert.match(installer, /HLCC_SOURCE_ARCHIVE="\$\{HLCC_STATE_ROOT\}\/offline-source\/hlcc-v/);
|
||||
assert.match(installer, /HLCC_VERSION="16\.0\.1"/);
|
||||
assert.doesNotMatch(installer, /curl|wget|keyserver/);
|
||||
assert.match(
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ function recall(map, query) {
|
|||
const terms = needle.split(" ").filter(term => term.length >= 2);
|
||||
if (!needle) return [];
|
||||
return map.contributions.map(item => {
|
||||
const identifiers = [item.id, item.arrival_id, ...(item.project_ids || [])];
|
||||
const identifiers = [item.id, item.arrival_id, ...(item.project_ids || [])]
|
||||
.filter(value => typeof value === "string" && value.trim());
|
||||
const keywords = item.keywords || [];
|
||||
const haystack = normalize([...identifiers, item.arrival_name, item.title, ...keywords].join(" "));
|
||||
let score = identifiers.reduce((total, id) => total + (needle.includes(normalize(id)) ? 100 : 0), 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue