Download packages/knowledge-fabric/src/CanonService.ts from AnthropicallyHuggingFaces/ProjectOS: direct link, hf CLI and curl.
- Browser
- Download file 466 Bytes
-
https://huggingface.co/spaces/AnthropicallyHuggingFaces/ProjectOS/resolve/main/packages/knowledge-fabric/src/CanonService.ts
- Command line
-
hf download hf://spaces/AnthropicallyHuggingFaces/ProjectOS/packages/knowledge-fabric/src/CanonService.ts
-
curl -L -o CanonService.ts https://huggingface.co/spaces/AnthropicallyHuggingFaces/ProjectOS/resolve/main/packages/knowledge-fabric/src/CanonService.ts
466 Bytes
| import { CanonRepository, type CanonEntryInput } from '@projectos/storage-fabric/sqlite/repositories'; | |
| import type { DatabaseSync } from 'node:sqlite'; | |
| export class CanonService { | |
| readonly repository: CanonRepository; | |
| constructor(db: DatabaseSync, repository = new CanonRepository(db)) { this.repository = repository; } | |
| create(entry: CanonEntryInput) { return this.repository.create(entry); } | |
| get(entryId: string) { return this.repository.get(entryId); } | |
| } | |