refactor: apply repository naming contract

Apply the accepted pre-release package, service, type, directory, and role renames as one repository-wide change.
This commit is contained in:
Tianyi Cui
2026-08-13 00:36:22 +08:00
parent 101df7cf58
commit a2d0f7f411
3281 changed files with 21730 additions and 21592 deletions

View File

@@ -66,12 +66,12 @@ function validateConfigKeys(config: TokenMeterConfig): void {
declare module '@deepseek-ai/cordis' {
interface Context {
tokenMeter: TokenMeterService
tokenMeter: TokenMeter
}
}
/** Replay owner for one service-wide estimator and isolated per-session folds. */
export class TokenMeterService extends Service {
export class TokenMeter extends Service {
// Schemastery preserves untrusted loader keys on an empty object schema;
// the public type excludes settings while validateConfigKeys rejects them.
static Config: z<TokenMeterConfig> = z.object({}) as unknown as z<TokenMeterConfig>
@@ -310,4 +310,4 @@ export class TokenMeterService extends Service {
}
}
export default TokenMeterService
export default TokenMeter

View File

@@ -6,7 +6,7 @@
* (one node per model-visible message) would grow a checkpoint without
* bound over the session's life. Instead, replacements ride the compact
* seam's shadow-price protocol: the metering event immediately before a
* surface `replace` (`compact/summary` or `compact/prune`) states the
* surface `replace` (`compaction/summary` or `compaction/prune`) states the
* heuristic price of the exact replaced range, so the fold keeps a running
* total plus at most one pending claim and never retains per-node prices.
* The counts are exact by construction: producers derive them from the same
@@ -19,8 +19,8 @@
import { deriveEventMessage, isSurfaceEvent } from '@deepseek-ai/dsh-session'
import type { SessionEvent } from '@deepseek-ai/dsh-session'
// Type-only: the `compact/*` SessionEventMap merges (shadow-price events).
import type {} from '@deepseek-ai/dsh-compact'
// Type-only: the `compaction/*` SessionEventMap merges (shadow-price events).
import type {} from '@deepseek-ai/dsh-compaction'
import { estimateMessage } from './estimate.ts'
/**
@@ -67,7 +67,7 @@ export function foldSurfaceProjection(
claim: ShadowPriceClaim | undefined,
event: SessionEvent,
): SurfaceTokensFold {
if (event.type === 'compact/summary' || event.type === 'compact/prune') {
if (event.type === 'compaction/summary' || event.type === 'compaction/prune') {
const { shadowedRange, shadowedTokenCount } = event.data
return {
deltaTokens: 0,