Skip to content

Conversation

@bbopen
Copy link
Owner

@bbopen bbopen commented Jan 23, 2026

Summary

This RFC proposes creating a curated ecosystem of pre-wrapped Python libraries published to npm under the @tywrapped organization, making world-class Python libraries accessible to JavaScript/TypeScript developers.

Motivation

JS/TS developers who need PyTorch, NumPy, SciPy, or scikit-learn currently must either learn Python, use inferior JS alternatives, or set up tywrap themselves. This RFC proposes ready-to-use npm install @tywrapped/numpy packages.

Key Proposals

Governance

  • Central @tywrapped org on npm and GitHub
  • Community-governed with technical committee oversight
  • Open Collective for transparent funding
  • Trusted maintainers per library with approval gates

Versioning

  • Mirror upstream by default: @tywrapped/numpy@1.26.0
  • Compound version for tywrap patches: @tywrapped/numpy@1.26.0-tywrap.1
  • Every tywrap release republishes all packages

Quality Indicators

Two separate badges:

  • Quality tier: 🥉 Bronze → 🥈 Silver → 🥇 Gold → 💎 Platinum (testing depth)
  • Support breadth: latest → latest+1 → upstream → upstream+LTS (version coverage)

Runtime

  • Auto-detection: Browser → Pyodide, Node → Subprocess
  • Explicit override for power users: setRuntime(new InProcessBridge())
  • Browser support opt-in per package

Breaking Changes

Mirror upstream directly. No buffering or parallel support periods. Users accept upstream's upgrade path.

Initial Launch Libraries

Library Priority
NumPy High
SciPy High
PyTorch High
scikit-learn Medium

Open for Discussion

  1. Is the versioning strategy (mirror + compound) intuitive?
  2. Are the quality tier names/badges clear?
  3. Should browser support be required or opt-in?
  4. Any concerns about the governance model?
  5. Other libraries that should be prioritized?

Full RFC

See docs/plans/2026-01-22-tywrapped-ecosystem-vision.md for the complete design document.


🤖 Generated with Claude Code

Proposes a curated ecosystem of pre-wrapped Python libraries published
to npm under the @tywrapped organization.

Key proposals:
- Governance: Central org with trusted maintainers, Open Collective funding
- Versioning: Mirror upstream, compound version for tywrap patches
- Quality: Two-badge system (quality tier + support breadth)
- Runtime: Auto-detection with explicit override option
- Breaking changes: Mirror upstream directly, transparent pass-through

Seeking community feedback on this direction before implementation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

A comprehensive RFC document was added outlining the Tywrapped ecosystem vision, defining pre-wrapped Python libraries for JavaScript/TypeScript developers. The document covers governance, naming conventions, versioning, CI/CD pipelines, runtime selection, initial launch libraries, and phased implementation steps.

Changes

Cohort / File(s) Summary
Ecosystem Planning Document
docs/plans/2026-01-22-tywrapped-ecosystem-vision.md
Added comprehensive RFC detailing Tywrapped ecosystem architecture, governance model, package conventions, versioning strategy, CI/CD workflow, health indicators, runtime abstraction mechanisms, and multi-phase rollout plan from foundation setup through expansion.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Wrapped in dreams, a vision bright,
Python libraries, bundled tight,
For JavaScript developers dear,
The Tywrapped ecosystem's here!
A strategic path, layer by layer, 🎁
Making cross-language lives much brighter.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely summarizes the main change: a comprehensive RFC proposing a curated ecosystem of pre-wrapped Python libraries (@tywrapped) for npm.
Description check ✅ Passed The description is directly related to the changeset, providing clear motivation, key proposals, and a reference to the full RFC document that was added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@bbopen
Copy link
Owner Author

bbopen commented Jan 23, 2026

@CodeRabbit help

@coderabbitai
Copy link

coderabbitai bot commented Jan 23, 2026

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

CodeRabbit commands

