mirror of
https://github.com/SHOGGOTH-SECTOR/sica-fondt.git
synced 2026-07-31 16:16:26 +00:00
Update mafiabot_types.ads
This commit is contained in:
parent
ca1985ca5d
commit
24ecea1c66
@ -3,49 +3,35 @@
|
|||||||
-- R / Octave / Pony / Guile), the inference cycle (cognition), or drive/affect
|
-- R / Octave / Pony / Guile), the inference cycle (cognition), or drive/affect
|
||||||
-- math (the organs' domain, done in floats). The gate needs exactly three
|
-- math (the organs' domain, done in floats). The gate needs exactly three
|
||||||
-- things: a source/trust tag, a status code, and a bounded payload to scan.
|
-- things: a source/trust tag, a status code, and a bounded payload to scan.
|
||||||
package Mafiabot_Types
|
package bodytypes
|
||||||
with SPARK_Mode => On
|
with SPARK_Mode => On
|
||||||
is
|
is
|
||||||
|
|
||||||
-- Source / trust tag. The border screens by this: external-origin content
|
-- Source / trust tag. The border screens by this: external-origin content
|
||||||
-- is never trusted; System_Internal bypasses the blocklist. A message may
|
-- is never full-trusted; Internal does not bypass the blocklist. all human messages possess a snowflake associsted via discord. A message may
|
||||||
-- not reclassify its own provenance (see Trust_Boundary.Validate_Provenance).
|
-- not reclassify its own provenance (see Trust_Boundary.Validate_Provenance). (may use some form of keyed cryptography)
|
||||||
type Provenance_Tag is (
|
type Provenance_Tag is (
|
||||||
User_Input,
|
outsideInput,
|
||||||
System_Internal,
|
architectMessage
|
||||||
LLM_Output,
|
allegedInternal,
|
||||||
Tool_Result,
|
myWords,
|
||||||
Memory_Recall,
|
toolResult,
|
||||||
Config_Static
|
mementoMori,
|
||||||
|
homeoSyscheck,
|
||||||
|
blackList
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Return status (replaces exceptions under the No_Exceptions profile).
|
-- Return status (replaces exceptions under the No_Exceptions profile).
|
||||||
type Operation_Status is (
|
type opStatus is (
|
||||||
OK,
|
OK,
|
||||||
Error_Invalid_State,
|
errInvalState,
|
||||||
Error_Overflow,
|
errOverflow,
|
||||||
Error_Underflow,
|
errUnderflow,
|
||||||
Error_Blocked, -- screened out: injection pattern hit
|
errBlacked, -- screened out and black listed
|
||||||
Error_Trust_Violation, -- provenance reclassification attempt
|
errTrustViolation, -- rewritten provenance, manipulation, poisoned rags, etc.
|
||||||
Error_Config
|
homeoSysCheckFail
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Payload buffer. By the time content reaches the border it has already
|
-- Payload buffer. By the time content reaches the border it has already
|
||||||
-- been pre-digested upstream into bounded RAG context, so a stack-bounded
|
-- been pre-digested upstream but we need to ge more cautious and particular.
|
||||||
-- buffer is the right shape: the gate scans it for prompt-injection
|
end bodytypes;
|
||||||
-- patterns, it does not stream raw input. No heap, no finalization.
|
|
||||||
Max_Text_Length : constant := 4096;
|
|
||||||
subtype Text_Length is Natural range 0 .. Max_Text_Length;
|
|
||||||
|
|
||||||
type Bounded_Text is record
|
|
||||||
Data : String (1 .. Max_Text_Length) := (others => ' ');
|
|
||||||
Length : Text_Length := 0;
|
|
||||||
end record;
|
|
||||||
|
|
||||||
-- Helpers
|
|
||||||
function Make_Text (S : String) return Bounded_Text
|
|
||||||
with Pre => S'Length <= Max_Text_Length;
|
|
||||||
|
|
||||||
function To_String (T : Bounded_Text) return String;
|
|
||||||
|
|
||||||
end Mafiabot_Types;
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user