@neuroverseos/governance 0.8.1 → 0.9.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`.
@@ -1326,30 +1326,112 @@ interface RenderOutput {
1326
1326
  }
1327
1327
  declare function render(input: RenderInput): RenderOutput;
1328
1328
 
1329
+ /**
1330
+ * @neuroverseos/governance/radiant — extends (org-wide world sharing)
1331
+ *
1332
+ * Lets a repo declare worldmodels that live in another repo, so one
1333
+ * source of truth can govern many repos. Auki has 51 repos — one
1334
+ * `aukiNetwork/worlds` repo holds the canonical worldmodel, every
1335
+ * other repo declares `extends: ["github:aukiNetwork/worlds"]`.
1336
+ *
1337
+ * Spec grammar:
1338
+ * github:OWNER/REPO — latest default branch, repo root
1339
+ * github:OWNER/REPO@REF — specific ref (branch, tag, or sha)
1340
+ * github:OWNER/REPO@REF:SUBPATH — subpath inside the cloned repo
1341
+ * ./relative/path — local dir relative to repo root
1342
+ * /absolute/path — absolute local dir
1343
+ *
1344
+ * github: sources are shallow-cloned into ~/.neuroverse/cache/extends/<hash>/
1345
+ * Cache is reused for 1 hour; set NEUROVERSE_REFRESH=1 to force refetch,
1346
+ * or NEUROVERSE_NO_FETCH=1 to forbid network access (cache-or-nothing).
1347
+ */
1348
+ interface ExtendsSpec {
1349
+ raw: string;
1350
+ kind: 'github' | 'local';
1351
+ owner?: string;
1352
+ repo?: string;
1353
+ ref?: string;
1354
+ subpath?: string;
1355
+ path?: string;
1356
+ }
1357
+ interface ExtendsConfig {
1358
+ extends?: string[];
1359
+ }
1360
+ interface ResolveResult {
1361
+ spec: ExtendsSpec;
1362
+ dir: string | null;
1363
+ warning?: string;
1364
+ }
1365
+ type Fetcher = (spec: ExtendsSpec, destDir: string) => void;
1366
+ declare function loadExtendsConfig(repoDir: string): ExtendsConfig | null;
1367
+ declare function parseExtendsSpec(raw: string): ExtendsSpec | null;
1368
+ declare function getCacheDir(spec: ExtendsSpec, baseCacheDir?: string): string;
1369
+ declare function resolveExtendsSpec(spec: ExtendsSpec, repoDir: string, options?: {
1370
+ cacheDir?: string;
1371
+ fetcher?: Fetcher;
1372
+ ttlMs?: number;
1373
+ forceRefresh?: boolean;
1374
+ noFetch?: boolean;
1375
+ /** Suppress warnings when the remote source doesn't exist.
1376
+ * Used by the org tier, where a missing <org>/worlds repo is the
1377
+ * common case and should silently skip. */
1378
+ silentOnMissing?: boolean;
1379
+ }): ResolveResult;
1380
+ /**
1381
+ * Detect the conventional org-level worldmodel source from the current
1382
+ * repo's git remote. Returns an ExtendsSpec pointing at `<owner>/worlds`
1383
+ * on the same host, or null if:
1384
+ * - no git repo / no origin remote
1385
+ * - remote is on a non-GitHub host (v1 only supports github.com)
1386
+ * - the current repo IS the worlds repo (avoid self-loop)
1387
+ *
1388
+ * Example: in a repo with origin github.com/NeuroverseOS/foo, this
1389
+ * returns a spec for `github:NeuroverseOS/worlds`. If that repo doesn't
1390
+ * exist on GitHub, discovery's silentOnMissing flag swallows the failure
1391
+ * so nothing noisy surfaces.
1392
+ */
1393
+ declare function detectOrgExtendsSpec(repoDir: string): ExtendsSpec | null;
1394
+ declare function resolveAllExtends(repoDir: string, options?: {
1395
+ cacheDir?: string;
1396
+ fetcher?: Fetcher;
1397
+ ttlMs?: number;
1398
+ forceRefresh?: boolean;
1399
+ noFetch?: boolean;
1400
+ config?: ExtendsConfig | null;
1401
+ }): ResolveResult[];
1402
+
1329
1403
  /**
1330
1404
  * @neuroverseos/governance/radiant — world discovery
1331
1405
  *
1332
- * Automatically discovers and loads worldmodels from three sources,
1333
- * in precedence order:
1406
+ * Automatically discovers and loads worldmodels from five sources,
1407
+ * in precedence order (later tiers override earlier ones):
1334
1408
  *
1335
1409
  * 1. NeuroVerse base (built-in, universal — always loaded)
1336
1410
  * 2. User worlds (~/.neuroverse/worlds/ — your personal model)
1337
- * 3. Repo worlds (./worlds/ in the current repo — local authority)
1411
+ * 3. Org worlds (github:<owner>/worlds for current repo's GitHub org zero config)
1412
+ * 4. Extends (declared in .neuroverse/config.json — explicit overrides)
1413
+ * 5. Repo worlds (./worlds/ in the current repo — local authority)
1338
1414
  *
1339
1415
  * Worlds live where the work lives. You don't switch between them —
1340
1416
  * you walk into them. Open an Auki repo → Auki's worlds load.
1341
1417
  * Leave → they disappear. No toggle, no config, no removal.
1342
1418
  *
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.
1419
+ * The org tier piggybacks on GitHub's existing org structure: discovery
1420
+ * reads .git/config, extracts the owner from the origin remote, and
1421
+ * probes `github:<owner>/worlds`. If the repo exists, its worldmodels
1422
+ * load automatically no per-repo config needed. Missing silently.
1423
+ *
1424
+ * The extends tier is the explicit override for non-conventional sources
1425
+ * (private mirrors, local paths, alternate orgs).
1347
1426
  */
1427
+
1348
1428
  interface DiscoveredWorld {
1349
1429
  name: string;
1350
- source: 'base' | 'user' | 'repo';
1430
+ source: 'base' | 'user' | 'org' | 'extends' | 'repo';
1351
1431
  path: string;
1352
1432
  content: string;
1433
+ /** For extends- and org-sourced worlds: the resolved spec. */
1434
+ extendsFrom?: string;
1353
1435
  }
1354
1436
  interface WorldStack {
1355
1437
  worlds: DiscoveredWorld[];
@@ -1357,6 +1439,8 @@ interface WorldStack {
1357
1439
  combinedContent: string;
1358
1440
  /** Human-readable list of what's loaded. */
1359
1441
  summary: string;
1442
+ /** Non-fatal warnings (e.g. failed extends fetch, stale cache). */
1443
+ warnings: string[];
1360
1444
  }
1361
1445
  /**
1362
1446
  * Discover and load worldmodels from all three sources.
@@ -1367,17 +1451,68 @@ interface WorldStack {
1367
1451
  * Default: ~/.neuroverse/worlds/
1368
1452
  * @param explicitWorldsDir — explicit --worlds flag (overrides discovery).
1369
1453
  * When provided, this is used AS the repo-level source.
1454
+ * @param scopeOwner — GitHub org/owner hint derived from a CLI scope
1455
+ * argument (e.g. the "NeuroverseOS" in `radiant emergent NeuroverseOS/`).
1456
+ * When provided, discovery also probes `github:<scopeOwner>/worlds`
1457
+ * in the org tier. This lets the command work without a local clone —
1458
+ * the scope itself tells us which org's worlds to load.
1370
1459
  */
1371
1460
  declare function discoverWorlds(options?: {
1372
1461
  repoDir?: string;
1373
1462
  userWorldsDir?: string;
1374
1463
  explicitWorldsDir?: string;
1464
+ scopeOwner?: string;
1465
+ /** Override the extends cache location (default ~/.neuroverse/cache/extends/). */
1466
+ extendsCacheDir?: string;
1467
+ /** Inject a fetcher (tests use this to avoid real network calls). */
1468
+ extendsFetcher?: Fetcher;
1469
+ /** Cache TTL for github: extends (default 1 hour). */
1470
+ extendsTtlMs?: number;
1471
+ /** Disable extends resolution entirely. */
1472
+ disableExtends?: boolean;
1473
+ /** Disable org auto-detect tier. Also disabled by NEUROVERSE_NO_ORG=1. */
1474
+ disableOrg?: boolean;
1375
1475
  }): WorldStack;
1376
1476
  /**
1377
1477
  * Format the active worlds list for display in the output header.
1378
1478
  */
1379
1479
  declare function formatActiveWorlds(stack: WorldStack): string;
1380
1480
 
1481
+ /**
1482
+ * @neuroverseos/governance/radiant — git remote introspection
1483
+ *
1484
+ * Reads the current repo's origin remote and parses out the host/owner/repo.
1485
+ * Used by the org-level discovery tier to ask "what GitHub org owns this
1486
+ * repo?" and then look for a conventional <org>/worlds source of truth.
1487
+ *
1488
+ * Works for both `.git/` directories and `.git` files (git worktrees /
1489
+ * submodules, which store a `gitdir: <path>` pointer instead of a full dir).
1490
+ */
1491
+ interface ParsedRemote {
1492
+ host: string;
1493
+ owner: string;
1494
+ repo: string;
1495
+ }
1496
+ /**
1497
+ * Read the `origin` remote URL from a repo's git config.
1498
+ * Returns null if no repo, no remote, or read fails.
1499
+ */
1500
+ declare function readOriginRemote(repoDir: string): string | null;
1501
+ /**
1502
+ * Parse a git remote URL into host/owner/repo.
1503
+ *
1504
+ * Supported forms:
1505
+ * https://github.com/OWNER/REPO(.git)
1506
+ * http://github.com/OWNER/REPO(.git)
1507
+ * git@github.com:OWNER/REPO(.git)
1508
+ * ssh://git@github.com/OWNER/REPO(.git)
1509
+ */
1510
+ declare function parseRemoteUrl(url: string): ParsedRemote | null;
1511
+ /**
1512
+ * One-shot: read origin and parse it.
1513
+ */
1514
+ declare function getRepoOrigin(repoDir: string): ParsedRemote | null;
1515
+
1381
1516
  /**
1382
1517
  * @neuroverseos/governance/radiant — Memory Palace file operations
1383
1518
  *
@@ -1657,4 +1792,4 @@ declare function emergent(input: EmergentInput): Promise<EmergentResult>;
1657
1792
  */
1658
1793
  declare const RADIANT_PACKAGE_VERSION = "0.0.0";
1659
1794
 
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 };
1795
+ 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 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 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, extractSignals, fetchDiscordActivity, fetchGitHubActivity, fetchGitHubOrgActivity, fetchNotionActivity, fetchSlackActivity, formatActiveWorlds, formatDiscordSignalsForPrompt, formatExocortexForPrompt, formatNotionSignalsForPrompt, formatPriorReadsForPrompt, formatScope, formatSlackSignalsForPrompt, formatTeamExocorticesForPrompt, getCacheDir, getLens, getRepoOrigin, interpretPatterns, isPresent, isScored, isSentinel, listLenses, loadExtendsConfig, loadPriorReads, parseExtendsSpec, parseRemoteUrl, parseRepoScope, parseScope, presenceAverage, readExocortex, readOriginRemote, readTeamExocortices, render, resolveAllExtends, resolveExtendsSpec, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, sovereignConduitLens, summarizeExocortex, think, updateKnowledge, writeRead };
@@ -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`.
@@ -1326,30 +1326,112 @@ interface RenderOutput {
1326
1326
  }
