Branchwell

Inkspring / app / commits / 3299148f

App source: current code new

written by Branchwell · 3299148fb8af57afc73c4a39f59b66f2ac2bca32

190 files changed

.gitignore added

1+ node_modules/
2+ .DS_Store
3+ dist/
4+ release/
5+ release-preview/
6+ test-output/
7+ *.log
8+ website/
9+ review-previews/
10+ .env*
11+ !.env.example
12+ .vercel/
13+ .playwright-mcp/
14+ xcuserdata/
15+
16+ # Local Xcode and Swift builds
17+ .build/
18+ DerivedData/
19+ *.xcresult
20+ *.xcarchive
21+ *.ipa
22+ *.dmg
23+ *.mobileprovision
24+ *.provisionprofile
25+ *.p8
26+ *.p12

CONTRIBUTING.md added

1+ # Contributing to Inkspring
2+
3+ Volunteer contributions are welcome. A small bug fix, accessibility improvement, test, or documentation update is a good first PR.
4+
5+ 1. [Fork the public repository](https://github.com/projectatomai/inkspring/fork), clone your fork, and create a branch for your change. Don’t push directly to the upstream `main` branch.
6+ 2. Make one focused change and run the relevant checks below. Use sample data. Never include secrets, private records, signing credentials, or files you don’t have permission to share.
7+ 3. [Open a pull request](https://github.com/projectatomai/inkspring/pulls) from your fork’s branch to this repository’s `main`. Explain what changed, why, and how you tested it. Mention anything you couldn’t test and attach screenshots if they clarify a UI change. A maintainer reviews changes before merging.
8+
9+ ## Local checks
10+
11+ See the [README build instructions](README.md#build-it-yourself). Build a local Mac bundle with `native-mac/build-app.sh "$PWD/.build/local"` and run `swift test --package-path native-mac`. Follow the [validation guide](VALIDATION.md) using a disposable workspace; don’t publish to real accounts from tests.
12+
13+ Prefer testing, design, or documentation help without a PR? See the [volunteer app-support roles](https://jobley.ai/volunteer/#app-support) or [Project ATOM’s open-source app directory](https://projectatom.ai/apps#open-source).

LICENSE added

1+ This is free and unencumbered software released into the public domain.
2+
3+ Anyone is free to copy, modify, publish, use, compile, sell, or
4+ distribute this software, either in source code form or as a compiled
5+ binary, for any purpose, commercial or non-commercial, and by any
6+ means.
7+
8+ In jurisdictions that recognize copyright laws, the author or authors
9+ of this software dedicate any and all copyright interest in the
10+ software to the public domain. We make this dedication for the benefit
11+ of the public at large and to the detriment of our heirs and
12+ successors. We intend this dedication to be an overt act of
13+ relinquishment in perpetuity of all present and future rights to this
14+ software under copyright law.
15+
16+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+ OTHER DEALINGS IN THE SOFTWARE.
23+
24+ For more information, please refer to <https://unlicense.org>

README.md added

1+ <p align="center"><img src="public/readme-app-icon.svg" alt="" width="120" height="120"></p>
2+
3+ <h1 align="center">Inkspring</h1>
4+
5+ <p align="center"><strong>Craft, schedule and post your social posts from your Mac.</strong><br>Research an idea, shape the post for X, LinkedIn, Reddit and Substack, and decide when it goes out.</p>
6+
7+ <p align="center"><a href="https://inkspring.ai/download"><strong>Download for Mac</strong></a> · <a href="#build-it-yourself">Build it yourself</a> · <a href="https://inkspring.ai">Visit Inkspring</a> · <a href="LICENSE">public domain (Unlicense)</a></p>
8+
9+ Want to help build, test, or document the app? Read the [contribution guide](CONTRIBUTING.md).
10+
11+ ## Your social posts, crafted on Mac
12+
13+ Collect references and post ideas, then turn an idea into an editable social draft or a newsletter. Write by hand, use a connected agent, or bring an API key. Review the text, attachments, and destination before you schedule or publish.
14+
15+ ![Inkspring Post Ideas on Mac showing six ideas and actions for developing drafts](docs/screenshots/mac-post-ideas.webp)
16+
17+ ## Review and schedule on iPhone and iPad
18+
19+ Review and edit recent drafts, save ideas, and choose a posting day and hour. With iCloud sync configured, your Mac receives the scheduling request and applies your preferred posting hours and minute settings.
20+
21+ <table>
22+ <tr><th>iPhone · Choose a posting time</th><th>iPad · Review a draft</th></tr>
23+ <tr>
24+ <td align="center" valign="top"><img src="docs/screenshots/iphone-schedule.webp" alt="Choosing a posting day and hour on iPhone" width="267"></td>
25+ <td align="center" valign="top"><img src="docs/screenshots/ipad-review.webp" alt="Draft list, selected draft, review notes, and Schedule action on iPad" width="425"></td>
26+ </tr>
27+ </table>
28+
29+ *Native app screenshots show sample content.*
30+
31+ ## What's inside
32+
33+ - **Research and ideas.** Save sources, explore angles by project, and turn an idea into a draft for the platforms you choose. The original idea stays in your workspace.
34+ - **Writing and newsletters.** Edit a post, attach an image or video, and draft newsletters with Markdown and previews.
35+ - **Scheduling.** Set preferred hours by platform on Mac and review what's ready, scheduled, and already published.
36+ - **AI and integrations.** Connect Claude or Codex on Mac, or configure a supported provider. Inkspring uses the connections you enable for AI, research, and publishing.
37+ - **Storage and backups.** The Mac workspace is stored locally. Export a ZIP with drafts and media, restore it, or set up scheduled backups. The companion uses your private iCloud account for sync.
38+
39+ [Social setup](SOCIAL_SETUP.md) · [Agent setup](docs/agent-app-setup.md) · [Newsletter setup](docs/substack-newsletters.md) · [Backups](docs/backups.md)
40+
41+ ## Build it yourself
42+
43+ Use a Mac with Xcode installed. The Mac app supports macOS 14 and later.
44+
45+ ```sh
46+ git clone https://github.com/projectatomai/inkspring.git
47+ cd inkspring
48+ native-mac/build-app.sh "$PWD/.build/local"
49+ open "$PWD/.build/local/Inkspring.app"
50+ ```
51+
52+ For iPhone and iPad, open [InkspringCompanion.xcodeproj](native-mac/InkspringCompanion.xcodeproj) and run the **InkspringCompanion** scheme on a simulator. A physical device requires your own signing team and bundle identifier. Cross-device iCloud sync in your own build also requires your own CloudKit container and matching entitlements.
53+
54+ [Native build and usage guide](native-mac/README.md) · [Validation guide](VALIDATION.md)
55+
56+ ## Open source, public domain (Unlicense)
57+
58+ Inkspring is free, and its source is open under the [public domain (Unlicense)](LICENSE). Use it, change it, ship it, sell it. Your posts remain yours. Third-party components keep their own licenses.
59+
60+ [Website](https://inkspring.ai) · [Send feedback](https://projectatom.ai/apps?app=inkspring#feedback)
61+
62+ ---
63+
64+ <p align="center"><strong>A <a href="https://projectatom.ai/">Project ATOM</a> app.</strong> Free, open source, and in the public domain (Unlicense).</p>
65+
66+ <p align="center">
67+ <a href="https://opentalon.ai">OpenTalon</a> ·
68+ <a href="https://inkspring.ai">Inkspring</a> ·
69+ <a href="https://jotley.ai">Jotley</a> ·
70+ <a href="https://glimmertoday.ai">Glimmer</a> ·
71+ <a href="https://pulsecanvas.ai">PulseCanvas</a> ·
72+ <a href="https://voxley.si">Voxley</a> ·
73+ <a href="https://textley.ai">Textley</a> ·
74+ <a href="https://graphley.ai">Graphley</a> ·
75+ <a href="https://bucksley.ai">Bucksley</a>
76+ </p>
77+
78+ <p align="center"><a href="https://projectatom.ai/apps">Project ATOM apps</a> · <a href="https://projectatom.ai/apps#open-source">Open-source projects</a></p>

SIGNING.md added

1+ # Signing Inkspring
2+
3+ See [Build and open](native-mac/README.md#build-and-open) for Developer ID signing, notarization, the branded DMG, and Sparkle updates. The [iPhone and iPad companion](native-mac/README.md#iphone-and-ipad-companion) section describes the production CloudKit provisioning required on both platforms. Retrieve release credentials from Bitwarden Secrets Manager and keep private keys out of the repository.

SOCIAL_SETUP.md added

1+ # Social sign-in and publishing
2+
3+ ## Shared Inkspring connections
4+
5+ The desktop can use server-managed Inkspring developer apps. It discovers availability at https://inkspring.ai/api/desktop/connect/config and opens sign-in in the system browser. Users do not enter app IDs or app secrets for an available shared connection. An optional advanced setup still supports their own developer apps.
6+
7+ App secrets are encrypted bindings in the `inkspring-website` Cloudflare Pages production environment. The server uses short-lived encrypted state and a Secure/HttpOnly/SameSite=Lax browser cookie, exchanges the platform code, and signs and encrypts the result to the requesting desktop’s ephemeral key. The protocol return contains ciphertext rather than plaintext account tokens. The desktop validates the signature and pending state, verifies platform identity directly, and stores tokens under OS credential protection. The service has no account database and does not receive drafts or publish posts. Refreshes requiring a shared app secret use a service-issued ticket bound to the refresh token.
8+
9+ The registered provider callbacks must be exactly:
10+
11+ - Instagram: `https://inkspring.ai/api/auth/callback/instagram`
12+ - LinkedIn: `https://inkspring.ai/api/auth/callback/linkedin`
13+ - Reddit: `https://inkspring.ai/api/auth/callback/reddit`
14+ - TikTok: `https://inkspring.ai/api/auth/callback/tiktok` (Login Kit, Web platform)
15+
16+ X publishing and signed-in X reads require a user-owned X developer app. InkSpring does not offer shared X sign-in or reuse old shared X sessions. Other shared providers keep their separate server configuration. LinkedIn and Reddit remain unavailable through the shared service until their app credentials are supplied. Configuration availability does not prove external-user app review or live account authorization. Provider developer dashboards: https://console.x.com/, https://developers.facebook.com/apps/, https://www.linkedin.com/developers/apps, https://www.reddit.com/prefs/apps.
17+
18+ The following instructions describe the optional **own developer app** mode.
19+
20+
21+ In own-app mode, Inkspring exchanges social authorization codes on the user’s computer and stores account tokens in macOS Keychain. That mode bypasses the shared connection service. Neither mode requires an Inkspring account or cloud database. Research API tokens and social publishing sessions are separate.
22+
23+ This build supports one connected account per platform:
24+
25+ | Platform | Publishing supported | Requirements |
26+ | --- | --- | --- |
27+ | X | Text posts, single-image posts, reply-linked threads and replies to a pasted post | OAuth 2.0 app with publishing access and available API credits |
28+ | Instagram | Single images with captions | Business or Creator account, Instagram Login permissions, public JPEG image URLs |
29+ | LinkedIn | Personal-profile text posts | Share on LinkedIn and OpenID Connect products |
30+ | Reddit | Subreddit text submissions, optional flair | Installed developer app, appropriate Reddit API access and subreddit permissions |
31+ | TikTok | Single photo posts with a title and caption (Direct Post) | Login Kit and Content Posting API with `user.info.basic` and `video.publish`; until TikTok approves the app, posts must go to a private account |
32+
33+ ## Before connecting
34+
35+ For X, configure a **developer app you own** in Connections. X API calls use that app’s credits and limits. You can also use your own developer app for other platforms. Never embed a shared Protomota client secret in the desktop application.
36+
37+ X and Reddit default to a temporary loopback listener bound only to `127.0.0.1:43821`, used during sign-in. The renderer still has no network access. Instagram and LinkedIn default to `https://inkspring.ai/desktop-connect/`, a static page that forwards an authorization code into the installed `inkspring://` protocol. The page has no token exchange, cookies, persistent browser storage, analytics, backend, or database. Its HTTPS host can observe the initial callback request; tokens and client secrets never pass through that page.
38+
39+ The static callback page is deployed from the website repository’s `public/desktop-connect/` directory at **https://inkspring.ai/desktop-connect/**. Its public HTTPS page was verified in the browser. Provider developer-app configuration is still required for actual sign-in. Local page preview: http://localhost:4178/desktop-connect/ (an empty return displays instructions; it does not initiate sign-in).
40+
41+ A packaged installation registers the `inkspring://` protocol. The Mac app handles the sign-in callback.
42+
43+ ## X setup
44+
45+ 1. Open https://console.x.com/ and select or create your developer app. If your account opens the older developer dashboard, use https://developer.x.com/en/portal/dashboard.
46+ 2. Open the app’s **Settings → User authentication settings → Set up/Edit**. Enable OAuth 2.0, select a **Native App** public client, and enable **Read and Write** access. Do not select read-only permissions for publishing.
47+ 3. Register this exact callback: `http://127.0.0.1:43821/oauth/x`. Enter `https://inkspring.ai` for the required website URL. Save the settings.
48+ 4. Open the app’s **Keys and tokens** page and copy the **OAuth 2.0 Client ID**. This is different from the app-only Bearer Token used for research.
49+ 5. In Inkspring, open **Connections → X → Set up your developer app**. Paste the Client ID, leave Client Secret blank for Native App, keep the exact callback above, and click **Save developer app**.
50+ 6. Click **Connect X**. Sign in on X in your system browser and authorize the displayed permissions (`tweet.read`, `tweet.write`, `users.read`, `media.write`, `offline.access`). If you connected X before image posts existed, choose **Disconnect** and **Connect X** again so Inkspring can upload images. The loopback page confirms connection and you can return to Inkspring.
51+ 7. For direct X research, copy the app-only Bearer Token from **Keys and tokens**, then use **Settings & API keys → X Bearer Token · research → Save key**. In **Research**, choose X and **X API · direct**. Account lookups use the user timeline; hashtag/keyword search uses the last seven days. Each fetch requests 10, 15, or 30 posts, with no automatic pagination.
52+
53+ If you already use a confidential X client, enter its Client Secret as well. Its configured callback and application access still must match.
54+
55+ ## Instagram setup
56+
57+ 1. Open https://developers.facebook.com/apps/ and create/select an app you own. Add **Instagram → API setup with Instagram login**, rather than the older Basic Display API.
58+ 2. Use a **Business or Creator** Instagram account. To change an account, open https://www.instagram.com/, then **More → Settings → Account type and tools → Switch to professional account**, or use the corresponding account-type settings in the Instagram mobile app.
59+ 3. In the Meta app’s **Instagram → API setup with Instagram login**, configure Business Login and register `https://inkspring.ai/desktop-connect/` as the valid OAuth redirect URI. This static page must be deployed before sign-in. Do not use a similarly named callback from the old hosted application.
60+ 4. Enable/request `instagram_business_basic` and `instagram_business_content_publish`. For development, add your Instagram account under the app’s roles/testers, then accept the invitation from that Instagram account’s **Settings → Apps and websites → Tester invites**. Additional users require the provider’s applicable review/permissions.
61+ 5. Copy the **Instagram App ID** and **Instagram App Secret** from the Instagram setup. In Inkspring, open **Connections → Instagram → Set up your developer app**, enter those values and the exact redirect URI, then click **Save developer app**.
62+ 6. Click **Connect Instagram**, sign in and authorize the requested access. On the static return page, click **Return to Inkspring** and allow the browser to open the installed app. No secret or access token is sent through the page.
63+ 7. To publish, provide 1 public JPEG URL for the image. Meta fetches these images from the URLs; a private file on the user’s desktop is not reachable by its image publishing API. Inkspring does not upload media to an Inkspring storage service. The app waits for processing and records the published media ID before looking up its permalink.
64+
65+ ## LinkedIn setup
66+
67+ 1. Open [LinkedIn My Apps](https://www.linkedin.com/developers/apps) and select or create an app you own.
68+ 2. Under **Products**, enable **Share on LinkedIn** and **Sign In with LinkedIn using OpenID Connect**. Personal sign-in requests `openid`, `profile`, and `w_member_social`.
69+ 3. Open **Auth → Authorized redirect URLs for your app → Edit**, add `https://inkspring.ai/desktop-connect/` including the final slash, and save.
70+ 4. Copy the **Client ID** and **Client Secret** from **Auth**. Open **Settings → Connections** or **Connections → LinkedIn → Use your own developer app** in Inkspring. Enter the values and select **Save developer app**. Leave company Page access off for personal posting.
71+ 5. Select **Connect developer app** in the Mac app, then sign in on LinkedIn and approve access. Select **Return to Inkspring** on the callback page if prompted. Select **Test connection** on the LinkedIn card to check identity without posting. Use a text draft and review the destination before publishing or scheduling.
72+
73+ The bring-your-own-app flow uses the existing public callback page to hand the authorization code to the app. The desktop exchanges it directly with LinkedIn. The client secret and account tokens are stored in protected local storage. Company Page posting requires Community Management approval and the appropriate Page role.
74+
75+ ## Reddit setup
76+
77+ 1. Read the provider’s current access requirements at https://support.reddithelp.com/hc/en-us/articles/14945211791892-Reddit-Data-API-Wiki and obtain access applicable to your intended use. Creating a client does not guarantee API approval.
78+ 2. Open https://www.reddit.com/prefs/apps, then click **create another app…** or **are you a developer? create an app…**.
79+ 3. Enter a name, choose **installed app**, and register `http://127.0.0.1:43821/oauth/reddit` as the exact redirect URI. Save the application.
80+ 4. Copy the client ID below the application name. Installed apps do not require a client secret.
81+ 5. In Inkspring, open **Connections → Reddit → Set up your developer app**, paste the Client ID, keep the redirect URI above, and click **Save developer app**.
82+ 6. Click **Connect Reddit**. Sign in and authorize identity, read, and submit access in your browser. Return to Inkspring after the loopback confirmation.
83+ 7. When publishing, enter the destination subreddit such as `r/test` and its flair ID if required. Reddit’s subreddit rules and account restrictions still apply.
84+
85+ ## Publish a draft
86+
87+ 1. Open **Writing studio**, choose the channel and supported format, and finish the content. For X threads, separate posts with a blank line.
88+ 2. Click **Review & publish**. Inkspring first saves the draft locally.
89+ 3. Add any required destination/media details and click **Review post**. Check the connected account, subreddit, exact text, image order, and any already-published thread segments.
90+ 4. Click **Publish to [platform]**. Do not close the app while publishing. The UI shows a confirmed platform result and saves a local receipt with returned post IDs/links in **Connections → Publishing history**.
91+ 5. For a partly published X thread, review the same draft again to publish only the remaining segments. If a request ended without a confirmed result, open the platform and check it first. Publishing history requires an explicit acknowledgment before another attempt; an unconfirmed post might already exist.
92+ 6. To disconnect, open **Connections → [platform] → Disconnect**. This removes the local account session, including refresh tokens. To revoke the provider grant as well, open the corresponding connected-app settings: X https://x.com/settings/connected_apps, Instagram https://www.instagram.com/accounts/manage_access/, LinkedIn https://www.linkedin.com/mypreferences/d/permitted-services, Reddit https://www.reddit.com/prefs/apps.
93+
94+ ## Validation limits
95+
96+ The automated suite covers simulated provider responses, OAuth callback validation and a real loopback listener, token refresh/rotation, canceled sign-in, account changes, publication payloads, processing, duplicate prevention, uncertain outcomes, and partial-thread recovery. These tests do not establish that any real account has approved the app. No live authorization grant, paid provider request, or social post was made during this implementation. Provider app registration, permissions/review, and a live permitted account are required for final acceptance testing.
97+
98+ Primary references: X OAuth https://docs.x.com/fundamentals/authentication/oauth-2-0/authorization-code and publishing https://docs.x.com/x-api/posts/create-post; Meta Instagram Login https://developers.facebook.com/docs/instagram-platform/instagram-api-with-instagram-login/ and content publishing https://developers.facebook.com/docs/instagram-platform/instagram-api-with-instagram-login/content-publishing/; LinkedIn OAuth https://learn.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow and publishing https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/posts-api; Reddit OAuth https://github.com/reddit-archive/reddit/wiki/oauth2.
99+
100+ ## TikTok setup
101+
102+ TikTok photo posts follow TikTok's Content Sharing Guidelines. Before every post Inkspring reads the creator's live posting options and shows the account nickname, an editable title and caption, a privacy menu with no default, an Allow comments box that starts off (and is disabled when the account turned comments off), a content disclosure toggle with Your brand and Branded content, and the Music Usage Confirmation (plus Branded Content Policy when it applies). Branded content cannot be private. After posting, Inkspring polls TikTok until the post completes and tells the person it can take a few minutes to appear.
103+
104+ TikTok only pulls photos from a URL the app has verified, so:
105+
106+ - **Shared Inkspring app:** the desktop converts the image to a JPEG of at most 1080p and uploads it to `https://inkspring.ai/api/desktop/media` with the person's TikTok token. The service checks the token with TikTok, stores the image in a private Vercel Blob store, serves it at `https://inkspring.ai/tiktok-media/<file>.jpg` for at most two hours, and deletes it once TikTok finishes. Verify the URL prefix `https://inkspring.ai/tiktok-media/` (or the domain) in the TikTok app. The service needs `TIKTOK_CLIENT_KEY`, `TIKTOK_CLIENT_SECRET` and `BLOB_READ_WRITE_TOKEN` in the website's Vercel environment.
107+ - **Your own developer app:** register the Desktop redirect `http://127.0.0.1:43821/oauth/tiktok`, paste the Client key and Client secret in **Connections → TikTok → Use your own developer app**, and enter a public image URL on a domain you verified for that app when posting.
108+
109+ Unaudited TikTok apps can only post to private accounts and to at most five users a day.

VALIDATION.md added

1+ # Validating Inkspring
2+
3+ Run `swift test --package-path native-mac` for the macOS suite. Build a local bundle with `native-mac/build-app.sh`. Use a disposable workspace for UI and MCP tests, as described in the [native guide](native-mac/README.md#build-and-open).
4+
5+ For a release, verify the signed Mac bundle and installer, the update feed, and the companion's production iCloud connection. Provider fixtures cover request and state handling; real account sign-in and delivery are separate checks.

build/BRANDING.md added

1+ # Inkspring logo assets
2+
3+ The editable mark is `public/inkspring-mark.svg`. It contains three separate ink-drop paths and a true circle: center (2508, 1388), radius 145 in the original flipped coordinate system. Do not convert the dot back to the old irregular traced path.
4+
5+ Keep the native icons and the website mark consistent with the master. The website has its own copy at `website/public/inkspring-mark.svg` because it deploys independently.
6+
7+ Install the rendering dependency with `npm install --prefix build`, then run `node build/generate-brand-assets.mjs` from the desktop repository to regenerate the macOS icon set/ICNS and the website's PNG logo variants, social image and Apple touch icon. Rendering takes place on Expand; the small shipped source assets are copied into their repositories. It uses Playwright and headless Chrome. Existing colors, transparency and asset layouts are retained; even the taller legacy layouts keep a circular dot.
8+
9+ These updates are local. Existing installed app bundles and deployed website assets remain unchanged until a new build is installed or a separately approved deployment is made.

build/generate-brand-assets.mjs added

1+ // Regenerate shipped logo images from the editable SVG, retaining each asset's layout.
2+ // Run from the desktop repo: node build/generate-brand-assets.mjs
3+ // Render on Expand, then copy the small shipped assets into their source locations.
4+ import fs from 'node:fs/promises';
5+ import path from 'node:path';
6+ import { fileURLToPath } from 'node:url';
7+ import { chromium } from 'playwright';
8+ import { execFileSync } from 'node:child_process';
9+
10+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
11+ const output = '/Volumes/Expand/Codex Media/inkspring/brand-assets';
12+ await fs.access('/Volumes/Expand');
13+ await fs.mkdir(output, { recursive: true });
14+ const master = await fs.readFile(path.join(root, 'public/inkspring-mark.svg'), 'utf8');
15+ const paths = [...master.matchAll(/<path[^>]*d="([^"]+)"/g)].map(match => `<path d="${match[1]}"/>`).join('');
16+ const circle = master.match(/<circle[^>]*cx="([^"]+)"[^>]*cy="([^"]+)"[^>]*r="([^"]+)"/);
17+ if (paths.length === 0 || !circle) throw new Error('The master must contain the ink drops and a circle.');
18+ const [centerX, centerY, radius] = circle.slice(1, 4).map(Number);
19+
20+ function mark([x, y, width, height], color) {
21+ const sx = width / 1808;
22+ const sy = height / 1789;
23+ // Keep the dot circular even in the older, slightly taller bitmap layouts.
24+ return `<g fill="${color}"><g transform="translate(${x} ${y}) scale(${sx} ${sy}) translate(-1102 -1124)"><g transform="translate(0 4000) scale(1 -1)">${paths}</g></g><circle cx="${x + (centerX - 1102) * sx}" cy="${y + (4000 - centerY - 1124) * sy}" r="${radius * Math.sqrt(sx * sy)}"/></g>`;
25+ }
26+
27+ const paper = '#F5F2EC';
28+ const accent = '#C4613C';
29+ const variants = [
30+ ['website/public/social-card.png', 1024, 1024, [154, 158, 716, 708], accent, paper, 0],
31+ ['website/public/inkspring-logo.png', 992, 1072, [176, 200, 644, 688], '#000000', 'transparent', 0],
32+ ['website/public/inkspring-logo-white.png', 992, 1072, [176, 200, 644, 688], '#FFFFFF', 'transparent', 0],
33+ ['website/public/inkspring-logo-cyan.png', 992, 1072, [176, 200, 644, 688], '#22D3EE', 'transparent', 0],
34+ ['website/public/inkspring-logo-flat.png', 992, 1072, [176, 200, 644, 688], '#22D3EE', '#030712', 0],
35+ ['website/public/inkspring-logo-styled.png', 400, 400, [110, 112, 182, 180], '#FFFFFF', 'gradient', 48],
36+ ['website/public/inkspring-logo-black-on-gradient.png', 400, 400, [110, 112, 182, 180], '#111116', 'gradient', 48],
37+ ['website/public/inkspring-icon-black-gradient.png', 512, 512, [40, 56, 435, 432], '#111116', 'gradient', 80],
38+ ['website/public/apple-touch-icon.png', 180, 180, [14.0625, 19.6875, 152.9297, 151.875], '#111116', 'gradient', 28.125],
39+ ];
40+ for (const size of [16, 32, 128, 256, 512]) {
41+ for (const retina of [false, true]) {
42+ const pixels = size * (retina ? 2 : 1);
43+ variants.push([`build/icon.iconset/icon_${size}x${size}${retina ? '@2x' : ''}.png`, pixels, pixels,
44+ [154, 158, 716, 708].map(value => value * pixels / 1024), accent, paper, 0]);
45+ }
46+ }
47+
48+ const browser = await chromium.launch({ channel: 'chrome', headless: true });
49+ try {
50+ for (const [file, width, height, box, color, background, rounding] of variants) {
51+ const page = await browser.newPage({ viewport: { width, height }, deviceScaleFactor: 1 });
52+ const fill = background === 'gradient' ? 'url(#background)' : background === 'transparent' ? 'none' : background;
53+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}"><defs><linearGradient id="background" x1="0" y1="0" x2="1" y2="1"><stop stop-color="#22D3EE"/><stop offset="1" stop-color="#A855F7"/></linearGradient></defs><rect width="${width}" height="${height}" rx="${rounding}" fill="${fill}"/>${mark(box, color)}</svg>`;
54+ await page.setContent(`<style>html,body{margin:0;background:transparent}svg{display:block}</style>${svg}`);
55+ const target = path.join(output, file);
56+ await fs.mkdir(path.dirname(target), { recursive: true });
57+ await page.screenshot({ path: target, omitBackground: true, scale: 'css' });
58+ // These small shipped assets belong in git; only large transient output stays on Expand.
59+ await fs.copyFile(target, path.join(root, file));
60+ await page.close();
61+ }
62+ } finally {
63+ await browser.close();
64+ }
65+ execFileSync('/usr/bin/iconutil', ['-c', 'icns', path.join(output, 'build/icon.iconset'), '-o', path.join(output, 'build/icon.icns')]);
66+ await fs.copyFile(path.join(output, 'build/icon.icns'), path.join(root, 'build/icon.icns'));
67+ console.log(`Rendered ${variants.length} logo/icon images and the macOS icon from the circular-dot SVG.`);

build/generate-installer-background.py added

1+ """Render the Inkspring Finder background at 1x and 2x. Requires Pillow."""
2+
3+ import argparse
4+ import math
5+ import subprocess
6+ from pathlib import Path
7+
8+ from PIL import Image, ImageDraw, ImageFont
9+
10+ FONT = "/System/Library/Fonts/SFNS.ttf"
11+ INK = "#24251f"
12+ SECONDARY = "#63584a"
13+ BORDER = "#c9bca9"
14+ ACCENT = "#a6482d"
15+
16+
17+ def draw_arrow(canvas: Image.Image, scale: int) -> None:
18+ # Finder can use the 1x TIFF page. Render the arrow at 4x before downsampling
19+ # either page so the diagonals and their joins have smooth edge coverage.
20+ left, top, width, height = 315, 210, 89, 40
21+ resolution = 4 * scale
22+ mask = Image.new("L", (width * resolution, height * resolution))
23+ draw = ImageDraw.Draw(mask)
24+ radius = 1.5 * resolution
25+ for path in ([(321, 230), (397, 230)], [(382, 215), (397, 230), (382, 245)]):
26+ points = [((x - left) * resolution, (y - top) * resolution) for x, y in path]
27+ draw.line(points, fill=255, width=3 * resolution)
28+ for x, y in points:
29+ draw.ellipse((x - radius, y - radius, x + radius, y + radius), fill=255)
30+ coverage = mask.resize((width * scale, height * scale), Image.Resampling.LANCZOS)
31+ canvas.paste(ACCENT, (left * scale, top * scale), coverage)
32+
33+
34+ def render(scale: int, target: Path) -> None:
35+ width, height = 720 * scale, 460 * scale
36+ canvas = Image.new("RGB", (width, height))
37+ base, glow = (236, 228, 215), (251, 248, 241)
38+ canvas.putdata([
39+ tuple(round(start + (end - start) * amount) for start, end in zip(base, glow))
40+ for y in range(height)
41+ for x in range(width)
42+ for amount in [math.exp(-(((x / scale - 360) / 410) ** 2
43+ + ((y / scale - 230) / 300) ** 2))]
44+ ])
45+ draw = ImageDraw.Draw(canvas)
46+
47+ def points(*values: float) -> tuple[int, ...]:
48+ return tuple(round(value * scale) for value in values)
49+
50+ def text(value: str, y: int, size: int, color: str, bold: bool = False) -> None:
51+ font = ImageFont.truetype(FONT, size * scale)
52+ font.set_variation_by_name("Bold" if bold else "Regular")
53+ draw.text(points(360, y), value, font=font, fill=color, anchor="mt")
54+
55+ draw.rounded_rectangle(points(18, 18, 702, 442), radius=22 * scale, outline=BORDER, width=scale)
56+ text("Install Inkspring", 48, 30, INK, bold=True)
57+ text("Drag Inkspring to Applications to get started.", 95, 16, SECONDARY)
58+ for left in (109, 439):
59+ draw.rounded_rectangle(points(left, 154, left + 172, 320), radius=22 * scale, fill="#fdfaf5")
60+
61+ # Finder overlays the real movable app and Applications shortcut.
62+ left, top, right, bottom, radius = 102, 147, 288, 327, 29
63+ dots = []
64+ for start, end, fixed, horizontal in (
65+ (left + radius, right - radius, top, True),
66+ (left + radius, right - radius, bottom, True),
67+ (top + radius, bottom - radius, left, False),
68+ (top + radius, bottom - radius, right, False),
69+ ):
70+ count = round((end - start) / 9)
71+ for index in range(count + 1):
72+ value = start + (end - start) * index / count
73+ dots.append((value, fixed) if horizontal else (fixed, value))
74+ for cx, cy, start in ((left + radius, top + radius, 180),
75+ (right - radius, top + radius, 270),
76+ (right - radius, bottom - radius, 0),
77+ (left + radius, bottom - radius, 90)):
78+ for angle in range(start + 15, start + 90, 20):
79+ dots.append((cx + radius * math.cos(math.radians(angle)),
80+ cy + radius * math.sin(math.radians(angle))))
81+ for x, y in dots:
82+ draw.ellipse(points(x - 1.15, y - 1.15, x + 1.15, y + 1.15), fill="#b75635")
83+
84+ draw_arrow(canvas, scale)
85+ draw.line(points(88, 355, 632, 355), fill=BORDER, width=scale)
86+ text("Eject the disk image when copying is complete.", 378, 15, INK)
87+ text("Open Inkspring from your Applications folder.", 410, 14, SECONDARY)
88+ canvas.save(target, dpi=(72 * scale, 72 * scale))
89+
90+
91+ def main() -> None:
92+ parser = argparse.ArgumentParser(description=__doc__)
93+ parser.add_argument("output_directory", type=Path)
94+ output = parser.parse_args().output_directory
95+ output.mkdir(parents=True, exist_ok=True)
96+ standard, retina = output / "background.png", output / "background@2x.png"
97+ render(1, standard)
98+ render(2, retina)
99+ subprocess.run(["tiffutil", "-cathidpicheck", str(standard), str(retina),
100+ "-out", str(output / "installer-background.tiff")], check=True)
101+
102+
103+ if __name__ == "__main__":
104+ main()

build/icon.icns added

Not a text file.

build/icon.iconset/icon_128x128.png added

Not a text file.

build/icon.iconset/icon_128x128@2x.png added

Not a text file.

build/icon.iconset/icon_16x16.png added

Not a text file.

build/icon.iconset/icon_16x16@2x.png added

Not a text file.

build/icon.iconset/icon_256x256.png added

Not a text file.

build/icon.iconset/icon_256x256@2x.png added

Not a text file.

build/icon.iconset/icon_32x32.png added

Not a text file.

build/icon.iconset/icon_32x32@2x.png added

Not a text file.

build/icon.iconset/icon_512x512.png added

Not a text file.

build/icon.iconset/icon_512x512@2x.png added

Not a text file.

build/installer-background.tiff added

Not a text file.

build/installer-requirements.txt added

1+ dmgbuild==1.6.7
2+ ds-store==1.3.3
3+ mac-alias==2.2.3

build/package-installer.py added

1+ """Package a signed Mac app in the PulseCanvas Finder installer layout."""
2+
3+ import argparse
4+ import json
5+ import os
6+ from pathlib import Path
7+ import subprocess
8+ import tempfile
9+
10+ from dmgbuild import build_dmg
11+ from ds_store import DSStore
12+ from mac_alias import Alias
13+
14+ ARTWORK = Path("Contents/Resources/installer-background.tiff")
15+
16+
17+ def run(*command: str) -> None:
18+ subprocess.run(command, check=True)
19+
20+
21+ def notarize(artifact: Path, staple_target: Path | None = None) -> None:
22+ """Read the Apple notarization credential options."""
23+ env = os.environ
24+ if env.get("APPLE_ID") and env.get("APPLE_APP_SPECIFIC_PASSWORD"):
25+ credentials = ["--apple-id", env["APPLE_ID"],
26+ "--password", env["APPLE_APP_SPECIFIC_PASSWORD"],
27+ "--team-id", env["APPLE_TEAM_ID"]]
28+ elif env.get("APPLE_API_KEY"):
29+ credentials = ["--key", env["APPLE_API_KEY"], "--key-id", env["APPLE_API_KEY_ID"],
30+ "--issuer", env["APPLE_API_ISSUER"]]
31+ else:
32+ credentials = ["--keychain-profile", env["APPLE_KEYCHAIN_PROFILE"]]
33+ if env.get("APPLE_KEYCHAIN"):
34+ credentials += ["--keychain", env["APPLE_KEYCHAIN"]]
35+ result = subprocess.run(
36+ ["xcrun", "notarytool", "submit", str(artifact), *credentials, "--wait",
37+ "--output-format", "json"], capture_output=True, text=True,
38+ )
39+ if result.returncode:
40+ raise RuntimeError(f"Apple notarization command failed for {artifact.name}")
41+ receipt = json.loads(result.stdout)
42+ artifact.with_suffix(".notarization.json").write_text(json.dumps(receipt, indent=2) + "\n")
43+ if receipt.get("status") != "Accepted":
44+ raise RuntimeError(f"Apple did not accept {artifact.name}: {receipt.get('status')}")
45+ target = str(staple_target or artifact)
46+ run("xcrun", "stapler", "staple", target)
47+ run("xcrun", "stapler", "validate", target)
48+
49+
50+ def package(app: Path, output: Path, title: str) -> None:
51+ if not (app / ARTWORK).is_file() or output.exists():
52+ raise ValueError("Use an app containing the installer artwork and a new output path")
53+ run("codesign", "--verify", "--deep", "--strict", str(app))
54+ mount: Path
55+
56+ def remember_mount(mount_point: str, _options: dict) -> None:
57+ nonlocal mount
58+ mount = Path(mount_point)
59+
60+ def write_background_alias(event: dict) -> None:
61+ if event.get("type") != "operation::finished" or event.get("operation") != "dsstore::create":
62+ return
63+ with DSStore.open(str(mount / ".DS_Store"), "r+") as store:
64+ icons = store["."]["icvp"]
65+ icons["backgroundType"] = 2
66+ icons["backgroundImageAlias"] = Alias.for_file(str(mount / app.name / ARTWORK)).to_bytes()
67+ store["."]["icvp"] = icons
68+
69+ build_dmg(str(output), title, settings={
70+ "format": "UDZO",
71+ "filesystem": "HFS+",
72+ "files": [str(app)],
73+ "symlinks": {"Applications": "/Applications"},
74+ "window_rect": ((160, 160), (720, 520)),
75+ "default_view": "icon-view",
76+ "show_toolbar": False,
77+ "show_sidebar": False,
78+ "show_status_bar": False,
79+ "show_pathbar": False,
80+ "show_tab_view": False,
81+ "arrange_by": None,
82+ "scroll_position": (0, 0),
83+ "icon_size": 104,
84+ "text_size": 15,
85+ "label_pos": "bottom",
86+ "icon_locations": {app.name: (195, 230), "Applications": (525, 230)},
87+ "create_hook": remember_mount,
88+ }, callback=write_background_alias)
89+ identity = os.environ.get("CSC_NAME") or "Developer ID Application: Protomota, LLC (22HV69L32T)"
90+ if not identity.startswith("Developer ID Application: "):
91+ identity = f"Developer ID Application: {identity}"
92+ keychain = os.environ.get("CSC_KEYCHAIN") or str(Path.home() / "Library/Keychains/login.keychain-db")
93+ run("codesign", "--timestamp", "--sign", identity, "--keychain", keychain, str(output))
94+ notarize(output)
95+ run("codesign", "--verify", "--strict", str(output))
96+ run("spctl", "--assess", "--type", "open", "--context", "context:primary-signature",
97+ "--verbose=2", str(output))
98+
99+
100+ def main() -> None:
101+ parser = argparse.ArgumentParser(description=__doc__)
102+ parser.add_argument("app", type=Path)
103+ parser.add_argument("output", type=Path)
104+ parser.add_argument("title", nargs="?")
105+ parser.add_argument("--notarize-app", action="store_true")
106+ args = parser.parse_args()
107+ if args.notarize_app:
108+ with tempfile.TemporaryDirectory(prefix="notary-app-") as temporary:
109+ archive = Path(temporary) / f"{args.app.stem}.zip"
110+ run("ditto", "-c", "-k", "--sequesterRsrc", "--keepParent", str(args.app), str(archive))
111+ notarize(archive, args.app)
112+ package(args.app, args.output, args.title or args.app.stem)
113+
114+
115+ if __name__ == "__main__":
116+ main()

build/package.json added

1+ {
2+ "name": "inkspring-brand-assets",
3+ "private": true,
4+ "devDependencies": {
5+ "playwright": "1.64.1"
6+ }
7+ }

docs/PLANS-AND-ON-DEVICE-ASSISTANT.md added

1+ # Plans and Ask Inkspring
2+
3+ Implemented November 18 and reconciled with the current writing tools November 19, 2026. Release authorized by the owner on November 19.
4+
5+ ## Use it
6+
7+ - Posts, ideas and newsletters have an optional **Plan**, separate from publishing copy and revision comments. In a post preview, Plan sits above Comments. Newsletter Source and Preview include the same section.
8+ - Choose Create plan or Import Markdown, switch Preview/Markdown, and save with Save plan. Cancel intentionally discards the editing session. Draft recovery preserves text when the app is interrupted; a failed save keeps the draft open.
9+ - New ideas and Writing Studio offer Include a plan. Ask Inkspring creation requests containing “with a plan” include a starter outline.
10+ - Export writes a real UTF-8 `.md` file named from the copyable content ID. Imports copy the text into the content record, so the source file is not needed afterwards.
11+ - Proofread uses on-device Apple Intelligence and preserves Markdown prefixes, links and fenced/indented code. A revision instruction generates a candidate. Review it, Apply to draft or Discard, then Save plan. Undo revision restores the prior editing draft; Restore previous plan restores the preceding saved version.
12+ - Ask Inkspring is separate from Ask my agent. The former uses Apple Intelligence on this device; the latter keeps the existing connected-agent workflow. There is no automatic remote fallback.
13+ - Examples: “Find my drafts”, “Read PRO-001”, “Rename PRO-001 to A clearer opening”, “Create an idea called Show the decision with a plan”, “Revise the plan for PRO-001 to add a testing checklist”. Use an exact replacement for direct title/body edits. Rewrites belong in the reviewed suggestion flow.
14+ - Chat stores conversations locally, supports New chat/history selection and confirmed individual/all-history deletion. Deleting chats keeps writing and Plans. Mac chat history is included in workspace backup preferences.
15+
16+ ## Save and sync behavior
17+
18+ Plans use stable internal content IDs and stay with records across moves, Trash/restore, restarts and ZIP backup/restore. The previous saved Plan remains in the record. User-facing IDs name exported files; renaming a project does not break the association.
19+
20+ Plan saves compare the exact previous document, so a comment or unrelated body edit does not falsely conflict. Concurrent Plan edits retain both versions for review. Mobile queues durable changes in the existing account/workspace-bound outbox and shows “saved on this device” / “waiting for your Mac”, never a false Mac-applied receipt. Conflicting mobile text stays available alongside the Mac Plan. An older Mac cannot receive new operations until it advertises supportsContentPlans.
21+
22+ The iCloud index omits large Plan text. Existing hashed, compressed full-text transport carries the current and previous documents. New optional fields preserve older snapshot decoding. Creation and update requests use the same idempotency/receipt path as existing mobile edits.
23+
24+ ## AI boundary
25+
26+ Foundation Models guided generation proposes one typed operation. Application code validates explicit intent, limits, target identity and ambiguity before using Workspace/MobileLibrary APIs. Model prose is never treated as a mutation receipt. Exact replacement edits must appear in the user's request. Plan rewrites are proposals, requiring Apply before save. Cancellation is checked before executing an action.
27+
28+ The assistant has no SQL, shell, arbitrary file, credential or network-publishing tool. Publishing, scheduling, agent dispatch, deletion and spending stay in existing review controls. Saved content is untrusted model context. Unsupported actions return a clear explanation. Native Writing Tools remain available in text editors on supported systems.
29+
30+ On-device AI requires an eligible device with Apple Intelligence enabled and its model ready. Manual Plan editing/import/export remains available without it. Revision requests are bounded for the model context; proofreading uses small independent excerpts for long documents. Tests on a simulator do not establish real model execution; the real Mac Foundation Models test is separate.
31+
32+ ## MCP
33+
34+ - `get_plan(content_id)` reads complete Markdown and the item's current timestamp.
35+ - `save_plan(content_id, markdown, expected_markdown)` compares the exact old document and saves locally; it neither publishes nor dispatches an agent.
36+ - `get_content` includes Plan fields. Connected agent rewriting receives the Plan as record context. The read-only in-app agent can read Plans only within its current project.
37+
38+ ## Local builds and acceptance
39+
40+ Use `INKSPRING_MAC_CONFIGURATION=debug native-mac/build-app.sh '/Volumes/Expand/Projects/Inkspring/native-app/Plans and On-device Assistant/Local'` for a local test build. The script defaults to release for ordinary builds. Never put build output on the internal drive.
41+
42+ Review evidence and the separate sample workspace live under `/Volumes/Expand/Projects/Inkspring/native-app/Plans and On-device Assistant`. The sample app uses its own bundle ID and library. The public release includes these features after native, mobile and visual validation. Current tests cover complete backup restoration, document-level conflicts, full-text transport, wire capability gates, MCP scope, idempotency, ambiguity/injection checks and real Mac model execution. Physical two-device iCloud acceptance remains distinct from isolated sync-contract tests.

docs/SHARED_SOCIAL_PUBLISHING_PLAN.md added

1+ # Shared TikTok and LinkedIn publishing
2+
3+ Requested by the owner on November 18, 2026. **Critical priority. Planning only; do not implement or deploy this service yet.**
4+
5+ ## Recommendation
6+
7+ Use Inkspring’s approved developer applications so customers can connect their own TikTok and LinkedIn accounts without creating developer applications or entering business secrets. Each customer must authorize their own account through the platform’s OAuth flow. Our app credentials identify Inkspring; they do not authorize posting as every customer.
8+
9+ We need a trusted cloud backend for confidential credentials and token operations. We already have an OAuth broker, so this is an extension and verification project, rather than an entirely missing middleware client. Serverless endpoints can handle this work; a dedicated always-running VM is not inherently required.
10+
11+ The Mac owns the schedule and triggers publishing while it is awake. The cloud service exists to protect our confidential application credentials and handle authenticated platform operations. **Cloud scheduling, cloud-owned job queues, and publishing while a Mac is asleep are outside this plan.**
12+
13+ Keeping our client secret on the server does not, by itself, mean every byte must pass through our cloud. OAuth token exchange and refresh require the confidential backend. A provider API operation that uses only a user access token can technically run on a native client where the provider permits that token arrangement. For the shared TikTok/LinkedIn connection, the recommended gateway holds provider tokens and handles publishing calls; large approved media transfers can still go directly from the Mac to the platform. [TikTok server-side token exchange](https://developers.tiktok.com/docs/en/oauth-get-a-user-access-token).
14+
15+ X is excluded from this shared-credentials rollout as requested. Preserve existing X connections and bring-your-own-developer-app support. Its cost is a product decision, not a technical inability to build a gateway.
16+
17+ ## What exists today
18+
19+ Read-only inspection on November 18 found:
20+
21+ | Component | Current implementation | What it means |
22+ | --- | --- | --- |
23+ | Hosted OAuth broker | Website `api/connect.js`, `server/connect.mjs`, `server/connect-crypto.mjs`; native `ManagedSocialAuth.swift` | Shared OAuth start, callback, encrypted return and refresh already exist. |
24+ | Public connection configuration | `https://inkspring.ai/api/desktop/connect/config` returns TikTok available and LinkedIn unavailable | This proves configured availability only, not the approved product/scopes, successful posting or public-post audit status. |
25+ | Native TikTok publishing | `TikTokPublishing.swift` | Creator-info lookup, video upload, photo handling, publishing status and explicit posting options already exist. |
26+ | Hosted TikTok photos | Website `api/media.js` and `server/media.mjs` | Existing hosting and deletion code can be evaluated and reused. |
27+ | Current credential arrangement | Server exchanges/refreshes tokens, then returns an encrypted session; native app keeps provider tokens in Keychain and calls publishing APIs | We must review this against the current provider rules before enabling a wider rollout. |
28+
29+ The relevant repositories are `protomota/inkspring-site` for the native app and `protomota/inkspring-website` for the website/gateway. The shared payment backend in `protomota/protomota-com` is separate; do not put social credentials into the payment service merely because it already exists.
30+
31+ TikTok’s current token guidance calls for server-side token exchange, storage, refresh and revocation. The recommended target therefore uses a server token vault and publishing gateway, with an opaque connection handle in the native app, rather than treating the existing token-return broker as the finished architecture. [TikTok token management](https://developers.tiktok.com/docs/en/oauth-user-access-token-management), [token exchange](https://developers.tiktok.com/docs/en/oauth-get-a-user-access-token).
32+
33+ ## Approval checks before building
34+
35+ ### TikTok
36+
37+ - the owner reports that TikTok posting is approved. Verify which production application was approved, the redirect URIs, `video.publish`, applicable account/creator limits, and whether the Direct Post audit permits public posting.
38+ - Distinguish Direct Post from upload-to-inbox and Login Kit approval. They are different capabilities. Do not substitute an advertising/Business API credential for the Content Posting API application.
39+ - The historical Inkspring candidate is app `7704773145382717492`; verify the actual current approved application in [TikTok’s developer portal](https://developers.tiktok.com/apps/), rather than assuming this is still the right one.
40+ - Record approval evidence and limitations in this task without copying secrets. Verify photo/video requirements and ownership of the actual media-serving domain.
41+
42+ Scope approval and a successful login do not by themselves establish unrestricted public publishing. [Direct Post prerequisites](https://developers.tiktok.com/docs/en/content-posting-api-get-started).
43+
44+ ### LinkedIn
45+
46+ - Verify the current status of app **266734420**, including the business-vetting appeal. Earlier Community Management access was denied; this plan does not assume that was reversed.
47+ - Treat personal-profile posting (`w_member_social`, Share on LinkedIn) separately from company-page posting (`w_organization_social`, Community Management and an authorized page role).
48+ - Verify Development versus Standard access and the approved member/app quotas before a public rollout. Do not use a limited development approval as proof of unrestricted multi-customer access.
49+ - Detect whether our approved application actually receives refresh tokens. Offer reconnect when required rather than assuming every LinkedIn application can refresh indefinitely.
50+
51+ Review: [application dashboard](https://www.linkedin.com/developers/apps/266734420/products), [Share on LinkedIn](https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/share-on-linkedin), [Posts API permissions](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/posts-api), [Community Management tiers](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/community-management-overview), [refresh eligibility](https://learn.microsoft.com/en-us/linkedin/shared/authentication/programmatic-refresh-tokens).
52+
53+ ## Proposed architecture
54+
55+ ```text
56+ Mac scheduler (mobile reviews/requests sync to the Mac)
57+ ├─ Local schedule, library, post editor, preview and consent
58+ ├─ Platform OAuth through the system browser
59+ └─ Opaque, revocable connection/session handle in Keychain
60+ │ HTTPS
61+ ▼
62+ Inkspring gateway on inkspring.ai
63+ ├─ OAuth callback, token exchange and refresh
64+ ├─ Encrypted provider-token vault with per-owner authorization
65+ ├─ Creator/page capabilities and publishing operations
66+ └─ Publish receipts, status reconciliation and disconnect
67+ │ User-specific platform authorization
68+ ▼
69+ TikTok / LinkedIn
70+
71+ Video bytes: native device → provider-approved upload URL where supported
72+ Hosted photos: temporary, verified Inkspring media domain → TikTok
73+ ```
74+
75+ ### Credential and account boundaries
76+
77+ 1. Retrieve application client secrets from Bitwarden Secrets Manager for deployment. Keep them in server-only configuration. Never put them in app bundles, public source, browser code, logs or task notes.
78+ 2. Store per-user access and refresh tokens encrypted on the server. Rotation must be atomic so parallel refreshes cannot overwrite the newest credential. Use returned expiry fields; avoid hard-coded lifetimes.
79+ 3. Reuse and review the existing callback protection, state checks and encrypted handoff. Apply provider-supported PKCE. Return an opaque Inkspring session/connection handle instead of provider tokens.
80+ 4. Prove ownership on every request. An arbitrary connection ID, page URN or post ID supplied by a client is not authorization. Include device revocation, replay protection, request limits and app-wide quota protection.
81+ 5. Keep connection identity separate from support identity. Do not silently require a support account or add a general Inkspring login. Define device-bound sessions and any future cross-device account recovery explicitly.
82+ 6. Disconnect must revoke the platform grant where supported, invalidate Inkspring sessions, stop pending local publication attempts, and remove retained credentials. Keep only necessary, redacted publication receipts under a documented retention policy.
83+
84+ ## Publishing and scheduling
85+
86+ ### The Mac schedules; the gateway handles confidential operations
87+
88+ - The user selects a project, platform account, final content, media and time in the existing native UI.
89+ - The Mac retains the schedule and initiates publishing through the gateway at the chosen time. Mobile keeps the existing simple day/hour workflow and Mac-owned preferences.
90+ - The gateway performs provider-authenticated operations and returns a receipt. For local videos, initialize a provider upload and send large bytes directly to its allowlisted upload URL instead of routing video bodies through ordinary serverless requests.
91+ - Preserve the existing requirement that the Mac runs the schedule. No new cloud scheduler or always-running publishing worker is needed.
92+ - Capture a consented revision of the post. If content or disclosure settings change, require review again where needed. Preserve ideas and source drafts.
93+
94+ ### Request flow at the scheduled time
95+
96+ 1. The awake Mac selects a due post from its existing local schedule and acquires the existing publication lease.
97+ 2. It sends the gateway the authorized connection handle, selected destination, approved content revision and an idempotency key. The app never sends or contains our client secret.
98+ 3. The gateway checks ownership and permissions, refreshes the user's token when needed, and initiates the provider operation. It responds to the Mac; it does not take ownership of future scheduled jobs.
99+ 4. The Mac sends local video bytes to the returned allowlisted provider upload URL where supported. Photos that TikTok must pull use the verified Inkspring media host with limited retention.
100+ 5. The Mac/gateway reconcile processing status using the saved provider operation ID, then save the receipt to the existing publication history.
101+ 6. On a timeout, reconnect, or app restart, reconcile the existing operation before retrying. Reject stale revisions and respect cancellation before provider submission. Do not promise exactly-once delivery across every external API.
102+
103+ Test expiry, concurrent refresh, gateway outages, rate limits, cancellation, duplicate requests, app restarts and uncertain provider responses. These are request/retry concerns for a Mac-owned schedule, not a separate cloud-scheduling project.
104+
105+ ## Platform-specific acceptance
106+
107+ **TikTok:** retrieve current creator capabilities and show the target account; require the user’s privacy choice without a preset; respect interaction restrictions; capture the applicable consent and commercial disclosures; preserve editable content and preview; show processing versus published status. Confirm the planned scheduling UX complies before enabling unattended execution. Use device video upload versus verified-domain URL transfer appropriately. This must be a product for creators, not an internal bulk-upload utility. [TikTok content-sharing requirements](https://developers.tiktok.com/docs/en/content-sharing-guidelines).
108+
109+ **LinkedIn:** show profile/page destination explicitly, verify page permissions, initialize and finish media before creating the post, save the returned post URN, and use the supported versioned Posts API. Handle missing permissions, revoked page roles, API sunset versions and reconnect separately from transient errors. [Posts API](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/posts-api).
110+
111+ Neither platform’s publishing documentation should be treated as a promise of unlimited, permanently free API access. Verify current terms and approved quotas. Infrastructure, storage and bandwidth still cost money even if organic posting has no listed per-post fee. This plan creates no paid service and changes no X billing arrangement.
112+
113+ ## App explanations and release gate
114+
115+ Keep the explanation beside the connection and scheduling controls, in plain language:
116+
117+ - **Connect:** “Connect your own TikTok or LinkedIn account. Inkspring securely handles the connection. You don’t need developer API keys.” Show only capabilities actually approved and configured.
118+ - **Schedule:** “Your Mac publishes scheduled posts while Inkspring is open, your Mac is awake, and it has an internet connection.” Explain the actual existing behavior for overdue posts after a restart; do not invent a delivery guarantee.
119+ - **Service role:** “Inkspring’s web service protects our app credentials and handles authorized publishing requests. Your schedule stays on your Mac.”
120+ - **Mobile:** “Schedule changes sync to your Mac, which publishes the post.” Show request acceptance separately from successful publication.
121+ - **Status:** distinguish Connected, Reconnect needed, Service unavailable, Scheduled, Uploading, Processing, Published and Failed. A receipt or confirmed provider status is required before showing Published.
122+ - **Unavailable setup:** say “TikTok posting isn’t available yet” or the equivalent LinkedIn capability, with a useful retry/help action. Do not display internal errors, missing secret names, or instructions for ordinary users to create our developer credentials.
123+
124+ the owner’s November 18 release instruction: after authorized implementation and service setup, create a separate local Mac build for the owner to test. Provide the build path and real recordings/screenshots. **Do not release a new Mac build, update the public installer or Sparkle feed, or trigger Mac release distribution until the owner has tested locally and authorized release.** A plan or a successful build is not that approval.
125+
126+ Provider credentials and any account-side steps are deferred until needed. First inspect existing approved app configuration and available Secrets Manager entries. Reuse valid credentials; do not create duplicates. Complete everything possible autonomously, and give the owner only the precise account-side actions that genuinely require him, with exact URLs and steps. Track those actions as Critical/Urgent To do items in OpenTalon, unassigned and without invented due dates.
127+
128+ ## Implementation sequence and review gates
129+
130+ 1. **Inventory and approval evidence:** confirm actual approved apps/scopes/audit status, callbacks, deployed routes, existing credentials by name only, provider limits and current tests. Link the existing TikTok review task INK-005 and LinkedIn appeal work without assuming historical blockers still apply.
131+ 2. **Design review:** approve the gateway/vault boundary, device identity and minimal retention. Preserve Mac-owned scheduling. Keep core editing and ordinary local use independent of this service.
132+ 3. **Gateway foundation:** harden existing broker, implement isolated token ownership/rotation/revocation, rate limits and provider adapters. Separate staging credentials and account connections from production.
133+ 4. **TikTok pilot:** test two independently authorized users, video and photo paths, privacy choices, processing outcomes, token rotation and disconnect. Use permitted visibility/test accounts; obtain approval before publishing any real content.
134+ 5. **LinkedIn pilot:** ship only the approved profile/page capability. Test text and supported media, page-role removal and token expiry. Keep unavailable capabilities clearly labeled.
135+ 6. **Existing scheduler integration and local review:** verify that a due post from the awake Mac publishes through the shared gateway using the existing Mac/mobile workflow. Verify the explanations above and capture real recordings. Create the local Mac build for the owner’s testing. Website changes go through GitHub only when authorized. Keep provider switches and rollback available. Hold Mac distribution until the owner has tested locally and authorizes release. Do not add cloud scheduling.
136+
137+ ## Definition of done
138+
139+ - Customers connect their own approved platform accounts without entering our secrets or making developer apps.
140+ - Two users cannot read, refresh, revoke or post through each other’s connections.
141+ - No shared secret or provider refresh token is present in the distributed native app or public source; logs and errors are redacted.
142+ - A real approved TikTok post and an approved LinkedIn profile/page post have verified platform receipts and visible results, not just successful login responses.
143+ - Scheduled retry, cancellation and uncertain-outcome tests demonstrate no duplicate publish caused by our executor.
144+ - Reconnect, disconnect, expired authorization, account restrictions, provider quotas and API failures have understandable UI.
145+ - Scheduling stays on the Mac. The gateway holds confidential credentials and handles authorized requests; it does not introduce a cloud-owned schedule, background job queue, or sleeping-Mac publication feature.
146+ - Real flow recordings and evidence are attached to the OpenTalon item before rollout is called complete.
147+
148+ ## Current status
149+
150+ Research and plan only. the owner clarified that this is exclusively about protecting shared API credentials while the awake Mac executes its schedule. Cloud scheduling is excluded. No TikTok/LinkedIn code, keys, account settings, connections, publishing jobs or deployments were changed for this request. TikTok approval is reported by the owner and must be matched to the exact production application during the first implementation step. The separate, already-authorized support/TestFlight release is unrelated to this plan.

docs/account-analytics.md added

1+ # Local account analytics
2+
3+ Open **Analytics** in the desktop sidebar. Select an account, refresh it, and optionally enable a daily snapshot while Inkspring is running. Automatic reads start off and pause after reconnecting an account. X reads use the connected app's API credits. A manual refresh reads at most one profile and one page of posts; loading older posts explicitly reads one further page.
4+
5+ The dashboard shows followers and net growth between observed snapshots; likes, replies/comments and other available engagement on imported posts; top posts; and confirmed publishing activity from this workspace. Date ranges select a post's publication date, not when its likes arrived. Engagement counts are cumulative at the last successful refresh. Missing metrics display as unavailable rather than zero. Rankings are limited to the imported sample and show the top 50 posts.
6+
7+ Follower history starts with the first actual observation. Daily rows preserve the first and latest observation that day, including same-day net growth. History is keyed to the platform and stable account ID, survives restarting and reconnecting the same account, and is kept separate when switching accounts. Net growth does not distinguish follows from unfollows. Historical counts are not inferred from a current follower total.
8+
9+ Data lives in the workspace SQLite database (`analytics-day`, `analytics-post`, `analytics-state` records). No credentials or provider payloads are written to analytics records. Social credentials continue to use protected storage. Account metrics are not sent to writing providers. Disconnecting hides that account's data without deleting it; reconnecting the same account restores its history. Analytics records are included in the complete workspace backup ZIP. Older JSON exports did not contain them.
10+
11+ ## Platform coverage
12+
13+ | Platform | Implemented reads | Access and limits |
14+ | --- | --- | --- |
15+ | X | Followers, following, profile post total; 25 own posts per page with likes, replies, reposts/quotes and impressions when returned | Existing `users.read` and `tweet.read` scopes. Replies included, reposts excluded from imported posts. Profile likes are **not** interpreted as likes received. |
16+ | Instagram | Followers, following, media total; 25 media entries per page with likes and comments when returned | Business/Creator connection with `instagram_business_basic`. Hidden counts remain unavailable. Reach, views and detailed Insights are not requested. |
17+ | TikTok | Followers/following, profile likes and public-video total; 20 public videos per page with likes, comments, shares and views | `user.info.stats` for profile counts; `video.list` and Display API access for videos. These are separate from publishing permission and are not silently added to sign-in. Private sandbox posts are absent from the public-video list. |
18+ | LinkedIn | Member follower total | Requires approved `r_member_profileAnalytics`, absent from the normal posting connection. Member post analytics are not integrated yet. |
19+ | Reddit | 25 own submissions per page, net score and comment count | Approved Reddit API access and `read`. Net score can be negative and is not a like count. User followers are not imported. |
20+
21+ All platforms also show confirmed local publishing receipts without additional read permissions. Each confirmed thread step counts once, including completed steps in a partially failed thread. Pending, uncertain and unconfirmed attempts are excluded. Counts deduplicate by platform, account and remote step ID. Activity is grouped by UTC date.
22+
23+ ## Sources checked November 9, 2026
24+
25+ - [X user lookup](https://docs.x.com/x-api/users/get-user-by-id) and [own-post timeline](https://docs.x.com/x-api/users/get-posts).
26+ - Meta's official SDK fields: [IGUser](https://github.com/facebook/facebook-python-business-sdk/blob/main/facebook_business/adobjects/iguser.py), [IGMedia](https://github.com/facebook/facebook-python-business-sdk/blob/main/facebook_business/adobjects/igmedia.py). The Meta documentation endpoint was rate limited during verification; the Instagram integration still needs a connected Business/Creator account for a live read test.
27+ - TikTok [user info](https://developers.tiktok.com/doc/tiktok-api-v2-get-user-info), [Display API](https://developers.tiktok.com/docs/en/display-api-overview), [public video listing](https://developers.tiktok.com/docs/en/tiktok-api-v2-video-list), [video metrics](https://developers.tiktok.com/docs/en/tiktok-api-v2-video-object).
28+ - LinkedIn [member follower statistics](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/members/follower-statistics), [member post statistics](https://learn.microsoft.com/en-us/linkedin/marketing/community-management/members/post-statistics) (post integration not implemented).
29+ - [Reddit API reference](https://www.reddit.com/dev/api/).

docs/agent-app-setup.md added

1+ # Connect your agent from its desktop app
2+
3+ Claude first, Codex second. These instructions are for local desktop sessions on the same computer as Inkspring. You do not need to open Terminal. A public directory listing is not required for this setup.
4+
5+ ## Start in Inkspring
6+
7+ 1. Open the installed Inkspring app. Keep it in a stable location so the connection does not break when you move it.
8+ 2. Open **Settings → AI agents**.
9+ 3. Turn on **Let AI agents use Inkspring**. This gives connected agents read and write access to the workspace; it is not a read-only connection.
10+ 4. Leave **Let agents post right away** off unless you want that capability. Agents can still schedule posts, so tell your agent when you want drafts only.
11+
12+ ## Claude Code in the Claude app
13+
14+ Download the desktop app if needed: [Claude download](https://claude.com/download).
15+
16+ 1. In Inkspring's agent settings, choose **Claude Code app**.
17+ 2. Select **Save project connection**. In the folder picker, choose the working folder you want to use in Claude Code. An ordinary folder is enough; this does not have to be Inkspring's source repository.
18+ 3. Inkspring saves `.mcp.json` in that folder. It preserves other server entries and asks before replacing a different Inkspring entry. The file contains the path to the native executable and its STDIO argument. Do not publish a project configuration that contains other services' secrets.
19+ 4. Open the Claude desktop app and select **Code**.
20+ 5. Start a new local session using **This computer**, selecting the same working folder. A cloud session cannot reach the local Inkspring server.
21+ 6. Read the project MCP trust prompt and approve the Inkspring connection if you want it to access the workspace.
22+ 7. Open the session's **Connectors** panel and check for Inkspring. Ask Claude to list your Inkspring projects using its MCP tools. If the session was already running when you saved the connection, start a new session.
23+
24+ If an older global or Claude chat connection also uses the name `inkspring`, check it before troubleshooting the project file. Claude Code gives some existing configurations precedence. Do not create duplicate connections just to work around a stale path.
25+
26+ The **+ → Add connectors** and **+ → Add plugins** menus browse installed or available integrations. Inkspring is not listed there yet. **Add custom connector** is for a remotely reachable server; pasting our localhost URL there does not make this desktop app cloud-accessible.
27+
28+ Sources: [Claude Code desktop connections and plugins](https://code.claude.com/docs/en/desktop#connect-external-tools), [shared MCP configuration](https://code.claude.com/docs/en/desktop#mcp-servers-from-the-claude-desktop-chat-app), [local versus remote connectors](https://support.claude.com/en/articles/11725091-when-to-use-desktop-and-web-connectors).
29+
30+ ## Codex app
31+
32+ 1. In Inkspring's agent settings, select **Codex app**.
33+ 2. Open the Codex app's **Settings → MCP servers → Add server**. Current OpenAI documentation calls this the ChatGPT desktop app; installed versions may retain the Codex name.
34+ 3. Enter **inkspring** as the server name and choose **STDIO**.
35+ 4. Copy **Command** from Inkspring into the command field. Do not add shell quotes around paths.
36+ 5. Add each **Argument** as one separate argument. A path containing spaces is still one argument.
37+ 6. Select **Save**, then **Restart** for that server.
38+ 7. Start a local chat. Type **/mcp** in its message box to inspect connected servers. Ask it to list your Inkspring projects using MCP.
39+
40+ Source: [OpenAI's app-based MCP setup](https://learn.chatgpt.com/docs/extend/mcp).
41+
42+ ## Verify reading and writing
43+
44+ For an authored post idea, ask the agent to use `save_idea` with the project ID, title, and text, then verify the returned ID with `get_idea`. The idea appears in **Post ideas → Open**. Platform and format are chosen when creating a draft. Local idea saving works while the Mac display is locked and does not require AI generation.
45+
46+ On Mac 1.0.65, `make_image` accepts an `idea_id` and optional prompt. To save an existing file, use `attach_image` with the `idea_id` and absolute local `file_path`. Both tools accept `draft_id` in place of `idea_id`, and `get_idea` or `get_draft` returns the saved image. Restart the MCP connection after updating to refresh the catalog.
47+
48+ In either agent app, send:
49+
50+ > Use Inkspring's MCP tools to list my projects. In the project I choose, save an unpublished newsletter titled “Agent connection test” with the body “Created from my agent app.” Read it back, then change its body to “Read and write verified.” Do not generate through Inkspring's model provider, schedule, sync to Substack or publish anything.
51+
52+ The agent should use `list_projects`, `save_newsletter`, `get_newsletter`, and `save_newsletter` with the current revision. Open **Newsletters** in Inkspring and check the saved title and final body. This tests a real local write and edit without a social post, subscriber email or Inkspring generation charge. Your agent app's normal usage still applies.
53+
54+ Afterward, ask the agent to bring selected context from sources it already has permission to use. Inkspring does not gain access to email or other apps simply because the agent can reach them. Keep private information out of public-post suggestions.
55+
56+ ## Claude desktop chat: advanced alternative
57+
58+ In Claude, open **Settings → Desktop app → Manage** beside **Extensions**, then **Edit config**. In older versions, use **Settings → Developer → Edit Config**. Merge the Inkspring entry shown under **Claude chat · advanced** into the existing `mcpServers` object using a text editor. Preserve other entries. Save, then fully quit and reopen Claude. This does not require Terminal.
59+
60+ An installable `.mcpb` extension is the planned simpler route. It has not been packaged, installed or submitted yet. Once available, its installation flow is **Settings → Desktop app → Manage beside Extensions → Advanced settings → Install Extension…**, then select the `.mcpb` file and review permissions. [Anthropic's extension instructions](https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop).

docs/backups.md added

1+ # Back up and restore Inkspring
2+
3+ ## Export Backup
4+
5+ 1. Open **Settings → Storage & backups**
6+ 2. Save or discard unfinished edits. Keep any drive containing an attached video connected.
7+ 3. Select **Export Backup**, choose a destination and save the `.zip`. The same action is in **File → Export Backup…**.
8+ 4. Wait for the saved confirmation, then keep a copy somewhere you can recover after losing this computer.
9+
10+ The ZIP contains versioned `data.json`, local workspace images, and copies of the videos referenced by saved drafts. Writing includes projects, posts/drafts, ideas and their relationships, sources, newsletters with exact Markdown, publication receipts, saved research, agent suggestions, replies and analytics. It includes provider/model choices, voice/style, interests/hashtags and the idea queue target. Dates, identifiers and relationships are preserved.
11+
12+ Credentials, API keys, social sessions, MCP keys and TikTok publishing consent are excluded. The full Obsidian vault, external linked content and cloud-only R2 objects remain in their own storage; the accepted notes/references already saved in Inkspring are included. Connect those services/folders again on a new computer. The ZIP is not encrypted; keep it private.
13+
14+ Export fails clearly if an attached file is missing or changed rather than silently creating an incomplete backup. Files stream to ZIP, including large videos. Limits:100MB structured JSON,100,000records,10,000media files,4GB per file and64GB total media. No cloud upload or sync is involved.
15+
16+ ## Import / Restore
17+
18+ 1. Open **Settings → Storage & backups → Import / Restore**, or **File → Import / Restore…**.
19+ 2. Choose the backup ZIP. Inkspring stages it privately, checks the version, record structure, project relationships, duplicate IDs, media paths, sizes and SHA-256 hashes before changing the workspace.
20+ 3. Read the counts and replacement warning. Matching record IDs will be replaced; other local records remain. Cancel and export your current workspace first if you want to keep its current versions.
21+ 4. Select **Restore backup** to proceed. Images and video files are restored locally; credentials and sign-ins are not imported. Re-importing the same backup updates those same record IDs and reuses restored media rather than duplicating them.
22+ 5. Review restored writing and reconnect accounts where needed. Restored scheduled posts move to **Ready to schedule**, with their original time retained as metadata. Choose a new time and schedule explicitly. Automatic posting, idea refill, reply/analytics monitoring and agent access are off after restore; enable each only when ready.
23+ 6. For Substack, check the remote publication before syncing/sending again. Restored linked newsletters are marked **Check Substack**. A schedule previously accepted by Substack may still run there independently of this computer; restoring cannot cancel it.
24+
25+ Database changes commit together. If media staging or a database write fails, existing records and files remain and newly created media is removed. Writing and background operations are held during the transfer. Existing files are never overwritten with different bytes.
26+
27+ Older version1 `.json` backups remain importable, but cannot recover the images, videos or newer record types those files never contained. The import review calls out that limitation.
28+
29+ ## Verification
30+
31+ Automated tests cover a meaningful full ZIP round trip into a clean on-disk workspace: posts, ideas, source relationships, exact newsletter code fences, an image, a video, voice/model preferences, analytics observations, replies, saved research and pending agent context. They also cover repeat import without duplication, excluded credentials/consent, paused schedules/automation, malformed records, missing/tampered media, unexpected ZIP entries, record-kind collisions, write-failure rollback, missing export media and legacy JSON.

docs/screenshots/ipad-review.webp added

Not a text file.

docs/screenshots/iphone-schedule.webp added

Not a text file.

docs/screenshots/mac-post-ideas.webp added

Not a text file.

docs/substack-newsletters.md added

1+ # Substack newsletters
2+
3+ Newsletters is a separate long-form workspace in the desktop sidebar. Each project keeps its own newsletters. The editor has Markdown source, a split view and a reader preview. Fenced and indented code blocks preserve text, indentation and line breaks, with a language label when supplied. Inline code, headings, nested lists, bold, italic, strikethrough, quotes, rules and HTTPS links are supported. Raw HTML is treated as text. Standalone Markdown images become Substack image blocks; the local preview shows remote images as links. An attached local cover uploads directly to Substack; no R2 bucket is required.
4+
5+ Original Markdown is stored in the local SQLite workspace and included in workspace backup ZIPs. Import/export Markdown files, or export a formatted HTML article. Substack controls its final typography and code presentation.
6+
7+ ## Connect
8+
9+ 1. Open **Connections → Substack newsletters → Sign in to Substack**. The destination is https://substack.com/sign-in . Sign in yourself, including any email code or verification.
10+ 2. If sign-in has not completed the connection, choose **Check connection**.
11+ 3. Choose the intended publication from **Publication**. Inkspring lists publications the account can edit and does not silently select the first one.
12+
13+ This is an unofficial connection to Substack's web interface, not a supported public publishing API. It can need maintenance or reconnection when that interface changes. API requests go only to substack.com or its publication subdomains, including for publications with custom domains. Sign-in uses an isolated local browser session. Cookies are never exposed to the writing renderer or MCP and are excluded from workspace backups. Disconnect clears that browser session.
14+
15+ ## Write and send
16+
17+ 1. Write or import Markdown in **Newsletters**. Optionally select references and use your configured writing provider to generate/refine a draft. This uses provider credits and shares the displayed brief, saved draft, approved project/voice context and selected references.
18+ 2. Choose everyone, paid subscribers or founding members, and whether to email subscribers or publish on the web only. Attach a cover if desired.
19+ 3. **Save local draft** keeps it on this computer. **Save to Substack** creates/updates a remote draft and verifies its returned content. It does not publish or email anything.
20+ 4. Choose **Schedule a time** or **Publish now**. Time is shown in your computer's time zone. The default uses an uneven minute; any exact minute, including :00, is allowed. Substack permits scheduling within three months.
21+ 5. Review shows the publication, audience, email choice and exact time. Check the acknowledgement and use the final confirmation button. A sent email cannot be recalled.
22+
23+ Confirmed schedules appear in **Schedule**. Substack delivers them even with Inkspring closed. The social-post pause switch does not pause Substack. **Check status** reconciles the saved state with Substack. **Cancel scheduled send** requests and verifies cancellation while retaining the remote draft. Disconnecting Inkspring does not cancel an existing Substack schedule. The publication dashboard is `https://<your-publication>.substack.com/publish/posts`.
24+
25+ Reviews are single-use, expire, and bind the saved revision, account, publication and remote content. Edits require another review. Unconfirmed requests are never automatically retried. Interrupted sync/send operations recover as uncertain after restart. ZIP restores preserve linked remote metadata but mark those newsletters Check Substack, with email delivery off. They never submit or resume a send. Check existing remote schedules on Substack before sending again. Older JSON imports restore local drafts only.
26+
27+ ## MCP and validation
28+
29+ `list_newsletters`, `get_newsletter` and `save_newsletter` provide local read/write access. Updates require the current revision. `list_schedule` includes newsletters' saved remote status. Agents cannot upload, schedule or send newsletters through these tools; a person reviews those steps in the app.
30+
31+ Automated tests simulate Substack responses, covering scheduling, publishing, cancellation, uncertain results, changed accounts/content, duplicate prevention and Markdown/code preservation. Native editor checks use an isolated workspace. Real sign-in, draft round-trip and an approved live send are separate acceptance checks; passing tests do not claim an email was sent.
32+
33+ Protocol references checked November 9, 2026: [Substack scheduling help](https://support.substack.com/hc/en-us/articles/360037870412-How-do-I-schedule-an-article-to-publish-for-a-future-date-on-Substack), [API terms](https://substack.com/api-tos), and the [unofficial interface reference](https://github.com/cotletdev/substack-api-mcp-server). No third-party Substack client code is bundled.

native-mac/Info.plist added

1+ <?xml version="1.0" encoding="UTF-8"?>
2+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+ <plist version="1.0">
4+ <dict>
5+ <key>CFBundleExecutable</key>
6+ <string>Inkspring</string>
7+ <key>CFBundleIconFile</key>
8+ <string>Inkspring.icns</string>
9+ <key>CFBundleIdentifier</key>
10+ <string>com.protomota.inkspring.native</string>
11+ <key>CFBundleName</key>
12+ <string>Inkspring</string>
13+ <key>CFBundlePackageType</key>
14+ <string>APPL</string>
15+ <key>CFBundleShortVersionString</key>
16+ <string>1.0.73</string>
17+ <key>CFBundleVersion</key>
18+ <string>83</string>
19+ <key>LSMinimumSystemVersion</key>
20+ <string>14.0</string>
21+ <key>NSHighResolutionCapable</key>
22+ <true/>
23+ </dict>
24+ </plist>

native-mac/InkspringCompanion.xcodeproj/project.pbxproj added

1+ // !$*UTF8*$!
2+ {
3+ archiveVersion = 1;
4+ classes = {
5+ };
6+ objectVersion = 56;
7+ objects = {
8+
9+ /* Begin PBXBuildFile section */
10+ FA291A600001000000000001 /* PlatformIcons in Resources */ = {isa = PBXBuildFile; fileRef = FA291A600001000000000002 /* PlatformIcons */; };
11+ A00000000000000000000031 /* InkspringCompanion.swift in Sources */ = {isa = PBXBuildFile; fileRef = A00000000000000000000021 /* InkspringCompanion.swift */; };
12+ A00000000000000000000032 /* CompanionSchedule.swift in Sources */ = {isa = PBXBuildFile; fileRef = A00000000000000000000022 /* CompanionSchedule.swift */; };
13+ A00000000000000000000033 /* CloudScheduleStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = A00000000000000000000023 /* CloudScheduleStore.swift */; };
14+ A00000000000000000000034 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A00000000000000000000026 /* Assets.xcassets */; };
15+ A00000000000000000000035 /* MobileLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = A00000000000000000000027 /* MobileLibrary.swift */; };
16+ A00000000000000000000036 /* MobileIdeas.swift in Sources */ = {isa = PBXBuildFile; fileRef = A00000000000000000000028 /* MobileIdeas.swift */; };
17+ A00000000000000000000037 /* CompanionLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = A00000000000000000000029 /* CompanionLibrary.swift */; };
18+ A00000000000000000000038 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = A0000000000000000000002A /* PrivacyInfo.xcprivacy */; };
19+ A00000000000000000000039 /* MobileSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0000000000000000000002B /* MobileSettings.swift */; };
20+ A0000000000000000000003A /* Sources/Inkspring/StudioAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0000000000000000000002C /* Sources/Inkspring/StudioAppearance.swift */; };
21+ FC000000000000000000003A /* StudioProofreading.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC000000000000000000002C /* StudioProofreading.swift */; };
22+ FC000000000000000000003B /* PostIdeaWriting.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC000000000000000000002D /* PostIdeaWriting.swift */; };
23+ A0000000000000000000003B /* Sources/Inkspring/InkspringCommunity.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0000000000000000000002D /* Sources/Inkspring/InkspringCommunity.swift */; };
24+ C01700000000000000000000 = {isa = PBXBuildFile; fileRef = C01700000000000000000100; };
25+ C01700000000000000000001 = {isa = PBXBuildFile; fileRef = C01700000000000000000101; };
26+ C01700000000000000000002 = {isa = PBXBuildFile; fileRef = C01700000000000000000102; };
27+ C01700000000000000000003 = {isa = PBXBuildFile; fileRef = C01700000000000000000103; };
28+ /* End PBXBuildFile section */
29+
30+ /* Begin PBXFileReference section */
31+ FA291A600001000000000002 /* PlatformIcons */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Resources/PlatformIcons; sourceTree = SOURCE_ROOT; };
32+ A00000000000000000000020 /* Inkspring.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Inkspring.app; sourceTree = BUILT_PRODUCTS_DIR; };
33+ A00000000000000000000021 /* InkspringCompanion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InkspringCompanion.swift; sourceTree = "<group>"; };
34+ A00000000000000000000022 /* CompanionSchedule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompanionSchedule.swift; sourceTree = "<group>"; };
35+ A00000000000000000000023 /* CloudScheduleStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CloudScheduleStore.swift; sourceTree = "<group>"; };
36+ A00000000000000000000024 /* CloudKit.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = CloudKit.entitlements; sourceTree = "<group>"; };
37+ A00000000000000000000025 /* iPhone settings */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "iPhone settings"; path = iPhone/Companion.xcconfig; sourceTree = SOURCE_ROOT; };
38+ A00000000000000000000026 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
39+ A00000000000000000000027 /* MobileLibrary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MobileLibrary.swift; sourceTree = "<group>"; };
40+ A00000000000000000000028 /* MobileIdeas.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MobileIdeas.swift; sourceTree = "<group>"; };
41+ A00000000000000000000029 /* CompanionLibrary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompanionLibrary.swift; sourceTree = "<group>"; };
42+ A0000000000000000000002A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
43+ A0000000000000000000002B /* MobileSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MobileSettings.swift; sourceTree = "<group>"; };
44+ A0000000000000000000002C /* Sources/Inkspring/StudioAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sources/Inkspring/StudioAppearance.swift; sourceTree = SOURCE_ROOT; };
45+ FC000000000000000000002C /* StudioProofreading.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sources/Inkspring/StudioProofreading.swift; sourceTree = SOURCE_ROOT; };
46+ FC000000000000000000002D /* PostIdeaWriting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sources/Inkspring/PostIdeaWriting.swift; sourceTree = SOURCE_ROOT; };
47+ A0000000000000000000002D /* Sources/Inkspring/InkspringCommunity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sources/Inkspring/InkspringCommunity.swift; sourceTree = SOURCE_ROOT; };
48+ C01700000000000000000100 = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sources/InkspringSchedule/ContentPlan.swift; sourceTree = SOURCE_ROOT; };
49+ C01700000000000000000101 = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sources/Inkspring/ContentPlanView.swift; sourceTree = SOURCE_ROOT; };
50+ C01700000000000000000102 = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sources/Inkspring/OnDeviceContentAssistant.swift; sourceTree = SOURCE_ROOT; };
51+ C01700000000000000000103 = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iPhone/MobileContentPlans.swift; sourceTree = SOURCE_ROOT; };
52+ /* End PBXFileReference section */
53+
54+ /* Begin PBXFrameworksBuildPhase section */
55+ A00000000000000000000008 /* Frameworks */ = {
56+ isa = PBXFrameworksBuildPhase;
57+ buildActionMask = 2147483647;
58+ files = (
59+ );
60+ runOnlyForDeploymentPostprocessing = 0;
61+ };
62+ /* End PBXFrameworksBuildPhase section */
63+
64+ /* Begin PBXGroup section */
65+ A00000000000000000000003 = {
66+ isa = PBXGroup;
67+ children = (
68+ C01700000000000000000100 /* ContentPlan */,
69+ C01700000000000000000101 /* ContentPlanView */,
70+ C01700000000000000000102 /* OnDeviceContentAssistant */,
71+ C01700000000000000000103 /* MobileContentPlans */,
72+ A00000000000000000000004 /* iPhone */,
73+ B00000000000000000000002 /* UI Tests */,
74+ A00000000000000000000005 /* Shared schedule */,
75+ A00000000000000000000006 /* Products */,
76+ A233B3E130A8FCFB00BCE10F /* Recovered References */,
77+ );
78+ sourceTree = "<group>";
79+ };
80+ A00000000000000000000004 /* iPhone */ = {
81+ isa = PBXGroup;
82+ children = (
83+ A00000000000000000000021 /* InkspringCompanion.swift */,
84+ A00000000000000000000024 /* CloudKit.entitlements */,
85+ A00000000000000000000026 /* Assets.xcassets */,
86+ A00000000000000000000027 /* MobileLibrary.swift */,
87+ A00000000000000000000028 /* MobileIdeas.swift */,
88+ A0000000000000000000002A /* PrivacyInfo.xcprivacy */,
89+ A0000000000000000000002B /* MobileSettings.swift */,
90+ A0000000000000000000002C /* Sources/Inkspring/StudioAppearance.swift */,
91+ FC000000000000000000002C /* StudioProofreading.swift */,
92+ FC000000000000000000002D /* PostIdeaWriting.swift */,
93+ A0000000000000000000002D /* Sources/Inkspring/InkspringCommunity.swift */,
94+ );
95+ path = iPhone;
96+ sourceTree = "<group>";
97+ };
98+ A00000000000000000000005 /* Shared schedule */ = {
99+ isa = PBXGroup;
100+ children = (
101+ A00000000000000000000022 /* CompanionSchedule.swift */,
102+ A00000000000000000000023 /* CloudScheduleStore.swift */,
103+ A00000000000000000000029 /* CompanionLibrary.swift */,
104+ );
105+ name = "Shared schedule";
106+ path = Sources/InkspringSchedule;
107+ sourceTree = "<group>";
108+ };
109+ A00000000000000000000006 /* Products */ = {
110+ isa = PBXGroup;
111+ children = (
112+ A00000000000000000000020 /* Inkspring.app */,
113+ );
114+ name = Products;
115+ sourceTree = "<group>";
116+ };
117+ A233B3E130A8FCFB00BCE10F /* Recovered References */ = {
118+ isa = PBXGroup;
119+ children = (
120+ A00000000000000000000025 /* iPhone settings */,
121+ );
122+ name = "Recovered References";
123+ sourceTree = "<group>";
124+ };
125+ /* End PBXGroup section */
126+
127+ /* Begin PBXNativeTarget section */
128+ A00000000000000000000002 /* InkspringCompanion */ = {
129+ isa = PBXNativeTarget;
130+ buildConfigurationList = A00000000000000000000011 /* Build configuration list for PBXNativeTarget "InkspringCompanion" */;
131+ buildPhases = (
132+ A00000000000000000000007 /* Sources */,
133+ A00000000000000000000008 /* Frameworks */,
134+ A00000000000000000000009 /* Resources */,
135+ );
136+ buildRules = (
137+ );
138+ dependencies = (
139+ );
140+ name = InkspringCompanion;
141+ productName = Inkspring;
142+ productReference = A00000000000000000000020 /* Inkspring.app */;
143+ productType = "com.apple.product-type.application";
144+ };
145+ /* End PBXNativeTarget section */
146+
147+ /* Begin PBXProject section */
148+ A00000000000000000000001 /* Project object */ = {
149+ isa = PBXProject;
150+ attributes = {
151+ BuildIndependentTargetsInParallel = YES;
152+ LastSwiftUpdateCheck = 2700;
153+ LastUpgradeCheck = 2700;
154+ TargetAttributes = {
155+ A00000000000000000000002 = {
156+ CreatedOnToolsVersion = 27.2;
157+ SystemCapabilities = {
158+ com.apple.iCloud = {
159+ enabled = 1;
160+ };
161+ };
162+ };
163+ };
164+ };
165+ buildConfigurationList = A00000000000000000000010 /* Build configuration list for PBXProject "InkspringCompanion" */;
166+ compatibilityVersion = "Xcode 14.0";
167+ developmentRegion = en;
168+ hasScannedForEncodings = 0;
169+ knownRegions = (
170+ en,
171+ Base,
172+ );
173+ mainGroup = A00000000000000000000003;
174+ productRefGroup = A00000000000000000000006 /* Products */;
175+ projectDirPath = "";
176+ projectRoot = "";
177+ targets = (
178+ A00000000000000000000002 /* InkspringCompanion */,
179+ B00000000000000000000001 /* UI Tests */,
180+ );
181+ };
182+ /* End PBXProject section */
183+
184+ /* Begin PBXResourcesBuildPhase section */
185+ A00000000000000000000009 /* Resources */ = {
186+ isa = PBXResourcesBuildPhase;
187+ buildActionMask = 2147483647;
188+ files = (
189+ A00000000000000000000034 /* Assets.xcassets in Resources */,
190+ FA291A600001000000000001 /* PlatformIcons in Resources */,
191+ A00000000000000000000038 /* PrivacyInfo.xcprivacy in Resources */,
192+ );
193+ runOnlyForDeploymentPostprocessing = 0;
194+ };
195+ /* End PBXResourcesBuildPhase section */
196+
197+ /* Begin PBXSourcesBuildPhase section */
198+ A00000000000000000000007 /* Sources */ = {
199+ isa = PBXSourcesBuildPhase;
200+ buildActionMask = 2147483647;
201+ files = (
202+ C01700000000000000000003 /* MobileContentPlans in Sources */,
203+ C01700000000000000000002 /* OnDeviceContentAssistant in Sources */,
204+ C01700000000000000000001 /* ContentPlanView in Sources */,
205+ C01700000000000000000000 /* ContentPlan in Sources */,
206+ A00000000000000000000031 /* InkspringCompanion.swift in Sources */,
207+ A00000000000000000000032 /* CompanionSchedule.swift in Sources */,
208+ A00000000000000000000033 /* CloudScheduleStore.swift in Sources */,
209+ A00000000000000000000035 /* MobileLibrary.swift in Sources */,
210+ A00000000000000000000036 /* MobileIdeas.swift in Sources */,
211+ A00000000000000000000037 /* CompanionLibrary.swift in Sources */,
212+ A00000000000000000000039 /* MobileSettings.swift in Sources */,
213+ A0000000000000000000003A /* Sources/Inkspring/StudioAppearance.swift in Sources */,
214+ FC000000000000000000003A /* StudioProofreading.swift in Sources */,
215+ FC000000000000000000003B /* PostIdeaWriting.swift in Sources */,
216+ A0000000000000000000003B /* Sources/Inkspring/InkspringCommunity.swift in Sources */,
217+ );
218+ runOnlyForDeploymentPostprocessing = 0;
219+ };
220+ /* End PBXSourcesBuildPhase section */
221+
222+ /* Begin XCBuildConfiguration section */
223+ A00000000000000000000012 /* Debug */ = {
224+ isa = XCBuildConfiguration;
225+ buildSettings = {
226+ ENABLE_TESTABILITY = YES;
227+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
228+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
229+ };
230+ name = Debug;
231+ };
232+ A00000000000000000000013 /* Release */ = {
233+ isa = XCBuildConfiguration;
234+ buildSettings = {
235+ SWIFT_COMPILATION_MODE = wholemodule;
236+ SWIFT_OPTIMIZATION_LEVEL = "-O";
237+ };
238+ name = Release;
239+ };
240+ A00000000000000000000014 /* Debug */ = {
241+ isa = XCBuildConfiguration;
242+ baseConfigurationReference = A00000000000000000000025 /* iPhone settings */;
243+ buildSettings = {
244+ };
245+ name = Debug;
246+ };
247+ A00000000000000000000015 /* Release */ = {
248+ isa = XCBuildConfiguration;
249+ baseConfigurationReference = A00000000000000000000025 /* iPhone settings */;
250+ buildSettings = {
251+ };
252+ name = Release;
253+ };
254+ /* End XCBuildConfiguration section */
255+
256+ /* Begin XCConfigurationList section */
257+ A00000000000000000000010 /* Build configuration list for PBXProject "InkspringCompanion" */ = {
258+ isa = XCConfigurationList;
259+ buildConfigurations = (
260+ A00000000000000000000012 /* Debug */,
261+ A00000000000000000000013 /* Release */,
262+ );
263+ defaultConfigurationIsVisible = 0;
264+ defaultConfigurationName = Release;
265+ };
266+ A00000000000000000000011 /* Build configuration list for PBXNativeTarget "InkspringCompanion" */ = {
267+ isa = XCConfigurationList;
268+ buildConfigurations = (
269+ A00000000000000000000014 /* Debug */,
270+ A00000000000000000000015 /* Release */,
271+ );
272+ defaultConfigurationIsVisible = 0;
273+ defaultConfigurationName = Release;
274+ };
275+ /* End XCConfigurationList section */
276+ B00000000000000000000001 = {isa = PBXNativeTarget; buildConfigurationList = B00000000000000000000006; buildPhases = (B00000000000000000000007); buildRules = (); dependencies = (B0000000000000000000000A); name = WalkthroughUITests; productName = WalkthroughUITests; productReference = B00000000000000000000003; productType = "com.apple.product-type.bundle.ui-testing";};
277+ B00000000000000000000002 = {isa = PBXGroup; children = (B00000000000000000000004); path = UITests; sourceTree = "<group>";};
278+ B00000000000000000000003 = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WalkthroughUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR;};
279+ B00000000000000000000004 = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITests/XPostEditingUITests.swift; sourceTree = SOURCE_ROOT;};
280+ B00000000000000000000005 = {isa = PBXBuildFile; fileRef = B00000000000000000000004;};
281+ B00000000000000000000006 = {isa = XCConfigurationList; buildConfigurations = (B00000000000000000000008); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug;};
282+ B00000000000000000000007 = {isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = (B00000000000000000000005); runOnlyForDeploymentPostprocessing = 0;};
283+ B00000000000000000000008 = {isa = XCBuildConfiguration; name = Debug; buildSettings = {SDKROOT = iphoneos; IPHONEOS_DEPLOYMENT_TARGET = 17.0; TARGETED_DEVICE_FAMILY = "1,2"; GENERATE_INFOPLIST_FILE = YES; PRODUCT_BUNDLE_IDENTIFIER = com.protomota.inkspring.walkthrough.ui; PRODUCT_NAME = WalkthroughUITests; SWIFT_VERSION = 6.0; ALWAYS_SEARCH_USER_PATHS = NO; TEST_TARGET_NAME = InkspringCompanion;};};
284+ B00000000000000000000009 = {isa = PBXContainerItemProxy; containerPortal = A00000000000000000000001; proxyType = 1; remoteGlobalIDString = A00000000000000000000002; remoteInfo = InkspringCompanion;};
285+ B0000000000000000000000A = {isa = PBXTargetDependency; target = A00000000000000000000002; targetProxy = B00000000000000000000009;};
286+ };
287+ rootObject = A00000000000000000000001 /* Project object */;
288+ }

native-mac/InkspringCompanion.xcodeproj/xcshareddata/xcschemes/InkspringCompanion.xcscheme added

1+ <?xml version="1.0" encoding="UTF-8"?>
2+ <Scheme
3+ LastUpgradeVersion = "2700"
4+ version = "1.7">
5+ <BuildAction
6+ parallelizeBuildables = "YES"
7+ buildImplicitDependencies = "YES">
8+ <BuildActionEntries>
9+ <BuildActionEntry
10+ buildForTesting = "YES"
11+ buildForRunning = "YES"
12+ buildForProfiling = "YES"
13+ buildForArchiving = "YES"
14+ buildForAnalyzing = "YES">
15+ <BuildableReference
16+ BuildableIdentifier = "primary"
17+ BlueprintIdentifier = "A00000000000000000000002"
18+ BuildableName = "Inkspring.app"
19+ BlueprintName = "InkspringCompanion"
20+ ReferencedContainer = "container:InkspringCompanion.xcodeproj">
21+ </BuildableReference>
22+ </BuildActionEntry>
23+ </BuildActionEntries>
24+ </BuildAction>
25+ <TestAction
26+ buildConfiguration = "Debug"
27+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+ shouldUseLaunchSchemeArgsEnv = "YES"
30+ shouldAutocreateTestPlan = "NO">
31+ <Testables>
32+ <TestableReference skipped="NO" parallelizable="NO">
33+ <BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="B00000000000000000000001" BuildableName="WalkthroughUITests.xctest" BlueprintName="WalkthroughUITests" ReferencedContainer="container:InkspringCompanion.xcodeproj"/>
34+ </TestableReference>
35+ </Testables>
36+ </TestAction>
37+ <LaunchAction
38+ buildConfiguration = "Debug"
39+ selectedDebuggerIdentifier = ""
40+ selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
41+ launchStyle = "0"
42+ useCustomWorkingDirectory = "NO"
43+ ignoresPersistentStateOnLaunch = "NO"
44+ debugDocumentVersioning = "YES"
45+ debugServiceExtension = "internal"
46+ allowLocationSimulation = "YES">
47+ <BuildableProductRunnable
48+ runnableDebuggingMode = "0">
49+ <BuildableReference
50+ BuildableIdentifier = "primary"
51+ BlueprintIdentifier = "A00000000000000000000002"
52+ BuildableName = "Inkspring.app"
53+ BlueprintName = "InkspringCompanion"
54+ ReferencedContainer = "container:InkspringCompanion.xcodeproj">
55+ </BuildableReference>
56+ </BuildableProductRunnable>
57+ </LaunchAction>
58+ <ProfileAction
59+ buildConfiguration = "Release"
60+ shouldUseLaunchSchemeArgsEnv = "YES"
61+ savedToolIdentifier = ""
62+ useCustomWorkingDirectory = "NO"
63+ debugDocumentVersioning = "YES">
64+ </ProfileAction>
65+ <AnalyzeAction
66+ buildConfiguration = "Debug">
67+ </AnalyzeAction>
68+ <ArchiveAction
69+ buildConfiguration = "Release"
70+ revealArchiveInOrganizer = "YES">
71+ </ArchiveAction>
72+ </Scheme>

native-mac/Package.resolved added

1+ {
2+ "originHash" : "21b0c8b304ebdcb3cf21a49f8a1bc0bae090431020c8cb6a5ff2bd7dabcd4d70",
3+ "pins" : [
4+ {
5+ "identity" : "sparkle",
6+ "kind" : "remoteSourceControl",
7+ "location" : "https://github.com/sparkle-project/Sparkle",
8+ "state" : {
9+ "revision" : "eef1a539a373c1f1a320624b1130fc5de7b2e100",
10+ "version" : "2.10.0"
11+ }
12+ }
13+ ],
14+ "version" : 3
15+ }

native-mac/Package.swift added

1+ // swift-tools-version: 6.0
2+ import PackageDescription
3+
4+ let package = Package(
5+ name: "Inkspring",
6+ platforms: [.macOS(.v14)],
7+ dependencies: [
8+ .package(url: "https://github.com/sparkle-project/Sparkle", exact: "2.10.0")
9+ ],
10+ targets: [
11+ .systemLibrary(name: "CSQLite"),
12+ .systemLibrary(name: "CArchive"),
13+ .systemLibrary(name: "CCMark"),
14+ .target(name: "InkspringSchedule"),
15+ .executableTarget(name: "Inkspring", dependencies: [
16+ "CSQLite", "CArchive", "CCMark", "InkspringSchedule",
17+ .product(name: "Sparkle", package: "Sparkle")
18+ ], linkerSettings: [
19+ .unsafeFlags(["-Xlinker", "-rpath", "-Xlinker", "@executable_path/../Frameworks"])
20+ ]),
21+ .testTarget(name: "InkspringTests", dependencies: ["Inkspring", "InkspringSchedule"])
22+ ]
23+ )

native-mac/README.md added

1+ # Inkspring for macOS
2+
3+ Inkspring for Mac is built with SwiftUI. It uses system Liquid Glass on macOS 26 and later, supports standard native controls on macOS 14 and 15, and opens a local SQLite workspace at `~/Library/Application Support/Inkspring Native`.
4+
5+ ## Build and open
6+
7+ Run the following from the repository root on a Mac with Xcode installed.
8+
9+ ```sh
10+ native-mac/build-app.sh
11+ open "/Volumes/Expand/Projects/Inkspring/native-app/Inkspring.app"
12+ ```
13+
14+ The build script accepts an absolute output directory as its first argument. For a disposable workspace, create a separate directory and open the app with `open -n -a <app-path> --env "INKSPRING_NATIVE_WORKSPACE=<workspace-path>"`.
15+
16+ For a Developer ID build, set `INKSPRING_MAC_SIGNING_IDENTITY` to the installed identity. The build uses Hardened Runtime and a secure signing timestamp. Set `INKSPRING_MAC_NOTARIZE=1` with `APPLE_API_KEY` (a private key file), `APPLE_API_KEY_ID`, and `APPLE_API_ISSUER` to submit the app bundle to Apple. The script staples the accepted ticket and verifies Gatekeeper before installing the build. Retrieve the notarization credentials from Bitwarden Secrets Manager.
17+
18+ For direct downloads with **Inkspring → Check for Updates…**, set `INKSPRING_UPDATE_FEED=https://inkspring.ai/updates/appcast.xml` and `INKSPRING_UPDATE_PUBLIC_KEY` to the public key returned by Sparkle’s `generate_keys --account com.protomota.inkspring.native -p`. Keep the private signing key in the signing Mac’s Keychain. For each release, increment `CFBundleVersion` (or set `INKSPRING_MAC_BUILD_NUMBER`) and notarize the app. Use `build/package-installer.py` to package the stapled app in the branded, signed and notarized DMG. Run Sparkle’s `generate_appcast --account com.protomota.inkspring.native --download-url-prefix https://inkspring.ai/updates/` in a directory containing the release DMG. Publish the signed XML and use that same DMG on the download page. Unsigned development builds leave the updater disabled.
19+
20+ ## Back up and restore
21+
22+ 1. Open **Settings → Storage & backups** or use the **File** menu.
23+ 2. Select **Export Backup…** and save a ZIP. It contains workspace records, local images and attached videos. API keys, OAuth sessions and background-service settings stay on this Mac.
24+ 3. Select **Import / Restore…**, choose a workspace backup ZIP, and review the record and media counts. Confirm to merge the backup. The review shows how many records the restore adds, replaces, and keeps. Inkspring keeps existing publishing history, protected drafts, and newsletters linked to Substack. Restored scheduled posts go back to **Ready to schedule**. Check remotely scheduled newsletters in Substack before sending again.
25+
26+ The same dialog accepts version 1 Inkspring JSON exports. Reattach images and videos after restoring an older JSON export.
27+
28+ Under **Daily backups**, choose a destination folder and turn on **Back up once a day**. **Choose iCloud Drive…** opens the iCloud Drive picker. Settings shows when iCloud confirms the upload of the latest ZIP, and Restore waits for an iCloud-only ZIP to download before opening it. Use **Back Up Now** to save an additional ZIP to the same folder. Inkspring checks for a backup on launch and periodically while open. The background item checks at 3 a.m. local time, on sign-in, and later in the day if a backup is still needed. Approve it in **System Settings → General → Login Items & Extensions** to keep backups running after you quit the app. The Mac must be signed in and able to access the chosen folder.
29+
30+ ## Migrate a workspace
31+
32+ In **Settings → Storage & backups**, select **Import Workspace Folder…** and choose the source workspace folder. Review the record and attachment counts before importing into the open Mac workspace. The source stays available for recovery. Reconnect social accounts in the native app after importing.
33+
34+ The migration command snapshots the source database with SQLite, copies and checks its images and videos, and creates a new native workspace directory. The source stays available for recovery. The destination must be a new folder. The copy retains all records and pauses automation and agent access until the native app is configured.
35+
36+ ```sh
37+ "/Volumes/Expand/Projects/Inkspring/native-app/Inkspring.app/Contents/MacOS/Inkspring" \
38+ --stage-workspace "<absolute source workspace path>" "<new absolute native workspace path>"
39+ ```
40+
41+ ## Connect an agent
42+
43+ Choose **Set up AI agents** in the Workspace or replay the walkthrough in **Settings → AI agents → Open connection guide**. The local test checks that Inkspring answers. Ask your connected client “List my Inkspring projects” to verify the client connection. The guide leaves credential and publishing choices up to you.
44+
45+ Open **Settings → AI agents** and turn on **Let AI agents use Inkspring**. Claude Code can save a project connection from this screen. For Codex, use the command and argument shown in the Codex tab. The Swift executable speaks STDIO MCP and reads and writes the same SQLite database as the app. Vault reading and immediate X or LinkedIn posting each require their own permission. Suggestions wait for review in Settings.
46+
47+ For a specific **Post idea**, use MCP **save_idea** with the chosen `project_id`, `title`, and `text`. It saves one item to **Post ideas → Open** with the supplied text and links. Use an optional `request_key` to retry an identical save safely, then **get_idea** with the returned ID to verify the complete idea. The local MCP server can save while the Mac display is locked.
48+
49+ Open an idea’s image controls to generate an image with your configured image API or attach a PNG, JPEG, or WebP file. Inkspring keeps the source image on the idea and sizes a copy for new X, LinkedIn, Reddit, Instagram, or TikTok photo drafts. A mobile generation request uses the image provider on your Mac and syncs back with a preview.
50+
51+ Through MCP, pass `idea_id` to **make_image** with an optional `prompt`, or to **attach_image** with an absolute local `file_path`. Both tools also accept `draft_id` in place of `idea_id`. Pass the last-read `expected_updated_at` to catch concurrent edits, then read back the saved image with **get_idea** or **get_draft**. To load the updated tool catalog, reconnect your MCP client after installing the current Mac version.
52+
53+ For already-written social copy, use MCP **save_draft** with `project_id`, `platform`, `title`, and `content`. It saves the exact text locally without a model, API key, scheduling, or publication. Optional `request_key` prevents duplicate creation on identical retries. Use **edit_draft** with the last-read `expected_updated_at` for revisions. **write_post** also accepts `content` for local saving; use its `idea` argument only when requesting model generation through the configured writing connection. Keep LinkedIn URLs in the supplied body when desired.
54+
55+ To save an authored X reply, use **save_draft** with `platform: "x"`, `format: "reply"`, and the original post link as `reply_to_url`. **get_draft** returns the saved reply target, exact copy and `agentPostingEnabled`. When the author requests publication and has enabled immediate agent posting, pass the draft's `updatedAt` as `expected_updated_at` to **post_now**. To publish a draft through the app, open it and use **Post now…** to review it.
56+
57+ **Ask my agent** opens a chat in the Mac app. Select a locally installed, signed-in Codex or Claude Code. Chat can read drafts, ideas, and newsletters in the open project and suggest wording. It cannot change drafts, schedule, or publish. The selected agent handles the model request using its existing sign-in.
58+
59+ Copy the ID shown on a post or newsletter, such as `PRO-001`, and give it to your agent. The Inkspring MCP tool `get_content` reads either kind by that ID. Posts and newsletters share a sequence within each project. IDs stay the same when you rename a project or edit an item. The iPhone companion shows the IDs after it syncs with an updated Mac.
60+
61+ Choose **Proofread** while editing a post or newsletter. Inkspring shows each suggested spelling, grammar, or punctuation correction and its reason. **Apply corrections** puts them into the editor. The Mac uses the selected Claude or Codex agent. On iPhone and iPad, Apple Intelligence runs the check on the device.
62+
63+ Drafting an X post from an idea keeps the opening free of URLs. Inkspring writes a follow-up that explains what readers will find and includes the link. When the copy and links exceed one reply’s character limit, Inkspring adds more replies. An idea without links can produce a single post. The opening and each follow-up have separate editors and character counts. On iPhone and iPad, open a follow-up to edit it, then return to the draft to add replies or save. Scheduling sends the entire thread in order, with each reply attached to the preceding post.
64+
65+ Paragraph breaks inside an X post are preserved. Newly edited threads use an explicit reply boundary instead of treating blank lines as extra tweets. Older blank-line-separated drafts remain readable. Keep Mac and mobile updated together for this format. Through MCP, use `save_x_thread` or pass `posts` to `edit_draft`, with one string per tweet. Each string can contain its own paragraphs. A three-part post uses the `thread` format.
66+
67+ Mobile keeps edits using the new reply format saved on the device until the Mac advertises `supportsXParagraphs`. It never sends this format to an older Mac parser. Revision-history delivery has its own compatibility flag and also waits for a compatible Mac.
68+
69+ **Revision history** retains saved post and newsletter versions, including agent edits and intermediate mobile saves. Inspect a version and choose **Restore this version** to create a new save without deleting later versions or publishing. Mobile history is saved locally while offline and delivered to the Mac separately from coalesced edits; full history returns through the existing chunked iCloud text transport. Workspace backups include revision history. Existing content gets an initial snapshot when opened in the updated Mac app, and the previous agent revision is recovered where available. Earlier overwritten versions cannot be recreated if no copy remains.
70+
71+ Agents can use `list_revisions`, `get_revision`, and `restore_revision` with a post or newsletter ID. Read the current item first and pass its `updatedAt` as `expected_updated_at` when restoring. This rejects stale restores.
72+
73+ To reuse credentials already in a secret manager, turn on **Let agents set API keys and R2 credentials** in **Settings → AI agents**. Ask an agent with local command access to retrieve the selected credentials from the secret manager, launch a local Inkspring `--mcp` session with them in its environment, and call the setup tool in that session. Keep the raw values out of chat, tool arguments, and saved MCP configuration files.
74+
75+ Use `INKSPRING_ANTHROPIC_API_KEY`, `INKSPRING_OPENAI_API_KEY`, `INKSPRING_GEMINI_API_KEY`, `INKSPRING_APIFY_API_KEY`, or `INKSPRING_X_BEARER_TOKEN` with `set_provider_key` and the corresponding provider ID. For `set_r2_credentials`, supply `INKSPRING_R2_ACCESS_KEY_ID` and `INKSPRING_R2_SECRET_ACCESS_KEY` in the environment and pass the account ID, bucket, and optional jurisdiction as tool arguments. The tools return save status. Existing credentials require `replace_existing: true` to change.
76+
77+ **Settings → AI models → Writing connection** defaults to **Connected agent (MCP)**. Inkspring sends a one-time request over local MCP to the selected Codex or Claude Code session. It uses that session for posts and replies, rewrites, idea generation and refill, newsletters, voice suggestions, research planning and analysis, vault-based suggestions, and image prompts. The same setting applies when an external agent calls Inkspring's generation tools. In **Provider API key** mode, these features use the selected Anthropic, OpenAI, or Gemini text model. An agent error surfaces in the app and requires an explicit change to use API writing.
78+
79+ Generating image files uses the OpenAI or Gemini image API. X post lookup and X research can use an X sign-in with read access or a configured X bearer token. Apify supplies Instagram and LinkedIn research and can supply X research. News search reads public Google News RSS. Reply monitoring, account analytics, publishing, and Substack delivery use their service connections. Cloudflare R2 uploads use the configured storage credentials.
80+
81+ Select **Test connection** to check that the local executable starts, lists its tools, and reads the workspace. In Claude Code, check **Connectors** in a local session. In Codex, run `/mcp` after saving the server settings to verify the client.
82+
83+ ## Publish and schedule
84+
85+ Use **Connections** to set up your own X developer app. X calls use that app’s credits and limits. For other platforms, use shared Inkspring sign-in where available or configure your own developer app. The app keeps social sessions and client secrets in Keychain.
86+
87+ Use **Settings → AI models → Test writing connection** to check the selected agent or API writing connection. In the writing studio, you can fetch the original X post for a reply, copy or save the attached image, and restore the wording from before a rewrite.
88+
89+ For an image post or reply, turn on **Create an image** before generating the draft. Inkspring saves the text first. If image generation fails, the text and any existing attachment stay saved.
90+
91+ In **Settings → Voice & projects**, paste examples or choose from drafts previously published in your workspace. **Suggest my voice** sends those examples to your writing provider and fills editable voice, interests, and style guidance. **Save profile** applies the edits to future writing. You can also choose a voice for one draft in the writing studio.
92+
93+ Open a draft in **Writing studio → Review & publish** to review the destination and content before sending. Publishing history records confirmed post IDs and links. A partial X thread can resume from its last confirmed post. A publish request with an uncertain result requires checking the platform before allowing another attempt.
94+
95+ **Schedule** offers open posting hours and a choice of exact or automatic minute. Use a post's actions to open publishing review, skip the post, or record a post you published yourself. Enable **Automatic posting** to send eligible posts while Inkspring is running, including with its window closed. The Mac must be awake. Instagram and Reddit wait for review. A scheduled TikTok post requires account-specific privacy and consent review before it can enter the queue.
96+
97+ The **Scheduled** tab opens across all projects and shows social posts and Substack newsletters in delivery order. Filter by project or channel to review part of the schedule. The totals above the filters cover the whole workspace.
98+
99+ Scheduled LinkedIn posts keep the selected personal profile or company page. If an account changes, review the destination and choose a new time. Interrupted sends appear in **Publishing history** for a check before retrying.
100+
101+ From a scheduled draft’s actions, choose **Return to ideas…** to reopen the idea. Review how many unposted drafts will be discarded before confirming. Inkspring keeps versions with publishing or reply history. You can also generate an image for eligible X and Instagram drafts. For ideas that cite an X post, **Create quote draft** saves an editable draft for manual posting. Use **Open quote in X…** in the writing studio or Schedule to open the X composer.
102+
103+ Configure **Cloudflare R2 for Instagram** in **Settings → Storage & backups** to upload private media and provide Instagram a temporary download link. R2 credentials stay in Keychain. You can also use an existing HTTPS media URL.
104+
105+ Sign in to **Substack** from **Settings → Connections**, then choose the publication. The newsletter editor saves Markdown locally, exports Markdown or HTML, syncs to Substack, and shows an explicit review before scheduling or publishing. Use **Write or refine with AI** to draft from a brief and up to six references from the selected project. Generation saves an editable draft. Substack owns the remote schedule and reports whether the send was scheduled, canceled, or published.
106+
107+ ## Preview coverage
108+
109+ The preview includes the writing workspace, ZIP backup and restore, native MCP, public-source research and idea generation, Obsidian review, X replies, account analytics refresh, social sign-in, and publishing review for X, LinkedIn, Instagram, Reddit, and TikTok. Tests use synthetic provider responses. Live sign-in, publishing, research, and analytics are still unverified with personal accounts.
110+
111+ In **Research → Last 30 Days**, enter a topic to save a project brief with dated sources, available engagement, cited findings and writing angles. Google News, Hacker News and public GitHub issues and pull requests are available without research keys. An Apify key adds Reddit, YouTube and X. A direct X connection covers seven days. The brief shows which sources responded, which were unavailable and which failed. The selected writing connection synthesizes the brief when available. Saved sources remain usable when synthesis is unavailable.
112+
113+ The existing platform tabs find topics based on the selected project. Use **Write for** before opening a draft from a source or an angle. **Reply to source** attaches the original X post. Save evidence as a reference to reuse it in other drafts.
114+
115+ Agents can call `research_last_30_days` with a `topic` to run the same search. Pass `platforms` to limit a run to selected sources. To bring in evidence from an external research tool or the [Last 30 Days skill](https://github.com/mvanhorn/last30days-skill), call `save_research_brief` with up to 24 sources and six cited findings. Supply a stable ID, original HTTPS link, title, platform and publication date for each source, and use those IDs in each finding’s `source_ids`. Inkspring validates the window and citations, deduplicates links, and keeps the latest brief for each topic in the project. `list_research` with `platform: "last30days"` lists briefs. Pass `research_id` to read back an individual brief.
116+
117+ **Refresh ideas** fills open queue slots with a mix of timely research, project work, and ideas based on measurements. Each generated idea needs a matching source. The refill can leave slots empty when the available sources do not support them. Automatic refill, when enabled, can refresh the research sources you selected in Settings.
118+
119+ Substack and R2 are verified against local fixtures.
120+
121+ Under **Settings → Ideas & sources → Idea source schedule**, review recent Git activity and local Claude Code and Codex recaps before saving selected summaries. To refresh automatically, choose project and Obsidian folders, set the interval, and enable the schedule for that project. Changing folders pauses the schedule. Automatic imports resume once enabled in the app.
122+
123+ ## iPhone and iPad companion
124+
125+ Open [InkspringCompanion.xcodeproj](InkspringCompanion.xcodeproj) and run the **InkspringCompanion** scheme. The app shows scheduled posts and newsletters across projects, including the channel, local posting time and review status. Canceling a social post sends the exact schedule revision back to the Mac and keeps the draft. A send already claimed by the Mac cannot be canceled from iPhone. Substack newsletters are visible on iPhone and their delivery is managed in Substack or Inkspring on Mac.
126+
127+ Both builds must have CloudKit entitlements for `iCloud.com.protomota.inkspring` and use the same CloudKit environment and Apple Account. Associate the container with `com.protomota.inkspring.native` and `com.protomota.inkspring.iphone` in [Apple Developer Identifiers](https://developer.apple.com/account/resources/identifiers/list). A signed Mac build accepts a matching profile in `INKSPRING_MAC_ICLOUD_PROFILE` and an optional entitlement override in `INKSPRING_MAC_ICLOUD_ENTITLEMENTS`. The included Mac entitlement file targets the production environment. For development testing use profiles and entitlements for the development environment on both devices. Deploy the `InkspringSchedule` record type in [CloudKit Console](https://icloud.developer.apple.com/dashboard/) before a production rollout.
128+
129+ On Mac, choose **Settings → Storage & backups → iPhone and iPad** and turn on schedule sync. The schedule shares titles, project names, channels, times, and status. Inkspring checks iCloud for a cancellation before publishing a synced post. The companion can cancel a social post while the Mac is offline if the phone or tablet can reach iCloud.
130+
131+ Turn on **library sync** in the same panel to review recent drafts and ideas, edit unscheduled drafts, add review notes, and skip or restore ideas on mobile. Draft editing and attachment indicators require an updated Mac app. Notes save when you leave the field. Changes upload to private iCloud automatically and the Mac applies them on its next sync. Attachment indicators sync as text metadata. Media files, credentials, and backups stay where you configured them.
132+
133+ Use **New ideas** or **Draft a new idea** to write an idea. On supported iPhones and iPads running iOS or iPadOS 26 or later, **Generate ideas** uses Apple Intelligence to suggest alternate versions from the working title and notes. Tap a suggestion to put it into the editor, then review or edit it before choosing **Save idea**. Inkspring syncs the saved idea to your project automatically. When iCloud is unavailable, Inkspring keeps the save and retries while the app is open. Ideas saved in previous companion builds also join the sync queue.
134+
135+ On iPhone and iPad, open a synced post idea and tap **Draft from post idea** above **Skip idea**. Choose an X, LinkedIn, or Reddit post, an X or LinkedIn article, a Substack newsletter, or a YouTube script. **Send to Claude** queues the request for Claude Code on the Mac and closes the picker. **View Post** opens the draft after it syncs or shows the source idea while the request is pending. The idea links to its drafts once they sync. Keep Inkspring open on your Mac with agent access enabled and Claude Code signed in. Drafts also appear in **Review**.
136+
137+ With Library Sync enabled, image previews appear in Review, post details and editors, and alongside artwork available for Scheduled and Published posts. Newsletter and article covers and saved video stills are also eligible. Inkspring syncs compact still previews and keeps original media on the Mac. Published artwork fits within the mobile sync budget, with newer posts taking priority.
138+
139+ For media, use **Review → New → New Instagram post** or **New TikTok video**. Choose a file and add an optional caption. TikTok accepts MP4 or MOV. Instagram also accepts JPEG and PNG. Each file can be up to 30 MB. Inkspring sends the attachment and caption to the Mac through your private iCloud and creates a draft for review.
140+
141+ After restoring a workspace on a new Mac, turn on schedule sync there and confirm **Use this Mac for mobile sync** if iCloud still lists the old workspace. Transfer pauses automatic posting on the receiving Mac and waits for any send already in progress. Review the restored drafts before scheduling them again.
142+
143+ ## Writing formats and Find
144+
145+ **YouTube scripts** and **X articles** are separate long-form formats. On Mac, each has a named sidebar section. On iPhone and iPad, choose **New → New YouTube script** or **New → New X article**, and use the **YouTube** or **X article** platform filter. X articles carry an explicit **X article** label so they cannot be confused with tweets or threads. YouTube scripts stay writing-only. X articles have **Review & publish on X** controls and publish through the official Articles API, separately from tweets and threads. X Article access and API credits are required.
146+
147+ Both formats keep the complete text, copyable project ID, Markdown preview, autosave, proofreading, revision history, and iCloud sync. Open the updated Mac app to exchange these formats with mobile. An older Mac cannot accept their edits; mobile retains them locally until a compatible Mac syncs.
148+
149+ While editing on mobile, the text uses the available content area and the metadata stays in the preview. **Done** returns to the preview. **Find** searches within the editor and jumps between matches. On Mac, use **Find** or Command-F in the writing editor. X replies edit in place with **Back to thread**, preserving the parent draft and autosaving changes.
150+
151+ MCP tools `list_scripts`, `get_script`, `save_script`, `list_articles`, `get_article`, and `save_article` read and save supplied text locally without an API key or a model call. Pass the last-read `expected_updated_at` when editing and a stable `request_key` when retrying creation. Scripts, articles, posts, and newsletters share each project's reference-ID sequence.
152+
153+ Choose **New → Long-form** on mobile for Substack newsletters, X articles, or YouTube scripts. **Writing tools → Ask AI** saves a request for the selected Mac writing connection; **Proofread** uses Apple Intelligence on supported mobile devices. The Mac applies requests while Inkspring is open, preserving earlier versions and checking for concurrent author edits.
154+
155+ To publish an X article, connect X on Mac, review the full article, then choose **Review & publish on X** and confirm the account. Mobile sends the reviewed revision and account to Mac through iCloud; the Mac must be awake with Inkspring open. A newer edit or changed account cancels the request instead of publishing unreviewed text. The receipt and article URL sync back to mobile. Known failures retain the remote draft for retry; ambiguous results require checking X before another attempt. `publish_article` is available over MCP only with immediate agent posting enabled and the current `expected_updated_at`. Supplied article text never needs an AI provider key.

native-mac/Resources/Fonts/Geist-LICENSE.txt added

1+ Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font) Geist-Italic[wght].ttf: Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font)
2+
3+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4+ This license is copied below, and is also available with a FAQ at:
5+ http://scripts.sil.org/OFL
6+
7+
8+ -----------------------------------------------------------
9+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10+ -----------------------------------------------------------
11+
12+ PREAMBLE
13+ The goals of the Open Font License (OFL) are to stimulate worldwide
14+ development of collaborative font projects, to support the font creation
15+ efforts of academic and linguistic communities, and to provide a free and
16+ open framework in which fonts may be shared and improved in partnership
17+ with others.
18+
19+ The OFL allows the licensed fonts to be used, studied, modified and
20+ redistributed freely as long as they are not sold by themselves. The
21+ fonts, including any derivative works, can be bundled, embedded,
22+ redistributed and/or sold with any software provided that any reserved
23+ names are not used by derivative works. The fonts and derivatives,
24+ however, cannot be released under any other type of license. The
25+ requirement for fonts to remain under this license does not apply
26+ to any document created using the fonts or their derivatives.
27+
28+ DEFINITIONS
29+ "Font Software" refers to the set of files released by the Copyright
30+ Holder(s) under this license and clearly marked as such. This may
31+ include source files, build scripts and documentation.
32+
33+ "Reserved Font Name" refers to any names specified as such after the
34+ copyright statement(s).
35+
36+ "Original Version" refers to the collection of Font Software components as
37+ distributed by the Copyright Holder(s).
38+
39+ "Modified Version" refers to any derivative made by adding to, deleting,
40+ or substituting -- in part or in whole -- any of the components of the
41+ Original Version, by changing formats or by porting the Font Software to a
42+ new environment.
43+
44+ "Author" refers to any designer, engineer, programmer, technical
45+ writer or other person who contributed to the Font Software.
46+
47+ PERMISSION & CONDITIONS
48+ Permission is hereby granted, free of charge, to any person obtaining
49+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50+ redistribute, and sell modified and unmodified copies of the Font
51+ Software, subject to the following conditions:
52+
53+ 1) Neither the Font Software nor any of its individual components,
54+ in Original or Modified Versions, may be sold by itself.
55+
56+ 2) Original or Modified Versions of the Font Software may be bundled,
57+ redistributed and/or sold with any software, provided that each copy
58+ contains the above copyright notice and this license. These can be
59+ included either as stand-alone text files, human-readable headers or
60+ in the appropriate machine-readable metadata fields within text or
61+ binary files as long as those fields can be easily viewed by the user.
62+
63+ 3) No Modified Version of the Font Software may use the Reserved Font
64+ Name(s) unless explicit written permission is granted by the corresponding
65+ Copyright Holder. This restriction only applies to the primary font name as
66+ presented to the users.
67+
68+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69+ Software shall not be used to promote, endorse or advertise any
70+ Modified Version, except to acknowledge the contribution(s) of the
71+ Copyright Holder(s) and the Author(s) or with their explicit written
72+ permission.
73+
74+ 5) The Font Software, modified or unmodified, in part or in whole,
75+ must be distributed entirely under this license, and must not be
76+ distributed under any other license. The requirement for fonts to
77+ remain under this license does not apply to any document created
78+ using the Font Software.
79+
80+ TERMINATION
81+ This license becomes null and void if any of the above conditions are
82+ not met.
83+
84+ DISCLAIMER
85+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93+ OTHER DEALINGS IN THE FONT SOFTWARE.

native-mac/Resources/Fonts/Geist.ttf added

Not a text file.

native-mac/Resources/Fonts/Newsreader-LICENSE.txt added

1+ Copyright 2020 The Newsreader Project Authors (http://github.com/productiontype/Newsreader) Newsreader-Italic[opsz,wght].ttf: Copyright 2020 The Newsreader Project Authors (http://github.com/productiontype/Newsreader)
2+
3+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
4+ This license is copied below, and is also available with a FAQ at:
5+ http://scripts.sil.org/OFL
6+
7+
8+ -----------------------------------------------------------
9+ SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10+ -----------------------------------------------------------
11+
12+ PREAMBLE
13+ The goals of the Open Font License (OFL) are to stimulate worldwide
14+ development of collaborative font projects, to support the font creation
15+ efforts of academic and linguistic communities, and to provide a free and
16+ open framework in which fonts may be shared and improved in partnership
17+ with others.
18+
19+ The OFL allows the licensed fonts to be used, studied, modified and
20+ redistributed freely as long as they are not sold by themselves. The
21+ fonts, including any derivative works, can be bundled, embedded,
22+ redistributed and/or sold with any software provided that any reserved
23+ names are not used by derivative works. The fonts and derivatives,
24+ however, cannot be released under any other type of license. The
25+ requirement for fonts to remain under this license does not apply
26+ to any document created using the fonts or their derivatives.
27+
28+ DEFINITIONS
29+ "Font Software" refers to the set of files released by the Copyright
30+ Holder(s) under this license and clearly marked as such. This may
31+ include source files, build scripts and documentation.
32+
33+ "Reserved Font Name" refers to any names specified as such after the
34+ copyright statement(s).
35+
36+ "Original Version" refers to the collection of Font Software components as
37+ distributed by the Copyright Holder(s).
38+
39+ "Modified Version" refers to any derivative made by adding to, deleting,
40+ or substituting -- in part or in whole -- any of the components of the
41+ Original Version, by changing formats or by porting the Font Software to a
42+ new environment.
43+
44+ "Author" refers to any designer, engineer, programmer, technical
45+ writer or other person who contributed to the Font Software.
46+
47+ PERMISSION & CONDITIONS
48+ Permission is hereby granted, free of charge, to any person obtaining
49+ a copy of the Font Software, to use, study, copy, merge, embed, modify,
50+ redistribute, and sell modified and unmodified copies of the Font
51+ Software, subject to the following conditions:
52+
53+ 1) Neither the Font Software nor any of its individual components,
54+ in Original or Modified Versions, may be sold by itself.
55+
56+ 2) Original or Modified Versions of the Font Software may be bundled,
57+ redistributed and/or sold with any software, provided that each copy
58+ contains the above copyright notice and this license. These can be
59+ included either as stand-alone text files, human-readable headers or
60+ in the appropriate machine-readable metadata fields within text or
61+ binary files as long as those fields can be easily viewed by the user.
62+
63+ 3) No Modified Version of the Font Software may use the Reserved Font
64+ Name(s) unless explicit written permission is granted by the corresponding
65+ Copyright Holder. This restriction only applies to the primary font name as
66+ presented to the users.
67+
68+ 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69+ Software shall not be used to promote, endorse or advertise any
70+ Modified Version, except to acknowledge the contribution(s) of the
71+ Copyright Holder(s) and the Author(s) or with their explicit written
72+ permission.
73+
74+ 5) The Font Software, modified or unmodified, in part or in whole,
75+ must be distributed entirely under this license, and must not be
76+ distributed under any other license. The requirement for fonts to
77+ remain under this license does not apply to any document created
78+ using the Font Software.
79+
80+ TERMINATION
81+ This license becomes null and void if any of the above conditions are
82+ not met.
83+
84+ DISCLAIMER
85+ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88+ OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89+ COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90+ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91+ DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92+ FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93+ OTHER DEALINGS IN THE FONT SOFTWARE.

native-mac/Resources/Fonts/Newsreader.ttf added

Not a text file.

native-mac/Resources/PlatformIcons/anthropic.png added

Not a text file.

native-mac/Resources/PlatformIcons/apify.png added

Not a text file.

native-mac/Resources/PlatformIcons/claude-mark.png added

Not a text file.

native-mac/Resources/PlatformIcons/gemini.png added

Not a text file.

native-mac/Resources/PlatformIcons/instagram.png added

Not a text file.

native-mac/Resources/PlatformIcons/linkedin.png added

Not a text file.

140 more files changed.

Browse files at this commit