refactor(platform): Phase 735 core preamble scopes and scope registry

Add swarmScope, dmScope, appEventsScope, cryptoScope, channelMetaScope,
permissionsScope, and hyperdbScope namespaces in index.js with dedicated
import modules and platform-index-scope-registry.js (17 scopes). No
behavior or mesh semantics changes.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-06-03 10:29:40 -04:00
co-authored by Cursor
parent 60a103a653
commit b3c011e61f
9 changed files with 286 additions and 224 deletions
+2
View File
@@ -54,6 +54,8 @@ Application facade: one `PearcordPlatform` class that wires identity, database,
**Phase 723 (v0.8.699):** Dedicated slash registry & invoke audit export JSON — `slash-registry-json-mixin.js`, `slash-invoke-audit-json-mixin.js`, spans `slash-registry.json` / `slash-invoke-audit.json`, `getSlashInvokeAuditExportJsonExport`, `clearSlashInvokeAuditExportJsonExports`, deep links `openSlashRegistryJson` / `openSlashInvokeAuditJson`. Bundle: `npm run test:ci-phase723`.
**Phase 735 (v0.8.711):** `swarmScope`, `dmScope`, `appEventsScope`, `cryptoScope`, `channelMetaScope`, `permissionsScope`, `hyperdbScope`; `platform-index-scope-registry.js` (17 import scopes). Bundle: `npm run test:ci-phase735`.
**Phase 734 (v0.8.710):** `foldersScope`, `enrichmentScope`, `threadsScope`, `botAuthScope`, `automationScope`; `platform-index-exports.js` module finalize. Bundle: `npm run test:ci-phase734`.
**Phase 733 (v0.8.709):** `index.js` uses `sharedScope`, `localScope`, `searchScope`, `integrationScope` (+ `deliveryScope`); `platform-index-integration-imports.js`. Bundle: `npm run test:ci-phase733`.
+179 -224
View File
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
'use strict'
const appEvents = require('pearcord-app-events')
module.exports = {
AppEventBridge: appEvents.AppEventBridge,
APP_EVENTS: appEvents.APP_EVENTS,
APP_EVENT_CATEGORIES: appEvents.APP_EVENT_CATEGORIES,
categoryAllows: appEvents.categoryAllows
}
+13
View File
@@ -0,0 +1,13 @@
'use strict'
const channelMeta = require('pearcord-channel-meta')
const { createTopicMergeCounters } = require('pearcord-channel-meta/topic-merge-counters')
module.exports = {
normalizeTopic: channelMeta.normalizeTopic,
normalizeDescription: channelMeta.normalizeDescription,
canEditTopic: channelMeta.canEditTopic,
buildChannelSummary: channelMeta.buildChannelSummary,
ChannelDescriptionStore: channelMeta.ChannelDescriptionStore,
createTopicMergeCounters: createTopicMergeCounters
}
+9
View File
@@ -0,0 +1,9 @@
'use strict'
const crypto = require('pearcord-crypto')
module.exports = {
sealDmContent: crypto.sealDmContent,
openDmContent: crypto.openDmContent,
dmEncryptionAvailable: crypto.dmEncryptionAvailable
}
+12
View File
@@ -0,0 +1,12 @@
'use strict'
const dm = require('pearcord-dm')
module.exports = {
PearcordDM: dm.PearcordDM,
DmChannelMetaStore: dm.DmChannelMetaStore,
DmPollStore: dm.DmPollStore,
DM_GUILD_ID: dm.DM_GUILD_ID,
dmChannelId: dm.dmChannelId,
listDmConversations: dm.listDmConversations
}
+17
View File
@@ -0,0 +1,17 @@
'use strict'
const guildRoles = require('pearcord-guild-roles')
const channelPerms = require('pearcord-channel-permissions')
const rolePerms = require('pearcord-guild-roles/permissions')
module.exports = {
PearcordGuildRoles: guildRoles.PearcordGuildRoles,
PERMISSION_META: guildRoles.PERMISSION_META,
PearcordChannelPermissions: channelPerms.PearcordChannelPermissions,
memberHasChannelPermission: channelPerms.memberHasChannelPermission,
effectivePermissionView: channelPerms.effectivePermissionView,
effectivePermissionMask: channelPerms.effectivePermissionMask,
viewToMask: rolePerms.viewToMask,
maskToPermissionView: rolePerms.maskToPermissionView,
memberPermissionMask: rolePerms.memberPermissionMask
}
+29
View File
@@ -0,0 +1,29 @@
'use strict'
/** Declared index.js import scopes for CI smokes (Phase 735). */
const INDEX_IMPORT_SCOPES = [
'deliveryScope',
'sharedScope',
'localScope',
'searchScope',
'integrationScope',
'foldersScope',
'enrichmentScope',
'threadsScope',
'botAuthScope',
'automationScope',
'swarmScope',
'dmScope',
'appEventsScope',
'cryptoScope',
'channelMetaScope',
'permissionsScope',
'hyperdbScope'
]
const INDEX_IMPORT_SCOPE_COUNT = INDEX_IMPORT_SCOPES.length
module.exports = {
INDEX_IMPORT_SCOPES,
INDEX_IMPORT_SCOPE_COUNT
}
+15
View File
@@ -0,0 +1,15 @@
'use strict'
const swarm = require('pearcord-swarm-manager')
module.exports = {
boundedFlush: swarm.boundedFlush,
retryWire: swarm.retryWire,
GossipOutbox: swarm.GossipOutbox,
adaptiveBurstDelays: swarm.adaptiveBurstDelays,
nextRoundRobinIndex: swarm.nextRoundRobinIndex,
gossipLaneForLabel: swarm.gossipLaneForLabel,
discoveryMeshFlushListings: swarm.discoveryMeshFlushListings,
GuildTopicPool: swarm.GuildTopicPool,
computeGuildTopicPoolMax: swarm.computeGuildTopicPoolMax
}