These commands are invoked using PR/Issue comments.

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>] to validate the custom pre-merge checks instructions. Defaults to error when --mode is omitted.
    • @coderabbitai ignore pre-merge checks to override pre-merge checks and get an approval on PR.
    • @coderabbitai run pre-merge checks to run pre-merge checks on the pull request.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai generate configuration to create a PR that adds the current resolved configuration as .coderabbit.yaml (or show it if already present).
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit configuration file (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, support, documentation and community

  • Visit our status page to check the current availability of CodeRabbit.
  • Create a ticket on our support page for assistance with any issues or questions.
  • Visit our documentation site for detailed information on how to use CodeRabbit.
  • Join our Discord community to connect with other users and get help from the community.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In `@docs/plans/2026-01-22-tywrapped-ecosystem-vision.md`:
- Line 330: The emphasized line "**Recommended approach: JSON passthrough**"
triggers MD036; replace the emphasis with a proper Markdown heading (e.g.,
change it to a level-3 heading like "### Recommended approach: JSON
passthrough") so the line is a heading rather than emphasized text and satisfies
the MD036 rule.
- Around line 198-201: The fenced code block containing "@tywrapped/numpy" (and
the other fenced blocks showing runtime/quality lines) lacks blank lines before
and after, triggering MD031; edit each fenced block (e.g., the block with
"@tywrapped/numpy" and the similar blocks around the other occurrences) to
ensure there is exactly one blank line above the opening ``` and one blank line
below the closing ``` so each fenced code block is separated from surrounding
text.
- Around line 153-165: Add language identifiers to the fenced code blocks that
triggered markdownlint MD040 (e.g., the block containing the numbered pipeline
with arrows "1. Trigger (Dependabot or tywrap release) … 6. Publish to npm" and
the other flagged fences), replacing opening triple backticks (```) with a
language-specific fence such as ```text or ```bash or ```typescript as
appropriate so each fence includes a language token; apply the same change to
the other flagged blocks referenced in the comment (the fences at the other
noted locations) to satisfy MD040.
- Around line 355-376: Add blank lines before and after each heading (e.g.,
"Phase 1: Foundation", "Phase 2: Template & Tooling", etc.) to satisfy MD022,
and convert all ordered list prefixes to "1." so Markdown auto-numbers (for
example, change "1., 2., 3." to "1." for items under each phase such as the
items under "Phase 1: Foundation" and "Phase 2: Template & Tooling"); ensure the
heading/section blocks and their lists have a single blank line separating them
from surrounding text so MD029 is resolved.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3668b5a and fd6351a.

📒 Files selected for processing (1)
  • docs/plans/2026-01-22-tywrapped-ecosystem-vision.md
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: bbopen
Repo: bbopen/tywrap PR: 127
File: runtime/python_bridge.py:99-123
Timestamp: 2026-01-19T21:49:05.612Z
Learning: In the tywrap repository, TYWRAP_REQUEST_MAX_BYTES uses strict integer parsing that rejects values with trailing characters (e.g., "1024abc"). This differs from TYWRAP_CODEC_MAX_BYTES, which uses tolerant/best-effort parsing that accepts numeric prefixes. The strict policy for REQUEST_MAX_BYTES ensures explicit integer values and consistent parse behavior across Node/Python implementations.
📚 Learning: 2026-01-19T21:14:40.872Z
Learnt from: bbopen
Repo: bbopen/tywrap PR: 127
File: src/runtime/bridge-core.ts:260-263
Timestamp: 2026-01-19T21:14:40.872Z
Learning: In `src/runtime/bridge-core.ts` and similar hot request/response loop implementations in the tywrap repository, avoid adding extra defensive validation (e.g., runtime shape checks on error payloads) in tight loops unless the protocol boundary is untrusted or there's a concrete bug report. The Python bridge protocol is controlled and validated via tests, so defensive checks would add unnecessary branching overhead without meaningful benefit.

Applied to files:

  • docs/plans/2026-01-22-tywrapped-ecosystem-vision.md
🪛 markdownlint-cli2 (0.18.1)
docs/plans/2026-01-22-tywrapped-ecosystem-vision.md

153-153: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


198-198: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


198-198: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


223-223: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


305-305: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


318-318: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


330-330: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)


355-355: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


361-361: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


362-362: Ordered list item prefix
Expected: 1; Actual: 5; Style: 1/2/3

(MD029, ol-prefix)


363-363: Ordered list item prefix
Expected: 2; Actual: 6; Style: 1/2/3

(MD029, ol-prefix)


364-364: Ordered list item prefix
Expected: 3; Actual: 7; Style: 1/2/3

(MD029, ol-prefix)


366-366: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


367-367: Ordered list item prefix
Expected: 1; Actual: 8; Style: 1/2/3

(MD029, ol-prefix)


368-368: Ordered list item prefix
Expected: 2; Actual: 9; Style: 1/2/3

(MD029, ol-prefix)


369-369: Ordered list item prefix
Expected: 3; Actual: 10; Style: 1/2/3

(MD029, ol-prefix)


371-371: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


372-372: Ordered list item prefix
Expected: 1; Actual: 11; Style: 1/2/3

(MD029, ol-prefix)


373-373: Ordered list item prefix
Expected: 2; Actual: 12; Style: 1/2/3

(MD029, ol-prefix)


374-374: Ordered list item prefix
Expected: 3; Actual: 13; Style: 1/2/3

(MD029, ol-prefix)


376-376: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +153 to +165
```
1. Trigger (Dependabot or tywrap release)
2. CI regenerates wrappers
3. Run test suite (based on health tier)
4. If tests pass → Create PR / request approval
5. Library maintainer reviews/approves
6. Publish to npm
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add language identifiers to fenced code blocks.

markdownlint reports MD040 on these fences; add a language (e.g., text, bash, typescript) to each to satisfy linting.

✅ Example fix pattern
-```
+```text
 1. Trigger (Dependabot or tywrap release)
         ↓
 2. CI regenerates wrappers
         ↓
 3. Run test suite (based on health tier)
         ↓
 4. If tests pass → Create PR / request approval
         ↓
 5. Library maintainer reviews/approves
         ↓
 6. Publish to npm
-```
+```

Also applies to: 198-201, 223-226, 305-315, 318-323

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

153-153: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In `@docs/plans/2026-01-22-tywrapped-ecosystem-vision.md` around lines 153 - 165,
Add language identifiers to the fenced code blocks that triggered markdownlint
MD040 (e.g., the block containing the numbered pipeline with arrows "1. Trigger
(Dependabot or tywrap release) … 6. Publish to npm" and the other flagged
fences), replacing opening triple backticks (```) with a language-specific fence
such as ```text or ```bash or ```typescript as appropriate so each fence
includes a language token; apply the same change to the other flagged blocks
referenced in the comment (the fences at the other noted locations) to satisfy
MD040.

Comment on lines +198 to +201
```
@tywrapped/numpy
Quality: 🥇 Gold | Support: upstream (1.24+) | Runtimes: node, browser
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add blank lines around fenced code blocks.

markdownlint reports MD031; ensure a blank line before and after each fenced block for consistent Markdown rendering.

Also applies to: 223-226, 318-323

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

198-198: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


198-198: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
In `@docs/plans/2026-01-22-tywrapped-ecosystem-vision.md` around lines 198 - 201,
The fenced code block containing "@tywrapped/numpy" (and the other fenced blocks
showing runtime/quality lines) lacks blank lines before and after, triggering
MD031; edit each fenced block (e.g., the block with "@tywrapped/numpy" and the
similar blocks around the other occurrences) to ensure there is exactly one
blank line above the opening ``` and one blank line below the closing ``` so
each fenced code block is separated from surrounding text.


### Adding node-calls-python Support

**Recommended approach: JSON passthrough**
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Avoid using emphasis as a heading.

MD036 flags this line; replace the emphasized line with a proper heading level (e.g., ### Recommended approach: JSON passthrough).

🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

330-330: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

🤖 Prompt for AI Agents
In `@docs/plans/2026-01-22-tywrapped-ecosystem-vision.md` at line 330, The
emphasized line "**Recommended approach: JSON passthrough**" triggers MD036;
replace the emphasis with a proper Markdown heading (e.g., change it to a
level-3 heading like "### Recommended approach: JSON passthrough") so the line
is a heading rather than emphasized text and satisfies the MD036 rule.

Comment on lines +355 to +376
### Phase 1: Foundation (before launch)
1. Register "tywrapped" trademark
2. Set up GitHub org (`tywrapped`) and npm org (`@tywrapped`)
3. Create Open Collective account
4. Secure domain (tywrapped.org or similar)

### Phase 2: Template & Tooling
5. Create template repository with standardized CI/CD
6. Build badge generation tooling for health indicators
7. Document governance charter and contribution guidelines

### Phase 3: Proof of Concept
8. Build `@tywrapped/numpy` as first package
9. Validate CI/CD pipeline with real upstream updates
10. Gather feedback, iterate on template

### Phase 4: Expansion
11. Add 2-3 more high-priority packages (scipy, scikit-learn)
12. Recruit initial maintainers
13. Announce publicly, begin community building

### Optional (parallel track)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Normalize heading spacing and ordered list numbering.

MD022/MD029 indicate missing blank lines around headings and non-1/2/3 list prefixes. Add blank lines around headings and use 1. for all ordered list items so Markdown auto-numbers.

✅ Example fix pattern
-### Phase 1: Foundation (before launch)
-1. Register "tywrapped" trademark
-2. Set up GitHub org (`tywrapped`) and npm org (`@tywrapped`)
-3. Create Open Collective account
-4. Secure domain (tywrapped.org or similar)
+### Phase 1: Foundation (before launch)
+
+1. Register "tywrapped" trademark
+1. Set up GitHub org (`tywrapped`) and npm org (`@tywrapped`)
+1. Create Open Collective account
+1. Secure domain (tywrapped.org or similar)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Phase 1: Foundation (before launch)
1. Register "tywrapped" trademark
2. Set up GitHub org (`tywrapped`) and npm org (`@tywrapped`)
3. Create Open Collective account
4. Secure domain (tywrapped.org or similar)
### Phase 2: Template & Tooling
5. Create template repository with standardized CI/CD
6. Build badge generation tooling for health indicators
7. Document governance charter and contribution guidelines
### Phase 3: Proof of Concept
8. Build `@tywrapped/numpy` as first package
9. Validate CI/CD pipeline with real upstream updates
10. Gather feedback, iterate on template
### Phase 4: Expansion
11. Add 2-3 more high-priority packages (scipy, scikit-learn)
12. Recruit initial maintainers
13. Announce publicly, begin community building
### Optional (parallel track)
### Phase 1: Foundation (before launch)
1. Register "tywrapped" trademark
1. Set up GitHub org (`tywrapped`) and npm org (`@tywrapped`)
1. Create Open Collective account
1. Secure domain (tywrapped.org or similar)
### Phase 2: Template & Tooling
1. Create template repository with standardized CI/CD
1. Build badge generation tooling for health indicators
1. Document governance charter and contribution guidelines
### Phase 3: Proof of Concept
1. Build `@tywrapped/numpy` as first package
1. Validate CI/CD pipeline with real upstream updates
1. Gather feedback, iterate on template
### Phase 4: Expansion
1. Add 2-3 more high-priority packages (scipy, scikit-learn)
1. Recruit initial maintainers
1. Announce publicly, begin community building
### Optional (parallel track)
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

355-355: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


361-361: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


362-362: Ordered list item prefix
Expected: 1; Actual: 5; Style: 1/2/3

(MD029, ol-prefix)


363-363: Ordered list item prefix
Expected: 2; Actual: 6; Style: 1/2/3

(MD029, ol-prefix)


364-364: Ordered list item prefix
Expected: 3; Actual: 7; Style: 1/2/3

(MD029, ol-prefix)


366-366: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


367-367: Ordered list item prefix
Expected: 1; Actual: 8; Style: 1/2/3

(MD029, ol-prefix)


368-368: Ordered list item prefix
Expected: 2; Actual: 9; Style: 1/2/3

(MD029, ol-prefix)


369-369: Ordered list item prefix
Expected: 3; Actual: 10; Style: 1/2/3

(MD029, ol-prefix)


371-371: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


372-372: Ordered list item prefix
Expected: 1; Actual: 11; Style: 1/2/3

(MD029, ol-prefix)


373-373: Ordered list item prefix
Expected: 2; Actual: 12; Style: 1/2/3

(MD029, ol-prefix)


374-374: Ordered list item prefix
Expected: 3; Actual: 13; Style: 1/2/3

(MD029, ol-prefix)


376-376: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)

🤖 Prompt for AI Agents
In `@docs/plans/2026-01-22-tywrapped-ecosystem-vision.md` around lines 355 - 376,
Add blank lines before and after each heading (e.g., "Phase 1: Foundation",
"Phase 2: Template & Tooling", etc.) to satisfy MD022, and convert all ordered
list prefixes to "1." so Markdown auto-numbers (for example, change "1., 2., 3."
to "1." for items under each phase such as the items under "Phase 1: Foundation"
and "Phase 2: Template & Tooling"); ensure the heading/section blocks and their
lists have a single blank line separating them from surrounding text so MD029 is
resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants