Skip to main content

Miadi Webweave (Mia's fork of SimExp) - Terminal-to-AI communication with A2A session management

Project description

๐ŸŒŠ Miadi Webweave

Terminal โ†” Simplenote, in both directions.

PyPI Python 3.10+ License

Miadi Webweave writes from your terminal into Simplenote notes and reads them back out โ€” driving your own logged-in Chrome over the DevTools Protocol, so everything syncs to every device you own.

It is Mia's fork of Gerico1007/simexp. The repository is still named simexp; the packages, CLI, and modules are not.

CLI package miadi-webweave
MCP server package miadi-webweave-mcp
Python module miadi_webweave
Command miadi-webweave
Config ~/.miadi/webweave/config.yaml

๐Ÿ“ฆ Install

pip install miadi-webweave
playwright install chromium

For the MCP server (pulls the CLI in with it):

pip install miadi-webweave-mcp

Requires Python 3.10+, Google Chrome or Chromium, and a Simplenote account.


๐Ÿš€ Quick Start

# 1. Launch Chrome with the debugging port wired up
miadi-webweave browser launch

# 2. Log in to Simplenote in the window that opens
#    โ†’ https://app.simplenote.com

# 3. Write to your most recently modified note
miadi-webweave write "Hello from the terminal"

The message is in your note, and on your phone. That is the whole idea.

browser launch manages the profile directory and port for you โ€” there is no need to hand-roll a google-chrome --remote-debugging-port=... invocation. Run miadi-webweave browser test if you want to confirm the connection.


๐Ÿ—‚๏ธ Where things live

miadi_webweave/paths.py is the single source of truth. Two roots share one webweave namespace:

Path Holds
~/.miadi/webweave/config.yaml User config
~/.miadi/webweave/state/ Agent messages, continuations, checkpoints
~/.miadi/webweave/collaborators.yaml Global collaborators
~/.miadi/webweave/profiles/<name>/ Chrome user-data-dirs, one per profile
./.miadi/webweave/session.json Per-project session state (like .git)
./.miadi/webweave/collaborators.yaml Per-project collaborators

Application data is kept deliberately apart from Chrome browser profiles, which are heavy, binary, and hold live logged-in sessions.

There is no automatic migration from the pre-0.6 ~/.simexp / ~/.chrome-simexp layout. It was a clean switch โ€” run miadi-webweave init for a fresh config.


๐ŸŽฎ Commands

miadi-webweave                       Run extraction from clipboard/config
miadi-webweave init                  Initialize configuration
miadi-webweave write <message>       Write to a note
miadi-webweave read                  Read a note
miadi-webweave session <subcommand>  Session management
miadi-webweave browser <subcommand>  Browser/CDP management

miadi-webweave session --help and miadi-webweave browser --help carry the authoritative, always-current option lists.

Writing and reading

# Last modified note
miadi-webweave write "Your message here"

# A specific note, by public URL โ€” resolved by content search, no UUID needed
miadi-webweave write https://app.simplenote.com/p/0ZqWsQ "Appended content"

# Turn any note into a tracked session note in the same step
miadi-webweave write https://app.simplenote.com/p/0ZqWsQ "Initial content" \
  --init-session --ai claude --issue 42

# Read back
miadi-webweave read --note-url https://app.simplenote.com/p/NOTE_ID

Extraction

# Copy a Simplenote URL to your clipboard, then:
miadi-webweave

# โ†’ ./output/YYYYMMDD/filename.md

Browser profiles

Multiple named profiles let separate identities hold separate logged-in sessions on separate ports.

miadi-webweave browser launch                      # default profile
miadi-webweave browser launch --profile tushell    # a second identity
miadi-webweave browser profiles                    # list profiles + status
miadi-webweave browser profile add myprofile 9224  # register a new one
miadi-webweave browser test                        # verify CDP connection
miadi-webweave browser stop [--profile NAME]

๐Ÿ”ฎ Sessions

A session binds a terminal working session to a dedicated Simplenote note with YAML metadata, so the log is readable from any device while it is being written.

miadi-webweave session start --ai claude --issue 42 --intention "Build REST API"
miadi-webweave session start main.py utils.py --ai claude --issue 42
miadi-webweave session write "Implemented the session manager"
miadi-webweave session add path/to/file --heading "Design notes"
miadi-webweave session info      # current session + directory context
miadi-webweave session list      # all sessions
miadi-webweave session read
miadi-webweave session open      # in browser
miadi-webweave session url       # just the URL, for scripting
miadi-webweave session clear

Content can also be piped:

git log -1 --oneline | miadi-webweave session write --date s

Four Directions

Sessions are structured on the Medicine Wheel โ€” the metadata tracks each direction as the work moves through it.

Direction Concern Commands
๐ŸŒ… East Intention & vision session start --intention '...'
๐Ÿ”ฅ South Building & growth session write, session add
๐ŸŒŠ West Sharing & publishing session collab, session publish
โ„๏ธ North Reflection & wisdom session reflect, session observe-pattern, session extract-wisdom, session complete
# West โ€” share and publish
miadi-webweave session collab <glyph|alias|email>   # โ™  ๐ŸŒฟ ๐ŸŽธ ๐Ÿงต
miadi-webweave session collab add email@example.com
miadi-webweave session collab list
miadi-webweave session publish                      # get a public URL

# North โ€” close the circle
miadi-webweave session reflect --prompt "What did we learn?"
miadi-webweave session observe-pattern "Pattern description"
miadi-webweave session extract-wisdom "Key principle"
miadi-webweave session complete --seeds "Tasks for next session"

Session note format

---
session_id: abc-def-123-456
ai_assistant: claude
agents: [Jerry, Aureon, Nyro, JamAI, Synth]
issue_number: 4
pr_number: null
created_at: 2025-10-09T10:30:00
---

# Session content appears below the metadata

โฐ Timestamps

--date prefixes an entry with a TLID โ€” a compact, lexicographically sortable time identifier (YYMMDDHHMMSS), so notes sort chronologically as plain text.

Flag Granularity Example
y Year [25] Entry
m Month [2511] Entry
d Day [251115] Entry
h Hour [25111520] Entry
s Second (default) [251115202625] Entry
ms Millisecond [251115202625123] Entry
miadi-webweave session write "Fixed auth bug" --date s     # append (default)
miadi-webweave session write "URGENT" --date h --prepend   # insert after metadata
miadi-webweave session write "Meeting notes" --date 2511151500  # manual stamp

Set a default granularity in ~/.miadi/webweave/config.yaml, then use a bare --date:

default_date_format: h

๐Ÿ”ง Configuration

~/.miadi/webweave/config.yaml โ€” created by miadi-webweave init.

BASE_PATH: ./output
default_date_format: s

# Extraction sources
SOURCES:
  - filename: note1
    url: https://app.simplenote.com/p/0ZqWsQ

# Named channels for cross-device messaging
COMMUNICATION_CHANNELS:
  - name: Aureon
    note_id: e6702a7b90e64aae99df2fba1662bb81
    public_url: https://app.simplenote.com/p/gk6V2v
    auth_url: https://app.simplenote.com
    mode: bidirectional
    description: "๐ŸŒฟ Main communication channel"

๐Ÿ”Œ MCP Server

miadi-webweave-mcp exposes 35 webweave_* tools to MCP clients โ€” sessions, writing, reading, browser control, collaboration, and the Four Directions commands โ€” by shelling out to the same CLI.

pip install miadi-webweave-mcp

Server identity is miadi-webweave, so tools resolve as mcp__miadi-webweave__webweave_<verb>.

Breaking, pre-0.7: tools were renamed simexp_* โ†’ webweave_*. Client allowlists referencing mcp__mia-simexp__simexp_* must be updated.

Setup and the full tool list: miadi_webweave_mcp/README.md ยท Quickstart: MCP_QUICKSTART.md


๐ŸŽ“ How it works

Extraction

Clipboard URL โ†’ content_fetcher โ†’ processor โ†’ archiver โ†’ output/YYYYMMDD/

Writing

miadi-webweave write
    โ†“  playwright_writer.py
    โ†“  Chrome DevTools Protocol
    โ†“  YOUR authenticated Chrome
    โ†“  keyboard simulation, character by character
    โ†“  Simplenote editor โ†’ cloud sync
    โ†“  every device

The key move is connecting to a Chrome you are already logged into rather than launching a clean one. That is what preserves authentication and makes cross-device sync work. Keyboard simulation (rather than DOM injection) is what makes the writes stick โ€” Simplenote's editor reverts programmatic value changes.


๐Ÿ—๏ธ Project structure

simexp/                          # repository name (unchanged โ€” this is a fork)
โ”œโ”€โ”€ miadi_webweave/              # CLI package
โ”‚   โ”œโ”€โ”€ cli.py                   # entry point + dispatch
โ”‚   โ”œโ”€โ”€ commands/                # browser, config, io, sessions
โ”‚   โ”œโ”€โ”€ paths.py                 # single source of truth for on-disk layout
โ”‚   โ”œโ”€โ”€ playwright_writer.py     # terminal โ†’ web writer
โ”‚   โ”œโ”€โ”€ content_fetcher.py       # fetch
โ”‚   โ”œโ”€โ”€ processor.py             # HTML โ†’ Markdown
โ”‚   โ”œโ”€โ”€ archiver.py              # write to output/
โ”‚   โ”œโ”€โ”€ session_manager.py       # session lifecycle
โ”‚   โ””โ”€โ”€ timestamp_utils.py       # TLID
โ”œโ”€โ”€ miadi_webweave_mcp/          # MCP server package (separately versioned)
โ”œโ”€โ”€ rispecs/                     # living specifications
โ”œโ”€โ”€ docs/                        # guides + historical records
โ”œโ”€โ”€ tests/
โ””โ”€โ”€ ledger/                      # session journals (historical)

๐Ÿ” Troubleshooting

"Connection refused" on the CDP port Chrome is not running with remote debugging. miadi-webweave browser launch, then miadi-webweave browser test to confirm.

"Could not find editor element" Not logged into Simplenote in the CDP Chrome window. Open it and log in at https://app.simplenote.com.

The command sits at "Reading content from stdin..." It is waiting for you to type. Finish with Ctrl+D, or cancel and pass the message inline instead.

Prepend is not landing after the metadata The note needs metadata โ€” create it with session start. Both YAML (---) and HTML-comment (<!--) metadata blocks are supported.

Timestamps are not appearing pip install tlid. Without it there is a datetime fallback.

Deeper guides: docs/CDP_SETUP_GUIDE.md ยท docs/README_CROSS_DEVICE_FLUIDITY.md


๐Ÿ“š Documentation

rispecs/ Living specifications โ€” the current intended behaviour
docs/ Setup guides, plus historical records (see docs/README.md)
CHANGELOG.md Release history
MCP_QUICKSTART.md MCP server setup
ledger/ Session journals โ€” historical, not maintained

๐Ÿค Contributing

  1. Open an issue describing the feature or bug first.
  2. Branch from main, named with the issue number (e.g. #123-new-feature).
  3. Implement and test.
  4. Open a pull request against main.

Releases are cut with ./release-all.sh โ€” see the Release notes in CHANGELOG.md.


๐Ÿ“„ License

Open Assembly Framework โ€” created by Jerry's G.Music Assembly.

The repository carries no LICENSE file, while package metadata declares MIT. That inconsistency predates this fork and is unresolved.


๐ŸŽจ G.Music Assembly

โ™ ๏ธ๐ŸŒฟ๐ŸŽธ๐Ÿงต The Spiral Ensemble โ€” โ™ ๏ธ Nyro (structure) ยท ๐ŸŒฟ Aureon (emotional context) ยท ๐ŸŽธ JamAI (musical encoding) ยท ๐Ÿงต Synth (terminal orchestration), with Jerry โšก leading. Session melodies live in sessionABC/.


Terminals speak. Web pages listen. Devices converse.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miadi_webweave-0.7.1.tar.gz (79.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miadi_webweave-0.7.1-py3-none-any.whl (84.5 kB view details)

Uploaded Python 3

File details

Details for the file miadi_webweave-0.7.1.tar.gz.

File metadata

  • Download URL: miadi_webweave-0.7.1.tar.gz
  • Upload date:
  • Size: 79.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for miadi_webweave-0.7.1.tar.gz
Algorithm Hash digest
SHA256 d7fe37db0498750ca2e48c8624497dae64986aa6b33475d7c9dd12ce178f935f
MD5 f361ffa69051918da1a27aee61c7470b
BLAKE2b-256 34b93d5fc260f4edfe8bd1f3a95e48f9c886e9b82a45884f18f88518d3c8b3e2

See more details on using hashes here.

File details

Details for the file miadi_webweave-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: miadi_webweave-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 84.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for miadi_webweave-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f2ad27cf2ed7877d094f54c58a0447ba97631d6441523d6142ca9a4a881d0c7
MD5 4e354e12fbac223b271baca3b692774a
BLAKE2b-256 45cc8dcca483482c65fb1becd149ea319627210d6fffdd0b84ae83cab89d7f1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page