MCPcopy Create free account
hub / github.com/arctic-cli/interface / formatAccess

Function formatAccess

packages/arctic/src/session/usage-format.ts:116–123  ·  view source on GitHub ↗
(record: UsageRecordSummary)

Source from the content-addressed store, hash-verified

114}
115
116function formatAccess(record: UsageRecordSummary): string {
117 if (record.allowed === false) {
118 return record.limitReached ? "blocked, limit reached" : "blocked"
119 }
120 if (record.limitReached) return "allowed, limit reached"
121 if (record.allowed === true) return "allowed"
122 return "unknown"
123}
124
125function formatLimits(limits: UsageRecordSummary["limits"], now: number): string[] | undefined {
126 if (!limits) return undefined

Callers 1

formatUsageSummaryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected