heinzel-atlassian
Read Jira issues and Confluence pages, and draft Jira changes a person approves, through Atlassian's CLI acli: the tracker and documents capabilities
(ADR 0028): a first-party
Heinzelmännchen plugin.
Install it with:
hz system plugin add atlassian --confirm
hz system plugin remove heinzel-atlassian
Set up
The plugin does only what you could do yourself: every read runs acli,
logged in as you (ADR 0035). It stores no token and needs no app an administrator registers. Install acli 1.3.39 or later (brew install acli;
guide) and log in to both products, in the
browser or with an API token without scopes:
acli jira auth login --web
acli confluence auth login --web
The site is read from acli (acli jira auth status), so you need not name it. To pin another site, and to bind the
adapter, use your user configuration (never a project hz.toml, which Heinzelmännchen ignores for both):
hz system config set atlassian.site_url https://acme.atlassian.net
hz system config set capabilities.tracker atlassian
hz system config set capabilities.documents atlassian
which together write
[atlassian]
site_url = "https://acme.atlassian.net"
[capabilities]
tracker = "atlassian"
documents = "atlassian"
Or per shell: HZ_ATLASSIAN__SITE_URL, HZ_CAPABILITIES__TRACKER=atlassian, HZ_CAPABILITIES__DOCUMENTS=atlassian.
site_url must be https://<site>.atlassian.net (a pasted .../wiki is trimmed). The plugin builds issue and page
links on it and accepts page URLs only on it. acli decides which site it reads. After a login with an API token,
an answer that names another site (an issue's self, a page's _links.base) is refused with acli jira auth switch
and the setting to change. After a browser login the check can't work: answers come through Atlassian's gateway
(api.atlassian.com/ex/<product>/<cloud id>), name no site, and are taken as they are, so keep acli on the site you
configured (acli jira auth switch, acli confluence auth switch), or links point at the wrong site. Matching the
cloud id would need a request of the plugin's own; doctor says so. The configured site is not a binding to an account identity; acli chooses the signed-in account. Optionally,
atlassian.timeout sets the seconds each acli command may take (default 60), and atlassian.acli the program (a name
looked up on absolute PATH entries, or an absolute path; default acli). A project hz.toml can set none of the
three.
Upgrading from the release that stored an API token: the plugin no longer reads it. Remove it with your keychain's
own tool (on macOS: security delete-generic-password -s heinzel/atlassian -a atlassian-token), and drop
atlassian.email from your configuration.
Is it connected?
hz atlassian status (and the connector page) reads acli's own local status commands, acli auth status and
acli <product> auth status, and reports one state: not-installed, not-connected, needs-attention or
connected, with identity, site, a one-line cause, and the one command to copy next (brew install acli, or
acli jira auth login --web, which opens your browser; you run it). A product counts only when its own status says
authorised: being signed in to acli's global profile (which serves Rovo and Admin) is not enough.
Bound automatically while it is the only installed adapter of a capability, ADR
0055. hz system connector list (or Settings → Connectors in hz ui) shows the site and the login command; whether acli is
logged in is only known after hz system connector test atlassian, which reads one Jira work item (acli jira workitem search --limit 1) and, when documents is bound to it, one Confluence space (acli confluence space list --limit 1),
15 s at most each, and only when you run it.
Use
Workflows ask for tracker and documents, never for Jira or Confluence:
from datetime import datetime
from heinzel import Document, Documents, Issue, Module, Tracker, Window
module = Module("digest", "Weekly digest.", requires=["tracker:read", "documents:read"])
@module.operation
def updated(tracker: Tracker, since: datetime, until: datetime) -> list[Issue]:
"""Issues updated this week."""
return tracker.issues_updated("WID", Window(since=since, until=until))
@module.operation
def plan(documents: Documents) -> Document:
"""The plan, as Markdown."""
return documents.read("https://acme.atlassian.net/wiki/spaces/WID/pages/123456/Widget+plan")
| Method | Capability | acli command |
|---|---|---|
issues_updated(project, window) |
tracker:read |
acli jira workitem search --jql 'project = "WID" AND updated >= <ms> AND updated < <ms> ORDER BY updated ASC, key ASC' --fields key,summary,status,assignee,labels --paginate --json, then acli jira workitem view <key> --fields summary,status,assignee,labels,updated --json for each issue (search refuses updated as a field) |
read(ref) |
documents:read |
acli confluence page view --id <id> --body-format storage --json |
- Projects are Jira project keys such as
WID(lower case is upper-cased); anything else is refused before acli runs, so no input reaches JQL unchecked. Windows are half-open[since, until)with timezone-aware times, sent as epoch milliseconds widened to whole minutes, which Jira compares as instants whatever your profile's time zone; the exact window is applied to the results, which come oldest first, each issue once. More than 200 issues in one window is refused with a request for a shorter one.stateis the status name,assigneethe display name,labelsthe issue's labels. - Documents are a page id (
123456) or a page URL on your site:/wiki/spaces/<space>/pages/<id>/...or/wiki/pages/viewpage.action?pageId=<id>. URLs on any other host are refused before acli runs; short links (/wiki/x/...) need the full URL. The page's storage format comes back as Markdown-flavoured text (headings, lists, tasks, links, tables, code blocks); images and macro settings are left out, image captions stay.revisionis the page version. - Not available through acli: a search for pages updated in a window (acli 1.3 has
page viewbut no page search or CQL), so thedocumentscapability staysread(ref)only, which is all it defines today.
hz atlassian info # this plugin, its version, the site, acli's path and the commands it runs
hz system capability list # who reads what, through which adapter and hosts
hz system doctor # acli and its version, the site and bindings; runs only `acli --version`, offline
Doctor doesn't check whether acli is logged in, because asking could reach Atlassian; the first read tells. Errors say
what to do: acli missing names its install and acli jira auth login; acli older than 1.3.39 names the upgrade; acli
logged out (unauthorized) names acli jira auth login or acli confluence auth login; a refusal names the
permission (Browse projects in Jira, View on the space in Confluence); a missing project or page says the account may
lack access; a rate limit says to retry later.
acli runs with an argument list (never a shell), no standard input, the home directory as working directory, an
allowlisted environment (PATH without relative entries, HOME, locale, proxy, XDG_* and D-Bus, and ACLI_*
variables; never HZ_CREDENTIAL_*), in its own process group under a deadline (SIGTERM, then SIGKILL for it and
anything it started; a descendant that left the group and keeps the output open counts as a timeout), with standard
output capped at 10 MiB and the last 64 KiB of standard error kept. Error messages are the plugin's own words: acli's
error text only picks the message and goes to the debug log (HZ_LOG_LEVEL=DEBUG), cleaned of escape sequences and
controls, redacted of anything shaped like a token and only then shortened.
The hosts hz system capability list shows are your site and api.atlassian.com, the gateway acli uses after a
browser login. acli is Atlassian's program with its own settings; what it sends besides the reads is Atlassian's
to document, not this plugin's.
The Jira shapes were checked against acli 1.3.39 on a live Jira Cloud site (answers recorded in
tests/fixtures/live, people made fictional); that check found that search accepts only a fixed set of --fields
(no updated, parent or comments) and that a browser login answers with links on a *.prod.atl-paas.net gateway
shard. The Confluence samples in tests/fixtures are still assumed from the v2 REST page, not yet checked live.
Durable agents and Jira: assigned work, epics, attention and approved changes
On top of the tracker adapter, the plugin's own operations let an agent (or you) work with Jira without ever
changing it unasked (drafts over surprises, done over reminded, content by the model and
authority by code):
| Operation | Changes Jira? | What it does |
|---|---|---|
hz atlassian assigned [--project KAN] |
no | Open work assigned to you, most pressing first: status, due date, epic, labels, newest comments. |
hz atlassian epics [--project KAN] |
no | Epics that are not done, with children done, doing, to do, overdue, and percent done. |
hz atlassian watch --since <time> [--previous <snapshots>] |
no | What in your own work deserves a look since a time: overdue, due soon, new comments by others, moved, newly assigned or assigned away, a blocked label, new items. Returns snapshots to pass as --previous next time. |
draft-create-issue, draft-update-issue, draft-comment-issue |
no | A draft with the exact arguments of the write below, a preview of what changes (before and after), problems for what is missing or wrong, and the seen time of the work item. |
create-issue, update-issue, comment-issue |
yes | Carry out a draft. They are private read_only=False operations restricted to the CLI. Typing the command authorizes those arguments; draft and inspect them first. |
The six reading and drafting operations are private: unauthenticated API and HTTP MCP callers cannot access them, and private API callers need private:read. Writes require private:write as well as the CLI head. The plugin does not obtain or store Atlassian credentials; acli retains that responsibility. Current core chat tools exclude private operations.
For notices and approvals on any channel a host offers (a native banner, a direct message): each watch item carries a
stable notice_key, a title and a body made of the work item key, the reason codes and dates only, and each draft
carries arguments_sha256, link and approval_text, so a host can post it as a notice or an approval request and
bind a reply to the exact arguments it will run. The plugin imports no channel and approves nothing: a reply is a claim
the host verifies. Applying it currently requires the person to run the CLI command. The released core has no generic approval contract for private plugin operations, so these writes are absent from chat, MCP, API and web heads. A scoped private API bearer authenticates access; it does not approve a Jira change.
Every reason in watch comes from dates, ids and status categories, never from ticket text. Writes are not
automatically retried. A create searches for the hz-<digest> label first and accepts only a known empty result or
one valid matching key in the requested project. Malformed or ambiguous results stop the operation. This hash search
reduces accidental duplicates; it is not an exactly-once guarantee, and concurrent calls can both create an item.
An update or comment compares the latest timestamp read with the draft's seen time. This detects observed changes,
but is not an atomic compare-and-set: Jira can change between the read and the write. A matching existing comment
can suppress a repeat; its presence does not prove this invocation posted it. The plugin checks returned keys against
the requested key before using a work item or parent. Rate limits, a signed-out acli, a missing work item, unsupported
types, missing fields and permission refusals each report what happened. Generic approved private writes from a
model/chat/MCP/network remain unavailable; CLI-only support does not complete that original agent capability.
Ticket text is data. Summaries, descriptions, comments, labels, status and people's names are written by other
people. They are cleaned of control, invisible and bidirectional characters, cut to a bound, returned in fields
documented as untrusted, and every result carries a notice saying so. No command, query, approval or watch reason is
ever built from them: keys are validated by pattern, and acli gets arguments as a list in --flag=value form, so a
summary that looks like options is stored as text. What this cannot do is stop a model from being persuaded by a ticket
to propose something; that is why these writes remain restricted to explicit CLI commands.
Seeding and trying it against a real site: tests/live/seed_kan.py fills a personal test project with fictional epics and
work items; HZ_ATLASSIAN_LIVE_SITE=https://<site>.atlassian.net pytest tests/live -m e2e runs the real-acli checks
(sign-in expired, missing item, rejected type, create/comment/update round trip, stale approval, hostile ticket).
Development and release commands: repository guide.
Known gaps
The --json shapes from acli are assumed from Atlassian's REST APIs and not yet verified against a signed-in acli.
Screenshots
Demo data: find the fictional Weekly work review among local contracts.
Demo data: the local Weekly work review declares Jira and Confluence inputs; no report has been generated.
Command line
Demo data: structured fictional Jira changes through the real adapter, using a fixture-only requester and local vendor replies.
Demo data: the fictional Confluence plan, source and revision in the shell, using a fixture-only requester and local vendor replies.
Metadata
Release files for heinzel-atlassian 0.9.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| heinzel_atlassian-0.9.4.tar.gz | 622.4 kB | Without provenance | Details for heinzel_atlassian-0.9.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| heinzel_atlassian-0.9.4-py3-none-any.whl | Python 3 | none | any | Details for heinzel_atlassian-0.9.4-py3-none-any.whl |
Total release size: 678.5 kB
Release files / heinzel_atlassian-0.9.4.tar.gz
| Download URL | heinzel_atlassian-0.9.4.tar.gz |
|---|---|
| Size | 622.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3e65127e4bafa3d40a1d30f1712384af58542f3e9a8563e1b87172ca2910b45
|
|
BLAKE2b-256 checksum How to use checksums |
ff057d7ff6c6c5a24c6c69e6bb90d9ea17caf5a0caa54d882b2bad2d57234ed6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / heinzel_atlassian-0.9.4-py3-none-any.whl
| Download URL | heinzel_atlassian-0.9.4-py3-none-any.whl |
|---|---|
| Size | 56.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
82719310d5731ec48179fb67abeaedbf3d1548d256d2e76b3afeb13b76965fd6
|
|
BLAKE2b-256 checksum How to use checksums |
17c476dea90dc27e6622c0fde02b3733e58815b99b2eea1753aaf738a12d00ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for heinzel-atlassian 0.9.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.