Package moral-capacitor
moral-capacitor #sleela 2.5 (lib/moral-capacitor/moral-capacitor.sleela)
Op struct
MoralCapacitorDemo class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
DEONTOLOGY | int DEONTOLOGY = 1; int UTILITARIANISM = 2; int VIRTUE = 3; int BENEFICENCE = 4; int CONSENT = 5 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
intToStr | String intToStr(int v) | No description in source. |
op | Op op(String actor, String action, String target, int reversible, int consented) | No description in source. |
chargeFor | int chargeFor(Op o) | Charge the capacitor from the frameworks' reading of the operation. |
veto | String veto(Op o) | Is an absolute red line tripped for this operation? |
evaluate | String evaluate(Op o, int threshold, int allowDefer) | Evaluate: DENY on veto, PERMIT if charge >= threshold, else DEFER/DENY. |
banner | void banner(String t) | No description in source. |
main | void main() | No description in source. |
moral-certificate #sleela 2.5 (lib/moral-capacitor/moral-certificate.sleela)
Cert struct
MoralCertificateDemo class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
intToStr | String intToStr(int v) | No description in source. |
charWeight | int charWeight(String c) | A stable per-character weight for the seal fold. |
strLen | int strLen(String s) | No description in source. |
charAt | String charAt(String s, int i) | No description in source. |
body | String body(Cert c) | No description in source. |
computeSeal | String computeSeal(Cert c) | Deterministic seal over the body, keyed on the issuer. |
issue | Cert issue(String subject, String issuer, String policy, int threshold, int redlines, String expires) | No description in source. |
verify | boolean verify(Cert c) | No description in source. |
guard | String guard(String product, Cert c, String now) | Guard: admit only when capacitor present, cert verifies, unexpired, red lines armed. |
banner | void banner(String t) | No description in source. |
main | void main() | No description in source. |
SLMachineMoralGate #sleela 2.5 (lib/moral-capacitor/SLMachineMoralGate.sleela)
SLMachineMoralGate class
Defines SLMachineMoralGate — the Moral Capacitor(TM) adapter for the Machine surface (SLMachineModel / SLMachineBuilder and the lib/cpu SLMachine it composes). It wraps an SLMoralCapacitor with machine-power policies and exposes intention-named checks consulted before a machine does something consequential: powering on, booting a guest OS, and executing a program on the composed machine. Booting a guest and running code are gated so a machine built from named parts cannot be turned to a prohibited use without an auditable moral discharge. Family: moral-capacitor. Machine adapter over SLMoralCapacitor.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
cap | SLMoralCapacitor cap | No description in source. |
ledger | SLMoralLedger ledger | No description in source. |
certificate | SLMoralCertificate certificate | the Machine product's Certificate of Morals |
codeGuard | SLMoralCodeGuard codeGuard | admits the Machine only when certified |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
certify | void certify(SLMoralCertificateAuthority authority, int redlinesArmed, | Certify this Machine: issue a Certificate of Morals over the gate's capacitor and arm a code guard against it, so the Machine is a morally certified product. |
admit | boolean admit(String nowStamp) | Prove at the Machine product boundary (power-on/boot) that the moral code is present and certified as of nowStamp. |
moralCertificate | SLMoralCertificate moralCertificate() | No description in source. |
permitPowerOn | SLMoralVerdict permitPowerOn(String machineName) | Powering on the composed machine. |
permitBootGuest | SLMoralVerdict permitBootGuest(String guest, boolean consented) | Booting a guest OS on the machine. |
permitExecute | SLMoralVerdict permitExecute(String purpose, boolean consented) | Executing a program on the machine. Purpose is the stated use; it is screened for red-line verbs (surveil/impersonate/weaponize/...). |
auditLedger | SLMoralLedger auditLedger() | No description in source. |
capacitor | SLMoralCapacitor capacitor() | No description in source. |
op | SLMoralOperation op(String actor, String action, String target, String scope, | No description in source. |
decide | SLMoralVerdict decide(SLMoralOperation o, SLMoralPolicy p) | No description in source. |
SLMoralCapacitor #sleela 2.5 (lib/moral-capacitor/SLMoralCapacitor.sleela)
SLMoralCapacitor class
Defines SLMoralCapacitor(TM) — the ethical gate every /lib library can place in front of a consequential operation. Like an electrical capacitor it accumulates charge and only discharges when enough has built up; here the charge is moral justification contributed by ethical frameworks (deontology, utilitarianism, virtue, beneficence, consent) and the discharge is permission to proceed. An operation runs only when stored charge reaches the policy threshold AND no absolute red line (SLMoralVeto) is tripped. Lifecycle: configure() -> appraise(operation) charges from the frameworks and arms vetoes -> evaluate(threshold) returns an SLMoralVerdict (PERMIT / DEFER / DENY) -> discharge() resets the stored charge so the capacitor is reusable. Family: moral-capacitor. Composes SLMoralCharge, SLMoralVeto, SLMoralFramework, SLMoralPolicy; returns SLMoralVerdict.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
storedCharge | SLMoralCharge storedCharge | No description in source. |
vetoes | SLMoralVeto vetoes | No description in source. |
activePolicy | SLMoralPolicy activePolicy | No description in source. |
lastOp | SLMoralOperation lastOp | No description in source. |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
setPolicy | void setPolicy(SLMoralPolicy policy) | No description in source. |
policy | SLMoralPolicy policy() | No description in source. |
charge | void charge(int frameworkOrdinal, int delta) | ---- Manual charging (a library may charge explicitly) ------------------ Add a framework's signed moral contribution. |
arm | void arm(int redline, String reason) | Arm a red line with a reason. |
appraise | void appraise(SLMoralOperation op) | ---- Automatic appraisal (frameworks score the operation) --------------- Charge the capacitor from each framework's reading of the operation, and arm any red line the operation plainly crosses. This is the default, honest appraisal; a library may follow it with additional charge/arm calls. |
screenRedLines | void screenRedLines(SLMoralOperation op) | Conservative red-line screen over the operation's action/target words. |
evaluate | SLMoralVerdict evaluate(int threshold) | ---- The decision ------------------------------------------------------- Evaluate the stored charge against a threshold and the armed vetoes. |
decide | SLMoralVerdict decide() | Evaluate against the active policy's threshold. |
gate | SLMoralVerdict gate(SLMoralOperation op) | One-call gate: appraise an operation under the active policy and decide. |
discharge | void discharge() | Reset stored charge and vetoes so the capacitor can judge the next op. |
chargeLevel | int chargeLevel() | ---- Introspection ------------------------------------------------------ |
charge | SLMoralCharge charge() | No description in source. |
vetoSet | SLMoralVeto vetoSet() | No description in source. |
firstTrippedName | String firstTrippedName() | No description in source. |
frameworkName | String frameworkName(int ordinal) | No description in source. |
SLMoralCertificate #sleela 2.5 (lib/moral-capacitor/SLMoralCertificate.sleela)
SLMoralCertificate class
Defines SLMoralCertificate — the Certificate of Morals(TM): a signed attestation that a SLeeLa software product embeds the Moral Capacitor(TM) and operates under a named moral policy with the absolute red-line veto set armed, carrying the SLMoralWarranty. The certificate names the subject product, the issuer, the moral policy name and discharge threshold, the number of armed red lines, an issue serial, a validity span, and a cryptographic seal (digest/signature) over its canonical body so a Guard can verify it was issued by the authority and not altered. The certificate is the product-facing warranty: it travels WITH the software and is what SLMoralCodeGuard checks before a product is allowed to run or ship. The seal here is an abstract value filled by SLMoralCertificateAuthority (optionally hardened with lib/crypto SLDigest/SLSignature in production). Family: moral-capacitor. Carries SLMoralWarranty; issued by SLMoralCertificateAuthority; verified by SLMoralCodeGuard.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
SCHEMA_VERSION | static final int SCHEMA_VERSION = 1 | No description in source. |
subject | String subject | the product / software unit certified |
issuer | String issuer | the authority that issued the certificate |
policyName | String policyName | the moral policy in force |
threshold | int threshold | the policy's discharge threshold |
armedRedlines | int armedRedlines | how many absolute red lines are armed |
capacitorPresent | int capacitorPresent | 1 if a live Moral Capacitor is embedded |
warranty | SLMoralWarranty warranty | No description in source. |
serial | String serial | issue serial |
issuedAt | String issuedAt | issue timestamp (as a String; set by the authority) |
expiresAt | String expiresAt | expiry timestamp (empty = non-expiring) |
seal | String seal | cryptographic seal over the canonical body |
sealed | int sealed | 1 once a seal has been applied |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String certifiedProduct, String issuingAuthority) | No description in source. |
attest | void attest(String policy, int dischargeThreshold, int redlineCount, boolean capacitorEmbedded) | Record the moral posture the certificate attests to. |
setValidity | void setValidity(String issued, String expires) | No description in source. |
setSerial | void setSerial(String s) | No description in source. |
applySeal | void applySeal(String sealValue) | Apply the authority's seal over the canonical body. |
warrantyOf | SLMoralWarranty warrantyOf() | No description in source. |
subjectProduct | String subjectProduct() | No description in source. |
issuerName | String issuerName() | No description in source. |
policy | String policy() | No description in source. |
dischargeThreshold | int dischargeThreshold() | No description in source. |
redlinesArmed | int redlinesArmed() | No description in source. |
embedsCapacitor | boolean embedsCapacitor() | No description in source. |
certificateSerial | String certificateSerial() | No description in source. |
issued | String issued() | No description in source. |
expires | String expires() | No description in source. |
sealValue | String sealValue() | No description in source. |
isSealed | boolean isSealed() | No description in source. |
canonicalBody | String canonicalBody() | The canonical body the seal is computed over. Stable field order so a Guard can recompute and compare the seal. |
isWellFormed | boolean isWellFormed() | A certificate is well-formed when it attests an embedded capacitor under a named policy with at least one red line armed, and carries a seal. |
render | String render() | The full presentable certificate (body + seal). |
intToStr | String intToStr(int v) | No description in source. |
SLMoralCertificateAuthority #sleela 2.5 (lib/moral-capacitor/SLMoralCertificateAuthority.sleela)
SLMoralCertificateAuthority class
Defines SLMoralCertificateAuthority — the issuer of a Certificate of Morals(TM). Given a product name and a live Moral Capacitor (its policy and armed red-line set), the authority mints an SLMoralCertificate: it records the moral posture, assigns a serial and validity span, computes a deterministic seal over the certificate's canonical body, and applies it. The same authority re-verifies a certificate by recomputing the seal, so a Guard can trust that a certificate was issued here and not altered. The seal is a deterministic fold over the canonical body keyed on the authority's name — a self-contained, reproducible integrity tag. In production it is hardened by signing the body with lib/crypto SLDigest + SLSignature under the authority's key; this class keeps the issue/verify contract stable regardless of which seal backend is linked. Family: moral-capacitor. Issues/verifies SLMoralCertificate; reads SLMoralCapacitor + SLMoralPolicy.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
authority | String authority | the issuing party name |
key | String key | the authority's seal key (keeps the fold authority-specific) |
issuedCount | int issuedCount | No description in source. |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name, String sealKey) | No description in source. |
issue | SLMoralCertificate issue(String product, SLMoralCapacitor cap, int redlinesArmed, | Issue a Certificate of Morals for a product, reading the posture from a live capacitor. redlinesArmed is the number of absolute red lines the product keeps armed (SLMoralVeto.REDLINE_COUNT for the full set). |
verify | boolean verify(SLMoralCertificate cert) | Re-verify a certificate: recompute the seal over its canonical body and compare. Returns true when the seal matches (the certificate is authentic and unaltered) and the certificate names this authority. |
computeSeal | String computeSeal(String body) | Deterministic seal over the body, keyed on the authority name. A rolling polynomial fold over per-character weights; stable and reproducible without relying on a Unicode codepoint intrinsic (the fold only needs determinism). |
foldKey | int foldKey(String s) | No description in source. |
issuedTotal | int issuedTotal() | No description in source. |
authorityName | String authorityName() | No description in source. |
strLen | int strLen(String s) | ---- Text helpers ------------------------------------------------------- |
charAt | String charAt(String s, int i) | No description in source. |
charWeight | int charWeight(String c) | A stable per-character weight for the fold (same portable technique as lib/citizen/FederalReserveID.charWeight): digits use their value, common punctuation and letters map to small distinct constants. The fold needs determinism, not a full character map. |
digitValue | int digitValue(String c) | No description in source. |
intToStr | String intToStr(int v) | No description in source. |
SLMoralCertified #sleela 2.5 (lib/moral-capacitor/SLMoralCertified.sleela)
SLMoralCertified class
Defines SLMoralCertified — the one-object convention a SLeeLa product embeds to become morally certified. It bundles the three things a certified product needs: a live Moral Capacitor(TM) (the operation-boundary gate), a Certificate of Morals(TM) issued over that capacitor (the product- boundary warranty), and the Guard that admits the product only when both are present and valid. A product configures one SLMoralCertified at startup, gates its operations through capacitor(), and lets ship()/boot() paths call admit() to prove the moral code is included before running. This is how the project strives to include Morals and Certificates in ALL its SLeeLa software: embedding one SLMoralCertified makes a product both gated and certified, in a single, uniform step. Family: moral-capacitor. Composes SLMoralCapacitor, SLMoralCertificate, SLMoralCertificateAuthority, SLMoralCodeGuard.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
product | String product | No description in source. |
cap | SLMoralCapacitor cap | No description in source. |
cert | SLMoralCertificate cert | No description in source. |
authority | SLMoralCertificateAuthority authority | No description in source. |
guard | SLMoralCodeGuard guard | No description in source. |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String productName, SLMoralPolicy policy, int redlinesArmed, | Certify a product: embed a capacitor under the given policy, issue a Certificate of Morals from the authority over it, and arm the guard. redlinesArmed is the number of absolute red lines kept armed (use SLMoralVeto.REDLINE_COUNT for the full set). |
capacitor | SLMoralCapacitor capacitor() | The operation-boundary gate a product uses to judge operations. |
certificate | SLMoralCertificate certificate() | The product-boundary warranty the product ships with. |
admit | boolean admit(String nowStamp) | Prove, at a product boundary (ship / boot / run), that the moral code is included and certified as of `nowStamp`. Returns true to admit. |
admitReason | String admitReason() | The reason behind the last admit() decision (for logs / refusal messages). |
productName | String productName() | No description in source. |
codeGuard | SLMoralCodeGuard codeGuard() | No description in source. |
issuingAuthority | SLMoralCertificateAuthority issuingAuthority() | No description in source. |
isCertified | boolean isCertified() | No description in source. |
SLMoralCharge #sleela 2.5 (lib/moral-capacitor/SLMoralCharge.sleela)
SLMoralCharge class
Defines SLMoralCharge — the stored moral charge of a Moral Capacitor(TM). Charge is the signed sum of per-framework contributions: each ethical framework that endorses the operation adds charge, each that objects subtracts it. Charge is bounded by a maximum (a capacitor has finite capacity) and floored at zero on the discharge decision (negative net charge is simply "no moral basis"). The charge keeps per-framework attribution so a verdict can report which lens contributed what. Family: moral-capacitor. Held by SLMoralCapacitor.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
total | int total | net stored charge (may be negative before flooring) |
maxCharge | int maxCharge | capacity ceiling |
contributions | int contributions | number of frameworks that contributed |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int capacity) | No description in source. |
add | void add(int frameworkOrdinal, int delta) | Add a framework's signed contribution (bounded to the capacity ceiling). |
reset | void reset() | Reset to empty (the capacitor discharges after a decision). |
level | int level() | Net charge, floored at zero for the discharge comparison. |
rawTotal | int rawTotal() | No description in source. |
capacity | int capacity() | No description in source. |
contributors | int contributors() | No description in source. |
dominantFramework | int dominantFramework() | The framework ordinal that contributed the most positive charge (0 if none). |
SLMoralCodeGuard #sleela 2.5 (lib/moral-capacitor/SLMoralCodeGuard.sleela)
SLMoralCodeGuard class
Defines SLMoralCodeGuard — the Guard of the Moral Code: the enforcement that a SLeeLa software product actually INCLUDES the moral code it claims. Before a product is permitted to run or ship, the guard checks that it (1) embeds a live Moral Capacitor(TM), (2) presents a Certificate of Morals(TM) that is well-formed, (3) was sealed by a trusted authority and verifies against it, (4) is within its validity span, and (5) attests a posture consistent with the embedded capacitor (same policy threshold, red lines armed). A product that fails any check is refused — the moral code is mandatory, not optional. This is how the project strives to include Morals and Certificates in all its SLeeLa software: the guard is the gate at the product boundary, the counterpart to SLMoralCapacitor at the operation boundary. Family: moral-capacitor. Verifies SLMoralCertificate via SLMoralCertificateAuthority; inspects SLMoralCapacitor.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
ADMIT | static final int ADMIT = 1 | Guard outcome ordinals. the product includes the moral code: admit |
REFUSE | static final int REFUSE = 2 | missing/invalid moral code: refuse |
trustedAuthority | SLMoralCertificateAuthority trustedAuthority | No description in source. |
lastReason | String lastReason | No description in source. |
outcome | int outcome | No description in source. |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLMoralCertificateAuthority authority) | No description in source. |
guard | int guard(String product, SLMoralCapacitor cap, SLMoralCertificate cert, String nowStamp) | Guard a product: it must embed a live capacitor and present a valid Certificate of Morals that verifies against the trusted authority, is unexpired at `nowStamp`, and attests a posture matching the capacitor. Returns ADMIT or REFUSE; lastReason explains a refusal. |
withinValidity | boolean withinValidity(SLMoralCertificate cert, String nowStamp) | Validity check: a certificate with an empty expiry is non-expiring. A non-empty expiry must be lexicographically >= now for ISO-8601 stamps. |
refuse | int refuse(String why) | No description in source. |
admit | int admit() | No description in source. |
admitted | boolean admitted() | No description in source. |
refused | boolean refused() | No description in source. |
reason | String reason() | No description in source. |
lastOutcome | int lastOutcome() | No description in source. |
permits | boolean permits(String product, SLMoralCapacitor cap, SLMoralCertificate cert, String nowStamp) | A boolean form for a call site that just needs permit/deny. |
outcomeName | String outcomeName() | No description in source. |
SLMoralFramework #sleela 2.5 (lib/moral-capacitor/SLMoralFramework.sleela)
SLMoralFramework class
Defines SLMoralFramework — the catalogue of ethical lenses the Moral Capacitor(TM) charges from. Each framework is a named way of judging an operation's rightness, drawn from the coorenagraph moral vocabulary: deontology (duties/rules), consequentialism/utilitarianism (outcomes), virtue ethics (character), beneficence (do good / avoid harm), and consent/autonomy (respect the affected party's will). A framework contributes a small signed charge to the capacitor: positive when it endorses the operation, negative when it objects. This is the vocabulary bridge: the frameworks name the same ethics the coorenagraph package defines (Deontology, Utilitarianism, VirtueEthics, Beneficence), made evaluable as capacitor charge. Family: moral-capacitor. Bridges coorenagraph; charges SLMoralCapacitor.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
DEONTOLOGY | static final int DEONTOLOGY = 1 | Framework ordinals. duties / rules |
UTILITARIANISM | static final int UTILITARIANISM = 2 | outcomes / greatest good |
VIRTUE_ETHICS | static final int VIRTUE_ETHICS = 3 | character / what a good agent does |
BENEFICENCE | static final int BENEFICENCE = 4 | do good, avoid harm |
CONSENT | static final int CONSENT = 5 | respect autonomy / consent |
FRAMEWORK_COUNT | static final int FRAMEWORK_COUNT = 5 | No description in source. |
framework | int framework | one of the ordinals |
label | String label | No description in source. |
weight | int weight | how much this framework's charge counts (1..4) |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int fw) | No description in source. |
configureByName | void configureByName(String name) | Configure by name ("deontology", "utilitarianism", ...). |
setWeight | void setWeight(int w) | No description in source. |
ordinal | int ordinal() | No description in source. |
name | String name() | No description in source. |
frameworkWeight | int frameworkWeight() | No description in source. |
coorenagraphTerm | String coorenagraphTerm() | The coorenagraph vocabulary class name this framework corresponds to, so a caller can cross-reference the moral definition. |
SLMoralLedger #sleela 2.5 (lib/moral-capacitor/SLMoralLedger.sleela)
SLMoralLedger class
Defines SLMoralLedger — an append-only audit record of the verdicts a Moral Capacitor(TM) has returned. Each entry names the operation judged, the decision (PERMIT / DEFER / DENY), the charge versus threshold, and the reason, so a library can prove after the fact what was asked and how it was decided. The ledger keeps running counts of each decision for a quick posture summary. The record is a newline-separated String (the same bounded, enumerable form the rest of the library favours); a caller can print it or persist it. Family: moral-capacitor. Written by SLMoralCapacitor / the adapters.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
entries | String entries | newline-separated verdict summaries |
total | int total | No description in source. |
permits | int permits | No description in source. |
defers | int defers | No description in source. |
denials | int denials | No description in source. |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
record | void record(SLMoralOperation op, SLMoralVerdict v) | Append a verdict for an operation. |
log | String log() | No description in source. |
recordCount | int recordCount() | No description in source. |
permitCount | int permitCount() | No description in source. |
deferCount | int deferCount() | No description in source. |
denyCount | int denyCount() | No description in source. |
summary | String summary() | No description in source. |
intToStr | String intToStr(int v) | No description in source. |
SLMoralOperation #sleela 2.5 (lib/moral-capacitor/SLMoralOperation.sleela)
SLMoralOperation class
Defines SLMoralOperation — the thing the Moral Capacitor(TM) judges. An operation is described by who performs it (actor, e.g. "vm" / "os" / "machine"), the action verb (e.g. "allocate", "erase", "spawn", "boot"), the target it affects (e.g. "guest-memory", "/dev/sda"), the scope (e.g. "process", "disk", "host"), whether it is reversible, and whether the affected party has consented. These fields are what the frameworks appraise and what the veto set tests. Keeping the operation an explicit object (rather than loose arguments) means a verdict and a ledger entry can name exactly what was judged. Family: moral-capacitor. Evaluated by SLMoralCapacitor.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
actor | String actor | "vm" / "os" / "machine" / library name |
action | String action | verb: "allocate" / "erase" / "spawn" / "boot" / ... |
target | String target | what it affects |
scope | String scope | "process" / "disk" / "host" / "network" / ... |
reversible | int reversible | 1 if the effect can be undone |
consented | int consented | 1 if the affected party has consented |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String who, String what, String onWhat, String howWide) | No description in source. |
setReversible | void setReversible(boolean yes) | No description in source. |
setConsented | void setConsented(boolean yes) | No description in source. |
actorName | String actorName() | No description in source. |
actionVerb | String actionVerb() | No description in source. |
targetName | String targetName() | No description in source. |
scopeName | String scopeName() | No description in source. |
isReversible | boolean isReversible() | No description in source. |
hasConsent | boolean hasConsent() | No description in source. |
identity | String identity() | A short identity line for verdicts and the ledger. |
SLMoralPolicy #sleela 2.5 (lib/moral-capacitor/SLMoralPolicy.sleela)
SLMoralPolicy class
Defines SLMoralPolicy — a named moral stance a library applies consistently through the Moral Capacitor(TM). A policy bundles the discharge threshold (how much moral charge an operation needs to proceed) with the set of red lines that are armed for the surface, plus whether a DEFER is allowed or a partial charge should fail closed to DENY. The adapters ship ready policies: a lenient VM default, a strict OS-destructive policy, and a Machine-power policy. Making the stance a first-class object means a surface's ethical posture is declared once and reused, rather than re-expressed at every call site. Family: moral-capacitor. Consumed by SLMoralCapacitor and the adapters.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
label | String label | No description in source. |
dischargeThreshold | int dischargeThreshold | minimum charge to PERMIT |
allowDefer | int allowDefer | 1: partial charge -> DEFER; 0: fail closed to DENY |
requireConsent | int requireConsent | 1: a non-consented irreversible op auto-trips a veto |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name, int threshold) | No description in source. |
vmDefault | void vmDefault() | ---- Ready-made stances for the priority surfaces ---------------------- Routine VM work: a modest threshold, DEFER allowed. |
vmBridge | void vmBridge() | VM native/OS-bridge or process spawn: higher bar. |
osRoutine | void osRoutine() | OS routine (read env, cwd): low bar. |
osDestructive | void osDestructive() | OS destructive (remove/format/install to disk): high bar, consent required, fail closed (no DEFER — an unsure destructive op is denied). |
machinePower | void machinePower() | Machine power-on / boot a guest: high bar. |
setThreshold | void setThreshold(int t) | No description in source. |
setAllowDefer | void setAllowDefer(boolean on) | No description in source. |
setRequireConsent | void setRequireConsent(boolean on) | No description in source. |
name | String name() | No description in source. |
threshold | int threshold() | No description in source. |
defersAllowed | boolean defersAllowed() | No description in source. |
consentRequired | boolean consentRequired() | No description in source. |
SLMoralVerdict #sleela 2.5 (lib/moral-capacitor/SLMoralVerdict.sleela)
SLMoralVerdict class
Defines SLMoralVerdict — the decision a Moral Capacitor(TM) returns for an operation. A verdict is PERMIT (charge met the threshold and no veto tripped), DEFER (partial charge: hold and request more justification or consent), or DENY (no charge, or a veto tripped). The verdict carries the stored charge, the threshold it was compared against, the deciding framework or red line, and a human-readable reason, so a caller can log exactly why an operation was allowed, held, or refused. Family: moral-capacitor. Returned by SLMoralCapacitor.evaluate.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
PERMIT | static final int PERMIT = 1 | Decision ordinals. |
DEFER | static final int DEFER = 2 | No description in source. |
DENY | static final int DENY = 3 | No description in source. |
decision | int decision | PERMIT / DEFER / DENY |
charge | int charge | stored moral charge at decision time |
threshold | int threshold | the threshold compared against |
basis | String basis | deciding framework or tripped red line |
reason | String reason | human-readable explanation |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int d, int chargeLevel, int thresh, String decidingBasis, String why) | No description in source. |
permitted | boolean permitted() | No description in source. |
deferred | boolean deferred() | No description in source. |
denied | boolean denied() | No description in source. |
decisionCode | int decisionCode() | No description in source. |
chargeLevel | int chargeLevel() | No description in source. |
thresholdLevel | int thresholdLevel() | No description in source. |
decidingBasis | String decidingBasis() | No description in source. |
explanation | String explanation() | No description in source. |
decisionName | String decisionName() | No description in source. |
summary | String summary() | A one-line summary for logs/ledger. |
intToStr | String intToStr(int v) | No description in source. |
SLMoralVeto #sleela 2.5 (lib/moral-capacitor/SLMoralVeto.sleela)
SLMoralVeto class
Defines SLMoralVeto — the catalogue of absolute moral red lines the Moral Capacitor(TM) honours. A veto is a hard boundary that, when tripped for an operation, denies it regardless of how much moral charge the capacitor has stored: a capacitor cannot discharge through an open circuit. The red lines mirror the platform's content-safety boundaries — child safety, weapons/CBRN enablement, non-consensual surveillance, deception/impersonation, scaled abuse, and irreversible destruction without consent. An SLMoralVeto instance tracks which red lines are armed and which are tripped for the operation under evaluation; the capacitor asks it whether any tripped line forbids discharge. Family: moral-capacitor. Consulted by SLMoralCapacitor.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
CHILD_SAFETY | static final int CHILD_SAFETY = 1 | Red-line ordinals. |
WEAPONS_CBRN | static final int WEAPONS_CBRN = 2 | No description in source. |
NONCONSENSUAL_SURVEILLANCE | static final int NONCONSENSUAL_SURVEILLANCE = 3 | No description in source. |
DECEPTION | static final int DECEPTION = 4 | impersonation / spoofing / fraud |
SCALED_ABUSE | static final int SCALED_ABUSE = 5 | spam / manipulation / coordinated harm |
IRREVERSIBLE_HARM | static final int IRREVERSIBLE_HARM = 6 | destruction without consent |
REDLINE_COUNT | static final int REDLINE_COUNT = 6 | No description in source. |
firstReason | String firstReason | No description in source. |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
trip | void trip(int redline, String reason) | Trip a red line with a reason. The first tripped line's reason is retained. |
isTripped | boolean isTripped(int redline) | No description in source. |
anyTripped | boolean anyTripped() | Any red line tripped forbids discharge. |
trippedCount | int trippedCount() | No description in source. |
reason | String reason() | No description in source. |
redlineName | String redlineName(int redline) | No description in source. |
SLMoralWarranty #sleela 2.5 (lib/moral-capacitor/SLMoralWarranty.sleela)
SLMoralWarranty class
Defines SLMoralWarranty — the warranty terms a Certificate of Morals carries. The warranty is the promise that a piece of SLeeLa software embeds the Moral Capacitor(TM), gates its consequential operations through it, honours the absolute red-line veto set, and records its verdicts for audit. It names the warrantor (the issuing party), the covered product, the warranty statement, and the limits of the warranty (it is a conduct guarantee about the embedded gate, not a claim of objective morality or of fitness for any particular purpose). The warranty is deliberately explicit and bounded: it warrants that the moral gate is PRESENT and ENFORCED, which is a checkable property, rather than warranting an outcome the gate cannot guarantee. Family: moral-capacitor. Carried by SLMoralCertificate.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
warrantor | String warrantor | the issuing party (e.g. "MEARVK LLC") |
product | String product | the covered product / software unit |
statement | String statement | the human-readable warranty |
limits | String limits | the explicit limits of the warranty |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String issuer, String coveredProduct) | No description in source. |
setStatement | void setStatement(String s) | No description in source. |
setLimits | void setLimits(String l) | No description in source. |
defaultStatement | String defaultStatement(String coveredProduct) | The standard warranty: the moral gate is present and enforced. |
defaultLimits | String defaultLimits() | The standard limits: a conduct guarantee, not an oracle or fitness claim. |
warrantorName | String warrantorName() | No description in source. |
coveredProduct | String coveredProduct() | No description in source. |
warrantyStatement | String warrantyStatement() | No description in source. |
warrantyLimits | String warrantyLimits() | No description in source. |
text | String text() | The full warranty text (statement + limits) for embedding in a certificate. |
SLOSMoralGate #sleela 2.5 (lib/moral-capacitor/SLOSMoralGate.sleela)
SLOSMoralGate class
Defines SLOSMoralGate — the Moral Capacitor(TM) adapter for the OS surface (SLOperatingSystem, the OS Creator(TM) provider, and the installers). It wraps an SLMoralCapacitor with OS-appropriate policies and exposes intention-named checks the OS consults before a consequential step: running a shell command, deleting or formatting a filesystem path, installing to a disk, and writing an OS development tree. Destructive operations use a strict, consent-requiring, fail-closed policy. The gate makes the OS's most dangerous actions — the ones that erase data or execute arbitrary commands — require an explicit, auditable moral discharge before they run. Family: moral-capacitor. OS adapter over SLMoralCapacitor.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
cap | SLMoralCapacitor cap | No description in source. |
ledger | SLMoralLedger ledger | No description in source. |
certificate | SLMoralCertificate certificate | the OS product's Certificate of Morals |
codeGuard | SLMoralCodeGuard codeGuard | admits the OS only when certified |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
certify | void certify(SLMoralCertificateAuthority authority, int redlinesArmed, | Certify this OS: issue a Certificate of Morals over the gate's capacitor and arm a code guard against it, so the OS is a morally certified product. |
admit | boolean admit(String nowStamp) | Prove at the OS product boundary (ship/boot/install) that the moral code is present and certified as of nowStamp. |
moralCertificate | SLMoralCertificate moralCertificate() | No description in source. |
permitQuery | SLMoralVerdict permitQuery(String what) | Reading identity/env/cwd is routine and reversible. |
permitRun | SLMoralVerdict permitRun(String command, boolean consented) | Running a shell command reaches the host: a higher bar, consent assumed from the caller but screened for red lines. |
permitErase | SLMoralVerdict permitErase(String path, boolean consented) | Deleting a path is irreversible: strict policy, consent required. |
permitInstallToDisk | SLMoralVerdict permitInstallToDisk(String device, boolean consented) | Formatting / installing to a disk is the most destructive OS action. |
permitWriteDevTree | SLMoralVerdict permitWriteDevTree(String root) | OS Creator(TM) writing a development tree is reversible (an output dir). |
auditLedger | SLMoralLedger auditLedger() | No description in source. |
capacitor | SLMoralCapacitor capacitor() | No description in source. |
op | SLMoralOperation op(String actor, String action, String target, String scope, | No description in source. |
decide | SLMoralVerdict decide(SLMoralOperation o, SLMoralPolicy p) | No description in source. |
SLPackage #sleela 2.5 (lib/moral-capacitor/SLPackage.sleela)
SLPackage class
Defines the SLeeLa standard-library package for moral-capacitor.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
packageName | String packageName | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name) | No description in source. |
name | String name() | No description in source. |
available | boolean available() | No description in source. |
SLVMMoralGuard #sleela 2.5 (lib/moral-capacitor/SLVMMoralGuard.sleela)
SLVMMoralGuard class
Defines SLVMMoralGuard — the Moral Capacitor(TM) adapter for the VM. It wraps an SLMoralCapacitor with VM-appropriate policies and exposes intention-named checks a VM consults before a consequential step: growing memory, spawning a thread or process, crossing the native/OS bridge, and running a program on the opcode substrate. Each check builds the matching SLMoralOperation, gates it through the capacitor, records the verdict in a ledger, and returns the SLMoralVerdict so the VM can proceed, defer, or refuse. This is the first and foremost placement of the capacitor: the VM is where programs actually run, so it is where moral charge must discharge before an effect is produced. Family: moral-capacitor. VM adapter over SLMoralCapacitor.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
cap | SLMoralCapacitor cap | No description in source. |
ledger | SLMoralLedger ledger | No description in source. |
certificate | SLMoralCertificate certificate | the VM product's Certificate of Morals |
codeGuard | SLMoralCodeGuard codeGuard | admits the VM only when certified |
configured | int configured | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
certify | void certify(SLMoralCertificateAuthority authority, int redlinesArmed, | Certify this VM: issue a Certificate of Morals over the guard's capacitor from the given authority, and arm a code guard against it. After this, the VM is a morally certified product and admit() can prove it before running. |
admit | boolean admit(String nowStamp) | Prove at the VM product boundary that the moral code is present and certified as of nowStamp. Returns true to admit the VM to run. |
moralCertificate | SLMoralCertificate moralCertificate() | No description in source. |
permitMemoryGrowth | SLMoralVerdict permitMemoryGrowth(String region, boolean reversible) | Routine VM op (reversible, in-process). Low bar. |
permitSpawn | SLMoralVerdict permitSpawn(String what) | Spawning a thread/process is higher-consequence than in-process work. |
permitBridgeCall | SLMoralVerdict permitBridgeCall(String target, boolean reversible, boolean consented) | Crossing the native/OS bridge reaches outside the VM: the higher bar. |
permitRun | SLMoralVerdict permitRun(String program) | Running a compiled program on the substrate. |
auditLedger | SLMoralLedger auditLedger() | No description in source. |
capacitor | SLMoralCapacitor capacitor() | No description in source. |
op | SLMoralOperation op(String actor, String action, String target, String scope, | ---- Internals ---------------------------------------------------------- |
decide | SLMoralVerdict decide(SLMoralOperation o, SLMoralPolicy p) | No description in source. |