MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / migrateExpiresAt

Function migrateExpiresAt

packages/core/sdk/src/migration-spec.ts:581–588  ·  view source on GitHub ↗
(input: {
  readonly grant: MigrationGrant;
  readonly v1ExpiresAt: number | null;
  readonly nowMs: number;
})

Source from the content-addressed store, hash-verified

579export const SYNTHETIC_CLIENT_CREDENTIALS_TTL_MS = 60 * 60 * 1000;
580
581export const migrateExpiresAt = (input: {
582 readonly grant: MigrationGrant;
583 readonly v1ExpiresAt: number | null;
584 readonly nowMs: number;
585}): number | null =>
586 input.grant === "client_credentials" && input.v1ExpiresAt == null
587 ? input.nowMs + SYNTHETIC_CLIENT_CREDENTIALS_TTL_MS
588 : input.v1ExpiresAt;
589
590// ---------------------------------------------------------------------------
591// Source config → v2 integration config.

Callers 2

planConnectionRowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected