RealAcquaintances.sleela
lib/telephony-skya/RealAcquaintances.sleela · 111 line(s) · sleela
<< lib/telephony-skya/RealAcquaintances.sleela
SLeeLa Standard Library Definition.
Definition: Defines RealAcquaintances, the Skya trust-roster Master Class —
the people a node has actually met and confirmed.
RealAcquaintances is an emblematic Skya module and a NATURAL / LOADABLE
MODULE sharing the common module contract (load / loaded / moduleName /
describe). It is the counterpart to Socio: Socio models the social fabric in
the abstract; RealAcquaintances records concrete, confirmed acquaintances a
node will preferentially reach and admit. An acquaintance becomes "real" only
after a confirmed two-way exchange, so the roster never contains unverified
entries. It holds roster state only; the confirming exchange is performed by
the Communication module. The runnable orchestration example lives in
telephony-skya/sleela/RealAcquaintances.sleela.
Family: telephony-skya. Native VM/OS work crosses an explicit bridge. >>
#sleela 2.5
material;
< Unified SLeeLa SDK front-end object. >
class RealAcquaintances {
< ---- Descriptive metadata (version 1.11 nested-friendly accessors) ---- >
<< Eleven catalogued attributes with getter/setter pairs, so a GUI, loader,
or catalog can read and (where appropriate) override this record.
Values are faithful to the subject's real origin where publicly known. >>
String metaVersion = "1.0.0";
int metaId = 10344;
String metaAuthor = "Kiro Agent";
String metaDate = "2026-10-16";
String metaCopyright = "SLeeLa project";
String metaTrademark = "none";
String metaCorporation = "none";
< metaOrigin: National | <nation> | International | Galactic >
String metaOrigin = "International";
String metaBirthDate = "2026-10-07";
< metaScienceRating: maturity/robustness on a 1..10 scale >
int metaScienceRating = 9;
< metaNationalSchedule: a real, citable instrument or "none" >
String metaNationalSchedule = "none";
String getMetaVersion() { return metaVersion; }
void setMetaVersion(String v) { metaVersion = v; }
int getMetaId() { return metaId; }
void setMetaId(int v) { metaId = v; }
String getAuthor() { return metaAuthor; }
void setAuthor(String v) { metaAuthor = v; }
String getDate() { return metaDate; }
void setDate(String v) { metaDate = v; }
String getCopyright() { return metaCopyright; }
void setCopyright(String v) { metaCopyright = v; }
String getTrademark() { return metaTrademark; }
void setTrademark(String v) { metaTrademark = v; }
String getCorporation() { return metaCorporation; }
void setCorporation(String v) { metaCorporation = v; }
String getOrigin() { return metaOrigin; }
void setOrigin(String v) { metaOrigin = v; }
String getBirthDate() { return metaBirthDate; }
void setBirthDate(String v) { metaBirthDate = v; }
int getScienceRating() { return metaScienceRating; }
void setScienceRating(int v) { metaScienceRating = v; }
String getNationalSchedule() { return metaNationalSchedule; }
void setNationalSchedule(String v) { metaNationalSchedule = v; }
static final String MODULE = "RealAcquaintances";
static final int MAX = 256;
int loadedFlag;
String[] names;
int count;
int pending;
void load() {
loadedFlag = 1;
names = new String[MAX];
count = 0;
pending = 0;
}
boolean loaded() { return loadedFlag == 1; }
String moduleName() { return MODULE; }
void introduce() { pending = pending + 1; }
boolean confirm(String name) {
if (name == null || count >= MAX) { return false; }
if (knows(name)) { return false; }
names[count] = name;
count = count + 1;
if (pending > 0) { pending = pending - 1; }
return true;
}
boolean knows(String name) {
if (name == null) { return false; }
int i = 0;
while (i < count) {
if (names[i] == name) { return true; }
i = i + 1;
}
return false;
}
boolean trusts(String name) { return knows(name); }
int acquaintanceCount() { return count; }
int pendingCount() { return pending; }
String describe() {
return MODULE + " real=" + count + " pending=" + pending
+ " capacity=" + MAX;
}
}