# Jira Live Sync — Plugin Task

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

## Runtime

- Runtime: `live-sandboxed`
- Template: `live`
- Plugin id: `jira-live-sync`
- Declared features: `jira`, `search`

## Functional requirements

- Publish one bounded declarative view on lifecycle mount.
- Handle inert button/form action IDs without leaving the sandboxed evaluator.
- Read the exact declared `atlassian` connection with a host-resolved Basic credential.
- Project only changed mapped properties using each note's opaque propertiesRevision.
- Render results through a declarative search node bound to the host SearchView.

## Non-goals

- No imports, dynamic code, DOM, network, storage, or filesystem access in guest source.
- No writes unless a declared write permission is selected.
- No arbitrary Atlassian tenant origins; only the approved exact origin is used.
- No provider response bodies or credentials are ever persisted.

## Contributions

- Views:
- `main` — Jira Live Sync
- Commands:
- none
- Navigation items:
- none
- Search presentations:
- none
- Editor extensions:
- none

## Permissions

- `network.request`
- `notes.properties.write`
- `notes.read`
- `search.query`
- `secrets.use`

## Connections

- `atlassian` → HTTPS origin from setting `siteUrl`

## Settings

- `label` (text, synced) — Synced display label for the live view heading.
- `siteUrl` (url, synced) — HTTPS origin for the approved Atlassian connection.
- `email` (text, synced) — Account email for the host Basic credential adapter.
- `apiToken` (secret, encrypted-secret) — Encrypted API token resolved only around approved requests.
- `statusProperty` (text, synced) — Note property that receives the projected Jira status.
- `refreshMinutes` (number, synced) — Active-interval refresh cadence in minutes.

## Secret names

- `apiToken`

## Mappings

- Jira issue `fields.status.name` → note property `JiraStatus`.

## Jobs

- none

## Commands (invocable IDs)

- none

## Synthetic fixtures

- test/fixtures/jira-issues.json — synthetic Jira responses for the client 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/live-plugin-v1.json`
- Template: `live`
- Template digest: `sha256:92d949e598e675a89304dcb2adc305806b90166c9088704a3c00bb30c7ec747d`
- 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.