1327
1327
  declare function render(input: RenderInput): RenderOutput;
1328
1328
 
1329
+ /**
1330
+ * @neuroverseos/governance/radiant — extends (org-wide world sharing)
1331
+ *
1332
+ * Lets a repo declare worldmodels that live in another repo, so one
1333
+ * source of truth can govern many repos. Auki has 51 repos — one
1334
+ * `aukiNetwork/worlds` repo holds the canonical worldmodel, every
1335
+ * other repo declares `extends: ["github:aukiNetwork/worlds"]`.
1336
+ *
1337
+ * Spec grammar:
1338
+ * github:OWNER/REPO — latest default branch, repo root
1339
+ * github:OWNER/REPO@REF — specific ref (branch, tag, or sha)
1340
+ * github:OWNER/REPO@REF:SUBPATH — subpath inside the cloned repo
1341
+ * ./relative/path — local dir relative to repo root
1342
+ * /absolute/path — absolute local dir
1343
+ *
1344
+ * github: sources are shallow-cloned into ~/.neuroverse/cache/extends/<hash>/
1345
+ * Cache is reused for 1 hour; set NEUROVERSE_REFRESH=1 to force refetch,
1346
+ * or NEUROVERSE_NO_FETCH=1 to forbid network access (cache-or-nothing).
1347
+ */
1348
+ interface ExtendsSpec {
1349
+ raw: string;
1350
+ kind: 'github' | 'local';
1351
+ owner?: string;
1352
+ repo?: string;
1353
+ ref?: string;
1354
+ subpath?: string;
1355
+ path?: string;
1356
+ }
1357
+ interface ExtendsConfig {
1358
+ extends?: string[];
1359
+ }
1360
+ interface ResolveResult {
1361
+ spec: ExtendsSpec;
1362
+ dir: string | null;
1363
+ warning?: string;
1364
+ }
1365
+ type Fetcher = (spec: ExtendsSpec, destDir: string) => void;
1366
+ declare function loadExtendsConfig(repoDir: string): ExtendsConfig | null;
1367
+ declare function parseExtendsSpec(raw: string): ExtendsSpec | null;
1368
+ declare function getCacheDir(spec: ExtendsSpec, baseCacheDir?: string): string;
1369
+ declare function resolveExtendsSpec(spec: ExtendsSpec, repoDir: string, options?: {
1370
+ cacheDir?: string;
1371
+ fetcher?: Fetcher;
1372
+ ttlMs?: number;
1373
+ forceRefresh?: boolean;
1374
+ noFetch?: boolean;
1375
+ /** Suppress warnings when the remote source doesn't exist.
1376
+ * Used by the org tier, where a missing <org>/worlds repo is the
1377
+ * common case and should silently skip. */
1378
+ silentOnMissing?: boolean;
1379
+ }): ResolveResult;
1380
+ /**
1381
+ * Detect the conventional org-level worldmodel source from the current
1382
+ * repo's git remote. Returns an ExtendsSpec pointing at `<owner>/worlds`
1383
+ * on the same host, or null if:
1384
+ * - no git repo / no origin remote
1385
+ * - remote is on a non-GitHub host (v1 only supports github.com)
1386
+ * - the current repo IS the worlds repo (avoid self-loop)
1387
+ *
1388
+ * Example: in a repo with origin github.com/NeuroverseOS/foo, this
1389
+ * returns a spec for `github:NeuroverseOS/worlds`. If that repo doesn't
1390
+ * exist on GitHub, discovery's silentOnMissing flag swallows the failure
1391
+ * so nothing noisy surfaces.
1392
+ */
1393
+ declare function detectOrgExtendsSpec(repoDir: string): ExtendsSpec | null;
1394
+ declare function resolveAllExtends(repoDir: string, options?: {
1395
+ cacheDir?: string;
1396
+ fetcher?: Fetcher;
1397
+ ttlMs?: number;
1398
+ forceRefresh?: boolean;
1399
+ noFetch?: boolean;
1400
+ config?: ExtendsConfig | null;
1401
+ }): ResolveResult[];
1402
+
1329
1403
  /**
1330
1404
  * @neuroverseos/governance/radiant — world discovery
1331
1405
  *
1332
- * Automatically discovers and loads worldmodels from three sources,
1333
- * in precedence order:
1406
+ * Automatically discovers and loads worldmodels from five sources,
1407
+ * in precedence order (later tiers override earlier ones):
1334
1408
  *
1335
1409
  * 1. NeuroVerse base (built-in, universal — always loaded)
1336
1410
  * 2. User worlds (~/.neuroverse/worlds/ — your personal model)
1337
- * 3. Repo worlds (./worlds/ in the current repo — local authority)
1411
+ * 3. Org worlds (github:<owner>/worlds for current repo's GitHub org zero config)
1412
+ * 4. Extends (declared in .neuroverse/config.json — explicit overrides)
1413
+ * 5. Repo worlds (./worlds/ in the current repo — local authority)
1338
1414
  *
1339
1415
  * Worlds live where the work lives. You don't switch between them —
1340
1416
  * you walk into them. Open an Auki repo → Auki's worlds load.
1341
1417
  * Leave → they disappear. No toggle, no config, no removal.
1342
1418
  *
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.
1419
+ * The org tier piggybacks on GitHub's existing org structure: discovery
1420
+ * reads .git/config, extracts the owner from the origin remote, and
1421
+ * probes `github:<owner>/worlds`. If the repo exists, its worldmodels
1422
+ * load automatically no per-repo config needed. Missing silently.
1423
+ *
1424
+ * The extends tier is the explicit override for non-conventional sources
1425
+ * (private mirrors, local paths, alternate orgs).
1347
1426
  */
