MCPcopy Create free account
hub / github.com/Noumena-Network/code / buildBaseRuntimeReport

Function buildBaseRuntimeReport

src/commands/env/index.js:123–182  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121}
122
123function buildBaseRuntimeReport() {
124 const buildMode = process.env.NCODE_BUILD_MODE ?? null
125 const userType = process.env.USER_TYPE ?? 'external'
126 const noumenaMode = buildMode === 'noumena' || buildMode === 'n'
127 const isInternalBuild = noumenaMode || userType === 'ant'
128 const isDemo = isEnvTruthy(process.env.IS_DEMO)
129 const internalCommandSetEnabled = isInternalBuild && !isDemo
130 const buildFeatures = getBuildFeatureStates()
131
132 const agentsPlatform = {
133 available:
134 buildFeatures.AGENT_TRIGGERS_REMOTE &&
135 getFeatureValue_CACHED_MAY_BE_STALE('ncode_surreal_dali', false) &&
136 isPolicyAllowed('allow_remote_sessions'),
137 gates: {
138 buildFeatureAgentTriggersRemote: buildFeatures.AGENT_TRIGGERS_REMOTE,
139 rolloutFlagTenguSurrealDali: getFeatureValue_CACHED_MAY_BE_STALE(
140 'ncode_surreal_dali',
141 false,
142 ),
143 policyAllowRemoteSessions: isPolicyAllowed('allow_remote_sessions'),
144 policyLimitsEligible: isPolicyLimitsEligible(),
145 },
146 }
147
148 const verifyPlanExecution = {
149 available:
150 buildFeatures.VERIFICATION_AGENT &&
151 process.env.CLAUDE_CODE_VERIFY_PLAN === 'true',
152 gates: {
153 buildFeatureVerificationAgent: buildFeatures.VERIFICATION_AGENT,
154 defineClaudeCodeVerifyPlan: process.env.CLAUDE_CODE_VERIFY_PLAN ?? null,
155 },
156 }
157
158 const hiddenReasons = []
159 if (!isInternalBuild) {
160 hiddenReasons.push(
161 'this bundle was built without Noumena internal compatibility enabled',
162 )
163 }
164 if (isDemo) {
165 hiddenReasons.push('IS_DEMO is set, so INTERNAL_ONLY_COMMANDS are excluded')
166 }
167
168 return {
169 now: new Date().toISOString(),
170 buildMode,
171 noumenaMode,
172 userType,
173 isInternalBuild,
174 internalCommandSetEnabled,
175 buildFeatures,
176 commandRuntimeGates: {
177 agentsPlatform,
178 verifyPlanExecution,
179 },
180 hiddenReasons,

Callers 1

getRuntimeReportFunction · 0.85

Calls 5

isEnvTruthyFunction · 0.90
getBuildFeatureStatesFunction · 0.85
isPolicyLimitsEligibleFunction · 0.85
isPolicyAllowedFunction · 0.50

Tested by

no test coverage detected