@neuroverseos/governance 0.7.0 → 0.8.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.
- package/README.md +43 -4
- package/dist/{chunk-T6EQ7ZBG.js → chunk-MC6O5GV5.js} +122 -11
- package/dist/cli/neuroverse.cjs +106 -21
- package/dist/cli/radiant.cjs +97 -12
- package/dist/cli/radiant.js +23 -5
- package/dist/radiant/index.cjs +531 -10
- package/dist/radiant/index.d.cts +247 -14
- package/dist/radiant/index.d.ts +247 -14
- package/dist/radiant/index.js +409 -1
- package/dist/{server-BXMC5NOE.js → server-DFNY5N5A.js} +1 -1
- package/package.json +1 -1
package/dist/radiant/index.d.cts
CHANGED
|
@@ -777,31 +777,56 @@ declare function createMockAI(fixedResponse: string): RadiantAI;
|
|
|
777
777
|
/**
|
|
778
778
|
* @neuroverseos/governance/radiant — scope resolution
|
|
779
779
|
*
|
|
780
|
-
* Parses scope strings
|
|
781
|
-
*
|
|
780
|
+
* Parses scope strings into typed scope objects that adapters know how
|
|
781
|
+
* to fetch. Supports two levels:
|
|
782
|
+
*
|
|
783
|
+
* "owner/repo" → RepoScope (single repo)
|
|
784
|
+
* "owner/" → OrgScope (entire organization)
|
|
785
|
+
* "owner" → OrgScope (entire organization)
|
|
782
786
|
*/
|
|
783
787
|
/**
|
|
784
|
-
* A GitHub repository scope —
|
|
788
|
+
* A GitHub repository scope — single repo.
|
|
785
789
|
*/
|
|
786
790
|
interface RepoScope {
|
|
791
|
+
type: 'repo';
|
|
787
792
|
owner: string;
|
|
788
793
|
repo: string;
|
|
789
794
|
}
|
|
790
795
|
/**
|
|
791
|
-
*
|
|
796
|
+
* A GitHub organization scope — all repos in an org.
|
|
797
|
+
*/
|
|
798
|
+
interface OrgScope {
|
|
799
|
+
type: 'org';
|
|
800
|
+
owner: string;
|
|
801
|
+
}
|
|
802
|
+
type Scope = RepoScope | OrgScope;
|
|
803
|
+
/**
|
|
804
|
+
* Visibility level for a Radiant read. Controls what sources are
|
|
805
|
+
* included and where output goes.
|
|
792
806
|
*
|
|
793
|
-
*
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
|
|
807
|
+
* community — public repos + public Discord. Anyone can reproduce.
|
|
808
|
+
* team — public + private repos + team channels. Team exocortex.
|
|
809
|
+
* full — everything + cross-exocortex. Leader's personal exocortex.
|
|
810
|
+
*/
|
|
811
|
+
type ViewLevel = 'community' | 'team' | 'full';
|
|
812
|
+
/**
|
|
813
|
+
* Parse a scope string into a RepoScope or OrgScope.
|
|
797
814
|
*
|
|
798
|
-
*
|
|
815
|
+
* Accepts:
|
|
816
|
+
* "owner/repo" → RepoScope
|
|
817
|
+
* "owner/" or "owner" → OrgScope
|
|
818
|
+
* "https://github.com/owner/repo" → RepoScope
|
|
819
|
+
* "https://github.com/owner" → OrgScope
|
|
820
|
+
*/
|
|
821
|
+
declare function parseScope(scope: string): Scope;
|
|
822
|
+
/**
|
|
823
|
+
* Backward-compatible: parse as RepoScope only. Throws if org-level.
|
|
799
824
|
*/
|
|
800
825
|
declare function parseRepoScope(scope: string): RepoScope;
|
|
801
826
|
/**
|
|
802
|
-
* Format
|
|
827
|
+
* Format any scope back to a display string.
|
|
803
828
|
*/
|
|
804
|
-
declare function formatScope(scope:
|
|
829
|
+
declare function formatScope(scope: Scope): string;
|
|
805
830
|
|
|
806
831
|
/**
|
|
807
832
|
* @neuroverseos/governance/radiant — GitHub activity adapter
|
|
@@ -844,6 +869,15 @@ interface GitHubFetchOptions {
|
|
|
844
869
|
* @param options — window size and pagination
|
|
845
870
|
*/
|
|
846
871
|
declare function fetchGitHubActivity(scope: RepoScope, token: string, options?: GitHubFetchOptions): Promise<Event[]>;
|
|
872
|
+
/**
|
|
873
|
+
* Fetch recent activity across an ENTIRE GitHub organization.
|
|
874
|
+
* Uses /orgs/{org}/repos to list repos, then fetches activity from
|
|
875
|
+
* each active repo.
|
|
876
|
+
*/
|
|
877
|
+
declare function fetchGitHubOrgActivity(scope: OrgScope, token: string, options?: GitHubFetchOptions): Promise<{
|
|
878
|
+
events: Event[];
|
|
879
|
+
repos: string[];
|
|
880
|
+
}>;
|
|
847
881
|
/**
|
|
848
882
|
* Create a mock GitHub adapter for testing. Returns fixed events
|
|
849
883
|
* without calling the GitHub API.
|
|
@@ -902,11 +936,210 @@ declare function readExocortex(dirPath: string): ExocortexContext;
|
|
|
902
936
|
* prompt. Only includes fields that were actually loaded.
|
|
903
937
|
*/
|
|
904
938
|
declare function formatExocortexForPrompt(ctx: ExocortexContext): string;
|
|
939
|
+
/**
|
|
940
|
+
* Read multiple exocortices from a team directory. Each subdirectory
|
|
941
|
+
* (or symlink) is treated as one person's exocortex.
|
|
942
|
+
*
|
|
943
|
+
* Returns an array of { name, context } for each person.
|
|
944
|
+
*/
|
|
945
|
+
declare function readTeamExocortices(teamDir: string): Array<{
|
|
946
|
+
name: string;
|
|
947
|
+
context: ExocortexContext;
|
|
948
|
+
}>;
|
|
949
|
+
/**
|
|
950
|
+
* Format multiple exocortices for the AI prompt — shows each person's
|
|
951
|
+
* stated intent so the AI can compare them against each other and
|
|
952
|
+
* against observed activity.
|
|
953
|
+
*/
|
|
954
|
+
declare function formatTeamExocorticesForPrompt(team: Array<{
|
|
955
|
+
name: string;
|
|
956
|
+
context: ExocortexContext;
|
|
957
|
+
}>): string;
|
|
905
958
|
/**
|
|
906
959
|
* One-line summary of what was loaded, for CLI status output.
|
|
907
960
|
*/
|
|
908
961
|
declare function summarizeExocortex(ctx: ExocortexContext): string;
|
|
909
962
|
|
|
963
|
+
/**
|
|
964
|
+
* @neuroverseos/governance/radiant — Discord adapter
|
|
965
|
+
*
|
|
966
|
+
* Reads conversational activity from Discord channels and maps it to
|
|
967
|
+
* Radiant's Event type. This is where Narrative Dynamics and Shared
|
|
968
|
+
* Prosperity signals become visible — how the team communicates,
|
|
969
|
+
* coordinates, welcomes newcomers, resolves debates.
|
|
970
|
+
*
|
|
971
|
+
* Two modes:
|
|
972
|
+
* - Channel message reading (via Discord Bot API)
|
|
973
|
+
* - Signal compression (aggregate metrics from raw messages)
|
|
974
|
+
*
|
|
975
|
+
* Privacy:
|
|
976
|
+
* - Public channels → community view (anyone can reproduce)
|
|
977
|
+
* - Team channels → team view (team exocortex only)
|
|
978
|
+
* - Private channels / DMs → never read unless explicitly configured
|
|
979
|
+
* - The bot token IS consent. Radiant respects Discord's permissions.
|
|
980
|
+
*
|
|
981
|
+
* Rate limiting:
|
|
982
|
+
* - Caps at 100 messages per channel per fetch
|
|
983
|
+
* - Produces compressed signals, not raw message dumps
|
|
984
|
+
* - AI receives a sample of 20-30 representative messages, not the firehose
|
|
985
|
+
*/
|
|
986
|
+
|
|
987
|
+
interface DiscordFetchOptions {
|
|
988
|
+
/** Channel IDs to read from. If empty, reads all accessible channels. */
|
|
989
|
+
channelIds?: string[];
|
|
990
|
+
/** How many days of history to fetch. Default: 14. */
|
|
991
|
+
windowDays?: number;
|
|
992
|
+
/** Max messages per channel. Default: 100. */
|
|
993
|
+
perChannel?: number;
|
|
994
|
+
/** Visibility level — determines which channels to read. */
|
|
995
|
+
visibility?: 'public' | 'team';
|
|
996
|
+
}
|
|
997
|
+
interface DiscordSignals {
|
|
998
|
+
/** Total messages across all channels in the window. */
|
|
999
|
+
totalMessages: number;
|
|
1000
|
+
/** Number of active channels. */
|
|
1001
|
+
activeChannels: number;
|
|
1002
|
+
/** Unique participants. */
|
|
1003
|
+
uniqueParticipants: number;
|
|
1004
|
+
/** Average response time in minutes (for threaded/reply messages). */
|
|
1005
|
+
avgResponseMinutes: number | null;
|
|
1006
|
+
/** Number of help requests detected (messages containing "help", "stuck", "how do I"). */
|
|
1007
|
+
helpRequests: number;
|
|
1008
|
+
/** Number of unresolved threads (threads with no reply). */
|
|
1009
|
+
unresolvedThreads: number;
|
|
1010
|
+
/** Top discussed topics (extracted from channel names + frequent terms). */
|
|
1011
|
+
topTopics: string[];
|
|
1012
|
+
/** Messages from new participants (first seen in this window). */
|
|
1013
|
+
newcomerMessages: number;
|
|
1014
|
+
}
|
|
1015
|
+
/**
|
|
1016
|
+
* Fetch Discord activity and return Radiant Events + compressed signals.
|
|
1017
|
+
*
|
|
1018
|
+
* Uses the Discord Bot API (raw fetch, no SDK dependency).
|
|
1019
|
+
* Requires a bot token with MESSAGE_CONTENT intent enabled.
|
|
1020
|
+
*/
|
|
1021
|
+
declare function fetchDiscordActivity(guildId: string, token: string, options?: DiscordFetchOptions): Promise<{
|
|
1022
|
+
events: Event[];
|
|
1023
|
+
signals: DiscordSignals;
|
|
1024
|
+
}>;
|
|
1025
|
+
/**
|
|
1026
|
+
* Format Discord signals for the AI interpretation prompt.
|
|
1027
|
+
*/
|
|
1028
|
+
declare function formatDiscordSignalsForPrompt(signals: DiscordSignals): string;
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* @neuroverseos/governance/radiant — Slack adapter
|
|
1032
|
+
*
|
|
1033
|
+
* Reads conversational activity from Slack workspaces. For Auki, Slack
|
|
1034
|
+
* is used for external client and partner communication — FairPrice,
|
|
1035
|
+
* retail pilots, Intercognitive coalition partners.
|
|
1036
|
+
*
|
|
1037
|
+
* What it captures:
|
|
1038
|
+
* - Partner coordination patterns (peaq, Mawari, GEODNET)
|
|
1039
|
+
* - Client communication quality (responsiveness, follow-through)
|
|
1040
|
+
* - External contributor onboarding
|
|
1041
|
+
* - Cross-organization alignment signals
|
|
1042
|
+
* - Decision-making in channels (debates → outcomes)
|
|
1043
|
+
*
|
|
1044
|
+
* Privacy: workspace token controls access. Bot tokens see channels
|
|
1045
|
+
* the bot is invited to. User tokens see what the user sees. Private
|
|
1046
|
+
* channels and DMs only accessible if explicitly configured.
|
|
1047
|
+
*
|
|
1048
|
+
* Uses Slack Web API via raw fetch (no SDK dependency).
|
|
1049
|
+
* Requires a Bot Token with channels:history + channels:read scopes.
|
|
1050
|
+
*/
|
|
1051
|
+
|
|
1052
|
+
interface SlackFetchOptions {
|
|
1053
|
+
/** Channel IDs to read. If empty, reads all public channels the bot can see. */
|
|
1054
|
+
channelIds?: string[];
|
|
1055
|
+
/** How many days of history to fetch. Default: 14. */
|
|
1056
|
+
windowDays?: number;
|
|
1057
|
+
/** Max messages per channel. Default: 100. */
|
|
1058
|
+
perChannel?: number;
|
|
1059
|
+
/** Visibility level. */
|
|
1060
|
+
visibility?: 'public' | 'team';
|
|
1061
|
+
}
|
|
1062
|
+
interface SlackSignals {
|
|
1063
|
+
totalMessages: number;
|
|
1064
|
+
activeChannels: number;
|
|
1065
|
+
uniqueParticipants: number;
|
|
1066
|
+
avgResponseMinutes: number | null;
|
|
1067
|
+
externalParticipants: number;
|
|
1068
|
+
unresolvedThreads: number;
|
|
1069
|
+
topChannels: string[];
|
|
1070
|
+
reactionCount: number;
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* Fetch Slack activity and return Radiant Events + compressed signals.
|
|
1074
|
+
*/
|
|
1075
|
+
declare function fetchSlackActivity(token: string, options?: SlackFetchOptions): Promise<{
|
|
1076
|
+
events: Event[];
|
|
1077
|
+
signals: SlackSignals;
|
|
1078
|
+
}>;
|
|
1079
|
+
/**
|
|
1080
|
+
* Format Slack signals for the AI interpretation prompt.
|
|
1081
|
+
*/
|
|
1082
|
+
declare function formatSlackSignalsForPrompt(signals: SlackSignals): string;
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* @neuroverseos/governance/radiant — Notion adapter
|
|
1086
|
+
*
|
|
1087
|
+
* Reads documentation and knowledge-base activity from Notion.
|
|
1088
|
+
* For Auki, Notion is where team documentation lives — specs, meeting
|
|
1089
|
+
* notes, strategy docs, project plans, decision records.
|
|
1090
|
+
*
|
|
1091
|
+
* What it captures:
|
|
1092
|
+
* - Documentation freshness (when pages were last edited)
|
|
1093
|
+
* - Who maintains what (authorship patterns across pages)
|
|
1094
|
+
* - Knowledge gaps (sprint mentions things that have no doc page)
|
|
1095
|
+
* - Decision crystallization (are debates in Discord becoming docs in Notion?)
|
|
1096
|
+
* - Documentation velocity alongside code velocity
|
|
1097
|
+
*
|
|
1098
|
+
* The behavioral signal: high code shipping + low documentation =
|
|
1099
|
+
* the team is building but not recording what they learn. That's a
|
|
1100
|
+
* Narrative Dynamics gap — the story of what's being built isn't
|
|
1101
|
+
* being told, even internally.
|
|
1102
|
+
*
|
|
1103
|
+
* Uses Notion API v1 via raw fetch (no SDK dependency).
|
|
1104
|
+
* Requires an internal integration token with read access.
|
|
1105
|
+
*/
|
|
1106
|
+
|
|
1107
|
+
interface NotionFetchOptions {
|
|
1108
|
+
/** Specific database IDs to query. If empty, searches all accessible pages. */
|
|
1109
|
+
databaseIds?: string[];
|
|
1110
|
+
/** How many days of history to fetch. Default: 14. */
|
|
1111
|
+
windowDays?: number;
|
|
1112
|
+
/** Max pages to fetch. Default: 100. */
|
|
1113
|
+
maxPages?: number;
|
|
1114
|
+
}
|
|
1115
|
+
interface NotionSignals {
|
|
1116
|
+
/** Total pages created or updated in the window. */
|
|
1117
|
+
pagesActive: number;
|
|
1118
|
+
/** Pages created (new docs). */
|
|
1119
|
+
pagesCreated: number;
|
|
1120
|
+
/** Pages updated (edited docs). */
|
|
1121
|
+
pagesUpdated: number;
|
|
1122
|
+
/** Unique editors. */
|
|
1123
|
+
uniqueEditors: number;
|
|
1124
|
+
/** Pages not touched in 30+ days. */
|
|
1125
|
+
stalePages: number;
|
|
1126
|
+
/** Average days since last edit across all tracked pages. */
|
|
1127
|
+
avgDaysSinceEdit: number | null;
|
|
1128
|
+
/** Top page titles by recent activity. */
|
|
1129
|
+
topPages: string[];
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* Fetch Notion page activity and return Radiant Events + compressed signals.
|
|
1133
|
+
*/
|
|
1134
|
+
declare function fetchNotionActivity(token: string, options?: NotionFetchOptions): Promise<{
|
|
1135
|
+
events: Event[];
|
|
1136
|
+
signals: NotionSignals;
|
|
1137
|
+
}>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Format Notion signals for the AI interpretation prompt.
|
|
1140
|
+
*/
|
|
1141
|
+
declare function formatNotionSignalsForPrompt(signals: NotionSignals): string;
|
|
1142
|
+
|
|
910
1143
|
/**
|
|
911
1144
|
* @neuroverseos/governance/radiant — AI pattern interpretation
|
|
912
1145
|
*
|
|
@@ -1037,7 +1270,7 @@ declare function auditGovernance(events: readonly ClassifiedEvent[], worldPath:
|
|
|
1037
1270
|
*/
|
|
1038
1271
|
|
|
1039
1272
|
interface RenderInput {
|
|
1040
|
-
scope:
|
|
1273
|
+
scope: Scope;
|
|
1041
1274
|
windowDays: number;
|
|
1042
1275
|
eventCount: number;
|
|
1043
1276
|
signals: readonly Signal[];
|
|
@@ -1224,7 +1457,7 @@ declare function think(input: ThinkInput): Promise<ThinkResult>;
|
|
|
1224
1457
|
*/
|
|
1225
1458
|
|
|
1226
1459
|
interface EmergentInput {
|
|
1227
|
-
scope: RepoScope;
|
|
1460
|
+
scope: RepoScope | OrgScope;
|
|
1228
1461
|
githubToken: string;
|
|
1229
1462
|
worldmodelContent: string;
|
|
1230
1463
|
lensId: string;
|
|
@@ -1298,4 +1531,4 @@ declare function emergent(input: EmergentInput): Promise<EmergentResult>;
|
|
|
1298
1531
|
*/
|
|
1299
1532
|
declare const RADIANT_PACKAGE_VERSION = "0.0.0";
|
|
1300
1533
|
|
|
1301
|
-
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 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 ObservedPattern, type OverlapDef, type PatternEvidence, type PatternPersistence, type PrimaryFrame, type PriorRead, RADIANT_PACKAGE_VERSION, type RadiantAI, type RenderInput, type RenderOutput, type RenderingLens, type RepoScope, type Score, type ScoreSentinel, type ScoredObservation, type Signal, type SignalExtractor, type SignalMatrix, type ThinkInput, type ThinkResult, type VoiceDirectives, type VoiceViolation, type WorldmodelItem, auditGovernance, aukiBuilderLens, checkForbiddenPhrases, classifyActorDomain, classifyEvents, composeSystemPrompt, computePersistence, createAnthropicAI, createMockAI, createMockGitHubAdapter, emergent, extractSignals, fetchGitHubActivity, formatExocortexForPrompt, formatPriorReadsForPrompt, formatScope, getLens, interpretPatterns, isPresent, isScored, isSentinel, listLenses, loadPriorReads, parseRepoScope, presenceAverage, readExocortex, render, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, summarizeExocortex, think, updateKnowledge, writeRead };
|
|
1534
|
+
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 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 WorldmodelItem, auditGovernance, aukiBuilderLens, checkForbiddenPhrases, classifyActorDomain, classifyEvents, composeSystemPrompt, computePersistence, createAnthropicAI, createMockAI, createMockGitHubAdapter, emergent, extractSignals, fetchDiscordActivity, fetchGitHubActivity, fetchGitHubOrgActivity, fetchNotionActivity, fetchSlackActivity, formatDiscordSignalsForPrompt, formatExocortexForPrompt, formatNotionSignalsForPrompt, formatPriorReadsForPrompt, formatScope, formatSlackSignalsForPrompt, formatTeamExocorticesForPrompt, getLens, interpretPatterns, isPresent, isScored, isSentinel, listLenses, loadPriorReads, parseRepoScope, parseScope, presenceAverage, readExocortex, readTeamExocortices, render, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, summarizeExocortex, think, updateKnowledge, writeRead };
|
package/dist/radiant/index.d.ts
CHANGED
|
@@ -777,31 +777,56 @@ declare function createMockAI(fixedResponse: string): RadiantAI;
|
|
|
777
777
|
/**
|
|
778
778
|
* @neuroverseos/governance/radiant — scope resolution
|
|
779
779
|
*
|
|
780
|
-
* Parses scope strings
|
|
781
|
-
*
|
|
780
|
+
* Parses scope strings into typed scope objects that adapters know how
|
|
781
|
+
* to fetch. Supports two levels:
|
|
782
|
+
*
|
|
783
|
+
* "owner/repo" → RepoScope (single repo)
|
|
784
|
+
* "owner/" → OrgScope (entire organization)
|
|
785
|
+
* "owner" → OrgScope (entire organization)
|
|
782
786
|
*/
|
|
783
787
|
/**
|
|
784
|
-
* A GitHub repository scope —
|
|
788
|
+
* A GitHub repository scope — single repo.
|
|
785
789
|
*/
|
|
786
790
|
interface RepoScope {
|
|
791
|
+
type: 'repo';
|
|
787
792
|
owner: string;
|
|
788
793
|
repo: string;
|
|
789
794
|
}
|
|
790
795
|
/**
|
|
791
|
-
*
|
|
796
|
+
* A GitHub organization scope — all repos in an org.
|
|
797
|
+
*/
|
|
798
|
+
interface OrgScope {
|
|
799
|
+
type: 'org';
|
|
800
|
+
owner: string;
|
|
801
|
+
}
|
|
802
|
+
type Scope = RepoScope | OrgScope;
|
|
803
|
+
/**
|
|
804
|
+
* Visibility level for a Radiant read. Controls what sources are
|
|
805
|
+
* included and where output goes.
|
|
792
806
|
*
|
|
793
|
-
*
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
|
|
807
|
+
* community — public repos + public Discord. Anyone can reproduce.
|
|
808
|
+
* team — public + private repos + team channels. Team exocortex.
|
|
809
|
+
* full — everything + cross-exocortex. Leader's personal exocortex.
|
|
810
|
+
*/
|
|
811
|
+
type ViewLevel = 'community' | 'team' | 'full';
|
|
812
|
+
/**
|
|
813
|
+
* Parse a scope string into a RepoScope or OrgScope.
|
|
797
814
|
*
|
|
798
|
-
*
|
|
815
|
+
* Accepts:
|
|
816
|
+
* "owner/repo" → RepoScope
|
|
817
|
+
* "owner/" or "owner" → OrgScope
|
|
818
|
+
* "https://github.com/owner/repo" → RepoScope
|
|
819
|
+
* "https://github.com/owner" → OrgScope
|
|
820
|
+
*/
|
|
821
|
+
declare function parseScope(scope: string): Scope;
|
|
822
|
+
/**
|
|
823
|
+
* Backward-compatible: parse as RepoScope only. Throws if org-level.
|
|
799
824
|
*/
|
|
800
825
|
declare function parseRepoScope(scope: string): RepoScope;
|
|
801
826
|
/**
|
|
802
|
-
* Format
|
|
827
|
+
* Format any scope back to a display string.
|
|
803
828
|
*/
|
|
804
|
-
declare function formatScope(scope:
|
|
829
|
+
declare function formatScope(scope: Scope): string;
|
|
805
830
|
|
|
806
831
|
/**
|
|
807
832
|
* @neuroverseos/governance/radiant — GitHub activity adapter
|
|
@@ -844,6 +869,15 @@ interface GitHubFetchOptions {
|
|
|
844
869
|
* @param options — window size and pagination
|
|
845
870
|
*/
|
|
846
871
|
declare function fetchGitHubActivity(scope: RepoScope, token: string, options?: GitHubFetchOptions): Promise<Event[]>;
|
|
872
|
+
/**
|
|
873
|
+
* Fetch recent activity across an ENTIRE GitHub organization.
|
|
874
|
+
* Uses /orgs/{org}/repos to list repos, then fetches activity from
|
|
875
|
+
* each active repo.
|
|
876
|
+
*/
|
|
877
|
+
declare function fetchGitHubOrgActivity(scope: OrgScope, token: string, options?: GitHubFetchOptions): Promise<{
|
|
878
|
+
events: Event[];
|
|
879
|
+
repos: string[];
|
|
880
|
+
}>;
|
|
847
881
|
/**
|
|
848
882
|
* Create a mock GitHub adapter for testing. Returns fixed events
|
|
849
883
|
* without calling the GitHub API.
|
|
@@ -902,11 +936,210 @@ declare function readExocortex(dirPath: string): ExocortexContext;
|
|
|
902
936
|
* prompt. Only includes fields that were actually loaded.
|
|
903
937
|
*/
|
|
904
938
|
declare function formatExocortexForPrompt(ctx: ExocortexContext): string;
|
|
939
|
+
/**
|
|
940
|
+
* Read multiple exocortices from a team directory. Each subdirectory
|
|
941
|
+
* (or symlink) is treated as one person's exocortex.
|
|
942
|
+
*
|
|
943
|
+
* Returns an array of { name, context } for each person.
|
|
944
|
+
*/
|
|
945
|
+
declare function readTeamExocortices(teamDir: string): Array<{
|
|
946
|
+
name: string;
|
|
947
|
+
context: ExocortexContext;
|
|
948
|
+
}>;
|
|
949
|
+
/**
|
|
950
|
+
* Format multiple exocortices for the AI prompt — shows each person's
|
|
951
|
+
* stated intent so the AI can compare them against each other and
|
|
952
|
+
* against observed activity.
|
|
953
|
+
*/
|
|
954
|
+
declare function formatTeamExocorticesForPrompt(team: Array<{
|
|
955
|
+
name: string;
|
|
956
|
+
context: ExocortexContext;
|
|
957
|
+
}>): string;
|
|
905
958
|
/**
|
|
906
959
|
* One-line summary of what was loaded, for CLI status output.
|
|
907
960
|
*/
|
|
908
961
|
declare function summarizeExocortex(ctx: ExocortexContext): string;
|
|
909
962
|
|
|
963
|
+
/**
|
|
964
|
+
* @neuroverseos/governance/radiant — Discord adapter
|
|
965
|
+
*
|
|
966
|
+
* Reads conversational activity from Discord channels and maps it to
|
|
967
|
+
* Radiant's Event type. This is where Narrative Dynamics and Shared
|
|
968
|
+
* Prosperity signals become visible — how the team communicates,
|
|
969
|
+
* coordinates, welcomes newcomers, resolves debates.
|
|
970
|
+
*
|
|
971
|
+
* Two modes:
|
|
972
|
+
* - Channel message reading (via Discord Bot API)
|
|
973
|
+
* - Signal compression (aggregate metrics from raw messages)
|
|
974
|
+
*
|
|
975
|
+
* Privacy:
|
|
976
|
+
* - Public channels → community view (anyone can reproduce)
|
|
977
|
+
* - Team channels → team view (team exocortex only)
|
|
978
|
+
* - Private channels / DMs → never read unless explicitly configured
|
|
979
|
+
* - The bot token IS consent. Radiant respects Discord's permissions.
|
|
980
|
+
*
|
|
981
|
+
* Rate limiting:
|
|
982
|
+
* - Caps at 100 messages per channel per fetch
|
|
983
|
+
* - Produces compressed signals, not raw message dumps
|
|
984
|
+
* - AI receives a sample of 20-30 representative messages, not the firehose
|
|
985
|
+
*/
|
|
986
|
+
|
|
987
|
+
interface DiscordFetchOptions {
|
|
988
|
+
/** Channel IDs to read from. If empty, reads all accessible channels. */
|
|
989
|
+
channelIds?: string[];
|
|
990
|
+
/** How many days of history to fetch. Default: 14. */
|
|
991
|
+
windowDays?: number;
|
|
992
|
+
/** Max messages per channel. Default: 100. */
|
|
993
|
+
perChannel?: number;
|
|
994
|
+
/** Visibility level — determines which channels to read. */
|
|
995
|
+
visibility?: 'public' | 'team';
|
|
996
|
+
}
|
|
997
|
+
interface DiscordSignals {
|
|
998
|
+
/** Total messages across all channels in the window. */
|
|
999
|
+
totalMessages: number;
|
|
1000
|
+
/** Number of active channels. */
|
|
1001
|
+
activeChannels: number;
|
|
1002
|
+
/** Unique participants. */
|
|
1003
|
+
uniqueParticipants: number;
|
|
1004
|
+
/** Average response time in minutes (for threaded/reply messages). */
|
|
1005
|
+
avgResponseMinutes: number | null;
|
|
1006
|
+
/** Number of help requests detected (messages containing "help", "stuck", "how do I"). */
|
|
1007
|
+
helpRequests: number;
|
|
1008
|
+
/** Number of unresolved threads (threads with no reply). */
|
|
1009
|
+
unresolvedThreads: number;
|
|
1010
|
+
/** Top discussed topics (extracted from channel names + frequent terms). */
|
|
1011
|
+
topTopics: string[];
|
|
1012
|
+
/** Messages from new participants (first seen in this window). */
|
|
1013
|
+
newcomerMessages: number;
|
|
1014
|
+
}
|
|
1015
|
+
/**
|
|
1016
|
+
* Fetch Discord activity and return Radiant Events + compressed signals.
|
|
1017
|
+
*
|
|
1018
|
+
* Uses the Discord Bot API (raw fetch, no SDK dependency).
|
|
1019
|
+
* Requires a bot token with MESSAGE_CONTENT intent enabled.
|
|
1020
|
+
*/
|
|
1021
|
+
declare function fetchDiscordActivity(guildId: string, token: string, options?: DiscordFetchOptions): Promise<{
|
|
1022
|
+
events: Event[];
|
|
1023
|
+
signals: DiscordSignals;
|
|
1024
|
+
}>;
|
|
1025
|
+
/**
|
|
1026
|
+
* Format Discord signals for the AI interpretation prompt.
|
|
1027
|
+
*/
|
|
1028
|
+
declare function formatDiscordSignalsForPrompt(signals: DiscordSignals): string;
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* @neuroverseos/governance/radiant — Slack adapter
|
|
1032
|
+
*
|
|
1033
|
+
* Reads conversational activity from Slack workspaces. For Auki, Slack
|
|
1034
|
+
* is used for external client and partner communication — FairPrice,
|
|
1035
|
+
* retail pilots, Intercognitive coalition partners.
|
|
1036
|
+
*
|
|
1037
|
+
* What it captures:
|
|
1038
|
+
* - Partner coordination patterns (peaq, Mawari, GEODNET)
|
|
1039
|
+
* - Client communication quality (responsiveness, follow-through)
|
|
1040
|
+
* - External contributor onboarding
|
|
1041
|
+
* - Cross-organization alignment signals
|
|
1042
|
+
* - Decision-making in channels (debates → outcomes)
|
|
1043
|
+
*
|
|
1044
|
+
* Privacy: workspace token controls access. Bot tokens see channels
|
|
1045
|
+
* the bot is invited to. User tokens see what the user sees. Private
|
|
1046
|
+
* channels and DMs only accessible if explicitly configured.
|
|
1047
|
+
*
|
|
1048
|
+
* Uses Slack Web API via raw fetch (no SDK dependency).
|
|
1049
|
+
* Requires a Bot Token with channels:history + channels:read scopes.
|
|
1050
|
+
*/
|
|
1051
|
+
|
|
1052
|
+
interface SlackFetchOptions {
|
|
1053
|
+
/** Channel IDs to read. If empty, reads all public channels the bot can see. */
|
|
1054
|
+
channelIds?: string[];
|
|
1055
|
+
/** How many days of history to fetch. Default: 14. */
|
|
1056
|
+
windowDays?: number;
|
|
1057
|
+
/** Max messages per channel. Default: 100. */
|
|
1058
|
+
perChannel?: number;
|
|
1059
|
+
/** Visibility level. */
|
|
1060
|
+
visibility?: 'public' | 'team';
|
|
1061
|
+
}
|
|
1062
|
+
interface SlackSignals {
|
|
1063
|
+
totalMessages: number;
|
|
1064
|
+
activeChannels: number;
|
|
1065
|
+
uniqueParticipants: number;
|
|
1066
|
+
avgResponseMinutes: number | null;
|
|
1067
|
+
externalParticipants: number;
|
|
1068
|
+
unresolvedThreads: number;
|
|
1069
|
+
topChannels: string[];
|
|
1070
|
+
reactionCount: number;
|
|
1071
|
+
}
|
|
1072
|
+
/**
|
|
1073
|
+
* Fetch Slack activity and return Radiant Events + compressed signals.
|
|
1074
|
+
*/
|
|
1075
|
+
declare function fetchSlackActivity(token: string, options?: SlackFetchOptions): Promise<{
|
|
1076
|
+
events: Event[];
|
|
1077
|
+
signals: SlackSignals;
|
|
1078
|
+
}>;
|
|
1079
|
+
/**
|
|
1080
|
+
* Format Slack signals for the AI interpretation prompt.
|
|
1081
|
+
*/
|
|
1082
|
+
declare function formatSlackSignalsForPrompt(signals: SlackSignals): string;
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* @neuroverseos/governance/radiant — Notion adapter
|
|
1086
|
+
*
|
|
1087
|
+
* Reads documentation and knowledge-base activity from Notion.
|
|
1088
|
+
* For Auki, Notion is where team documentation lives — specs, meeting
|
|
1089
|
+
* notes, strategy docs, project plans, decision records.
|
|
1090
|
+
*
|
|
1091
|
+
* What it captures:
|
|
1092
|
+
* - Documentation freshness (when pages were last edited)
|
|
1093
|
+
* - Who maintains what (authorship patterns across pages)
|
|
1094
|
+
* - Knowledge gaps (sprint mentions things that have no doc page)
|
|
1095
|
+
* - Decision crystallization (are debates in Discord becoming docs in Notion?)
|
|
1096
|
+
* - Documentation velocity alongside code velocity
|
|
1097
|
+
*
|
|
1098
|
+
* The behavioral signal: high code shipping + low documentation =
|
|
1099
|
+
* the team is building but not recording what they learn. That's a
|
|
1100
|
+
* Narrative Dynamics gap — the story of what's being built isn't
|
|
1101
|
+
* being told, even internally.
|
|
1102
|
+
*
|
|
1103
|
+
* Uses Notion API v1 via raw fetch (no SDK dependency).
|
|
1104
|
+
* Requires an internal integration token with read access.
|
|
1105
|
+
*/
|
|
1106
|
+
|
|
1107
|
+
interface NotionFetchOptions {
|
|
1108
|
+
/** Specific database IDs to query. If empty, searches all accessible pages. */
|
|
1109
|
+
databaseIds?: string[];
|
|
1110
|
+
/** How many days of history to fetch. Default: 14. */
|
|
1111
|
+
windowDays?: number;
|
|
1112
|
+
/** Max pages to fetch. Default: 100. */
|
|
1113
|
+
maxPages?: number;
|
|
1114
|
+
}
|
|
1115
|
+
interface NotionSignals {
|
|
1116
|
+
/** Total pages created or updated in the window. */
|
|
1117
|
+
pagesActive: number;
|
|
1118
|
+
/** Pages created (new docs). */
|
|
1119
|
+
pagesCreated: number;
|
|
1120
|
+
/** Pages updated (edited docs). */
|
|
1121
|
+
pagesUpdated: number;
|
|
1122
|
+
/** Unique editors. */
|
|
1123
|
+
uniqueEditors: number;
|
|
1124
|
+
/** Pages not touched in 30+ days. */
|
|
1125
|
+
stalePages: number;
|
|
1126
|
+
/** Average days since last edit across all tracked pages. */
|
|
1127
|
+
avgDaysSinceEdit: number | null;
|
|
1128
|
+
/** Top page titles by recent activity. */
|
|
1129
|
+
topPages: string[];
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* Fetch Notion page activity and return Radiant Events + compressed signals.
|
|
1133
|
+
*/
|
|
1134
|
+
declare function fetchNotionActivity(token: string, options?: NotionFetchOptions): Promise<{
|
|
1135
|
+
events: Event[];
|
|
1136
|
+
signals: NotionSignals;
|
|
1137
|
+
}>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Format Notion signals for the AI interpretation prompt.
|
|
1140
|
+
*/
|
|
1141
|
+
declare function formatNotionSignalsForPrompt(signals: NotionSignals): string;
|
|
1142
|
+
|
|
910
1143
|
/**
|
|
911
1144
|
* @neuroverseos/governance/radiant — AI pattern interpretation
|
|
912
1145
|
*
|
|
@@ -1037,7 +1270,7 @@ declare function auditGovernance(events: readonly ClassifiedEvent[], worldPath:
|
|
|
1037
1270
|
*/
|
|
1038
1271
|
|
|
1039
1272
|
interface RenderInput {
|
|
1040
|
-
scope:
|
|
1273
|
+
scope: Scope;
|
|
1041
1274
|
windowDays: number;
|
|
1042
1275
|
eventCount: number;
|
|
1043
1276
|
signals: readonly Signal[];
|
|
@@ -1224,7 +1457,7 @@ declare function think(input: ThinkInput): Promise<ThinkResult>;
|
|
|
1224
1457
|
*/
|
|
1225
1458
|
|
|
1226
1459
|
interface EmergentInput {
|
|
1227
|
-
scope: RepoScope;
|
|
1460
|
+
scope: RepoScope | OrgScope;
|
|
1228
1461
|
githubToken: string;
|
|
1229
1462
|
worldmodelContent: string;
|
|
1230
1463
|
lensId: string;
|
|
@@ -1298,4 +1531,4 @@ declare function emergent(input: EmergentInput): Promise<EmergentResult>;
|
|
|
1298
1531
|
*/
|
|
1299
1532
|
declare const RADIANT_PACKAGE_VERSION = "0.0.0";
|
|
1300
1533
|
|
|
1301
|
-
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 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 ObservedPattern, type OverlapDef, type PatternEvidence, type PatternPersistence, type PrimaryFrame, type PriorRead, RADIANT_PACKAGE_VERSION, type RadiantAI, type RenderInput, type RenderOutput, type RenderingLens, type RepoScope, type Score, type ScoreSentinel, type ScoredObservation, type Signal, type SignalExtractor, type SignalMatrix, type ThinkInput, type ThinkResult, type VoiceDirectives, type VoiceViolation, type WorldmodelItem, auditGovernance, aukiBuilderLens, checkForbiddenPhrases, classifyActorDomain, classifyEvents, composeSystemPrompt, computePersistence, createAnthropicAI, createMockAI, createMockGitHubAdapter, emergent, extractSignals, fetchGitHubActivity, formatExocortexForPrompt, formatPriorReadsForPrompt, formatScope, getLens, interpretPatterns, isPresent, isScored, isSentinel, listLenses, loadPriorReads, parseRepoScope, presenceAverage, readExocortex, render, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, summarizeExocortex, think, updateKnowledge, writeRead };
|
|
1534
|
+
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 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 WorldmodelItem, auditGovernance, aukiBuilderLens, checkForbiddenPhrases, classifyActorDomain, classifyEvents, composeSystemPrompt, computePersistence, createAnthropicAI, createMockAI, createMockGitHubAdapter, emergent, extractSignals, fetchDiscordActivity, fetchGitHubActivity, fetchGitHubOrgActivity, fetchNotionActivity, fetchSlackActivity, formatDiscordSignalsForPrompt, formatExocortexForPrompt, formatNotionSignalsForPrompt, formatPriorReadsForPrompt, formatScope, formatSlackSignalsForPrompt, formatTeamExocorticesForPrompt, getLens, interpretPatterns, isPresent, isScored, isSentinel, listLenses, loadPriorReads, parseRepoScope, parseScope, presenceAverage, readExocortex, readTeamExocortices, render, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, summarizeExocortex, think, updateKnowledge, writeRead };
|