1427
+
1348
1428
  interface DiscoveredWorld {
1349
1429
  name: string;
1350
- source: 'base' | 'user' | 'repo';
1430
+ source: 'base' | 'user' | 'org' | 'extends' | 'repo';
1351
1431
  path: string;
1352
1432
  content: string;
1433
+ /** For extends- and org-sourced worlds: the resolved spec. */
1434
+ extendsFrom?: string;
1353
1435
  }
1354
1436
  interface WorldStack {
1355
1437
  worlds: DiscoveredWorld[];
@@ -1357,6 +1439,8 @@ interface WorldStack {
1357
1439
  combinedContent: string;
1358
1440
  /** Human-readable list of what's loaded. */
1359
1441
  summary: string;
1442
+ /** Non-fatal warnings (e.g. failed extends fetch, stale cache). */
1443
+ warnings: string[];
1360
1444
  }
1361
1445
  /**
1362
1446
  * Discover and load worldmodels from all three sources.
@@ -1367,17 +1451,68 @@ interface WorldStack {
1367
1451
  * Default: ~/.neuroverse/worlds/
1368
1452
  * @param explicitWorldsDir — explicit --worlds flag (overrides discovery).
1369
1453
  * When provided, this is used AS the repo-level source.
1454
+ * @param scopeOwner — GitHub org/owner hint derived from a CLI scope
1455
+ * argument (e.g. the "NeuroverseOS" in `radiant emergent NeuroverseOS/`).
1456
+ * When provided, discovery also probes `github:<scopeOwner>/worlds`
1457
+ * in the org tier. This lets the command work without a local clone —
1458
+ * the scope itself tells us which org's worlds to load.
1370
1459
  */
1371
1460
  declare function discoverWorlds(options?: {
1372
1461
  repoDir?: string;
1373
1462
  userWorldsDir?: string;
1374
1463
  explicitWorldsDir?: string;
1464
+ scopeOwner?: string;
1465
+ /** Override the extends cache location (default ~/.neuroverse/cache/extends/). */
1466
+ extendsCacheDir?: string;
1467
+ /** Inject a fetcher (tests use this to avoid real network calls). */
1468
+ extendsFetcher?: Fetcher;
1469
+ /** Cache TTL for github: extends (default 1 hour). */
1470
+ extendsTtlMs?: number;
1471
+ /** Disable extends resolution entirely. */
1472
+ disableExtends?: boolean;
1473
+ /** Disable org auto-detect tier. Also disabled by NEUROVERSE_NO_ORG=1. */
1474
+ disableOrg?: boolean;
1375
1475
  }): WorldStack;
1376
1476
  /**
1377
1477
  * Format the active worlds list for display in the output header.
1378
1478
  */
1379
1479
  declare function formatActiveWorlds(stack: WorldStack): string;
1380
1480
 
1481
+ /**
1482
+ * @neuroverseos/governance/radiant — git remote introspection
1483
+ *
1484
+ * Reads the current repo's origin remote and parses out the host/owner/repo.
1485
+ * Used by the org-level discovery tier to ask "what GitHub org owns this
1486
+ * repo?" and then look for a conventional <org>/worlds source of truth.
1487
+ *
1488
+ * Works for both `.git/` directories and `.git` files (git worktrees /
1489
+ * submodules, which store a `gitdir: <path>` pointer instead of a full dir).
1490
+ */
1491
+ interface ParsedRemote {
1492
+ host: string;
1493
+ owner: string;
1494
+ repo: string;
1495
+ }
1496
+ /**
1497
+ * Read the `origin` remote URL from a repo's git config.
1498
+ * Returns null if no repo, no remote, or read fails.
1499
+ */
1500
+ declare function readOriginRemote(repoDir: string): string | null;
1501
+ /**
1502
+ * Parse a git remote URL into host/owner/repo.
1503
+ *
1504
+ * Supported forms:
1505
+ * https://github.com/OWNER/REPO(.git)
1506
+ * http://github.com/OWNER/REPO(.git)
1507
+ * git@github.com:OWNER/REPO(.git)
1508
+ * ssh://git@github.com/OWNER/REPO(.git)
1509
+ */
1510
+ declare function parseRemoteUrl(url: string): ParsedRemote | null;
1511
+ /**
1512
+ * One-shot: read origin and parse it.
1513
+ */
1514
+ declare function getRepoOrigin(repoDir: string): ParsedRemote | null;
1515
+
1381
1516
  /**
1382
1517
  * @neuroverseos/governance/radiant — Memory Palace file operations
1383
1518
  *
@@ -1657,4 +1792,4 @@ declare function emergent(input: EmergentInput): Promise<EmergentResult>;
1657
1792
  */
1658
1793
  declare const RADIANT_PACKAGE_VERSION = "0.0.0";
1659
1794
 
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 };
1795
+ 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 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 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, extractSignals, fetchDiscordActivity, fetchGitHubActivity, fetchGitHubOrgActivity, fetchNotionActivity, fetchSlackActivity, formatActiveWorlds, formatDiscordSignalsForPrompt, formatExocortexForPrompt, formatNotionSignalsForPrompt, formatPriorReadsForPrompt, formatScope, formatSlackSignalsForPrompt, formatTeamExocorticesForPrompt, getCacheDir, getLens, getRepoOrigin, interpretPatterns, isPresent, isScored, isSentinel, listLenses, loadExtendsConfig, loadPriorReads, parseExtendsSpec, parseRemoteUrl, parseRepoScope, parseScope, presenceAverage, readExocortex, readOriginRemote, readTeamExocortices, render, resolveAllExtends, resolveExtendsSpec, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, sovereignConduitLens, summarizeExocortex, think, updateKnowledge, writeRead };
@@ -14,6 +14,7 @@ import {
14
14
  createAnthropicAI,
15
15
  createMockAI,
16
16
  createMockGitHubAdapter,
17
+ detectOrgExtendsSpec,
17
18
  discoverWorlds,
18
19
  emergent,
19
20
  extractSignals,
@@ -30,17 +31,25 @@ import {
30
31
  formatScope,
31
32
  formatSlackSignalsForPrompt,
32
33
  formatTeamExocorticesForPrompt,
34
+ getCacheDir,
35
+ getRepoOrigin,
33
36
  interpretPatterns,
34
37
  isPresent,
35
38
  isScored,
36
39
  isSentinel,
40
+ loadExtendsConfig,
37
41
  loadPriorReads,
42
+ parseExtendsSpec,
43
+ parseRemoteUrl,
38
44
  parseRepoScope,
39
45
  parseScope,
40
46
  presenceAverage,
41
47
  readExocortex,
48
+ readOriginRemote,
42
49
  readTeamExocortices,
43
50
  render,
51
+ resolveAllExtends,
52
+ resolveExtendsSpec,
44
53
  scoreComposite,
45
54
  scoreCyber,
46
55
  scoreLife,
@@ -49,14 +58,14 @@ import {
49
58
  think,
50
59
  updateKnowledge,
51
60
  writeRead
52
- } from "../chunk-ETDIEVAX.js";
61
+ } from "../chunk-3ZWU7C43.js";
53
62
  import {
54
63
  LENSES,
55
64
  aukiBuilderLens,
56
65
  getLens,
57
66
  listLenses,
58
67
  sovereignConduitLens
59
- } from "../chunk-F2LWMOM5.js";
68
+ } from "../chunk-TCGGED4G.js";
60
69
  import "../chunk-I4RTIMLX.js";
