@neuroverseos/governance 0.8.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -584,7 +584,7 @@ declare const sovereignConduitLens: RenderingLens;
584
584
  * Current registry:
585
585
  * - auki-builder — Auki's vanguard leadership lens.
586
586
  * - sovereign-conduit — NeuroVerseOS base lens. Warm, accessible,
587
- * teaching. Stewardship / Sovereignty / Integration.
587
+ * teaching. Stewardship / Agency / Integration.
588
588
  *
589
589
  * To add a new lens:
590
590
  * 1. Create src/radiant/lenses/<name>.ts exporting a `RenderingLens`.
@@ -1168,6 +1168,137 @@ declare function fetchNotionActivity(token: string, options?: NotionFetchOptions
1168
1168
  */
1169
1169
  declare function formatNotionSignalsForPrompt(signals: NotionSignals): string;
1170
1170
 
1171
+ /**
1172
+ * @neuroverseos/governance/radiant — Linear adapter
1173
+ *
1174
+ * Reads planned work from Linear and surfaces the gap between what the team
1175
+ * said it would ship (issues, cycles, projects) and what actually got built
1176
+ * (signals from the GitHub adapter).
1177
+ *
1178
+ * The behavioral signal Linear uniquely provides:
1179
+ * stated intent (issues planned, cycle committed) vs.
1180
+ * shipped outcome (PRs merged, features delivered)
1181
+ *
1182
+ * That gap is the clearest "agency drift" signal a team can produce — and
1183
+ * none of the dev-productivity tools (LinearB, Swarmia, Jellyfish) read
1184
+ * Linear and GitHub together through a worldmodel lens.
1185
+ *
1186
+ * What it captures:
1187
+ * - Issues created (planning velocity)
1188
+ * - Issues completed (shipping velocity)
1189
+ * - Issues stalled (in-progress > N days without movement)
1190
+ * - Cycle commitment vs. completion (did we finish what we committed to?)
1191
+ * - Comments (how much the team debates vs. ships)
1192
+ * - Project-level updates (direction signals above the issue layer)
1193
+ *
1194
+ * Uses Linear GraphQL v1 via raw fetch (no @linear/sdk dependency,
1195
+ * matching the shape of notion.ts / slack.ts / discord.ts).
1196
+ * Requires a Linear personal API key with read access.
1197
+ */
1198
+
1199
+ interface LinearFetchOptions {
1200
+ /** Restrict to specific team IDs. If empty, reads all accessible teams. */
1201
+ teamIds?: string[];
1202
+ /** How many days of history to fetch. Default: 14. */
1203
+ windowDays?: number;
1204
+ /** Max issues to fetch. Default: 200. */
1205
+ maxIssues?: number;
1206
+ }
1207
+ interface LinearSignals {
1208
+ /** Issues created in window. */
1209
+ issuesCreated: number;
1210
+ /** Issues completed (moved to a "completed" state) in window. */
1211
+ issuesCompleted: number;
1212
+ /** Issues still open at window end. */
1213
+ issuesOpen: number;
1214
+ /** Issues in an in-progress state for > 14 days with no update. */
1215
+ issuesStalled: number;
1216
+ /** Ratio of completed / committed for cycles that ended in window. */
1217
+ cycleCompletionRate: number | null;
1218
+ /** Unique assignees active in window. */
1219
+ uniqueAssignees: number;
1220
+ /** Total comments across issues in window. */
1221
+ commentsTotal: number;
1222
+ /** Top project titles active in window. */
1223
+ topProjects: string[];
1224
+ }
1225
+ /**
1226
+ * Fetch Linear activity and return Radiant Events + compressed signals.
1227
+ *
1228
+ * Shape mirrors fetchNotionActivity / fetchSlackActivity so the radiant
1229
+ * pipeline composes uniformly. Call from commands/emergent.ts the same way
1230
+ * as the other adapters.
1231
+ */
1232
+ declare function fetchLinearActivity(apiKey: string, options?: LinearFetchOptions): Promise<{
1233
+ events: Event[];
1234
+ signals: LinearSignals;
1235
+ }>;
1236
+ /**
1237
+ * Format Linear signals for the AI interpretation prompt.
1238
+ * Emphasizes the stated-intent-vs-shipped-outcome framing so the lens
1239
+ * can pick up agency drift without the adapter naming it directly.
1240
+ */
1241
+ declare function formatLinearSignalsForPrompt(signals: LinearSignals): string;
1242
+
1243
+ /**
1244
+ * @neuroverseos/governance/radiant — declared vocabulary extraction
1245
+ *
1246
+ * Pulls Aligned Behaviors and Drift Behaviors from a worldmodel markdown
1247
+ * file and turns them into canonical snake_case pattern names that the AI
1248
+ * must use when it sees matching evidence.
1249
+ *
1250
+ * Why this exists: Radiant's AI was inventing names like
1251
+ * `velocity_without_declared_target` when the worldmodel already declared
1252
+ * `dependency_on_ai_presenting_as_integration` for the same observation.
1253
+ * The prompt told the AI to "use canonical names if you see them" — but
1254
+ * no one was extracting canonical names from the worldmodel. This module
1255
+ * closes that loop: Radiant now governs its own output against the
1256
+ * vocabulary it claims to read.
1257
+ *
1258
+ * Supported bullet formats (under `## Aligned Behaviors` / `## Drift Behaviors`):
1259
+ * - `` `canonical_name` — prose description `` (explicit, preferred)
1260
+ * - `canonical_name — prose description` (explicit, no backticks)
1261
+ * - `prose description only` (auto-snake-cased)
1262
+ *
1263
+ * Empty sections, missing sections, and HTML comments are silently ignored
1264
+ * — partial vocabulary is better than no vocabulary, and falling back to
1265
+ * candidate-only behavior is the correct failure mode.
1266
+ */
1267
+ interface DeclaredPattern {
1268
+ /** snake_case canonical identifier (stable across reads). */
1269
+ name: string;
1270
+ /** Human-readable prose for keyword matching against AI output. */
1271
+ prose: string;
1272
+ /** Which section this came from. */
1273
+ kind: 'aligned' | 'drift';
1274
+ }
1275
+ interface DeclaredVocabulary {
1276
+ aligned: DeclaredPattern[];
1277
+ drift: DeclaredPattern[];
1278
+ /** All canonical names (aligned + drift) for quick membership checks. */
1279
+ allNames: string[];
1280
+ }
1281
+ declare function extractDeclaredVocabulary(worldmodelContent: string): DeclaredVocabulary;
1282
+ /**
1283
+ * Given a pattern description + name the AI emitted, find a declared
1284
+ * pattern whose prose has enough keyword overlap to be "the same thing."
1285
+ *
1286
+ * Matching is deterministic keyword overlap over content words (lowercased,
1287
+ * >3 chars, punctuation stripped, common stopwords removed). A match
1288
+ * requires at least 2 shared words AND at least 30% coverage of the
1289
+ * declared prose's content words. When multiple declared patterns match,
1290
+ * the one with highest coverage wins.
1291
+ *
1292
+ * This is intentionally a simple deterministic pass, not an LLM call:
1293
+ * - no extra token cost
1294
+ * - testable and reproducible
1295
+ * - easy to tune thresholds without retraining
1296
+ *
1297
+ * Returns null when nothing matches well enough. The pattern stays a
1298
+ * candidate.
1299
+ */
1300
+ declare function matchDeclaredPattern(candidateName: string, candidateDescription: string, vocabulary: DeclaredVocabulary): DeclaredPattern | null;
1301
+
1171
1302
  /**
1172
1303
  * @neuroverseos/governance/radiant — AI pattern interpretation
1173
1304
  *
@@ -1201,8 +1332,15 @@ interface InterpretInput {
1201
1332
  lens: RenderingLens;
1202
1333
  /** AI adapter to call for interpretation. */
1203
1334
  ai: RadiantAI;
1204
- /** Known canonical pattern names from the worldmodel (optional). */
1335
+ /** Known canonical pattern names from the worldmodel (optional).
1336
+ * Kept for backward compatibility — new callers should pass
1337
+ * declaredVocabulary instead, which carries both names and prose. */
1205
1338
  canonicalPatterns?: readonly string[];
1339
+ /** Declared vocabulary extracted from the worldmodel's Aligned/Drift
1340
+ * Behaviors. When present, the AI is told the exact canonical names
1341
+ * to use, and any candidate whose description matches declared prose
1342
+ * is reclassified to the declared name. */
1343
+ declaredVocabulary?: DeclaredVocabulary;
1206
1344
  /** Stated intent from the exocortex (optional). When present, the AI
1207
1345
  * compares stated intent against observed behavior and surfaces gaps. */
1208
1346
  statedIntent?: string;
@@ -1291,7 +1429,7 @@ declare function auditGovernance(events: readonly ClassifiedEvent[], worldPath:
1291
1429
  * Takes signals + patterns + scores + lens metadata and produces the
1292
1430
  * structured output Nils reads. Two output modes:
1293
1431
  * - text: the EMERGENT / MEANING / MOVE structure for terminal display
1294
- * - yaml+text: Memory Palace coded read file (YAML frontmatter + prose)
1432
+ * - yaml+text: Mind Palace coded read file (YAML frontmatter + prose)
1295
1433
  *
1296
1434
  * The renderer enforces the lens's voice rules: forbidden phrases are
1297
1435
  * checked, bucket names are never leaked, vocabulary is Auki-native.
@@ -1321,35 +1459,117 @@ interface RenderInput {
1321
1459
  interface RenderOutput {
1322
1460
  /** The human-readable text output for terminal display. */
1323
1461
  text: string;
1324
- /** The Memory Palace coded YAML frontmatter (Tier 2 structured signals). */
1462
+ /** The Mind Palace coded YAML frontmatter (Tier 2 structured signals). */
1325
1463
  frontmatter: string;
1326
1464
  }
1327
1465
  declare function render(input: RenderInput): RenderOutput;
1328
1466
 
1467
+ /**
1468
+ * @neuroverseos/governance/radiant — extends (org-wide world sharing)
1469
+ *
1470
+ * Lets a repo declare worldmodels that live in another repo, so one
1471
+ * source of truth can govern many repos. Auki has 51 repos — one
1472
+ * `aukiNetwork/worlds` repo holds the canonical worldmodel, every
1473
+ * other repo declares `extends: ["github:aukiNetwork/worlds"]`.
1474
+ *
1475
+ * Spec grammar:
1476
+ * github:OWNER/REPO — latest default branch, repo root
1477
+ * github:OWNER/REPO@REF — specific ref (branch, tag, or sha)
1478
+ * github:OWNER/REPO@REF:SUBPATH — subpath inside the cloned repo
1479
+ * ./relative/path — local dir relative to repo root
1480
+ * /absolute/path — absolute local dir
1481
+ *
1482
+ * github: sources are shallow-cloned into ~/.neuroverse/cache/extends/<hash>/
1483
+ * Cache is reused for 1 hour; set NEUROVERSE_REFRESH=1 to force refetch,
1484
+ * or NEUROVERSE_NO_FETCH=1 to forbid network access (cache-or-nothing).
1485
+ */
1486
+ interface ExtendsSpec {
1487
+ raw: string;
1488
+ kind: 'github' | 'local';
1489
+ owner?: string;
1490
+ repo?: string;
1491
+ ref?: string;
1492
+ subpath?: string;
1493
+ path?: string;
1494
+ }
1495
+ interface ExtendsConfig {
1496
+ extends?: string[];
1497
+ }
1498
+ interface ResolveResult {
1499
+ spec: ExtendsSpec;
1500
+ dir: string | null;
1501
+ warning?: string;
1502
+ }
1503
+ type Fetcher = (spec: ExtendsSpec, destDir: string) => void;
1504
+ declare function loadExtendsConfig(repoDir: string): ExtendsConfig | null;
1505
+ declare function parseExtendsSpec(raw: string): ExtendsSpec | null;
1506
+ declare function getCacheDir(spec: ExtendsSpec, baseCacheDir?: string): string;
1507
+ declare function resolveExtendsSpec(spec: ExtendsSpec, repoDir: string, options?: {
1508
+ cacheDir?: string;
1509
+ fetcher?: Fetcher;
1510
+ ttlMs?: number;
1511
+ forceRefresh?: boolean;
1512
+ noFetch?: boolean;
1513
+ /** Suppress warnings when the remote source doesn't exist.
1514
+ * Used by the org tier, where a missing <org>/worlds repo is the
1515
+ * common case and should silently skip. */
1516
+ silentOnMissing?: boolean;
1517
+ }): ResolveResult;
1518
+ /**
1519
+ * Detect the conventional org-level worldmodel source from the current
1520
+ * repo's git remote. Returns an ExtendsSpec pointing at `<owner>/worlds`
1521
+ * on the same host, or null if:
1522
+ * - no git repo / no origin remote
1523
+ * - remote is on a non-GitHub host (v1 only supports github.com)
1524
+ * - the current repo IS the worlds repo (avoid self-loop)
1525
+ *
1526
+ * Example: in a repo with origin github.com/NeuroverseOS/foo, this
1527
+ * returns a spec for `github:NeuroverseOS/worlds`. If that repo doesn't
1528
+ * exist on GitHub, discovery's silentOnMissing flag swallows the failure
1529
+ * so nothing noisy surfaces.
1530
+ */
1531
+ declare function detectOrgExtendsSpec(repoDir: string): ExtendsSpec | null;
1532
+ declare function resolveAllExtends(repoDir: string, options?: {
1533
+ cacheDir?: string;
1534
+ fetcher?: Fetcher;
1535
+ ttlMs?: number;
1536
+ forceRefresh?: boolean;
1537
+ noFetch?: boolean;
1538
+ config?: ExtendsConfig | null;
1539
+ }): ResolveResult[];
1540
+
1329
1541
  /**
1330
1542
  * @neuroverseos/governance/radiant — world discovery
1331
1543
  *
1332
- * Automatically discovers and loads worldmodels from three sources,
1333
- * in precedence order:
1544
+ * Automatically discovers and loads worldmodels from five sources,
1545
+ * in precedence order (later tiers override earlier ones):
1334
1546
  *
1335
1547
  * 1. NeuroVerse base (built-in, universal — always loaded)
1336
1548
  * 2. User worlds (~/.neuroverse/worlds/ — your personal model)
1337
- * 3. Repo worlds (./worlds/ in the current repo — local authority)
1549
+ * 3. Org worlds (github:<owner>/worlds for current repo's GitHub org zero config)
1550
+ * 4. Extends (declared in .neuroverse/config.json — explicit overrides)
1551
+ * 5. Repo worlds (./worlds/ in the current repo — local authority)
1338
1552
  *
1339
1553
  * Worlds live where the work lives. You don't switch between them —
1340
1554
  * you walk into them. Open an Auki repo → Auki's worlds load.
1341
1555
  * Leave → they disappear. No toggle, no config, no removal.
1342
1556
  *
1343
- * Precedence: repo > user > base. When you're in someone else's
1344
- * system, their worlds take authority. Your personal world stays
1345
- * as your baseline perspective. The NeuroVerse base is the universal
1346
- * foundation both sit on top of.
1557
+ * The org tier piggybacks on GitHub's existing org structure: discovery
1558
+ * reads .git/config, extracts the owner from the origin remote, and
1559
+ * probes `github:<owner>/worlds`. If the repo exists, its worldmodels
1560
+ * load automatically no per-repo config needed. Missing silently.
1561
+ *
1562
+ * The extends tier is the explicit override for non-conventional sources
1563
+ * (private mirrors, local paths, alternate orgs).
1347
1564
  */
1565
+
1348
1566
  interface DiscoveredWorld {
1349
1567
  name: string;
1350
- source: 'base' | 'user' | 'repo';
1568
+ source: 'base' | 'user' | 'org' | 'extends' | 'repo';
1351
1569
  path: string;
1352
1570
  content: string;
1571
+ /** For extends- and org-sourced worlds: the resolved spec. */
1572
+ extendsFrom?: string;
1353
1573
  }
1354
1574
  interface WorldStack {
1355
1575
  worlds: DiscoveredWorld[];
@@ -1357,6 +1577,8 @@ interface WorldStack {
1357
1577
  combinedContent: string;
1358
1578
  /** Human-readable list of what's loaded. */
1359
1579
  summary: string;
1580
+ /** Non-fatal warnings (e.g. failed extends fetch, stale cache). */
1581
+ warnings: string[];
1360
1582
  }
1361
1583
  /**
1362
1584
  * Discover and load worldmodels from all three sources.
@@ -1367,11 +1589,27 @@ interface WorldStack {
1367
1589
  * Default: ~/.neuroverse/worlds/
1368
1590
  * @param explicitWorldsDir — explicit --worlds flag (overrides discovery).
1369
1591
  * When provided, this is used AS the repo-level source.
1592
+ * @param scopeOwner — GitHub org/owner hint derived from a CLI scope
1593
+ * argument (e.g. the "NeuroverseOS" in `radiant emergent NeuroverseOS/`).
1594
+ * When provided, discovery also probes `github:<scopeOwner>/worlds`
1595
+ * in the org tier. This lets the command work without a local clone —
1596
+ * the scope itself tells us which org's worlds to load.
1370
1597
  */
1371
1598
  declare function discoverWorlds(options?: {
1372
1599
  repoDir?: string;
1373
1600
  userWorldsDir?: string;
1374
1601
  explicitWorldsDir?: string;
1602
+ scopeOwner?: string;
1603
+ /** Override the extends cache location (default ~/.neuroverse/cache/extends/). */
1604
+ extendsCacheDir?: string;
1605
+ /** Inject a fetcher (tests use this to avoid real network calls). */
1606
+ extendsFetcher?: Fetcher;
1607
+ /** Cache TTL for github: extends (default 1 hour). */
1608
+ extendsTtlMs?: number;
1609
+ /** Disable extends resolution entirely. */
1610
+ disableExtends?: boolean;
1611
+ /** Disable org auto-detect tier. Also disabled by NEUROVERSE_NO_ORG=1. */
1612
+ disableOrg?: boolean;
1375
1613
  }): WorldStack;
1376
1614
  /**
1377
1615
  * Format the active worlds list for display in the output header.
@@ -1379,13 +1617,48 @@ declare function discoverWorlds(options?: {
1379
1617
  declare function formatActiveWorlds(stack: WorldStack): string;
1380
1618
 
1381
1619
  /**
1382
- * @neuroverseos/governance/radiant — Memory Palace file operations
1620
+ * @neuroverseos/governance/radiant — git remote introspection
1621
+ *
1622
+ * Reads the current repo's origin remote and parses out the host/owner/repo.
1623
+ * Used by the org-level discovery tier to ask "what GitHub org owns this
1624
+ * repo?" and then look for a conventional <org>/worlds source of truth.
1625
+ *
1626
+ * Works for both `.git/` directories and `.git` files (git worktrees /
1627
+ * submodules, which store a `gitdir: <path>` pointer instead of a full dir).
1628
+ */
1629
+ interface ParsedRemote {
1630
+ host: string;
1631
+ owner: string;
1632
+ repo: string;
1633
+ }
1634
+ /**
1635
+ * Read the `origin` remote URL from a repo's git config.
1636
+ * Returns null if no repo, no remote, or read fails.
1637
+ */
1638
+ declare function readOriginRemote(repoDir: string): string | null;
1639
+ /**
1640
+ * Parse a git remote URL into host/owner/repo.
1641
+ *
1642
+ * Supported forms:
1643
+ * https://github.com/OWNER/REPO(.git)
1644
+ * http://github.com/OWNER/REPO(.git)
1645
+ * git@github.com:OWNER/REPO(.git)
1646
+ * ssh://git@github.com/OWNER/REPO(.git)
1647
+ */
1648
+ declare function parseRemoteUrl(url: string): ParsedRemote | null;
1649
+ /**
1650
+ * One-shot: read origin and parse it.
1651
+ */
1652
+ declare function getRepoOrigin(repoDir: string): ParsedRemote | null;
1653
+
1654
+ /**
1655
+ * @neuroverseos/governance/radiant — Mind Palace file operations
1383
1656
  *
1384
1657
  * Writes Radiant reads to the exocortex as dated markdown files (with
1385
1658
  * YAML frontmatter for structured signal data). Reads prior files to
1386
1659
  * detect pattern persistence across runs.
1387
1660
  *
1388
- * The exocortex directory IS the Memory Palace. Files are the tiers:
1661
+ * The exocortex directory IS the Mind Palace. Files are the tiers:
1389
1662
  * - reads/YYYY-MM-DD.md = Tier 2 (structured signals) + Tier 3 (narrative)
1390
1663
  * - knowledge.md = accumulated pattern facts with persistence counts
1391
1664
  *
@@ -1458,7 +1731,7 @@ declare function computePersistence(priorReads: PriorRead[], currentPatternNames
1458
1731
  declare function formatPriorReadsForPrompt(priorReads: PriorRead[]): string;
1459
1732
 
1460
1733
  /**
1461
- * @neuroverseos/governance/radiant — Memory Palace compression
1734
+ * @neuroverseos/governance/radiant — Mind Palace compression
1462
1735
  *
1463
1736
  * Applies the three-tier principle to everything that enters the AI
1464
1737
  * prompt: raw data is not the memory; structured signals are.
@@ -1594,11 +1867,16 @@ interface EmergentInput {
1594
1867
  * When present, each event is evaluated through evaluateGuard
1595
1868
  * and the GOVERNANCE section appears in the output. */
1596
1869
  worldPath?: string;
1870
+ /** When set, filter events to only this GitHub login's activity.
1871
+ * Turns Radiant into a local, personal facilitator — reads your
1872
+ * own drift, not the team's. No one else is observed. Leave
1873
+ * undefined for the default team-wide read. */
1874
+ personalUser?: string;
1597
1875
  }
1598
1876
  interface EmergentResult {
1599
1877
  /** The rendered text output (EMERGENT / MEANING / MOVE). */
1600
1878
  text: string;
1601
- /** The YAML frontmatter for Memory Palace coding. */
1879
+ /** The YAML frontmatter for Mind Palace coding. */
1602
1880
  frontmatter: string;
1603
1881
  /** Voice violations detected in AI output. */
1604
1882
  voiceViolations: VoiceViolation[];
@@ -1620,6 +1898,13 @@ interface EmergentResult {
1620
1898
  worldStack?: WorldStack;
1621
1899
  }
1622
1900
  declare function emergent(input: EmergentInput): Promise<EmergentResult>;
1901
+ /**
1902
+ * Keep only events whose actor login matches `username` (case-insensitive).
1903
+ * Used by personal mode to narrow a read to a single contributor — Radiant
1904
+ * as a local facilitator reading one person's own drift, not a global
1905
+ * observer of the team. Pure function, testable in isolation.
1906
+ */
1907
+ declare function filterEventsByUser(events: readonly Event[], username: string): Event[];
1623
1908
 
1624
1909
  /**
1625
1910
  * @neuroverseos/governance/radiant
@@ -1641,12 +1926,12 @@ declare function emergent(input: EmergentInput): Promise<EmergentResult>;
1641
1926
  * before the renderer sees them — deterministic shaping, no LLM in path
1642
1927
  * - Stateless commands: emergent, decision
1643
1928
  * - Stateful (via MemoryProvider) commands: drift, evolve
1644
- * - Memory Palace 4-layer coding standard (compression / baselines /
1929
+ * - Mind Palace 4-layer coding standard (compression / baselines /
1645
1930
  * knowledge / synthesis) with a SQLite reference implementation
1646
1931
  * - CLI entry (bin/radiant.ts) and MCP server entry (bin/radiant-mcp.ts)
1647
1932
  *
1648
1933
  * Build state: Phase 1 complete — voice layer, behavioral dashboard,
1649
- * MCP server, Memory Palace write-back, governance audit, ExoCortex
1934
+ * MCP server, Mind Palace write-back, governance audit, ExoCortex
1650
1935
  * handshake. See radiant/PROJECT-PLAN.md for the full roadmap.
1651
1936
  *
1652
1937
  * Usage:
@@ -1657,4 +1942,4 @@ declare function emergent(input: EmergentInput): Promise<EmergentResult>;
1657
1942
  */
1658
1943
  declare const RADIANT_PACKAGE_VERSION = "0.0.0";
1659
1944
 
1660
- export { type Actor, type ActorDomain, type ActorKind, type AlignmentStatus, type BridgingComponent, type BridgingComponentScore, type ClassifiedEvent, type CyberCapability, type CyberDimension, DEFAULT_EVIDENCE_GATE, DEFAULT_SIGNAL_EXTRACTORS, type DiscordFetchOptions, type DiscordSignals, type DiscoveredWorld, type EmergentInput, type EmergentResult, type Event, type EventReference, type EvidenceGate, type ExemplarRef, type ExocortexContext, type ExtractionResult, type GitHubFetchOptions, type GovernanceAudit, type GovernanceVerdict, type InterpretInput, type InterpretResult, LENSES, type LensVocabulary, type LifeCapability, type LifeDimension, type NotionFetchOptions, type NotionSignals, type ObservedPattern, type OrgScope, type OverlapDef, type PatternEvidence, type PatternPersistence, type PrimaryFrame, type PriorRead, RADIANT_PACKAGE_VERSION, type RadiantAI, type RenderInput, type RenderOutput, type RenderingLens, type RepoScope, type Scope, type Score, type ScoreSentinel, type ScoredObservation, type Signal, type SignalExtractor, type SignalMatrix, type SlackFetchOptions, type SlackSignals, type ThinkInput, type ThinkResult, type ViewLevel, type VoiceDirectives, type VoiceViolation, type WorldStack, type WorldmodelItem, auditGovernance, aukiBuilderLens, checkForbiddenPhrases, classifyActorDomain, classifyEvents, composeSystemPrompt, compressExocortex, compressLens, compressPriorReads, compressWorldmodel, computePersistence, createAnthropicAI, createMockAI, createMockGitHubAdapter, discoverWorlds, emergent, extractSignals, fetchDiscordActivity, fetchGitHubActivity, fetchGitHubOrgActivity, fetchNotionActivity, fetchSlackActivity, formatActiveWorlds, formatDiscordSignalsForPrompt, formatExocortexForPrompt, formatNotionSignalsForPrompt, formatPriorReadsForPrompt, formatScope, formatSlackSignalsForPrompt, formatTeamExocorticesForPrompt, getLens, interpretPatterns, isPresent, isScored, isSentinel, listLenses, loadPriorReads, parseRepoScope, parseScope, presenceAverage, readExocortex, readTeamExocortices, render, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, sovereignConduitLens, summarizeExocortex, think, updateKnowledge, writeRead };
1945
+ export { type Actor, type ActorDomain, type ActorKind, type AlignmentStatus, type BridgingComponent, type BridgingComponentScore, type ClassifiedEvent, type CyberCapability, type CyberDimension, DEFAULT_EVIDENCE_GATE, DEFAULT_SIGNAL_EXTRACTORS, type DeclaredPattern, type DeclaredVocabulary, type DiscordFetchOptions, type DiscordSignals, type DiscoveredWorld, type EmergentInput, type EmergentResult, type Event, type EventReference, type EvidenceGate, type ExemplarRef, type ExocortexContext, type ExtendsConfig, type ExtendsSpec, type ExtractionResult, type Fetcher, type GitHubFetchOptions, type GovernanceAudit, type GovernanceVerdict, type InterpretInput, type InterpretResult, LENSES, type LensVocabulary, type LifeCapability, type LifeDimension, type LinearFetchOptions, type LinearSignals, type NotionFetchOptions, type NotionSignals, type ObservedPattern, type OrgScope, type OverlapDef, type ParsedRemote, type PatternEvidence, type PatternPersistence, type PrimaryFrame, type PriorRead, RADIANT_PACKAGE_VERSION, type RadiantAI, type RenderInput, type RenderOutput, type RenderingLens, type RepoScope, type ResolveResult, type Scope, type Score, type ScoreSentinel, type ScoredObservation, type Signal, type SignalExtractor, type SignalMatrix, type SlackFetchOptions, type SlackSignals, type ThinkInput, type ThinkResult, type ViewLevel, type VoiceDirectives, type VoiceViolation, type WorldStack, type WorldmodelItem, auditGovernance, aukiBuilderLens, checkForbiddenPhrases, classifyActorDomain, classifyEvents, composeSystemPrompt, compressExocortex, compressLens, compressPriorReads, compressWorldmodel, computePersistence, createAnthropicAI, createMockAI, createMockGitHubAdapter, detectOrgExtendsSpec, discoverWorlds, emergent, extractDeclaredVocabulary, extractSignals, fetchDiscordActivity, fetchGitHubActivity, fetchGitHubOrgActivity, fetchLinearActivity, fetchNotionActivity, fetchSlackActivity, filterEventsByUser, formatActiveWorlds, formatDiscordSignalsForPrompt, formatExocortexForPrompt, formatLinearSignalsForPrompt, formatNotionSignalsForPrompt, formatPriorReadsForPrompt, formatScope, formatSlackSignalsForPrompt, formatTeamExocorticesForPrompt, getCacheDir, getLens, getRepoOrigin, interpretPatterns, isPresent, isScored, isSentinel, listLenses, loadExtendsConfig, loadPriorReads, matchDeclaredPattern, parseExtendsSpec, parseRemoteUrl, parseRepoScope, parseScope, presenceAverage, readExocortex, readOriginRemote, readTeamExocortices, render, resolveAllExtends, resolveExtendsSpec, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, sovereignConduitLens, summarizeExocortex, think, updateKnowledge, writeRead };
@@ -14,33 +14,47 @@ import {
14
14
  createAnthropicAI,
15
15
  createMockAI,
16
16
  createMockGitHubAdapter,
17
+ detectOrgExtendsSpec,
17
18
  discoverWorlds,
18
19
  emergent,
20
+ extractDeclaredVocabulary,
19
21
  extractSignals,
20
22
  fetchDiscordActivity,
21
23
  fetchGitHubActivity,
22
24
  fetchGitHubOrgActivity,
25
+ fetchLinearActivity,
23
26
  fetchNotionActivity,
24
27
  fetchSlackActivity,
28
+ filterEventsByUser,
25
29
  formatActiveWorlds,
26
30
  formatDiscordSignalsForPrompt,
27
31
  formatExocortexForPrompt,
32
+ formatLinearSignalsForPrompt,
28
33
  formatNotionSignalsForPrompt,
29
34
  formatPriorReadsForPrompt,
30
35
  formatScope,
31
36
  formatSlackSignalsForPrompt,
32
37
  formatTeamExocorticesForPrompt,
38
+ getCacheDir,
39
+ getRepoOrigin,
33
40
  interpretPatterns,
34
41
  isPresent,
35
42
  isScored,
36
43
  isSentinel,
44
+ loadExtendsConfig,
37
45
  loadPriorReads,
46
+ matchDeclaredPattern,
47
+ parseExtendsSpec,
48
+ parseRemoteUrl,
38
49
  parseRepoScope,
39
50
  parseScope,
40
51
  presenceAverage,
41
52
  readExocortex,
53
+ readOriginRemote,
42
54
  readTeamExocortices,
43
55
  render,
56
+ resolveAllExtends,
57
+ resolveExtendsSpec,
44
58
  scoreComposite,
45
59
  scoreCyber,
46
60
  scoreLife,
@@ -49,14 +63,14 @@ import {
49
63
  think,
50
64
  updateKnowledge,
51
65
  writeRead
52
- } from "../chunk-ETDIEVAX.js";
66
+ } from "../chunk-BZYQHJDM.js";
53
67
  import {
54
68
  LENSES,
55
69
  aukiBuilderLens,
56
70
  getLens,
57
71
  listLenses,
58
72
  sovereignConduitLens
59
- } from "../chunk-F2LWMOM5.js";
73
+ } from "../chunk-TCGGED4G.js";
60
74
  import "../chunk-I4RTIMLX.js";
61
75
  import "../chunk-ZAF6JH23.js";
62
76
  import "../chunk-QLPTHTVB.js";
@@ -83,35 +97,49 @@ export {
83
97
  createAnthropicAI,
84
98
  createMockAI,
85
99
  createMockGitHubAdapter,
100
+ detectOrgExtendsSpec,
86
101
  discoverWorlds,
87
102
  emergent,
103
+ extractDeclaredVocabulary,
88
104
  extractSignals,
89
105
  fetchDiscordActivity,
90
106
  fetchGitHubActivity,
91
107
  fetchGitHubOrgActivity,
108
+ fetchLinearActivity,
92
109
  fetchNotionActivity,
93
110
  fetchSlackActivity,
111
+ filterEventsByUser,
94
112
  formatActiveWorlds,
95
113
  formatDiscordSignalsForPrompt,
96
114
  formatExocortexForPrompt,
115
+ formatLinearSignalsForPrompt,
97
116
  formatNotionSignalsForPrompt,
98
117
  formatPriorReadsForPrompt,
99
118
  formatScope,
100
119
  formatSlackSignalsForPrompt,
101
120
  formatTeamExocorticesForPrompt,
121
+ getCacheDir,
102
122
  getLens,
123
+ getRepoOrigin,
103
124
  interpretPatterns,
104
125
  isPresent,
105
126
  isScored,
106
127
  isSentinel,
107
128
  listLenses,
129
+ loadExtendsConfig,
108
130
  loadPriorReads,
131
+ matchDeclaredPattern,
132
+ parseExtendsSpec,
133
+ parseRemoteUrl,
109
134
  parseRepoScope,
110
135
  parseScope,
111
136
  presenceAverage,
112
137
  readExocortex,
138
+ readOriginRemote,
113
139
  readTeamExocortices,
114
140
  render,
141
+ resolveAllExtends,
142
+ resolveExtendsSpec,
115
143
  scoreComposite,
116
144
  scoreCyber,
117
145
  scoreLife,
@@ -3,8 +3,8 @@ import {
3
3
  emergent,
4
4
  parseRepoScope,
5
5
  think
6
- } from "./chunk-ETDIEVAX.js";
7
- import "./chunk-F2LWMOM5.js";
6
+ } from "./chunk-BZYQHJDM.js";
7
+ import "./chunk-TCGGED4G.js";
8
8
  import "./chunk-I4RTIMLX.js";
9
9
  import "./chunk-ZAF6JH23.js";
10
10
  import "./chunk-QLPTHTVB.js";
@@ -0,0 +1,84 @@
1
+ # Weekly Radiant Read — GitHub Actions workflow template
2
+ #
3
+ # Copy this file into your org's exocortex repo at:
4
+ # .github/workflows/radiant-weekly.yml
5
+ #
6
+ # Every Monday at 9am UTC it:
7
+ # 1. Checks out this repo (the exocortex — where reads persist)
8
+ # 2. Runs `radiant emergent <your-org>/` against the latest 14 days of activity
9
+ # 3. Writes the read to radiant/reads/YYYY-MM-DD.md
10
+ # 4. Commits and pushes the new file
11
+ #
12
+ # Each run extends the palace history. Week over week, Radiant gains the
13
+ # baselines / drift detection / pattern confidence promised in the DEPTH
14
+ # section of the output.
15
+ #
16
+ # Required repo secrets:
17
+ # ANTHROPIC_API_KEY — for the MEANING/MOVE interpretation step
18
+ #
19
+ # Required repo settings:
20
+ # Settings → Actions → General → Workflow permissions → "Read and write"
21
+ # (so the job can push its own commit)
22
+ #
23
+ # Optional:
24
+ # Replace the hardcoded org (NeuroverseOS) with your own.
25
+ # Replace the lens (sovereign-conduit) with your chosen lens.
26
+
27
+ name: Weekly Radiant Read
28
+
29
+ on:
30
+ schedule:
31
+ # Monday at 09:00 UTC. Change to whatever rhythm your team uses.
32
+ - cron: '0 9 * * MON'
33
+ # Allow manual trigger from the Actions tab for testing.
34
+ workflow_dispatch:
35
+
36
+ permissions:
37
+ contents: write # needed to push the new read back into this repo
38
+
39
+ jobs:
40
+ read:
41
+ runs-on: ubuntu-latest
42
+ steps:
43
+ - name: Check out this exocortex repo
44
+ uses: actions/checkout@v4
45
+
46
+ - name: Set up Node
47
+ uses: actions/setup-node@v4
48
+ with:
49
+ node-version: '20'
50
+
51
+ - name: Install @neuroverseos/governance
52
+ run: npm install --no-save @neuroverseos/governance@latest
53
+
54
+ - name: Run Radiant emergent read
55
+ env:
56
+ # GITHUB_TOKEN is auto-provided by Actions and is enough to read the
57
+ # NeuroverseOS org's public repos. For private repo reads, replace
58
+ # with a fine-grained PAT stored in secrets.RADIANT_GITHUB_TOKEN.
59
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
61
+ # Mind Palace writes into THIS repo — since we checked it out at
62
+ # the workflow root, point the CLI at $GITHUB_WORKSPACE.
63
+ RADIANT_EXOCORTEX: ${{ github.workspace }}
64
+ run: |
65
+ npx @neuroverseos/governance@latest radiant emergent NeuroverseOS/ \
66
+ --entire-org \
67
+ --lens sovereign-conduit
68
+ # --entire-org is required to read all repos in the org. Without
69
+ # it, Radiant's default scope is narrow (consent-first posture).
70
+ # No --worlds flag needed — discovery probes NeuroverseOS/worlds
71
+ # directly from the scope arg. See the governance repo for details.
72
+
73
+ - name: Commit and push the new read
74
+ run: |
75
+ git config user.name 'radiant-bot'
76
+ git config user.email 'radiant-bot@users.noreply.github.com'
77
+ # Only commit if the read actually produced a file.
78
+ if [[ -n "$(git status --porcelain radiant/reads/)" ]]; then
79
+ git add radiant/reads/
80
+ git commit -m "radiant: weekly read $(date -u +%Y-%m-%d)"
81
+ git push
82
+ else
83
+ echo "No new read file produced — nothing to commit."
84
+ fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuroverseos/governance",
3
- "version": "0.8.1",
3
+ "version": "0.10.0",
4
4
  "description": "Deterministic governance engine for AI agents — enforce worlds (permanent rules) and plans (mission constraints) with full audit trace",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -114,6 +114,7 @@
114
114
  "dist/browser.global.js",
115
115
  "policies",
116
116
  "examples/social-media-sim",
117
+ "examples/radiant-weekly-workflow.yml",
117
118
  "simulate.html",
118
119
  "LICENSE.md",
119
120
  "README.md",