Skip to content

Component: SmrtSpaceArchive

Canonical source: SmrtApps/CSApps/SmrtSpaceArchive/README.md (mirrored below)


SmrtSpaceArchive

Overview & responsibilities

SmrtSpaceArchive is a runtime service and CLI for persisting SmartSpace archive entries into the append-only SQLite archive managed by Smrt.SmrtSpace.Archive.

Public surface (entry points, CLI commands, UI)

SmrtSpaceArchive runs headless and exposes a CLI for one-shot append calls.

Entry points

  • Primary executable: SmrtSpaceArchive.exe

CLI / commands

  • append --stdin — Reads a JSON payload from stdin.
  • append --payload "{...}" — Reads a JSON payload from the command line.
  • append --payload-file <path> — Reads a JSON payload from disk.

Payload schema:

{
  "entries": [
    {
      "recordedAtUtc": "2025-01-01T00:00:00Z",
      "smrtSpaceName": "",
      "sourceName": "",
      "sourceUrl": "",
      "sourcePath": "",
      "encounterId": "",
      "fragmentType": "",
      "role": "",
      "fileName": "",
      "fileExtension": "",
      "filePath": "",
      "fileSizeBytes": 0,
      "detectedType": "",
      "confidence": 0.0,
      "contentText": "",
      "contentJson": ""
    }
  ]
}

Key files and folders

  • SmrtSpaceArchive.csproj — .NET 8 console app project (x64 only; RID win-x64).
  • Program.cs — CLI entry point and optional pipe-backed service loop.
  • Build-SmrtSpaceArchive.ps1 — build + stage script.
  • Clean-SmrtSpaceArchive.ps1 — clean script.

Dependencies / integrations

  • Smrt.SmrtSpace.Archive: SQLite archive schema + writer.
  • Smrt.Config: canonical SmrtDB path resolution.
  • Smrt.Logging: structured component logging (slug smart-space-archive).

Configuration, logs, paths, and operational data

  • Staged app (Debug): Apps/Debug/win-x64/SmrtSpaceArchive/SmrtSpaceArchive.exe
  • Archive database: %LOCALAPPDATA%/SmrtHub/SmrtDB/smart-space-archive/archive.db
  • Logs: %LOCALAPPDATA%/SmrtHub/Logs/smart-space-archive/
  • smart-space-archive-logYYYYMMDD.txt
  • smart-space-archive-logYYYYMMDD.json

See: README.Files/System/Policies/SmrtHub-Operational-Data-Policy-v1.0.README.md.

Observability (logging, diagnostics)

  • Logging uses Smrt.Logging with component slug smart-space-archive.
  • Archive entries store metadata + content text/JSON only; image bytes are never persisted.

Testing & validation expectations

  • Build + stage: SmrtApps/CSApps/SmrtSpaceArchive/Build-SmrtSpaceArchive.ps1 -Configuration Debug
  • Append test payload: SmrtSpaceArchive.exe append --stdin (from staged output directory)

Support bundle / Support Bundle

SmrtSpaceArchive relies on standard operational data paths (SmrtDB + logs). No custom Support Bundle attachments are added yet.

  • SmrtSpace Archive library: SmrtApps/src/Smrt.SmrtSpace.Archive/README.md
  • Logging guide: README.Files/Reference-Guides/SmrtHub.Logging.README.md
  • Operational Data Policy: README.Files/System/Policies/SmrtHub-Operational-Data-Policy-v1.0.README.md
  • Privacy & Security Policy: README.Files/System/Policies/SmrtHub-Privacy-and-Security-Policy.README.md