Skip to content

Commit 9c1a9e1

Browse files
authored
Merge pull request #70 from AdaWorldAPI/claude/v3-substrate-migration-review-o0yoxv
OSINT: canonical 0x0700 ClassView card + FieldMask ViewFilter + Epstein-broker power
2 parents bf5e9e0 + dd1595f commit 9c1a9e1

5 files changed

Lines changed: 438 additions & 17 deletions

File tree

cockpit/src/OsintGraph.tsx

Lines changed: 104 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,32 @@ const AX = {
7777
militaryUse: 0, civicUse: 1, airoRole: 2, mlTask: 3, purpose: 4,
7878
capacity: 5, currentStatus: 6, type: 7, output: 8, impact: 9, stakeholder: 10,
7979
};
80-
// McClelland motive — and its adjacency to Freud's developmental gradient.
81-
// demand (need) and intent are INHERENT in the motive: the motive is the source
82-
// of both reasoning axes. The POWER motive (nPow) isn't flat — it's a 4-level
83-
// control-directionality scale (Freud's psychosexual stages), and it sits
84-
// ADJACENT to airo:type: the actor role IS the power level.
85-
// P1 Oral "consume from others to myself" → extraction (the consumed = AISubject)
86-
// P2 Anal "control myself" → self-control (internal systems)
87-
// P3 Phallic "control OTHERS" → AIDeployer/AIOperator (fields the tool)
88-
// P4 Genital "empower OTHERS to control others"→ AIDeveloper/AIProvider/AISupplier (builds it)
80+
// McClelland's nPow motive — with the 4-level developmental POWER gradient
81+
// (Freud's psychosexual stages; taught in Falko Rheinberg's Potsdam motivation
82+
// lectures). demand (need) and intent are INHERENT in the motive. The gradient
83+
// is a control-directionality ladder, ADJACENT to airo:type — the actor role IS
84+
// the power level. ALL FOUR levels are reachable:
85+
// P1 Oral "I consume from others to myself" → AISubject (the consumed end)
86+
// P2 Anal "I control myself" → AIOperator (controls the operation itself)
87+
// P3 Phallic "I control others" → AIDeployer (fields the tool AT others)
88+
// P4 Genital "I empower others/stakeholders to control" → AIDeveloper/AIProvider/AISupplier (builds/supplies it)
8989
// airo:type bits: 0=Subject(1) 1=Deployer(2) 2=Developer(4) 3=Provider(8)
9090
// 4=Operator(16) 5=Supplier(32).
9191
const MOTIVE = ['nPow', 'nAch', 'nAff'];
92-
const POWER_LEVEL = ['—', 'P1·oral·consume', 'P2·anal·self', 'P3·phallic·control-others', 'P4·genital·empower'];
93-
// Power level (0..4) read straight from the airo:type bitset — the adjacency.
92+
const POWER_LEVEL = [
93+
'—',
94+
'P1·oral·consume from others',
95+
'P2·anal·control myself',
96+
'P3·phallic·control others',
97+
'P4·genital·empower others to control',
98+
];
99+
// Power level (0..4) from the airo:type bitset — the adjacency, all four levels.
94100
// The boomerang (Deployer ∧ Subject) is P3 that has become P1's object.
95101
const powerOfAiro = (bits: number): number => {
96-
if (bits & (4 | 8 | 32)) return 4; // Developer | Provider | Supplier — empower others
97-
if (bits & (2 | 16)) return 3; // Deployer | Operator — control others
98-
if (bits & 1) return 1; // Subject — the consumed
102+
if (bits & (4 | 8 | 32)) return 4; // Developer | Provider | Supplier — empower others to control
103+
if (bits & 2) return 3; // Deployer — control others (fields the tool at them)
104+
if (bits & 16) return 2; // Operator — control the operation itself (self-control)
105+
if (bits & 1) return 1; // Subject — consumed from
99106
return 0;
100107
};
101108
// nAch / nAff still come from the intent/use LABELS (keyword heuristic); nPow is
@@ -921,14 +928,22 @@ export function OsintGraph() {
921928
// builds to prove the harm the companies deny. The PERSON is the trait
922929
// (POWER_LEVEL from airo:type, else the McClelland motive) reasoned against it:
923930
// the divergence is trait-driven, not incidental to a "neutral" dual-use.
924-
const lines = duModel.rows.slice(0, 40).map((r) => {
931+
// P4 backdoor-networking platforms first (the Epstein archetype — power as
932+
// brokerage between circles), then the per-capability causal chains.
933+
const brokerLines = duModel.brokers.map((b) => ({
934+
text: `◆ P4 backdoor platform · ${b.label} — broker ${b.brk.toFixed(1)} (empowers others to control)`,
935+
conf: 1,
936+
survived: true,
937+
}));
938+
const chainLines = duModel.rows.slice(0, 40).map((r) => {
925939
const trait = r.pow ? POWER_LEVEL[r.pow] : r.motive >= 0 ? MOTIVE[r.motive] : '—';
926940
return {
927941
text: `${r.label} → [mil ${r.mil}/civ ${r.civ}] → ${r.expl || '—'}${r.impl || '—'}${trait}`,
928942
conf: r.divergence,
929943
survived: r.divergence >= 0.5,
930944
};
931945
});
946+
const lines = [...brokerLines, ...chainLines];
932947
// Person→Situation attribution: how much of the high-divergence (the situational
933948
// intent→impact drift) is carried by a power trait (P3/P4 or nPow). High % = the
934949
// harm is trait-driven — the causal chain the "can't prove it's harmful" defense denies.
@@ -1044,7 +1059,71 @@ export function OsintGraph() {
10441059
nmeth.set(ax, m);
10451060
}
10461061
const nameOf = (ax: number, code: number) => nmeth.get(ax)?.get(code) ?? '';
1047-
const powerOf = (i: number) => powerOfAiro(T[i * stride + AX.airoRole]);
1062+
// adjacency (undirected) + directed degree over the rendered entity edges —
1063+
// the SOCIAL power reading. The backdoor-networker (Epstein) has no AIRO role;
1064+
// his power is GRAPH POSITION: he brokers between otherwise-separate clusters.
1065+
const adj = new Map<number, Set<number>>();
1066+
const outDeg = new Map<number, number>();
1067+
const inDeg = new Map<number, number>();
1068+
for (const e of view.semantic) {
1069+
let a = adj.get(e.s);
1070+
if (!a) {
1071+
a = new Set();
1072+
adj.set(e.s, a);
1073+
}
1074+
a.add(e.t);
1075+
let b = adj.get(e.t);
1076+
if (!b) {
1077+
b = new Set();
1078+
adj.set(e.t, b);
1079+
}
1080+
b.add(e.s);
1081+
outDeg.set(e.s, (outDeg.get(e.s) ?? 0) + 1);
1082+
inDeg.set(e.t, (inDeg.get(e.t) ?? 0) + 1);
1083+
}
1084+
// Burt structural-hole brokerage: degree × openness (neighbours that DON'T
1085+
// know each other). High = a node bridging distinct power circles — the
1086+
// backdoor-networking platform ("empower others to control", P4).
1087+
const brkCache = new Map<number, number>();
1088+
const brokerage = (i: number): number => {
1089+
const c = brkCache.get(i);
1090+
if (c !== undefined) return c;
1091+
const nb = adj.get(i);
1092+
let v = 0;
1093+
if (nb && nb.size >= 2) {
1094+
const arr = [...nb];
1095+
const cap = Math.min(arr.length, 24); // bound the O(d²) pair scan
1096+
let links = 0;
1097+
let pairs = 0;
1098+
for (let x = 0; x < cap; x++) {
1099+
for (let y = x + 1; y < cap; y++) {
1100+
pairs += 1;
1101+
if (adj.get(arr[x])?.has(arr[y])) links += 1;
1102+
}
1103+
}
1104+
const cc = pairs ? links / pairs : 0;
1105+
v = nb.size * (1 - cc);
1106+
}
1107+
brkCache.set(i, v);
1108+
return v;
1109+
};
1110+
// Person(2)/Stakeholder(1) power from graph POSITION; AI actors from airo:type.
1111+
const powerOfActor = (i: number): number => {
1112+
const brk = brokerage(i);
1113+
const o = outDeg.get(i) ?? 0;
1114+
const inn = inDeg.get(i) ?? 0;
1115+
if (brk >= 6 && (adj.get(i)?.size ?? 0) >= 4) return 4; // P4 backdoor platform (broker)
1116+
if (o > inn * 1.5 && o >= 3) return 3; // P3 controls others (out-edges)
1117+
if (inn > o * 1.5 && inn >= 2) return 1; // P1 consumed from (in-edges)
1118+
return 0; // affiliation / peripheral
1119+
};
1120+
// combined: an AIRO actor role wins; else a social actor reads from position.
1121+
const powerOf = (i: number): number => {
1122+
const airo = T[i * stride + AX.airoRole];
1123+
if (airo) return powerOfAiro(airo);
1124+
const c = soa.cls[i];
1125+
return c === 1 || c === 2 ? powerOfActor(i) : 0;
1126+
};
10481127
const motiveOf = (i: number): number => {
10491128
if (powerOf(i) > 0) return 0; // nPow is carried by the power level
10501129
const txt = [
@@ -1165,7 +1244,15 @@ export function OsintGraph() {
11651244
const d = capDiv.get(T[i * stride + AX.capacity]);
11661245
if (d != null) nodeDiv.set(i, d);
11671246
});
1168-
return { rows, nodeDiv };
1247+
// the P4 backdoor-networking platforms — Person/Stakeholder brokers, ranked by
1248+
// structural-hole brokerage. This is the Epstein archetype the model exists to
1249+
// explain: power as being the connective tissue between power circles.
1250+
const brokers = Array.from(view.touched)
1251+
.filter((i) => (soa.cls[i] === 1 || soa.cls[i] === 2) && powerOfActor(i) === 4)
1252+
.map((i) => ({ label: soa.labels[i] || `#${i}`, brk: brokerage(i) }))
1253+
.sort((a, b) => b.brk - a.brk)
1254+
.slice(0, 8);
1255+
return { rows, nodeDiv, brokers };
11691256
}, [soa, view]);
11701257

11711258
const lensChip = (i: number): CSSProperties => ({

crates/cockpit-server/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ futures-core.workspace = true
2323
serde.workspace = true
2424
serde_json = "1"
2525

26+
# Server-side templating — the OSINT ClassView card is rendered via a compile-
27+
# time-checked askama template (the "XSLT" over the FieldMask projection, per
28+
# OGAR docs/CLASSVIEW-FIELDVIEW-ASKAMA-BITMASK.md). Core crate only (render to
29+
# String); the handler keeps its `Html<String>` axum idiom, so no askama_axum ↔
30+
# axum version coupling. Matches woa-rs's askama pin.
31+
askama = "0.12"
32+
2633
# ── The engine: lance-graph ──────────────────────────────────────────
2734
# Parser, DataFusion planner, LanceDB storage, blasgraph columnar,
2835
# semiring algebra, HHTL cascade. ALL queries route through here.

crates/cockpit-server/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ mod style_state;
3939
mod dto_bridge;
4040
mod codebook;
4141
mod mock_driver;
42+
mod osint_classview;
4243

4344
// ── Embed the Vite build at compile time ─────────────────────────────────────
4445
// The cockpit/ directory is built by `cd cockpit && npm run build` which
@@ -222,6 +223,10 @@ async fn main() {
222223
// Pre-baked enriched OSINT SoA bytes — the 3D view (/osint3d) fetches
223224
// these and decodes each GUID → xyz client-side (no JSON).
224225
.route("/osint.soa", get(osint_soa_handler))
226+
// The canonical OSINT card (classid 0x0700) projected through a FieldMask —
227+
// the Redmine-style ViewFilter, server-side (`?mask=<bits>`, omitted = FULL).
228+
.route("/api/osint/card", get(osint_classview::osint_card_handler))
229+
.route("/api/osint/card.html", get(osint_classview::osint_card_html_handler))
225230
// /body server-side HHTL LOD — POST camera → per-concept HhtlAction byte
226231
// (cascade over 1658 baked BlockBounds; native SIMD; client gates draw by it).
227232
.route("/api/body/lod", post(body_lod::body_lod_handler))

0 commit comments

Comments
 (0)