@neuroverseos/governance 0.6.1 → 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 -7
- package/dist/{chunk-AEVT7DSZ.js → chunk-MC6O5GV5.js} +486 -12
- package/dist/cli/neuroverse.cjs +868 -142
- package/dist/cli/radiant.cjs +2173 -149
- package/dist/cli/radiant.js +29 -4
- package/dist/radiant/index.cjs +2083 -13
- package/dist/radiant/index.d.cts +392 -21
- package/dist/radiant/index.d.ts +392 -21
- package/dist/radiant/index.js +426 -3
- package/dist/server-DFNY5N5A.js +271 -0
- package/package.json +1 -1
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
|
*
|
|
@@ -970,6 +1203,60 @@ interface InterpretResult {
|
|
|
970
1203
|
*/
|
|
971
1204
|
declare function interpretPatterns(input: InterpretInput): Promise<InterpretResult>;
|
|
972
1205
|
|
|
1206
|
+
/**
|
|
1207
|
+
* @neuroverseos/governance/radiant — governance audit
|
|
1208
|
+
*
|
|
1209
|
+
* Runs each GitHub event through the NeuroverseOS guard engine against
|
|
1210
|
+
* the compiled worldmodel. Produces an audit trail showing which events
|
|
1211
|
+
* triggered governance (BLOCK/MODIFY), which side (human/AI/joint),
|
|
1212
|
+
* and what invariants were tested.
|
|
1213
|
+
*
|
|
1214
|
+
* This is where Radiant meets the NeuroverseOS governance engine.
|
|
1215
|
+
* Same evaluateGuard() that runs at API-level, applied retroactively
|
|
1216
|
+
* to activity that already happened. The audit trail is the proof that
|
|
1217
|
+
* the cocoon's walls are holding — or shows where they're being tested.
|
|
1218
|
+
*/
|
|
1219
|
+
|
|
1220
|
+
interface GovernanceVerdict {
|
|
1221
|
+
eventId: string;
|
|
1222
|
+
domain: ActorDomain;
|
|
1223
|
+
status: 'ALLOW' | 'BLOCK' | 'MODIFY' | 'PAUSE' | 'PENALIZE' | 'REWARD';
|
|
1224
|
+
reason?: string;
|
|
1225
|
+
ruleId?: string;
|
|
1226
|
+
warning?: string;
|
|
1227
|
+
}
|
|
1228
|
+
interface GovernanceAudit {
|
|
1229
|
+
totalEvents: number;
|
|
1230
|
+
human: {
|
|
1231
|
+
allow: number;
|
|
1232
|
+
modify: number;
|
|
1233
|
+
block: number;
|
|
1234
|
+
details: GovernanceVerdict[];
|
|
1235
|
+
};
|
|
1236
|
+
cyber: {
|
|
1237
|
+
allow: number;
|
|
1238
|
+
modify: number;
|
|
1239
|
+
block: number;
|
|
1240
|
+
details: GovernanceVerdict[];
|
|
1241
|
+
};
|
|
1242
|
+
joint: {
|
|
1243
|
+
allow: number;
|
|
1244
|
+
modify: number;
|
|
1245
|
+
block: number;
|
|
1246
|
+
details: GovernanceVerdict[];
|
|
1247
|
+
};
|
|
1248
|
+
/** Summary for rendering — most important findings. */
|
|
1249
|
+
summary: string;
|
|
1250
|
+
}
|
|
1251
|
+
/**
|
|
1252
|
+
* Run each classified event through the guard engine against the compiled
|
|
1253
|
+
* worldmodel. Returns a structured audit with human/cyber/joint breakdown.
|
|
1254
|
+
*
|
|
1255
|
+
* @param events — classified events from the GitHub adapter
|
|
1256
|
+
* @param worldPath — path to a compiled .nv-world.md or world directory
|
|
1257
|
+
*/
|
|
1258
|
+
declare function auditGovernance(events: readonly ClassifiedEvent[], worldPath: string): Promise<GovernanceAudit>;
|
|
1259
|
+
|
|
973
1260
|
/**
|
|
974
1261
|
* @neuroverseos/governance/radiant — renderer
|
|
975
1262
|
*
|
|
@@ -983,7 +1270,7 @@ declare function interpretPatterns(input: InterpretInput): Promise<InterpretResu
|
|
|
983
1270
|
*/
|
|
984
1271
|
|
|
985
1272
|
interface RenderInput {
|
|
986
|
-
scope:
|
|
1273
|
+
scope: Scope;
|
|
987
1274
|
windowDays: number;
|
|
988
1275
|
eventCount: number;
|
|
989
1276
|
signals: readonly Signal[];
|
|
@@ -1000,6 +1287,8 @@ interface RenderInput {
|
|
|
1000
1287
|
move?: string;
|
|
1001
1288
|
/** Number of prior Radiant reads available (0 = first run). */
|
|
1002
1289
|
priorReadCount?: number;
|
|
1290
|
+
/** Governance audit trail — events evaluated against the worldmodel. */
|
|
1291
|
+
governance?: GovernanceAudit;
|
|
1003
1292
|
}
|
|
1004
1293
|
interface RenderOutput {
|
|
1005
1294
|
/** The human-readable text output for terminal display. */
|
|
@@ -1009,6 +1298,85 @@ interface RenderOutput {
|
|
|
1009
1298
|
}
|
|
1010
1299
|
declare function render(input: RenderInput): RenderOutput;
|
|
1011
1300
|
|
|
1301
|
+
/**
|
|
1302
|
+
* @neuroverseos/governance/radiant — Memory Palace file operations
|
|
1303
|
+
*
|
|
1304
|
+
* Writes Radiant reads to the exocortex as dated markdown files (with
|
|
1305
|
+
* YAML frontmatter for structured signal data). Reads prior files to
|
|
1306
|
+
* detect pattern persistence across runs.
|
|
1307
|
+
*
|
|
1308
|
+
* The exocortex directory IS the Memory Palace. Files are the tiers:
|
|
1309
|
+
* - reads/YYYY-MM-DD.md = Tier 2 (structured signals) + Tier 3 (narrative)
|
|
1310
|
+
* - knowledge.md = accumulated pattern facts with persistence counts
|
|
1311
|
+
*
|
|
1312
|
+
* No database. The file system is the time series. Git is the versioning.
|
|
1313
|
+
*/
|
|
1314
|
+
interface PriorRead {
|
|
1315
|
+
date: string;
|
|
1316
|
+
filename: string;
|
|
1317
|
+
/** Pattern names found in this read (parsed from frontmatter). */
|
|
1318
|
+
patternNames: string[];
|
|
1319
|
+
/** Raw frontmatter content for signal comparison. */
|
|
1320
|
+
frontmatter: string;
|
|
1321
|
+
}
|
|
1322
|
+
interface PatternPersistence {
|
|
1323
|
+
name: string;
|
|
1324
|
+
/** How many prior reads contained this pattern. */
|
|
1325
|
+
occurrences: number;
|
|
1326
|
+
/** Dates this pattern was observed. */
|
|
1327
|
+
dates: string[];
|
|
1328
|
+
}
|
|
1329
|
+
/**
|
|
1330
|
+
* Write a Radiant read to the exocortex. Creates the directory structure
|
|
1331
|
+
* if it doesn't exist.
|
|
1332
|
+
*
|
|
1333
|
+
* @param exocortexDir — root of the exocortex (e.g. ~/exocortex/)
|
|
1334
|
+
* @param frontmatter — YAML frontmatter (Tier 2 structured signals)
|
|
1335
|
+
* @param text — prose output (Tier 3 narrative)
|
|
1336
|
+
* @returns the path of the written file
|
|
1337
|
+
*/
|
|
1338
|
+
declare function writeRead(exocortexDir: string, frontmatter: string, text: string): string;
|
|
1339
|
+
/**
|
|
1340
|
+
* Items from the worldmodel that Radiant tracks for subtraction proposals.
|
|
1341
|
+
*/
|
|
1342
|
+
interface WorldmodelItem {
|
|
1343
|
+
type: 'invariant' | 'drift_behavior' | 'aligned_behavior' | 'decision_priority';
|
|
1344
|
+
name: string;
|
|
1345
|
+
}
|
|
1346
|
+
/**
|
|
1347
|
+
* Update the knowledge file with:
|
|
1348
|
+
* - Pattern persistence (what keeps recurring → consider adding)
|
|
1349
|
+
* - Subtraction proposals (what hasn't fired → consider removing)
|
|
1350
|
+
* - Active items (what recently triggered → keep)
|
|
1351
|
+
*
|
|
1352
|
+
* The leader reads this file and makes deliberate, rare, bidirectional
|
|
1353
|
+
* changes to the worldmodel. Radiant proposes; the human decides.
|
|
1354
|
+
*/
|
|
1355
|
+
declare function updateKnowledge(exocortexDir: string, persistence: PatternPersistence[], options?: {
|
|
1356
|
+
/** Items declared in the worldmodel (invariants, drift behaviors, etc.) */
|
|
1357
|
+
declaredItems?: WorldmodelItem[];
|
|
1358
|
+
/** Item names that triggered governance in this read */
|
|
1359
|
+
triggeredItems?: string[];
|
|
1360
|
+
/** Total number of reads completed (for "hasn't fired in N reads" tracking) */
|
|
1361
|
+
totalReads?: number;
|
|
1362
|
+
}): string;
|
|
1363
|
+
/**
|
|
1364
|
+
* Load prior Radiant reads from the exocortex. Returns them sorted by
|
|
1365
|
+
* date (oldest first). Each read has its pattern names extracted from
|
|
1366
|
+
* the frontmatter.
|
|
1367
|
+
*/
|
|
1368
|
+
declare function loadPriorReads(exocortexDir: string): PriorRead[];
|
|
1369
|
+
/**
|
|
1370
|
+
* Compute pattern persistence across prior reads + the current patterns.
|
|
1371
|
+
*/
|
|
1372
|
+
declare function computePersistence(priorReads: PriorRead[], currentPatternNames: string[]): PatternPersistence[];
|
|
1373
|
+
/**
|
|
1374
|
+
* Format prior-read context for the AI interpretation prompt.
|
|
1375
|
+
* Tells the AI what patterns were seen in previous runs so it can
|
|
1376
|
+
* reference persistence.
|
|
1377
|
+
*/
|
|
1378
|
+
declare function formatPriorReadsForPrompt(priorReads: PriorRead[]): string;
|
|
1379
|
+
|
|
1012
1380
|
/**
|
|
1013
1381
|
* @neuroverseos/governance/radiant — `think` command
|
|
1014
1382
|
*
|
|
@@ -1089,7 +1457,7 @@ declare function think(input: ThinkInput): Promise<ThinkResult>;
|
|
|
1089
1457
|
*/
|
|
1090
1458
|
|
|
1091
1459
|
interface EmergentInput {
|
|
1092
|
-
scope: RepoScope;
|
|
1460
|
+
scope: RepoScope | OrgScope;
|
|
1093
1461
|
githubToken: string;
|
|
1094
1462
|
worldmodelContent: string;
|
|
1095
1463
|
lensId: string;
|
|
@@ -1100,6 +1468,10 @@ interface EmergentInput {
|
|
|
1100
1468
|
* intent (attention, goals, sprint) and compares against observed
|
|
1101
1469
|
* behavior from GitHub. The gap is the most valuable signal. */
|
|
1102
1470
|
exocortexPath?: string;
|
|
1471
|
+
/** Path to a compiled world directory (for governance audit).
|
|
1472
|
+
* When present, each event is evaluated through evaluateGuard
|
|
1473
|
+
* and the GOVERNANCE section appears in the output. */
|
|
1474
|
+
worldPath?: string;
|
|
1103
1475
|
}
|
|
1104
1476
|
interface EmergentResult {
|
|
1105
1477
|
/** The rendered text output (EMERGENT / MEANING / MOVE). */
|
|
@@ -1147,17 +1519,16 @@ declare function emergent(input: EmergentInput): Promise<EmergentResult>;
|
|
|
1147
1519
|
* knowledge / synthesis) with a SQLite reference implementation
|
|
1148
1520
|
* - CLI entry (bin/radiant.ts) and MCP server entry (bin/radiant-mcp.ts)
|
|
1149
1521
|
*
|
|
1150
|
-
* Build state:
|
|
1151
|
-
*
|
|
1152
|
-
*
|
|
1153
|
-
* Full roadmap: `radiant/PROJECT-PLAN.md` at the repo root.
|
|
1522
|
+
* Build state: Phase 1 complete — voice layer, behavioral dashboard,
|
|
1523
|
+
* MCP server, Memory Palace write-back, governance audit, ExoCortex
|
|
1524
|
+
* handshake. See radiant/PROJECT-PLAN.md for the full roadmap.
|
|
1154
1525
|
*
|
|
1155
|
-
* Usage
|
|
1526
|
+
* Usage:
|
|
1156
1527
|
* import {
|
|
1157
|
-
*
|
|
1158
|
-
*
|
|
1528
|
+
* think, emergent, scoreLife, classifyActorDomain,
|
|
1529
|
+
* aukiBuilderLens, checkForbiddenPhrases,
|
|
1159
1530
|
* } from '@neuroverseos/governance/radiant';
|
|
1160
1531
|
*/
|
|
1161
1532
|
declare const RADIANT_PACKAGE_VERSION = "0.0.0";
|
|
1162
1533
|
|
|
1163
|
-
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 InterpretInput, type InterpretResult, LENSES, type LensVocabulary, type LifeCapability, type LifeDimension, type ObservedPattern, type OverlapDef, type PatternEvidence, type PrimaryFrame, 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, aukiBuilderLens, checkForbiddenPhrases, classifyActorDomain, classifyEvents, composeSystemPrompt, createAnthropicAI, createMockAI, createMockGitHubAdapter, emergent, extractSignals, fetchGitHubActivity, formatExocortexForPrompt, formatScope, getLens, interpretPatterns, isPresent, isScored, isSentinel, listLenses, parseRepoScope, presenceAverage, readExocortex, render, scoreComposite, scoreCyber, scoreLife, scoreNeuroVerse, summarizeExocortex, think };
|
|
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 };
|