Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/portals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Public portal compatibility
on:
workflow_dispatch:
push:
branches: [feat/paste-verification]
branches: [feat/paste-verification, feat/application-workflows]
permissions:
contents: read
jobs:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ jobs:
- run: npm test
- run: npx playwright install chromium
- run: npm run test:browser
- run: node tests/workflows.mjs
if: ${{ !cancelled() }}
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x1024x24" node tests/popup.mjs
if: ${{ !cancelled() }}
- run: |
python3 scripts/package.py
cp dist/SHA256SUMS /tmp/first-checksum
Expand All @@ -41,6 +44,7 @@ jobs:
path: |
dist/
test-results/browser-summary.json
test-results/workflow-summary.json
test-results/popup-summary.json
test-results/screenshots/*.png
retention-days: 14
Expand All @@ -58,4 +62,4 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
version="$(node -p "require('./extension/manifest.json').version")"
gh release create "v$version" "dist/draft-cairn-$version.zip" "dist/draft-cairn-store-kit-$version.zip" dist/SHA256SUMS --target "$GITHUB_SHA" --prerelease --title "Draft Cairn $version · preview" --notes-file docs/release-notes.md
gh release create "v$version" "dist/draft-cairn-$version.zip" "dist/draft-cairn-store-kit-$version.zip" dist/SHA256SUMS --target "$GITHUB_SHA" --prerelease --title "Draft Cairn $version · preview" --notes-file docs/release-notes.md
18 changes: 14 additions & 4 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Privacy policy

Effective 23 October 2026 · Draft Cairn 0.3.0 preview
Effective 5 November 2026 · Draft Cairn 0.4.0 preview

Draft Cairn keeps supported field text only on websites you explicitly enable. It also keeps complete oversized, changed or unverified paste originals temporarily, and library answers you deliberately save or import. No account is required. Nothing is sent to the developer.

Expand All @@ -10,7 +10,7 @@ Recovery records contain answer text, the exact website origin (scheme, host and

Raw URL paths, query strings, fragments, cookies and a general browsing-history log are not stored. Hashes are fingerprints, not guaranteed anonymization: someone who knows candidate pages or fields may guess them. Selected site origins are retained for capture and recovery. Arbitrary narrative answers can contain sensitive information even when credential fields are excluded.

Library records contain title, answer text, optional project, local identifier and save time. They have no website association. Settings include selected and blocked origins, field exclusions, retention, metadata and session-storage choices, encryption mode, and appearance (system, light or dark). The extension does not use Chrome Sync.
Library records contain title, answer text, optional project, local identifier and save time. They have no website association. Settings include selected and blocked origins, field exclusions, global/per-site retention, metadata and session-storage choices, encryption mode, and appearance (system, light or dark). The extension does not use Chrome Sync.

## Encryption choices

Expand All @@ -33,15 +33,15 @@ Copy writes to the system clipboard. Other apps, clipboard managers, Windows cli

## Capture exclusions

Visible, editable standard long-answer fields and recognized top-level Quill, ProseMirror/Tiptap, CKEditor 5 and inline TinyMCE roots qualify. Rich-text snapshots contain rendered plain text, not formatting or attachments, and support copy back only. Password, payment, one-time-code, hidden, read-only and other sensitive-hint fields are filtered. Sensitive autocomplete tokens are excluded; `autocomplete="off"` is allowed. Incognito, frames, generic contenteditable and shadow-root fields are unsupported. Filters are imperfect. Use only where you have authority to retain a local copy.
Visible, editable standard long-answer fields and recognized Quill, ProseMirror/Tiptap, CKEditor 5 and inline TinyMCE roots qualify. Rich-text snapshots contain rendered plain text, not formatting or attachments, and support copy back only. Password, payment, one-time-code, hidden, read-only and other sensitive-hint fields are filtered. Sensitive autocomplete tokens are excluded; `autocomplete="off"` is allowed. Eligible fields in open shadow roots and HTTP/HTTPS frames can save. Embedded frames require both their own origin and the containing website enabled; frame/shadow recovery is copy-only. Incognito, closed shadow roots, opaque/about:blank/srcdoc frames and generic contenteditable are unsupported. Filters are imperfect. Use only where you have authority to retain a local copy.

Post-paste checks inspect the plain-text clipboard payload only during a trusted paste in a qualifying field. They compare visible text after 1.5 seconds, or keep an original for manual review when comparison is interrupted or a rich selection cannot be matched. Originals are encrypted under the selected storage mode. The page can hold at most four original/observed-text reviews in memory until dismissed, reload, protection off or close; vault locking does not erase text already present on a website or these page-memory copies. Visible matches do not prove server acceptance. No background clipboard history is collected.

You can block a site from the popup. A field can be excluded from the larger on-page editor; fields with the same identity on that page are excluded together and their recovery revisions are deleted. A hashed exclusion and its origin are retained until removed in settings. Blocking a site stops capture but keeps earlier drafts unless you delete them.

## Retention and deletion

New installations default to one day of recovery. Existing installations retain their choice. Options are 1, 3, 7, 14 or 30 days. Separate original-paste records expire within one hour. Expired records are excluded on reads and removed on successful writes, hourly cleanup or startup while Chrome runs. Closed-browser files may retain expired bytes until cleanup succeeds.
New installations default to one day of recovery. Existing installations retain their choice. Options are 1, 3, 7, 14 or 30 days globally and per site. Organization-managed policy can restrict allowed origins and cap retention. Increasing retention does not extend earlier expiry or override storage budgets. Separate original-paste records expire within one hour. Expired records are excluded on reads and removed on successful writes, hourly cleanup or startup while Chrome runs. Closed-browser files may retain expired bytes until cleanup succeeds.

Recovery is a rolling buffer: the oldest revisions can disappear earlier at the 180-record or 6 MiB total plaintext budget. Library capacity reserves space for recovery; library answers are never evicted. Evictions are shown in the UI.

Expand All @@ -54,3 +54,13 @@ Individual drafts, site drafts/access, library answers or all extension data can
Handled data is used only for the disclosed answer-recovery, paste-protection and answer-library features. It is not sold, used for advertising or credit decisions, or made accessible to the developer. Use follows the Chrome Web Store User Data Policy, including Limited Use requirements.

Use [GitHub issues](https://github.com/librerob/draft-cairn/issues) for general questions with synthetic examples only. Never post confidential answers. For vulnerabilities use the route in [SECURITY.md](SECURITY.md).

## Optional workflow actions (0.4.0)

The library picker sends saved titles/projects, and the selected answer, to the isolated content script only after the user opens it on an enabled page. Its closed-shadow editor is a convenience, not a security boundary against a compromised live website or browser. Explicit insertion exposes text to that website. Existing text outside the saved selection is preserved; changed destinations cancel insertion. Visible results are checked after 1.5 seconds without verifying server receipt.

Counter hints read short visible field-associated counters on enabled pages. They are advisory; no counter contents or usage analytics are sent to the developer. The shortcut opens the same explicit picker and does not insert automatically.

Application snapshot export writes selected saved answers to readable local Markdown, including question labels only where page details were saved. No automatic submission receipt is collected. It is not proof that an application was sent or accepted. The exported file is outside vault protection. The local practice page stores synthetic answer text in the ordinary encrypted recovery buffer, capped at one day, without enabling any website.

Frame capture additionally uses a hashed containing-page/frame scope. Raw containing-page paths and queries are not stored. Exact origins and per-site retention settings remain operational metadata under the automatic profile key. Organization policy is read from Chrome managed storage. It supplies restrictions only; it does not grant access, enable a server, share answers, or upload usage.
27 changes: 23 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Draft Cairn — Your words. Still within reach.](docs/store/readme-header.svg)

Local answer recovery for long web applications. A free, MIT-licensed Chrome extension for grant writers, consultants, and agencies working through application portals.
Keep a local safety copy of long application answers. Recover lost writing, check answer fit, and reuse approved paragraphs. Free, MIT-licensed, and private by default.

Draft Cairn keeps a local safety copy of supported answers on websites you choose.

Expand All @@ -28,7 +28,7 @@ This is an early preview. Commercial demand and broad compatibility have not bee

## Install

1. Download `draft-cairn-0.3.1.zip` from [Releases](https://github.com/librerob/draft-cairn/releases), verify it against `SHA256SUMS`, and extract it.
1. Download `draft-cairn-0.4.0.zip` from [Releases](https://github.com/librerob/draft-cairn/releases), verify it against `SHA256SUMS`, and extract it.
2. Open `chrome://extensions`, enable Developer mode, choose **Load unpacked**, and select the extracted folder containing `manifest.json`.
3. Pin Draft Cairn. On an ordinary HTTP/HTTPS website, open its popup and choose **Enable for this site**. Approve Chrome's site-access request.
4. Type in a supported field and wait for **saved on this device**. Open **Recovery & library** to inspect saved text.
Expand All @@ -42,10 +42,26 @@ Preparing a store listing? The release also includes a separate `draft-cairn-sto
- Visible, editable standard textareas, and ordinary text inputs with a declared `maxlength` of at least 120.
- Plain-text answers in targeted top-level Quill, ProseMirror/Tiptap, CKEditor 5 and inline TinyMCE roots. Rich-text recovery uses copy back; formatting and attachments are not saved.
- Up to 180 recovery records in a rolling history; the oldest recovery records are removed when the count or byte budget is reached, with a visible notice. Explicit library answers are never evicted. Up to four snapshots per field. Rapid edits update the current snapshot; revisions at least 30 seconds apart can remain as earlier snapshots.
- One day of recovery by default on new installs (existing choices are preserved), configurable to 1, 3, 7, 14, or 30 days. Complete oversized pastes expire within one hour. Expiry cleanup runs hourly while Chrome is running and on reads/startup.
- One day of recovery by default on new installs (existing choices are preserved), configurable to 1, 3, 7, 14, or 30 days globally and per site. Increasing retention does not extend earlier records or defeat storage eviction. Complete oversized pastes expire within one hour. Expiry cleanup runs hourly while Chrome is running and on reads/startup.
- Library answers with a title and optional project. These remain until deleted; import/export uses a [documented v1 format](docs/library-format.md).

The current source supports only the top-level page. Generic contenteditable, frames, shadow-root fields, browser-internal pages and incognito remain excluded. See the [public portal and editor sample matrix](docs/portal-matrix.md) and [precise compatibility limits](docs/compatibility.md). A public demo result does not establish compatibility with every customer portal using that technology.
Supported ordinary fields and targeted rich editors can also save in open shadow roots and authorized HTTP/HTTPS frames. Enable both the containing site and an embedded form’s exact origin. Frame and shadow-root recovery is copy-only. Closed shadow roots, opaque/about:blank/srcdoc frames, generic contenteditable, browser-internal pages and incognito remain excluded. See the [public portal and editor sample matrix](docs/portal-matrix.md) and [precise compatibility limits](docs/compatibility.md). A public demo result does not establish compatibility with every customer portal using that technology.

![Real local save, reload and recovery exercise](docs/images/recovery-demo.gif)

## Reuse an answer without guessing the fit

Focus a supported field, open the on-page Draft Cairn editor and choose **Use library answer**, or press **Alt+Shift+L** (configure conflicts in `chrome://extensions/shortcuts`). Choose a saved paragraph, inspect the projected result and character/word counts, then explicitly insert it at the saved cursor. Existing text outside your selection stays. A changed destination cancels insertion; oversized HTML limits disable it. The extension checks the visible result after 1.5 seconds. Rich editors remain copy-only.

A visible, explicitly linked `342/500 words` or `120/500 characters` counter can supply an advisory website limit. Local word counts are whitespace estimates; website rules can differ. Conflicting or unrecognized counters are ignored. These hints do not prove server acceptance or block form submission.

## Try it and keep an application copy

Choose **Try a sample recovery** in the toolbar popup for a local, synthetic save → reload → recover exercise using the real encrypted store. It does not grant website access. On real sites, enable protection before writing.

In Recovery drafts, select the saved revisions you want and choose **Export selected snapshot**. The readable Markdown file contains only those revisions, with question labels when page details were saved. It is an application snapshot, **not proof of submission**. It can miss fields that were never captured or have expired; exports remain outside vault protection.

For several portals, use **Sites & settings → Enable several exact website origins** to request their host access together. Both the parent website and the embedded form origin must be enabled for frame capture. No vendor-wide wildcard presets or untested compatibility promises are bundled. Optional [organization policies](docs/managed-policy.md) restrict allowed origins and maximum retention; they never silently grant Chrome access.

## Appearance

Expand Down Expand Up @@ -101,6 +117,9 @@ Plain JavaScript, HTML, and CSS keep review and maintenance straightforward. The

Restoration uses a hashed page path, a stable field descriptor, and the ordered form structure. Duplicate or missing identities refuse restoration. Pages with query strings or fragments support copying only. This conservatism reduces wrong-field restoration; it cannot prove that a website has kept the same meaning for an identifier. Always check restored text before submitting.

- [Ten-tester pilot kit](docs/tester-kit.md) — invitation, synthetic tasks and grant-portal worksheet.
- [Organization policy](docs/managed-policy.md) — optional origin restrictions and retention caps.
- [Edge handoff](docs/edge-handoff.md) — prepared instructions; native Edge testing and submission remain pending.
- [Commercial validation](docs/commercial-validation.md) — first users, alternatives, and decision criteria.
- [Costs](docs/costs.md) — current requirements, no recurring infrastructure, future cost categories.
- [Store listing and submission checklist](docs/chrome-web-store.md).
Expand Down
1 change: 1 addition & 0 deletions demo/frame.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Synthetic embedded form</title></head><body><label for="frame-answer">Embedded project narrative</label><textarea id="frame-answer" rows="5"></textarea></body></html>
8 changes: 8 additions & 0 deletions demo/workflows-fixture.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
for(const [id,mode] of [['shadow-host','open'],['private-host','open'],['closed-host','closed']]){
const host=document.getElementById(id),root=host.attachShadow({mode});
const label=document.createElement('label');label.textContent='Synthetic shadow narrative';
const area=document.createElement('textarea');area.id=id+'-answer';area.rows=5;label.append(area);root.append(label);
if(mode==='closed')globalThis.focusClosed=()=>area.focus();
}
document.getElementById('narrative').addEventListener('input',e=>{document.getElementById('narrative-count').textContent=(e.target.value.trim().match(/\S+/g)||[]).length+'/50 words';});
document.getElementById('synthetic-form').addEventListener('submit',e=>e.preventDefault());
1 change: 1 addition & 0 deletions demo/workflows.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Synthetic workflow fixture</title><link rel="stylesheet" href="demo.css"><script src="workflows-fixture.js" defer></script></head><body><main><h1>Synthetic application</h1><form id="synthetic-form"><div><label for="narrative">Project narrative</label><textarea id="narrative" maxlength="500" aria-describedby="narrative-count"></textarea><output id="narrative-count">0/50 words</output></div><label for="other">Other narrative</label><textarea id="other"></textarea><button type="submit">Submit synthetic fixture</button></form><div id="shadow-host"></div><div data-cairn-ignore><div id="private-host"></div></div><div id="closed-host"></div><div id="rich" class="ql-editor" contenteditable="true" role="textbox" aria-label="Rich narrative"></div><iframe title="Same-origin form" src="frame.html"></iframe><iframe title="Cross-origin form" src="http://127.0.0.1:8766/frame.html"></iframe></main></body></html>
Loading
Loading