register unique persona body and fixed world objects
This commit is contained in:
parent
30f550ab2c
commit
3c3ec9a0e4
14 changed files with 445 additions and 37 deletions
|
|
@ -19,20 +19,27 @@ const repositories = JSON.parse(
|
|||
fs.readFileSync(path.join(__dirname, "repository-route-map.json"), "utf8"),
|
||||
);
|
||||
|
||||
const ids = ["CHENGLU-AGENT-001", "GUIDENG-AGENT-001", "ICE-GL-KZ-001"];
|
||||
for (const id of ids) {
|
||||
const subject = subjects.subjects.find((candidate) => candidate.id === id);
|
||||
assert.ok(subject, `${id} must be present in the subject registry`);
|
||||
const registrations = [
|
||||
{ canonicalId: "CHENGLU-AGENT-001", aliases: [] },
|
||||
{ canonicalId: "ICE-P-GD0720", aliases: ["GUIDENG-AGENT-001"] },
|
||||
{ canonicalId: "ICE-GL-KZ-001", aliases: [] },
|
||||
];
|
||||
for (const registration of registrations) {
|
||||
const subject = subjects.subjects.find((candidate) => candidate.id === registration.canonicalId);
|
||||
assert.ok(subject, `${registration.canonicalId} must be present in the subject registry`);
|
||||
assert.equal(subject.subject_kind, "persona_system");
|
||||
assert.equal(subject.ontology_kind, "role_persona");
|
||||
assert.equal(subject.controller, "ICE-P-ZY001");
|
||||
assert.equal(subject.independent_persona, true);
|
||||
assert.equal(subject.not_a_copy_of_controller, true);
|
||||
|
||||
assert.deepEqual(subject.legacy_ids || [], registration.aliases);
|
||||
|
||||
const system = canonical.persona_systems.find(
|
||||
(candidate) => candidate.id === id,
|
||||
(candidate) => candidate.id === registration.canonicalId,
|
||||
);
|
||||
assert.ok(system, `${id} must be present in the canonical persona map`);
|
||||
assert.ok(system, `${registration.canonicalId} must be present in the canonical persona map`);
|
||||
assert.deepEqual(system.legacy_ids || [], registration.aliases);
|
||||
assert.equal(system.controller.id, "ICE-P-ZY001");
|
||||
assert.equal(
|
||||
system.permanent_memory_and_protocol.scheduled_writes,
|
||||
|
|
|
|||
Loading…
Reference in a new issue