61
70
  import "../chunk-ZAF6JH23.js";
62
71
  import "../chunk-QLPTHTVB.js";
@@ -83,6 +92,7 @@ export {
83
92
  createAnthropicAI,
84
93
  createMockAI,
85
94
  createMockGitHubAdapter,
95
+ detectOrgExtendsSpec,
86
96
  discoverWorlds,
87
97
  emergent,
88
98
  extractSignals,
@@ -99,19 +109,27 @@ export {
99
109
  formatScope,
100
110
  formatSlackSignalsForPrompt,
101
111
  formatTeamExocorticesForPrompt,
112
+ getCacheDir,
102
113
  getLens,
114
+ getRepoOrigin,
103
115
  interpretPatterns,
104
116
  isPresent,
105
117
  isScored,
106
118
  isSentinel,
107
119
  listLenses,
120
+ loadExtendsConfig,
108
121
  loadPriorReads,
122
+ parseExtendsSpec,
123
+ parseRemoteUrl,
109
124
  parseRepoScope,
110
125
  parseScope,
111
126
  presenceAverage,
112
127
  readExocortex,
128
+ readOriginRemote,
113
129
  readTeamExocortices,
114
130
  render,
131
+ resolveAllExtends,
132
+ resolveExtendsSpec,
115
133
  scoreComposite,
116
134
  scoreCyber,
117
135
  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-3ZWU7C43.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,81 @@
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
+ # Memory 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
+ --lens sovereign-conduit
67
+ # No --worlds flag needed — discovery probes NeuroverseOS/worlds
68
+ # directly from the scope arg. See the governance repo for details.
69
+
70
+ - name: Commit and push the new read
71
+ run: |
72
+ git config user.name 'radiant-bot'
73
+ git config user.email 'radiant-bot@users.noreply.github.com'
74
+ # Only commit if the read actually produced a file.
75
+ if [[ -n "$(git status --porcelain radiant/reads/)" ]]; then
76
+ git add radiant/reads/
77
+ git commit -m "radiant: weekly read $(date -u +%Y-%m-%d)"
78
+ git push
79
+ else
80
+ echo "No new read file produced — nothing to commit."
81
+ fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuroverseos/governance",
3
- "version": "0.8.1",
3
+ "version": "0.9.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",