← 返回 Skill 列表
extension
分类: 开发与工程API Key 暂未确认

PowerContext Source Importer

Import offline CSV tables and JSONL event logs into PowerContext as row-level or event-level Sources with stable identities, then retrieve exact citations. Use when a user needs traceable evidence from spreadsheets, export dumps, or agent session logs instead of whole-file blobs.

person作者: KuoTzuyanghubOpenAPI

PowerContext Source Importer

Turn flat files into per-record evidence so every retrieval hit can be traced back to an exact row or event.

<!-- OB-S:fsXw4Y-6Js_bAWwYxFA70Q -->

When to use

  • A CSV report must be searchable per row, keyed by a business key.
  • A JSONL session log (agent traces, audit trails) must keep one Source per event.
  • Reviews demand a citation that resolves to the original record, byte for byte.

Workflow

  1. Inspect the file. Read the header line; confirm the primary key column exists, is non-blank, and is unique per document.
  2. Parse strictly. Decode as UTF-8 (accept a leading BOM). Use strict CSV quoting: comma separator, " quote, "" escape. Reject duplicates, blank keys, wrong widths.
  3. Build one Source per record. Identity depends only on document identity plus the record key, so re-imports stay idempotent and revisions get new identities.
  4. Project to text evidence. Content is a compact JSON object of the row (or the event body); metadata keeps document id, key, and record identity.
  5. Persist through the runtime. Submit observations via the ingestion API; a repeat submission of the same identity must not create a second Source.
  6. Verify citations. Run a query, resolve each hit, and confirm the cited text equals the projected content and that coordinates match the original record.

Rules

  • Never rewrite, translate, or summarise record content into the evidence text.
  • Reject the whole document on any parse error; never emit partial rows.
  • Keep identities under 256 characters and delimiter-safe (percent-encode separators).