MCPcopy Create free account
hub / github.com/TanStack/ai / computeWorkspaceHash

Function computeWorkspaceHash

packages/ai-sandbox/src/key.ts:52–58  ·  view source on GitHub ↗
(
  workspace: WorkspaceDefinition | undefined,
)

Source from the content-addressed store, hash-verified

50 * intentionally excluded (rotating a token must not orphan the sandbox).
51 */
52export function computeWorkspaceHash(
53 workspace: WorkspaceDefinition | undefined,
54): string {
55 if (!workspace) return fnv1a('no-workspace')
56 const { secrets: _secrets, ...rest } = workspace
57 return fnv1a(canonical(rest))
58}
59
60/** Compute the compound sandbox instance key. */
61export function computeSandboxKey(input: SandboxKeyInput): string {

Callers 3

setupFunction · 0.90
key.test.tsFile · 0.90
computeSandboxKeyFunction · 0.85

Calls 2

fnv1aFunction · 0.85
canonicalFunction · 0.85

Tested by

no test coverage detected