# CSV Sandbox Import — Plugin Task

Authoritative requirements for this scaffolded project. Keep it in sync with
`manifest.json`.

## Runtime

- Runtime: `sandboxed-page`
- Template: `sandbox`
- Plugin id: `csv-sandbox-import`
- Declared features: `csv`

## Functional requirements

- Render a bounded read-only panel from admitted note/search data.
- Expose a manual refresh command that re-reads bounded data.
- Register commands and the single job only in the controller activation context.
- Parse one explicitly selected indexed CSV asset with a bounded RFC 4180 parser.
- Preview mapped property changes and apply only accepted, conditionally-revisioned writes.

## Non-goals

- No unbounded scans of the vault or the metadata index.
- No writes unless a declared write permission is selected.
- View leaves never register commands or jobs; only the controller does.
- No filesystem handles; assets are read only through api.assets.

## Contributions

- Views:
- `panel` — CSV Sandbox Import panel
- Commands:
- `refresh` — Refresh CSV Sandbox Import
- Navigation items:
- `open-panel` — CSV Sandbox Import
- Search presentations:
- none
- Editor extensions:
- none

## Permissions

- `assets.read`
- `jobs.schedule`
- `metadata.read`
- `notes.properties.write`
- `notes.read`
- `search.query`

## Connections

- none

## Settings

- `label` (text, synced) — Synced display label for the panel heading.
- `verbose` (checkbox, local) — Device-local verbose diagnostics toggle.
- `csvPath` (asset, synced) — Exact vault-relative CSV asset path to import.
- `csvMappings` (textarea, synced) — CSV-field to note-property mappings, one per line.

## Secret names

- none

## Mappings

- CSV field `name` → note property `ImportedName` (synthetic sample).

## Jobs

- `sync` — Sync CSV Sandbox Import; triggers: startup, command:refresh
- `import-csv` — Import CSV properties; triggers: command:refresh, asset-change:csvPath

## Commands (invocable IDs)

- `refresh`

## Synthetic fixtures

- test/fixtures/sample.csv — synthetic CSV rows for parser and mapping tests.

## Pinned references

- Docs:
- node_modules/@thortiq/plugin-api/README.md
- node_modules/@thortiq/plugin-api/LIMITS.md
- AGENTS.md
- PLUGIN_TASK.md
- Schema: `@thortiq/plugin-api/schemas/manifest-v2.json`
- Template: `sandbox`
- Template digest: `sha256:d8e3361e56472b0322fa5c51325a563a5c785072d685cfdf43272ba5317fdb79`
- API version: `1.0.0` (manifest range `^1.0`)
- Kit version: `1.0.0`

## Boundaries

- No internal imports: only `@thortiq/plugin-api`, `@thortiq/plugin-sdk`, and
  own `./` modules (plus the template's declared UI kit). Application internals
  such as `@thortiq/data`, `/shared/*`, and `shell/*` are forbidden.
- Live-vault prohibition: never scaffold into, read, or write the user's live
  vault. All development uses temporary directories and synthetic fixtures.
