Contraband detection (Task #425, D-065): - New module: simulation/contraband.rs — NPC scan checks carried items against the KnowledgeGraph confidence gate. NPCs with Authority access can initiate a scan; scan outcome depends on item CarriedBy + KG entry. - Adds ContrabandScanResult event type and ContrabanEntry component. - Wired into simulation/mod.rs module list. Dialogue confidence gate (Task #524, D-075 — OQ-18 resolution): - relationship_to_trust() gains confidence parameter (KnowledgeConfidence). - Trust tier mapping: (Friendly, KnowsDetails+)→Secret, (Friendly|Known, KnowsOf+)→Real, otherwise Surface. Access tier (Layer 1) unchanged. - Caller process_talk_interaction passes observer KG confidence_of target. - Resolves OQ-18: confidence co-gates TrustTier, not AccessTier. Supporting changes: - decisions/content.md: add D-075 (16 decisions, dated 2026-02-19) - knowledge/types.rs: expose KnowledgeConfidence comparison helpers - knowledge/registry.rs: minor API polish - bridge/types.rs: ContrabandScanResult wire type - bridge/text_renderer.rs: render contraband scan status - perception/observer: include carried item count in snapshot - npc/mod.rs: NPC scan range constant, authority flag Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -77,7 +77,8 @@ impl EntityRegistry {
|
||||
assert!(
|
||||
target >= self.next_id,
|
||||
"cannot reserve backwards: next_id={}, target={}",
|
||||
self.next_id, target
|
||||
self.next_id,
|
||||
target
|
||||
);
|
||||
self.next_id = target;
|
||||
}
|
||||
|
||||
@@ -140,8 +140,8 @@ impl RelationshipState {
|
||||
Self::Friendly => Self::Known,
|
||||
Self::Known => Self::PersonOfInterest,
|
||||
Self::PersonOfInterest => Self::Hostile,
|
||||
Self::Unknown => Self::Unknown, // no-op: can't confront a stranger
|
||||
Self::Hostile => Self::Hostile, // floor: already worst state
|
||||
Self::Unknown => Self::Unknown, // no-op: can't confront a stranger
|
||||
Self::Hostile => Self::Hostile, // floor: already worst state
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user