MCPcopy
hub / github.com/openclaw/clawsweeper / reviewPolicyHash

Function reviewPolicyHash

src/clawsweeper.ts:2163–2183  ·  view source on GitHub ↗
(options: {
  model?: string;
  reasoningEffort?: string;
  sandboxMode?: string;
  serviceTier?: string;
})

Source from the content-addressed store, hash-verified

2161}
2162
2163function reviewPolicyHash(options: {
2164 model?: string;
2165 reasoningEffort?: string;
2166 sandboxMode?: string;
2167 serviceTier?: string;
2168}): string {
2169 return sha256(
2170 stableJson({
2171 version: REVIEW_POLICY_VERSION,
2172 freshDays: FRESH_DAYS,
2173 model: options.model ?? DEFAULT_CODEX_MODEL,
2174 reasoningEffort: options.reasoningEffort ?? DEFAULT_REASONING_EFFORT,
2175 sandboxMode: options.sandboxMode ?? "read-only",
2176 serviceTier: options.serviceTier ?? DEFAULT_SERVICE_TIER,
2177 targetRepo: targetRepo(),
2178 repositoryProfile: targetProfile(),
2179 prompt: reviewPromptTemplate(),
2180 schema: reviewDecisionSchemaText(),
2181 }),
2182 ).slice(0, 16);
2183}
2184
2185function asRecord(value: unknown): Record<string, unknown> {
2186 return value && typeof value === "object" ? (value as Record<string, unknown>) : {};

Callers 2

planCommandFunction · 0.85
reviewCommandFunction · 0.85

Calls 6

stableJsonFunction · 0.90
targetRepoFunction · 0.85
targetProfileFunction · 0.85
reviewPromptTemplateFunction · 0.85
reviewDecisionSchemaTextFunction · 0.85
sha256Function · 0.70

Tested by

no test coverage detected