commits
Consolidate the separate monopam_changes library into the main monopam
library as submodules (Changes.Aggregated, Changes.Daily, Changes.Query).
This simplifies the dependency graph and provides a cleaner interface.
Update poe to use the new Monopam.Changes interface and add:
- Git pull before checking for changes in the polling loop
- Detailed logging of git pull results (up-to-date vs new changes)
- --requests-verbose flag to control HTTP request logging (off by default)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Enables "develop in monorepo first, extract later" workflow by running
git subtree split to extract commits, creating a new repository in
checkouts, and configuring the remote URL. Optionally pushes to remote
and creates opam package metadata.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement OAuth 2.0 authentication for Mastodon instances alongside the
existing HTTP signature auth for ActivityPub federation.
New features:
- `apub auth login user@instance.social` - OAuth login with PKCE
- Commands (post, follow, like, boost) use Mastodon REST API when OAuth
credentials are available, falling back to ActivityPub federation
New files:
- apub_mastodon_oauth.ml - OAuth flow (app registration, PKCE, token exchange)
- apub_mastodon_api.ml - Mastodon REST API client (statuses, follows, etc.)
Session type changes:
- key_id and private_key_pem now optional (for OAuth-only sessions)
- New optional fields: oauth_instance, oauth_access_token, oauth_client_id,
oauth_client_secret
- Backwards compatible JSON codec
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
monopam:
- Make --aggregate the default for daily changes (add --no-aggregate to skip)
- Skip past days entirely if per-day file exists to avoid redundant Claude calls
- For today, still check if entry exists before regenerating
- Simplify Zulip format headers ("Updates for..." instead of "## Changes for...")
poe:
- Fix admin verification to use delivery_email from Zulip API
- Fallback to sender_email if API call fails
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change the daily changes system from single <repo>-daily.json files to
separate <repo>-<YYYY-MM-DD>.json files per day per repo, with hour
timestamps for real-time updates.
Key changes:
- Add hour and timestamp fields to daily_entry type for precise tracking
- Change file naming from <repo>-daily.json to <repo>-<date>.json
- Update load_daily/save_daily to work with per-day files
- Update generate_aggregated to find files by new pattern
- Add hour/timestamp to aggregated entry type for consistency
- Create new Daily module with immutable Map-based data structure
- Add query functions for real-time access (daily_changes_since, etc.)
The new Daily module provides:
- by_repo and by_date indexes using String_map
- Query functions: since, for_repo, for_date, repos, dates
- Loading functions: load_all, load_repo_day, load_repo_all
- Discovery functions: list_repos, list_dates
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
These executables are internal tests and examples that should not be
installed as public binaries.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit implements a comprehensive changes broadcast system:
**monopam_changes library** (new package):
- Aggregated module: Types and JSON codecs for daily changes format
- Query module: Functions to load changes since timestamp, format for Zulip
- Supports .changes/YYYYMMDD.json aggregated format
**monopam enhancements**:
- Added --aggregate flag to `monopam changes --daily` command
- Generates structured JSON files for broadcast system
- Added generate_aggregated function to Changes module
- Added rev_parse to Git module
**poe bot refactoring**:
- Commands module: Deterministic command parsing (help, status, broadcast, admin)
- Admin module: Storage management for broadcast state (last_time, git_head)
- Broadcast module: Smart broadcasting that only sends NEW changes
- Loop module: Hourly polling loop for automated change detection
- Config: Added admin_emails and changes_dir fields
- Handler: Updated to use command parser, delegate to modules
New poe commands:
- `poe loop --interval SECONDS` - Automated polling and broadcasting
- Admin commands: last-broadcast, reset-broadcast, storage keys/get/delete
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add authentication system for the apub CLI following the atp-auth pattern:
- New apub_auth library (lib/auth/) with session persistence
- Store actor credentials in ~/.config/apub/profiles/<profile>/session.json
- Support multiple profiles for different ActivityPub accounts
- Auto-load credentials for write commands (post, follow, like, boost)
CLI commands:
- apub auth setup <actor-uri> -k <key.pem> Import actor credentials
- apub auth status Show current profile
- apub auth logout Clear saved credentials
- apub auth profile list/switch/current Profile management
Write commands now work without explicit --actor/--key-file/--key-id
when credentials are saved via 'apub auth setup'.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Integrate ocaml-webfinger library for RFC 7033/7565 compliant discovery
- Add ActivityPub WebFinger spec to spec/ directory
- Add location and preview fields to Object type
- Add Question activity support (one_of, any_of, closed fields)
- Add CLI commands: post, follow, like, boost
- Fix Signing.from_pem to properly handle string PEM input
- Update PLAN.md marking all phases complete
- Update README.md with CLI documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42a9979 Expose accessor functions for Signing.key and user_agent
331449a Add project metadata for opam release
git-subtree-dir: ocaml-apubt
git-subtree-split: 42a9979e083a249b98c3b2520cdfb2ccbac52f18
a1fa899 Fix non-deterministic lexicon code generation
git-subtree-dir: ocaml-atp
git-subtree-split: a1fa8999f659c33660db64143f7d5fe813353c89
git-subtree-dir: ocaml-apubt
git-subtree-split: 06018cf01daa5ccff87441fa3084fe26b0bf649a
c074b19 Add Zulip standard [api] section config support and daily changelog
98a5561 Store poe config under unified XDG app name
git-subtree-dir: ocaml-zulip
git-subtree-split: c074b199446d2065bf0ce23b5ebe54e7d11f5245
git-subtree-dir: ocaml-webfinger
git-subtree-split: 9a2e6464c534862cf7b9152c78ff35c471506cbc
9f0d328 Store poe config under unified XDG app name
git-subtree-dir: poe
git-subtree-split: 9f0d328f3ca9e950481b279f3e2079577d60e9af
dda1358 Fix tangled.org URL parsing to strip @ prefix from username
4b3af82 monopam: Auto-create checkout on push if missing
git-subtree-dir: monopam
git-subtree-split: dda13588877f3199b31cc4dc2510df6b8bf6638d
ffeb22c Add accessors, pp functions, and missing .mli files to ocaml-matrix
c98278f Fix all odoc documentation warnings in ocaml-matrix
git-subtree-dir: ocaml-matrix
git-subtree-split: ffeb22c17c8d6a7aff093c689fee4422040e198e
8424c92 Refactor mail-flag to use polymorphic variants and move wire modules
cdedd0b Add unified mail-flag library for IMAP/JMAP interoperability
git-subtree-dir: ocaml-jmap
git-subtree-split: 8424c92aa2dac414ba48933129bd38f7ac346d1e
beffea3 Refactor mail-flag to use polymorphic variants and move wire modules
be23666 Add unified mail-flag library for IMAP/JMAP interoperability
cb5e7a0 Implement comprehensive IMAP RFC extensions
0713094 Add IMAP RFC specs and implementation plans
ea87a88 Add IMAP integration test suite and fix protocol bugs
git-subtree-dir: ocaml-imap
git-subtree-split: beffea327c75f5c5a45e0c39e024964442706506
9023a12 sync
849001f ocaml-atp: Regenerate lexicon bindings
git-subtree-dir: ocaml-atp
git-subtree-split: 9023a123f7f96aa2ba2ea37746af6841ef0e216a
The hermest code generator was producing different output on each run
due to multiple sources of non-determinism:
- group_nsids_by_prefix: trie children were in insertion order
- sort_children_by_deps: topological sort didn't order "ready" elements
- topo_sort_defs: same issue with definition sorting
- find_json_files: Sys.readdir returns files in unspecified order
All four are now fixed by sorting alphabetically where order was
previously undefined. Regenerated all lexicon files with the new
deterministic ordering.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements WebFinger protocol with jsont for JSON encoding/decoding,
requests library for HTTP, and cmdliner for CLI. Features abstract
Link and Jrd types, nullable property support, and comprehensive tests.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The tangled.org URL format uses @username in the path (e.g.,
https://tangled.org/@anil.recoil.org/foo). This strips the leading @
when converting to a push URL.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
git-subtree-dir: ocaml-mail-flag
git-subtree-split: ef50a8e84e8da9a232f397639a86cd183fda400b
ocaml-zulip: Support Zulip's native config format which uses [api] section
with "key" field instead of [bot] section with "api_key". Config loading
now tries [bot], then [api], then bare format.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add xdg_app parameter to zulip-bot Config to allow custom XDG paths.
Poe now stores all configuration under ~/.config/poe/ including:
- config.toml (poe settings)
- zulip.config (zulip credentials)
Also renamed config file from "config" to "zulip.config" for clarity.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Convert Flag_color to polymorphic variants (`Red, `Orange, etc.)
- Remove Imap_wire module from mail-flag, merge into ocaml-imap Flag
- Flag.system now uses polymorphic variants
- Flag.Keyword now wraps Mail_flag.Keyword.t directly
- Add flags_of_keywords/keywords_of_flags batch conversions
- Remove Jmap_wire module from mail-flag, merge into ocaml-jmap
- Add role_of_special_use/special_use_of_role to Mail_mailbox
- Add keywords_to_assoc/keywords_of_assoc to Mail_email
- Create toplevel mail_flag.mli with module aliases and full API docs
- Update all IMAP library code and tests for polymorphic variant types
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
matrix_proto changes:
- Add pp functions to all matrix_id modules (User_id, Room_id, etc.)
- Add make constructors and accessor functions to event content types
- Add pp functions to Msgtype, Event_type, and message content types
- Add doc comments with @see links to Matrix spec
matrix_client changes:
- Create 13 missing .mli files: backup, calls, matrix_client, olm,
push, room_preview, send_queue, sliding_sync, spaces, store,
timeline, uiaa, verification
- Fix type annotation in verification.ml
All tests pass and dune build @doc-full produces no warnings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update generated OCaml bindings for AT Protocol lexicons:
- atproto: Core protocol types
- bsky: Bluesky application types
- standard-site: Standard site lexicons
- tangled: Tangled lexicons
These files are auto-generated from upstream lexicon schemas.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, `monopam push` would silently skip packages whose checkout
directory didn't exist in the src/ folder. This was inconvenient when
adding new packages to the monorepo - you had to manually run
`monopam pull` first or clone the repository yourself.
Now `push_one` calls `ensure_checkout` to clone the upstream repository
before pushing, enabling a simpler workflow:
1. Add a new subtree to the monorepo
2. Run `monopam push` - it automatically clones then pushes
The change detects whether cloning is needed by checking if the path
exists and is a valid git repository, reusing the existing
`ensure_checkout` function which handles cloning from the package's
dev-repo URL.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New mail-flag library providing shared types for email protocols:
Core modules:
- keyword.ml: Unified message keywords (RFC 8621, draft-ietf-mailmaint)
- Standard: Seen, Answered, Flagged, Draft, Deleted, Forwarded
- Spam: Phishing, Junk, NotJunk
- Extended: HasAttachment, Muted, Followed, Notify, etc.
- Apple Mail flag color bits
- mailbox_attr.ml: Mailbox attributes and roles (RFC 6154, RFC 5258)
- LIST attributes: Noinferiors, Noselect, HasChildren, etc.
- Special-use roles: Inbox, Drafts, Sent, Trash, Archive, etc.
- Extended: Snoozed, Scheduled, Memos
- flag_color.ml: Apple Mail 7-color encoding via 3-bit keywords
Wire format adapters:
- imap_wire.ml: IMAP protocol serialization (\Seen, $forwarded)
- jmap_wire.ml: JMAP JSON format ({"$seen": true})
Integration:
- ocaml-imap: Flag and List_attr modules now interop with mail-flag
- ocaml-jmap: Keyword and Role modules now use mail-flag types
54 tests for mail-flag library, all existing tests pass.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Consolidate the separate monopam_changes library into the main monopam
library as submodules (Changes.Aggregated, Changes.Daily, Changes.Query).
This simplifies the dependency graph and provides a cleaner interface.
Update poe to use the new Monopam.Changes interface and add:
- Git pull before checking for changes in the polling loop
- Detailed logging of git pull results (up-to-date vs new changes)
- --requests-verbose flag to control HTTP request logging (off by default)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implement OAuth 2.0 authentication for Mastodon instances alongside the
existing HTTP signature auth for ActivityPub federation.
New features:
- `apub auth login user@instance.social` - OAuth login with PKCE
- Commands (post, follow, like, boost) use Mastodon REST API when OAuth
credentials are available, falling back to ActivityPub federation
New files:
- apub_mastodon_oauth.ml - OAuth flow (app registration, PKCE, token exchange)
- apub_mastodon_api.ml - Mastodon REST API client (statuses, follows, etc.)
Session type changes:
- key_id and private_key_pem now optional (for OAuth-only sessions)
- New optional fields: oauth_instance, oauth_access_token, oauth_client_id,
oauth_client_secret
- Backwards compatible JSON codec
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
monopam:
- Make --aggregate the default for daily changes (add --no-aggregate to skip)
- Skip past days entirely if per-day file exists to avoid redundant Claude calls
- For today, still check if entry exists before regenerating
- Simplify Zulip format headers ("Updates for..." instead of "## Changes for...")
poe:
- Fix admin verification to use delivery_email from Zulip API
- Fallback to sender_email if API call fails
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change the daily changes system from single <repo>-daily.json files to
separate <repo>-<YYYY-MM-DD>.json files per day per repo, with hour
timestamps for real-time updates.
Key changes:
- Add hour and timestamp fields to daily_entry type for precise tracking
- Change file naming from <repo>-daily.json to <repo>-<date>.json
- Update load_daily/save_daily to work with per-day files
- Update generate_aggregated to find files by new pattern
- Add hour/timestamp to aggregated entry type for consistency
- Create new Daily module with immutable Map-based data structure
- Add query functions for real-time access (daily_changes_since, etc.)
The new Daily module provides:
- by_repo and by_date indexes using String_map
- Query functions: since, for_repo, for_date, repos, dates
- Loading functions: load_all, load_repo_day, load_repo_all
- Discovery functions: list_repos, list_dates
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit implements a comprehensive changes broadcast system:
**monopam_changes library** (new package):
- Aggregated module: Types and JSON codecs for daily changes format
- Query module: Functions to load changes since timestamp, format for Zulip
- Supports .changes/YYYYMMDD.json aggregated format
**monopam enhancements**:
- Added --aggregate flag to `monopam changes --daily` command
- Generates structured JSON files for broadcast system
- Added generate_aggregated function to Changes module
- Added rev_parse to Git module
**poe bot refactoring**:
- Commands module: Deterministic command parsing (help, status, broadcast, admin)
- Admin module: Storage management for broadcast state (last_time, git_head)
- Broadcast module: Smart broadcasting that only sends NEW changes
- Loop module: Hourly polling loop for automated change detection
- Config: Added admin_emails and changes_dir fields
- Handler: Updated to use command parser, delegate to modules
New poe commands:
- `poe loop --interval SECONDS` - Automated polling and broadcasting
- Admin commands: last-broadcast, reset-broadcast, storage keys/get/delete
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add authentication system for the apub CLI following the atp-auth pattern:
- New apub_auth library (lib/auth/) with session persistence
- Store actor credentials in ~/.config/apub/profiles/<profile>/session.json
- Support multiple profiles for different ActivityPub accounts
- Auto-load credentials for write commands (post, follow, like, boost)
CLI commands:
- apub auth setup <actor-uri> -k <key.pem> Import actor credentials
- apub auth status Show current profile
- apub auth logout Clear saved credentials
- apub auth profile list/switch/current Profile management
Write commands now work without explicit --actor/--key-file/--key-id
when credentials are saved via 'apub auth setup'.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Integrate ocaml-webfinger library for RFC 7033/7565 compliant discovery
- Add ActivityPub WebFinger spec to spec/ directory
- Add location and preview fields to Object type
- Add Question activity support (one_of, any_of, closed fields)
- Add CLI commands: post, follow, like, boost
- Fix Signing.from_pem to properly handle string PEM input
- Update PLAN.md marking all phases complete
- Update README.md with CLI documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
beffea3 Refactor mail-flag to use polymorphic variants and move wire modules
be23666 Add unified mail-flag library for IMAP/JMAP interoperability
cb5e7a0 Implement comprehensive IMAP RFC extensions
0713094 Add IMAP RFC specs and implementation plans
ea87a88 Add IMAP integration test suite and fix protocol bugs
git-subtree-dir: ocaml-imap
git-subtree-split: beffea327c75f5c5a45e0c39e024964442706506
The hermest code generator was producing different output on each run
due to multiple sources of non-determinism:
- group_nsids_by_prefix: trie children were in insertion order
- sort_children_by_deps: topological sort didn't order "ready" elements
- topo_sort_defs: same issue with definition sorting
- find_json_files: Sys.readdir returns files in unspecified order
All four are now fixed by sorting alphabetically where order was
previously undefined. Regenerated all lexicon files with the new
deterministic ordering.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add xdg_app parameter to zulip-bot Config to allow custom XDG paths.
Poe now stores all configuration under ~/.config/poe/ including:
- config.toml (poe settings)
- zulip.config (zulip credentials)
Also renamed config file from "config" to "zulip.config" for clarity.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Convert Flag_color to polymorphic variants (`Red, `Orange, etc.)
- Remove Imap_wire module from mail-flag, merge into ocaml-imap Flag
- Flag.system now uses polymorphic variants
- Flag.Keyword now wraps Mail_flag.Keyword.t directly
- Add flags_of_keywords/keywords_of_flags batch conversions
- Remove Jmap_wire module from mail-flag, merge into ocaml-jmap
- Add role_of_special_use/special_use_of_role to Mail_mailbox
- Add keywords_to_assoc/keywords_of_assoc to Mail_email
- Create toplevel mail_flag.mli with module aliases and full API docs
- Update all IMAP library code and tests for polymorphic variant types
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
matrix_proto changes:
- Add pp functions to all matrix_id modules (User_id, Room_id, etc.)
- Add make constructors and accessor functions to event content types
- Add pp functions to Msgtype, Event_type, and message content types
- Add doc comments with @see links to Matrix spec
matrix_client changes:
- Create 13 missing .mli files: backup, calls, matrix_client, olm,
push, room_preview, send_queue, sliding_sync, spaces, store,
timeline, uiaa, verification
- Fix type annotation in verification.ml
All tests pass and dune build @doc-full produces no warnings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update generated OCaml bindings for AT Protocol lexicons:
- atproto: Core protocol types
- bsky: Bluesky application types
- standard-site: Standard site lexicons
- tangled: Tangled lexicons
These files are auto-generated from upstream lexicon schemas.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, `monopam push` would silently skip packages whose checkout
directory didn't exist in the src/ folder. This was inconvenient when
adding new packages to the monorepo - you had to manually run
`monopam pull` first or clone the repository yourself.
Now `push_one` calls `ensure_checkout` to clone the upstream repository
before pushing, enabling a simpler workflow:
1. Add a new subtree to the monorepo
2. Run `monopam push` - it automatically clones then pushes
The change detects whether cloning is needed by checking if the path
exists and is a valid git repository, reusing the existing
`ensure_checkout` function which handles cloning from the package's
dev-repo URL.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New mail-flag library providing shared types for email protocols:
Core modules:
- keyword.ml: Unified message keywords (RFC 8621, draft-ietf-mailmaint)
- Standard: Seen, Answered, Flagged, Draft, Deleted, Forwarded
- Spam: Phishing, Junk, NotJunk
- Extended: HasAttachment, Muted, Followed, Notify, etc.
- Apple Mail flag color bits
- mailbox_attr.ml: Mailbox attributes and roles (RFC 6154, RFC 5258)
- LIST attributes: Noinferiors, Noselect, HasChildren, etc.
- Special-use roles: Inbox, Drafts, Sent, Trash, Archive, etc.
- Extended: Snoozed, Scheduled, Memos
- flag_color.ml: Apple Mail 7-color encoding via 3-bit keywords
Wire format adapters:
- imap_wire.ml: IMAP protocol serialization (\Seen, $forwarded)
- jmap_wire.ml: JMAP JSON format ({"$seen": true})
Integration:
- ocaml-imap: Flag and List_attr modules now interop with mail-flag
- ocaml-jmap: Keyword and Role modules now use mail-flag types
54 tests for mail-flag library, all existing tests pass.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>