mirror of
https://github.com/lWolvesl/claw-code.git
synced 2026-04-02 16:21:52 +08:00
Make the repository's primary source tree genuinely Python
The old tracked TypeScript snapshot has been removed from the repository history and the root directory is now a Python porting workspace. README and tests now describe and verify the Python-first layout instead of treating the exposed snapshot as the active source tree. A local archive can still exist outside Git, but the tracked repository now presents only the Python porting surface, related essay context, and OmX workflow artifacts. Constraint: Tracked history should collapse to a single commit while excluding the archived snapshot from Git Rejected: Keep the exposed TypeScript tree in tracked history under an archive path | user explicitly wanted only the Python porting repo state in Git Confidence: medium Scope-risk: broad Reversibility: messy Directive: Keep future tracked additions focused on the Python port itself; do not reintroduce the exposed snapshot into Git history Tested: python3 -m unittest discover -s tests -v; python3 -m src.main summary; git diff --check Not-tested: Behavioral parity with the original TypeScript system beyond the current Python workspace surface
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
__pycache__/
|
||||||
|
archive/
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
# Is legal the same as legitimate: AI reimplementation and the erosion of copyleft
|
||||||
|
|
||||||
|
- **Date:** March 9, 2026
|
||||||
|
- **Author:** Hong Minhee
|
||||||
|
- **Source context:** _Hong Minhee on Things_ (English / 日本語 / 朝鮮語 (國漢文) / 한국어 (한글))
|
||||||
|
- **Archive note:** This copy was normalized from user-provided text for this repository's research/archive context. Site navigation/footer language links were converted into metadata.
|
||||||
|
|
||||||
|
Last week, Dan Blanchard, the maintainer of chardet—a Python library for detecting text encodings used by roughly 130 million projects a month—released a new version. Version 7.0 is 48 times faster than its predecessor, supports multiple cores, and was redesigned from the ground up. Anthropic's Claude is listed as a contributor. The license changed from LGPL to MIT.
|
||||||
|
|
||||||
|
Blanchard's account is that he never looked at the existing source code directly. He fed only the API and the test suite to Claude and asked it to reimplement the library from scratch. The resulting code shares less than 1.3% similarity with any prior version, as measured by JPlag. His conclusion: this is an independent new work, and he is under no obligation to carry forward the LGPL. Mark Pilgrim, the library's original author, opened a GitHub issue to object. The LGPL requires that modifications be distributed under the same license, and a reimplementation produced with ample exposure to the original codebase cannot, in Pilgrim's view, pass as a clean-room effort.
|
||||||
|
|
||||||
|
The dispute drew responses from two prominent figures in the open source world. Armin Ronacher, the creator of Flask, welcomed the relicensing. Salvatore Sanfilippo (antirez), the creator of Redis, published a broader defense of AI reimplementation, grounding it in copyright law and the history of the GNU project. Both conclude, by different routes, that what Blanchard did is legitimate. I respect both writers, and I think both are wrong—or more precisely, both are evading the question that actually matters.
|
||||||
|
|
||||||
|
That question is this: does legal mean legitimate? Neither piece answers it. Both move from “this is legally permissible” to “this is therefore fine,” without pausing at the gap between those two claims. Law sets a floor; clearing it does not mean the conduct is right. That gap is where this essay begins.
|
||||||
|
|
||||||
|
## The analogy points the wrong way
|
||||||
|
|
||||||
|
Antirez builds his case on history. When the GNU project reimplemented the UNIX userspace, it was lawful. So was Linux. Copyright law prohibits copying “protected expressions”—the actual code, its structure, its specific mechanisms—but it does not protect ideas or behavior. AI-assisted reimplementation occupies the same legal ground. Therefore, it is lawful.
|
||||||
|
|
||||||
|
The legal analysis is largely correct, and I am not disputing it. The problem lies in what antirez does next: he presents the legal conclusion as if it were also a social one, and uses a historical analogy that, examined more carefully, argues against his own position.
|
||||||
|
|
||||||
|
When GNU reimplemented the UNIX userspace, the vector ran from proprietary to free. Stallman was using the limits of copyright law to turn proprietary software into free software. The ethical force of that project did not come from its legal permissibility—it came from the direction it was moving, from the fact that it was expanding the commons. That is why people cheered.
|
||||||
|
|
||||||
|
The vector in the chardet case runs the other way. Software protected by a copyleft license—one that guarantees users the right to study, modify, and redistribute derivative works under the same terms—has been reimplemented under a permissive license that carries no such guarantee. This is not a reimplementation that expands the commons. It is one that removes the fencing that protected the commons. Derivative works built on chardet 7.0 are under no obligation to share their source code. That obligation, which applied to a library downloaded 130 million times a month, is now gone.
|
||||||
|
|
||||||
|
Antirez does not address this directional difference. He invokes the GNU precedent, but that precedent is a counterexample to his conclusion, not a supporting one.
|
||||||
|
|
||||||
|
## Does the GPL work against sharing?
|
||||||
|
|
||||||
|
Ronacher's argument is different. He discloses upfront that he has a stake in the outcome: “I personally have a horse in the race here because I too wanted chardet to be under a non-GPL license for many years. So consider me a very biased person in that regard.” He goes on to write that he considers “the GPL to run against that spirit by restricting what can be done with it”—the spirit being that society is better off when we share.
|
||||||
|
|
||||||
|
This claim rests on a fundamental misreading of what the GPL does.
|
||||||
|
|
||||||
|
Start with what the GPL actually prohibits. It does not prohibit keeping source code private. It imposes no constraint on privately modifying GPL software and using it yourself. The GPL's conditions are triggered only by distribution. If you distribute modified code, or offer it as a networked service, you must make the source available under the same terms. This is not a restriction on sharing. It is a condition placed on sharing: if you share, you must share in kind.
|
||||||
|
|
||||||
|
The requirement that improvements be returned to the commons is not a mechanism that suppresses sharing. It is a mechanism that makes sharing recursive and self-reinforcing. The claim that imposing contribution obligations on users of a commons undermines sharing culture does not hold together logically.
|
||||||
|
|
||||||
|
The contrast with the MIT license clarifies the point. Under MIT, anyone may take code, improve it, and close it off into a proprietary product. You can receive from the commons without giving back. If Ronacher calls this structure “more share-friendly,” he is using a concept of sharing with a specific directionality built in: sharing flows toward whoever has more capital and more engineers to take advantage of it.
|
||||||
|
|
||||||
|
The historical record bears this out. In the 1990s, companies routinely absorbed GPL code into proprietary products—not because they had chosen permissive licenses, but because copyleft enforcement was slack. The strengthening of copyleft mechanisms closed that gap. For individual developers and small projects without the resources to compete on anything but reciprocity, copyleft was what made the exchange approximately fair.
|
||||||
|
|
||||||
|
The creator of Flask knows this distinction. If he elides it anyway, the argument is not naïve—it is convenient.
|
||||||
|
|
||||||
|
## A self-refuting example
|
||||||
|
|
||||||
|
The most interesting moment in Ronacher's piece is not the argument but a detail he mentions in passing: Vercel reimplemented GNU Bash using AI and published it, then got visibly upset when Cloudflare reimplemented Next.js the same way.
|
||||||
|
|
||||||
|
Ronacher notes this as an irony and moves on. But the irony cuts deeper than he lets on. Next.js is MIT licensed. Cloudflare's vinext did not violate any license—it did exactly what Ronacher calls a contribution to the culture of openness, applied to a permissively licensed codebase. Vercel's reaction had nothing to do with license infringement; it was purely competitive and territorial. The implicit position is: reimplementing GPL software as MIT is a victory for sharing, but having our own MIT software reimplemented by a competitor is cause for outrage. This is what the claim that permissive licensing is “more share-friendly” than copyleft looks like in practice. The spirit of sharing, it turns out, runs in one direction only: outward from oneself.
|
||||||
|
|
||||||
|
Ronacher registers the contradiction and does not stop. “This development plays into my worldview,” he writes. When you present evidence that cuts against your own position, acknowledge it, and then proceed to your original conclusion unchanged, that is a signal that the conclusion preceded the argument.
|
||||||
|
|
||||||
|
## Legality and social legitimacy are different registers
|
||||||
|
|
||||||
|
Back to the question posed at the start. Is legal the same as legitimate?
|
||||||
|
|
||||||
|
Antirez closes his careful legal analysis as though it settles the matter. Ronacher acknowledges that “there is an obvious moral question here, but that isn't necessarily what I'm interested in.” Both pieces treat legal permissibility as a proxy for social legitimacy. But law only says what conduct it will not prevent—it does not certify that conduct as right. Aggressive tax minimization that never crosses into illegality may still be widely regarded as antisocial. A pharmaceutical company that legally acquires a patent on a long-generic drug and raises the price a hundredfold has done something legal, but that does not make it fine. Legality is a necessary condition; it is not a sufficient one.
|
||||||
|
|
||||||
|
In the chardet case, the distinction is sharper still. What the LGPL protected was not Blanchard's labor alone. It was a social compact agreed to by everyone who contributed to the library over twelve years. The terms of that compact were: if you take this and build on it, you share back under the same terms. This compact operated as a legal instrument, yes, but it was also the foundation of trust that made contribution rational. The fact that a reimplementation may qualify legally as a new work, and the fact that it breaks faith with the original contributors, are separate questions. If a court eventually rules in Blanchard's favor, that ruling will tell us what the law permits. It will not tell us that the act was right.
|
||||||
|
|
||||||
|
Zoë Kooyman, executive director of the FSF, put it plainly: “Refusing to grant others the rights you yourself received as a user is highly antisocial, no matter what method you use.”
|
||||||
|
|
||||||
|
## Whose perspective is the default?
|
||||||
|
|
||||||
|
Reading this debate, I keep returning to a question about position. From where are these two writers looking at the situation?
|
||||||
|
|
||||||
|
Antirez created Redis. Ronacher created Flask. Both are figures at the center of the open source ecosystem, with large audiences and well-established reputations. For them, falling costs of AI reimplementation means something specific: it is easier to reimplement things they want in a different form. Ronacher says explicitly that he had begun reimplementing GNU Readline precisely because of its copyleft terms.
|
||||||
|
|
||||||
|
For the people who have spent years contributing to a library like chardet, the same shift in costs means something else entirely: the copyleft protection around their contributions can be removed. The two writers are speaking from the former position to people in the latter, telling them that this was always lawful, that historical precedent supports it, and that the appropriate response is adaptation.
|
||||||
|
|
||||||
|
When positional asymmetry of this kind is ignored, and the argument is presented as universal analysis, what you get is not analysis but rationalization. Both writers arrive at conclusions that align precisely with their own interests. Readers should hold that fact in mind.
|
||||||
|
|
||||||
|
## What this fight points toward
|
||||||
|
|
||||||
|
Bruce Perens, who wrote the original Open Source Definition, told The Register: “The entire economics of software development are dead, gone, over, kaput!” He meant it as an alarm. Antirez, from a similar assessment of the situation, draws the conclusion: adapt. Ronacher says he finds the direction exciting.
|
||||||
|
|
||||||
|
None of the three responses addresses the central question. When copyleft becomes technically easier to circumvent, does that make it less necessary, or more?
|
||||||
|
|
||||||
|
I think more. What the GPL protected was not the scarcity of code but the freedom of users. The fact that producing code has become cheaper does not make it acceptable to use that code as a vehicle for eroding freedom. If anything, as the friction of reimplementation disappears, so does the friction of stripping copyleft from anything left exposed. The erosion of enforcement capacity is a legal problem. It does not touch the underlying normative judgment.
|
||||||
|
|
||||||
|
That judgment is this: those who take from the commons owe something back to the commons. The principle does not change depending on whether a reimplementation takes five years or five days. No court ruling on AI-generated code will alter its social weight.
|
||||||
|
|
||||||
|
This is where law and community norms diverge. Law is made slowly, after the fact, reflecting existing power arrangements. The norms that open source communities built over decades did not wait for court approval. People chose the GPL when the law offered them no guarantee of its enforcement, because it expressed the values of the communities they wanted to belong to. Those values do not expire when the law changes.
|
||||||
|
|
||||||
|
In previous writing, I argued for a training copyleft (TGPL) as the next step in this line of development. The chardet situation suggests the argument has to go further: to a specification copyleft covering the layer below source code. If source code can now be generated from a specification, the specification is where the essential intellectual content of a GPL project resides. Blanchard's own claim—that he worked only from the test suite and API without reading the source—is, paradoxically, an argument for protecting that test suite and API specification under copyleft terms.
|
||||||
|
|
||||||
|
The history of the GPL is the history of licensing tools evolving in response to new forms of exploitation: GPLv2 to GPLv3, then AGPL. What drove each evolution was not a court ruling but a community reaching a value judgment first and then seeking legal instruments to express it. The same sequence is available now. Whatever courts eventually decide about AI reimplementation, the question we need to answer first is not a legal one. It is a social one. Do those who take from the commons owe something back? I think they do. That judgment does not require a verdict.
|
||||||
|
|
||||||
|
What makes the pieces by antirez and Ronacher worth reading is not that they are right. It is that they make visible, with unusual clarity, what they are choosing not to see. When legality is used as a substitute for a value judgment, the question that actually matters gets buried in the footnotes of a law it has already outgrown.
|
||||||
123
README.md
Normal file
123
README.md
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
# Claude Code Python Porting Workspace
|
||||||
|
|
||||||
|
> The primary `src/` tree in this repository is now dedicated to **Python porting work**. The March 31, 2026 Claude Code source exposure is part of the project's background, but the tracked repository is now centered on Python source rather than the exposed TypeScript snapshot.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Porting Status
|
||||||
|
|
||||||
|
The main source tree is now Python-first.
|
||||||
|
|
||||||
|
- `src/` contains the active Python porting workspace
|
||||||
|
- `tests/` verifies the current Python workspace
|
||||||
|
- the exposed snapshot is no longer part of the tracked repository state
|
||||||
|
|
||||||
|
The current Python workspace is not yet a complete one-to-one replacement for the original system, but the primary implementation surface is now Python.
|
||||||
|
|
||||||
|
## Why this rewrite exists
|
||||||
|
|
||||||
|
I originally studied the exposed codebase to understand its harness, tool wiring, and agent workflow. After spending more time with the legal and ethical questions—and after reading the essay linked below—I did not want the exposed snapshot itself to remain the main tracked source tree.
|
||||||
|
|
||||||
|
This repository now focuses on Python porting work instead.
|
||||||
|
|
||||||
|
## Repository Layout
|
||||||
|
|
||||||
|
```text
|
||||||
|
.
|
||||||
|
├── src/ # Python porting workspace
|
||||||
|
│ ├── __init__.py
|
||||||
|
│ ├── commands.py
|
||||||
|
│ ├── main.py
|
||||||
|
│ ├── models.py
|
||||||
|
│ ├── port_manifest.py
|
||||||
|
│ ├── query_engine.py
|
||||||
|
│ ├── task.py
|
||||||
|
│ └── tools.py
|
||||||
|
├── tests/ # Python verification
|
||||||
|
├── assets/omx/ # OmX workflow screenshots
|
||||||
|
├── 2026-03-09-is-legal-the-same-as-legitimate-ai-reimplementation-and-the-erosion-of-copyleft.md
|
||||||
|
└── README.md
|
||||||
|
```
|
||||||
|
|
||||||
|
## Python Workspace Overview
|
||||||
|
|
||||||
|
The new Python `src/` tree currently provides:
|
||||||
|
|
||||||
|
- **`port_manifest.py`** — summarizes the current Python workspace structure
|
||||||
|
- **`models.py`** — dataclasses for subsystems, modules, and backlog state
|
||||||
|
- **`commands.py`** — Python-side command port metadata
|
||||||
|
- **`tools.py`** — Python-side tool port metadata
|
||||||
|
- **`query_engine.py`** — renders a Python porting summary from the active workspace
|
||||||
|
- **`main.py`** — a CLI entrypoint for manifest and summary output
|
||||||
|
|
||||||
|
## Quickstart
|
||||||
|
|
||||||
|
Render the Python porting summary:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m src.main summary
|
||||||
|
```
|
||||||
|
|
||||||
|
Print the current Python workspace manifest:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m src.main manifest
|
||||||
|
```
|
||||||
|
|
||||||
|
List the current Python modules:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m src.main subsystems --limit 16
|
||||||
|
```
|
||||||
|
|
||||||
|
Run verification:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m unittest discover -s tests -v
|
||||||
|
```
|
||||||
|
|
||||||
|
Run the parity audit against the local ignored archive (when present):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m src.main parity-audit
|
||||||
|
```
|
||||||
|
|
||||||
|
Inspect mirrored command/tool inventories:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python3 -m src.main commands --limit 10
|
||||||
|
python3 -m src.main tools --limit 10
|
||||||
|
```
|
||||||
|
|
||||||
|
## Current Parity Checkpoint
|
||||||
|
|
||||||
|
The port now mirrors the archived root-entry file surface, top-level subsystem names, and command/tool inventories much more closely than before. However, it is **not yet** a full runtime-equivalent replacement for the original TypeScript system; the Python tree still contains fewer executable runtime slices than the archived source.
|
||||||
|
|
||||||
|
## Related Essay
|
||||||
|
|
||||||
|
- [*Is legal the same as legitimate: AI reimplementation and the erosion of copyleft*](https://writings.hongminhee.org/2026/03/legal-vs-legitimate/)
|
||||||
|
|
||||||
|
The essay is dated **March 9, 2026**, so it should be read as companion analysis that predates the **March 31, 2026** source exposure that motivated this rewrite direction.
|
||||||
|
|
||||||
|
## Built with `oh-my-codex`
|
||||||
|
|
||||||
|
The restructuring and documentation work on this repository was AI-assisted and orchestrated with Yeachan Heo's [oh-my-codex (OmX)](https://github.com/Yeachan-Heo/oh-my-codex), layered on top of Codex.
|
||||||
|
|
||||||
|
- **`$team` mode:** used for coordinated parallel review and architectural feedback
|
||||||
|
- **`$ralph` mode:** used for persistent execution, verification, and completion discipline
|
||||||
|
- **Codex-driven workflow:** used to turn the main `src/` tree into a Python-first porting workspace
|
||||||
|
|
||||||
|
### OmX workflow screenshots
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
*Ralph/team orchestration view while the README and essay context were being reviewed in terminal panes.*
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
*Split-pane review and verification flow during the final README wording pass.*
|
||||||
|
|
||||||
|
## Ownership / Affiliation Disclaimer
|
||||||
|
|
||||||
|
- This repository does **not** claim ownership of the original Claude Code source material.
|
||||||
|
- This repository is **not affiliated with, endorsed by, or maintained by Anthropic**.
|
||||||
BIN
assets/omx/omx-readme-review-1.png
Normal file
BIN
assets/omx/omx-readme-review-1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
BIN
assets/omx/omx-readme-review-2.png
Normal file
BIN
assets/omx/omx-readme-review-2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
19
src/QueryEngine.py
Normal file
19
src/QueryEngine.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from .query_engine import QueryEnginePort
|
||||||
|
from .runtime import PortRuntime
|
||||||
|
|
||||||
|
|
||||||
|
class QueryEngineRuntime(QueryEnginePort):
|
||||||
|
def route(self, prompt: str, limit: int = 5) -> str:
|
||||||
|
matches = PortRuntime().route_prompt(prompt, limit=limit)
|
||||||
|
lines = ['# Query Engine Route', '', f'Prompt: {prompt}', '']
|
||||||
|
if not matches:
|
||||||
|
lines.append('No mirrored command/tool matches found.')
|
||||||
|
return '\n'.join(lines)
|
||||||
|
lines.append('Matches:')
|
||||||
|
lines.extend(f'- [{match.kind}] {match.name} ({match.score}) — {match.source_hint}' for match in matches)
|
||||||
|
return '\n'.join(lines)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = ['QueryEnginePort', 'QueryEngineRuntime']
|
||||||
15
src/Tool.py
Normal file
15
src/Tool.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class ToolDefinition:
|
||||||
|
name: str
|
||||||
|
purpose: str
|
||||||
|
|
||||||
|
|
||||||
|
DEFAULT_TOOLS = (
|
||||||
|
ToolDefinition('port_manifest', 'Summarize the active Python workspace'),
|
||||||
|
ToolDefinition('query_engine', 'Render a Python-first porting summary'),
|
||||||
|
)
|
||||||
19
src/__init__.py
Normal file
19
src/__init__.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
"""Python porting workspace for the Claude Code rewrite effort."""
|
||||||
|
|
||||||
|
from .commands import PORTED_COMMANDS, build_command_backlog
|
||||||
|
from .parity_audit import ParityAuditResult, run_parity_audit
|
||||||
|
from .port_manifest import PortManifest, build_port_manifest
|
||||||
|
from .query_engine import QueryEnginePort
|
||||||
|
from .tools import PORTED_TOOLS, build_tool_backlog
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
'ParityAuditResult',
|
||||||
|
'PortManifest',
|
||||||
|
'QueryEnginePort',
|
||||||
|
'PORTED_COMMANDS',
|
||||||
|
'PORTED_TOOLS',
|
||||||
|
'build_command_backlog',
|
||||||
|
'build_port_manifest',
|
||||||
|
'build_tool_backlog',
|
||||||
|
'run_parity_audit',
|
||||||
|
]
|
||||||
16
src/assistant/__init__.py
Normal file
16
src/assistant/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `assistant` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'assistant.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/bootstrap/__init__.py
Normal file
16
src/bootstrap/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `bootstrap` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'bootstrap.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/bridge/__init__.py
Normal file
16
src/bridge/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `bridge` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'bridge.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/buddy/__init__.py
Normal file
16
src/buddy/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `buddy` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'buddy.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/cli/__init__.py
Normal file
16
src/cli/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `cli` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'cli.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
58
src/commands.py
Normal file
58
src/commands.py
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from functools import lru_cache
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from .models import PortingBacklog, PortingModule
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent / 'reference_data' / 'commands_snapshot.json'
|
||||||
|
|
||||||
|
|
||||||
|
@lru_cache(maxsize=1)
|
||||||
|
def load_command_snapshot() -> tuple[PortingModule, ...]:
|
||||||
|
raw_entries = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
return tuple(
|
||||||
|
PortingModule(
|
||||||
|
name=entry['name'],
|
||||||
|
responsibility=entry['responsibility'],
|
||||||
|
source_hint=entry['source_hint'],
|
||||||
|
status='mirrored',
|
||||||
|
)
|
||||||
|
for entry in raw_entries
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
PORTED_COMMANDS = load_command_snapshot()
|
||||||
|
|
||||||
|
|
||||||
|
def build_command_backlog() -> PortingBacklog:
|
||||||
|
return PortingBacklog(title='Command surface', modules=list(PORTED_COMMANDS))
|
||||||
|
|
||||||
|
|
||||||
|
def command_names() -> list[str]:
|
||||||
|
return [module.name for module in PORTED_COMMANDS]
|
||||||
|
|
||||||
|
|
||||||
|
def get_command(name: str) -> PortingModule | None:
|
||||||
|
needle = name.lower()
|
||||||
|
for module in PORTED_COMMANDS:
|
||||||
|
if module.name.lower() == needle:
|
||||||
|
return module
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def find_commands(query: str, limit: int = 20) -> list[PortingModule]:
|
||||||
|
needle = query.lower()
|
||||||
|
matches = [module for module in PORTED_COMMANDS if needle in module.name.lower() or needle in module.source_hint.lower()]
|
||||||
|
return matches[:limit]
|
||||||
|
|
||||||
|
|
||||||
|
def render_command_index(limit: int = 20, query: str | None = None) -> str:
|
||||||
|
modules = find_commands(query, limit) if query else list(PORTED_COMMANDS[:limit])
|
||||||
|
lines = [f'Command entries: {len(PORTED_COMMANDS)}', '']
|
||||||
|
if query:
|
||||||
|
lines.append(f'Filtered by: {query}')
|
||||||
|
lines.append('')
|
||||||
|
lines.extend(f'- {module.name} — {module.source_hint}' for module in modules)
|
||||||
|
return '\n'.join(lines)
|
||||||
16
src/components/__init__.py
Normal file
16
src/components/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `components` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'components.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/constants/__init__.py
Normal file
16
src/constants/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `constants` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'constants.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/context.py
Normal file
16
src/context.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class PortContext:
|
||||||
|
source_root: Path
|
||||||
|
tests_root: Path
|
||||||
|
assets_root: Path
|
||||||
|
|
||||||
|
|
||||||
|
def build_port_context(base: Path | None = None) -> PortContext:
|
||||||
|
root = base or Path(__file__).resolve().parent.parent
|
||||||
|
return PortContext(source_root=root / 'src', tests_root=root / 'tests', assets_root=root / 'assets')
|
||||||
16
src/coordinator/__init__.py
Normal file
16
src/coordinator/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `coordinator` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'coordinator.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
8
src/costHook.py
Normal file
8
src/costHook.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from .cost_tracker import CostTracker
|
||||||
|
|
||||||
|
|
||||||
|
def apply_cost_hook(tracker: CostTracker, label: str, units: int) -> CostTracker:
|
||||||
|
tracker.record(label, units)
|
||||||
|
return tracker
|
||||||
13
src/cost_tracker.py
Normal file
13
src/cost_tracker.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass, field
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class CostTracker:
|
||||||
|
total_units: int = 0
|
||||||
|
events: list[str] = field(default_factory=list)
|
||||||
|
|
||||||
|
def record(self, label: str, units: int) -> None:
|
||||||
|
self.total_units += units
|
||||||
|
self.events.append(f'{label}:{units}')
|
||||||
15
src/dialogLaunchers.py
Normal file
15
src/dialogLaunchers.py
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class DialogLauncher:
|
||||||
|
name: str
|
||||||
|
description: str
|
||||||
|
|
||||||
|
|
||||||
|
DEFAULT_DIALOGS = (
|
||||||
|
DialogLauncher('summary', 'Launch the Markdown summary view'),
|
||||||
|
DialogLauncher('parity_audit', 'Launch the parity audit view'),
|
||||||
|
)
|
||||||
16
src/entrypoints/__init__.py
Normal file
16
src/entrypoints/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `entrypoints` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'entrypoints.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
17
src/history.py
Normal file
17
src/history.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass, field
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class HistoryEvent:
|
||||||
|
title: str
|
||||||
|
detail: str
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class HistoryLog:
|
||||||
|
events: list[HistoryEvent] = field(default_factory=list)
|
||||||
|
|
||||||
|
def add(self, title: str, detail: str) -> None:
|
||||||
|
self.events.append(HistoryEvent(title=title, detail=detail))
|
||||||
16
src/hooks/__init__.py
Normal file
16
src/hooks/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `hooks` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'hooks.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
6
src/ink.py
Normal file
6
src/ink.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
|
||||||
|
def render_markdown_panel(text: str) -> str:
|
||||||
|
border = '=' * 40
|
||||||
|
return f"{border}\n{text}\n{border}"
|
||||||
5
src/interactiveHelpers.py
Normal file
5
src/interactiveHelpers.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
|
||||||
|
def bulletize(items: list[str]) -> str:
|
||||||
|
return '\n'.join(f'- {item}' for item in items)
|
||||||
16
src/keybindings/__init__.py
Normal file
16
src/keybindings/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `keybindings` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'keybindings.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
87
src/main.py
Normal file
87
src/main.py
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
from .commands import get_command, render_command_index
|
||||||
|
from .parity_audit import run_parity_audit
|
||||||
|
from .port_manifest import build_port_manifest
|
||||||
|
from .query_engine import QueryEnginePort
|
||||||
|
from .runtime import PortRuntime
|
||||||
|
from .tools import get_tool, render_tool_index
|
||||||
|
|
||||||
|
|
||||||
|
def build_parser() -> argparse.ArgumentParser:
|
||||||
|
parser = argparse.ArgumentParser(description='Python porting workspace for the Claude Code rewrite effort')
|
||||||
|
subparsers = parser.add_subparsers(dest='command', required=True)
|
||||||
|
subparsers.add_parser('summary', help='render a Markdown summary of the Python porting workspace')
|
||||||
|
subparsers.add_parser('manifest', help='print the current Python workspace manifest')
|
||||||
|
subparsers.add_parser('parity-audit', help='compare the Python workspace against the local ignored TypeScript archive when available')
|
||||||
|
list_parser = subparsers.add_parser('subsystems', help='list the current Python modules in the workspace')
|
||||||
|
list_parser.add_argument('--limit', type=int, default=32)
|
||||||
|
commands_parser = subparsers.add_parser('commands', help='list mirrored command entries from the archived snapshot')
|
||||||
|
commands_parser.add_argument('--limit', type=int, default=20)
|
||||||
|
commands_parser.add_argument('--query')
|
||||||
|
tools_parser = subparsers.add_parser('tools', help='list mirrored tool entries from the archived snapshot')
|
||||||
|
tools_parser.add_argument('--limit', type=int, default=20)
|
||||||
|
tools_parser.add_argument('--query')
|
||||||
|
route_parser = subparsers.add_parser('route', help='route a prompt across mirrored command/tool inventories')
|
||||||
|
route_parser.add_argument('prompt')
|
||||||
|
route_parser.add_argument('--limit', type=int, default=5)
|
||||||
|
show_command = subparsers.add_parser('show-command', help='show one mirrored command entry by exact name')
|
||||||
|
show_command.add_argument('name')
|
||||||
|
show_tool = subparsers.add_parser('show-tool', help='show one mirrored tool entry by exact name')
|
||||||
|
show_tool.add_argument('name')
|
||||||
|
return parser
|
||||||
|
|
||||||
|
|
||||||
|
def main(argv: list[str] | None = None) -> int:
|
||||||
|
parser = build_parser()
|
||||||
|
args = parser.parse_args(argv)
|
||||||
|
manifest = build_port_manifest()
|
||||||
|
if args.command == 'summary':
|
||||||
|
print(QueryEnginePort(manifest).render_summary())
|
||||||
|
return 0
|
||||||
|
if args.command == 'manifest':
|
||||||
|
print(manifest.to_markdown())
|
||||||
|
return 0
|
||||||
|
if args.command == 'parity-audit':
|
||||||
|
print(run_parity_audit().to_markdown())
|
||||||
|
return 0
|
||||||
|
if args.command == 'subsystems':
|
||||||
|
for subsystem in manifest.top_level_modules[: args.limit]:
|
||||||
|
print(f'{subsystem.name}\t{subsystem.file_count}\t{subsystem.notes}')
|
||||||
|
return 0
|
||||||
|
if args.command == 'commands':
|
||||||
|
print(render_command_index(limit=args.limit, query=args.query))
|
||||||
|
return 0
|
||||||
|
if args.command == 'tools':
|
||||||
|
print(render_tool_index(limit=args.limit, query=args.query))
|
||||||
|
return 0
|
||||||
|
if args.command == 'route':
|
||||||
|
matches = PortRuntime().route_prompt(args.prompt, limit=args.limit)
|
||||||
|
if not matches:
|
||||||
|
print('No mirrored command/tool matches found.')
|
||||||
|
return 0
|
||||||
|
for match in matches:
|
||||||
|
print(f'{match.kind}\t{match.name}\t{match.score}\t{match.source_hint}')
|
||||||
|
return 0
|
||||||
|
if args.command == 'show-command':
|
||||||
|
module = get_command(args.name)
|
||||||
|
if module is None:
|
||||||
|
print(f'Command not found: {args.name}')
|
||||||
|
return 1
|
||||||
|
print(f'{module.name}\n{module.source_hint}\n{module.responsibility}')
|
||||||
|
return 0
|
||||||
|
if args.command == 'show-tool':
|
||||||
|
module = get_tool(args.name)
|
||||||
|
if module is None:
|
||||||
|
print(f'Tool not found: {args.name}')
|
||||||
|
return 1
|
||||||
|
print(f'{module.name}\n{module.source_hint}\n{module.responsibility}')
|
||||||
|
return 0
|
||||||
|
parser.error(f'unknown command: {args.command}')
|
||||||
|
return 2
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
raise SystemExit(main())
|
||||||
16
src/memdir/__init__.py
Normal file
16
src/memdir/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `memdir` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'memdir.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/migrations/__init__.py
Normal file
16
src/migrations/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `migrations` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'migrations.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
31
src/models.py
Normal file
31
src/models.py
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass, field
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class Subsystem:
|
||||||
|
name: str
|
||||||
|
path: str
|
||||||
|
file_count: int
|
||||||
|
notes: str
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class PortingModule:
|
||||||
|
name: str
|
||||||
|
responsibility: str
|
||||||
|
source_hint: str
|
||||||
|
status: str = 'planned'
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class PortingBacklog:
|
||||||
|
title: str
|
||||||
|
modules: list[PortingModule] = field(default_factory=list)
|
||||||
|
|
||||||
|
def summary_lines(self) -> list[str]:
|
||||||
|
return [
|
||||||
|
f'- {module.name} [{module.status}] — {module.responsibility} (from {module.source_hint})'
|
||||||
|
for module in self.modules
|
||||||
|
]
|
||||||
16
src/moreright/__init__.py
Normal file
16
src/moreright/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `moreright` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'moreright.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/native_ts/__init__.py
Normal file
16
src/native_ts/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `native-ts` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'native_ts.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/outputStyles/__init__.py
Normal file
16
src/outputStyles/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `outputStyles` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'outputStyles.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
138
src/parity_audit.py
Normal file
138
src/parity_audit.py
Normal file
@@ -0,0 +1,138 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
ARCHIVE_ROOT = Path(__file__).resolve().parent.parent / 'archive' / 'claude_code_ts_snapshot' / 'src'
|
||||||
|
CURRENT_ROOT = Path(__file__).resolve().parent
|
||||||
|
REFERENCE_SURFACE_PATH = CURRENT_ROOT / 'reference_data' / 'archive_surface_snapshot.json'
|
||||||
|
COMMAND_SNAPSHOT_PATH = CURRENT_ROOT / 'reference_data' / 'commands_snapshot.json'
|
||||||
|
TOOL_SNAPSHOT_PATH = CURRENT_ROOT / 'reference_data' / 'tools_snapshot.json'
|
||||||
|
|
||||||
|
ARCHIVE_ROOT_FILES = {
|
||||||
|
'QueryEngine.ts': 'QueryEngine.py',
|
||||||
|
'Task.ts': 'task.py',
|
||||||
|
'Tool.ts': 'Tool.py',
|
||||||
|
'commands.ts': 'commands.py',
|
||||||
|
'context.ts': 'context.py',
|
||||||
|
'cost-tracker.ts': 'cost_tracker.py',
|
||||||
|
'costHook.ts': 'costHook.py',
|
||||||
|
'dialogLaunchers.tsx': 'dialogLaunchers.py',
|
||||||
|
'history.ts': 'history.py',
|
||||||
|
'ink.ts': 'ink.py',
|
||||||
|
'interactiveHelpers.tsx': 'interactiveHelpers.py',
|
||||||
|
'main.tsx': 'main.py',
|
||||||
|
'projectOnboardingState.ts': 'projectOnboardingState.py',
|
||||||
|
'query.ts': 'query.py',
|
||||||
|
'replLauncher.tsx': 'replLauncher.py',
|
||||||
|
'setup.ts': 'setup.py',
|
||||||
|
'tasks.ts': 'tasks.py',
|
||||||
|
'tools.ts': 'tools.py',
|
||||||
|
}
|
||||||
|
|
||||||
|
ARCHIVE_DIR_MAPPINGS = {
|
||||||
|
'assistant': 'assistant',
|
||||||
|
'bootstrap': 'bootstrap',
|
||||||
|
'bridge': 'bridge',
|
||||||
|
'buddy': 'buddy',
|
||||||
|
'cli': 'cli',
|
||||||
|
'commands': 'commands.py',
|
||||||
|
'components': 'components',
|
||||||
|
'constants': 'constants',
|
||||||
|
'context': 'context.py',
|
||||||
|
'coordinator': 'coordinator',
|
||||||
|
'entrypoints': 'entrypoints',
|
||||||
|
'hooks': 'hooks',
|
||||||
|
'ink': 'ink.py',
|
||||||
|
'keybindings': 'keybindings',
|
||||||
|
'memdir': 'memdir',
|
||||||
|
'migrations': 'migrations',
|
||||||
|
'moreright': 'moreright',
|
||||||
|
'native-ts': 'native_ts',
|
||||||
|
'outputStyles': 'outputStyles',
|
||||||
|
'plugins': 'plugins',
|
||||||
|
'query': 'query.py',
|
||||||
|
'remote': 'remote',
|
||||||
|
'schemas': 'schemas',
|
||||||
|
'screens': 'screens',
|
||||||
|
'server': 'server',
|
||||||
|
'services': 'services',
|
||||||
|
'skills': 'skills',
|
||||||
|
'state': 'state',
|
||||||
|
'tasks': 'tasks.py',
|
||||||
|
'tools': 'tools.py',
|
||||||
|
'types': 'types',
|
||||||
|
'upstreamproxy': 'upstreamproxy',
|
||||||
|
'utils': 'utils',
|
||||||
|
'vim': 'vim',
|
||||||
|
'voice': 'voice',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class ParityAuditResult:
|
||||||
|
archive_present: bool
|
||||||
|
root_file_coverage: tuple[int, int]
|
||||||
|
directory_coverage: tuple[int, int]
|
||||||
|
total_file_ratio: tuple[int, int]
|
||||||
|
command_entry_ratio: tuple[int, int]
|
||||||
|
tool_entry_ratio: tuple[int, int]
|
||||||
|
missing_root_targets: tuple[str, ...]
|
||||||
|
missing_directory_targets: tuple[str, ...]
|
||||||
|
|
||||||
|
def to_markdown(self) -> str:
|
||||||
|
lines = ['# Parity Audit']
|
||||||
|
if not self.archive_present:
|
||||||
|
lines.append('Local archive unavailable; parity audit cannot compare against the original snapshot.')
|
||||||
|
return '\n'.join(lines)
|
||||||
|
|
||||||
|
lines.extend([
|
||||||
|
'',
|
||||||
|
f'Root file coverage: **{self.root_file_coverage[0]}/{self.root_file_coverage[1]}**',
|
||||||
|
f'Directory coverage: **{self.directory_coverage[0]}/{self.directory_coverage[1]}**',
|
||||||
|
f'Total Python files vs archived TS-like files: **{self.total_file_ratio[0]}/{self.total_file_ratio[1]}**',
|
||||||
|
f'Command entry coverage: **{self.command_entry_ratio[0]}/{self.command_entry_ratio[1]}**',
|
||||||
|
f'Tool entry coverage: **{self.tool_entry_ratio[0]}/{self.tool_entry_ratio[1]}**',
|
||||||
|
'',
|
||||||
|
'Missing root targets:',
|
||||||
|
])
|
||||||
|
if self.missing_root_targets:
|
||||||
|
lines.extend(f'- {item}' for item in self.missing_root_targets)
|
||||||
|
else:
|
||||||
|
lines.append('- none')
|
||||||
|
|
||||||
|
lines.extend(['', 'Missing directory targets:'])
|
||||||
|
if self.missing_directory_targets:
|
||||||
|
lines.extend(f'- {item}' for item in self.missing_directory_targets)
|
||||||
|
else:
|
||||||
|
lines.append('- none')
|
||||||
|
return '\n'.join(lines)
|
||||||
|
|
||||||
|
|
||||||
|
def _reference_surface() -> dict[str, object]:
|
||||||
|
return json.loads(REFERENCE_SURFACE_PATH.read_text())
|
||||||
|
|
||||||
|
|
||||||
|
def _snapshot_count(path: Path) -> int:
|
||||||
|
return len(json.loads(path.read_text()))
|
||||||
|
|
||||||
|
|
||||||
|
def run_parity_audit() -> ParityAuditResult:
|
||||||
|
current_entries = {path.name for path in CURRENT_ROOT.iterdir()}
|
||||||
|
root_hits = [target for target in ARCHIVE_ROOT_FILES.values() if target in current_entries]
|
||||||
|
dir_hits = [target for target in ARCHIVE_DIR_MAPPINGS.values() if target in current_entries]
|
||||||
|
missing_roots = tuple(target for target in ARCHIVE_ROOT_FILES.values() if target not in current_entries)
|
||||||
|
missing_dirs = tuple(target for target in ARCHIVE_DIR_MAPPINGS.values() if target not in current_entries)
|
||||||
|
current_python_files = sum(1 for path in CURRENT_ROOT.rglob('*.py') if path.is_file())
|
||||||
|
reference = _reference_surface()
|
||||||
|
return ParityAuditResult(
|
||||||
|
archive_present=ARCHIVE_ROOT.exists(),
|
||||||
|
root_file_coverage=(len(root_hits), len(ARCHIVE_ROOT_FILES)),
|
||||||
|
directory_coverage=(len(dir_hits), len(ARCHIVE_DIR_MAPPINGS)),
|
||||||
|
total_file_ratio=(current_python_files, int(reference['total_ts_like_files'])),
|
||||||
|
command_entry_ratio=(_snapshot_count(COMMAND_SNAPSHOT_PATH), int(reference['command_entry_count'])),
|
||||||
|
tool_entry_ratio=(_snapshot_count(TOOL_SNAPSHOT_PATH), int(reference['tool_entry_count'])),
|
||||||
|
missing_root_targets=missing_roots,
|
||||||
|
missing_directory_targets=missing_dirs,
|
||||||
|
)
|
||||||
16
src/plugins/__init__.py
Normal file
16
src/plugins/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `plugins` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'plugins.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
52
src/port_manifest.py
Normal file
52
src/port_manifest.py
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from collections import Counter
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from .models import Subsystem
|
||||||
|
|
||||||
|
DEFAULT_SRC_ROOT = Path(__file__).resolve().parent
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class PortManifest:
|
||||||
|
src_root: Path
|
||||||
|
total_python_files: int
|
||||||
|
top_level_modules: tuple[Subsystem, ...]
|
||||||
|
|
||||||
|
def to_markdown(self) -> str:
|
||||||
|
lines = [
|
||||||
|
f'Port root: `{self.src_root}`',
|
||||||
|
f'Total Python files: **{self.total_python_files}**',
|
||||||
|
'',
|
||||||
|
'Top-level Python modules:',
|
||||||
|
]
|
||||||
|
for module in self.top_level_modules:
|
||||||
|
lines.append(f'- `{module.name}` ({module.file_count} files) — {module.notes}')
|
||||||
|
return '\n'.join(lines)
|
||||||
|
|
||||||
|
|
||||||
|
def build_port_manifest(src_root: Path | None = None) -> PortManifest:
|
||||||
|
root = src_root or DEFAULT_SRC_ROOT
|
||||||
|
files = [path for path in root.rglob('*.py') if path.is_file()]
|
||||||
|
counter = Counter(
|
||||||
|
path.relative_to(root).parts[0] if len(path.relative_to(root).parts) > 1 else path.name
|
||||||
|
for path in files
|
||||||
|
if path.name != '__pycache__'
|
||||||
|
)
|
||||||
|
notes = {
|
||||||
|
'__init__.py': 'package export surface',
|
||||||
|
'main.py': 'CLI entrypoint',
|
||||||
|
'port_manifest.py': 'workspace manifest generation',
|
||||||
|
'query_engine.py': 'port orchestration summary layer',
|
||||||
|
'commands.py': 'command backlog metadata',
|
||||||
|
'tools.py': 'tool backlog metadata',
|
||||||
|
'models.py': 'shared dataclasses',
|
||||||
|
'task.py': 'task-level planning structures',
|
||||||
|
}
|
||||||
|
modules = tuple(
|
||||||
|
Subsystem(name=name, path=f'src/{name}', file_count=count, notes=notes.get(name, 'Python port support module'))
|
||||||
|
for name, count in counter.most_common()
|
||||||
|
)
|
||||||
|
return PortManifest(src_root=root, total_python_files=len(files), top_level_modules=modules)
|
||||||
10
src/projectOnboardingState.py
Normal file
10
src/projectOnboardingState.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class ProjectOnboardingState:
|
||||||
|
has_readme: bool
|
||||||
|
has_tests: bool
|
||||||
|
python_first: bool = True
|
||||||
13
src/query.py
Normal file
13
src/query.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class QueryRequest:
|
||||||
|
prompt: str
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class QueryResponse:
|
||||||
|
text: str
|
||||||
32
src/query_engine.py
Normal file
32
src/query_engine.py
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
from .commands import PORTED_COMMANDS, build_command_backlog
|
||||||
|
from .port_manifest import PortManifest, build_port_manifest
|
||||||
|
from .tools import PORTED_TOOLS, build_tool_backlog
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass
|
||||||
|
class QueryEnginePort:
|
||||||
|
manifest: PortManifest
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_workspace(cls) -> 'QueryEnginePort':
|
||||||
|
return cls(manifest=build_port_manifest())
|
||||||
|
|
||||||
|
def render_summary(self) -> str:
|
||||||
|
command_backlog = build_command_backlog()
|
||||||
|
tool_backlog = build_tool_backlog()
|
||||||
|
sections = [
|
||||||
|
'# Python Porting Workspace Summary',
|
||||||
|
'',
|
||||||
|
self.manifest.to_markdown(),
|
||||||
|
'',
|
||||||
|
f'{command_backlog.title}: {len(PORTED_COMMANDS)} mirrored entries',
|
||||||
|
*command_backlog.summary_lines()[:10],
|
||||||
|
'',
|
||||||
|
f'{tool_backlog.title}: {len(PORTED_TOOLS)} mirrored entries',
|
||||||
|
*tool_backlog.summary_lines()[:10],
|
||||||
|
]
|
||||||
|
return '\n'.join(sections)
|
||||||
1
src/reference_data/__init__.py
Normal file
1
src/reference_data/__init__.py
Normal file
@@ -0,0 +1 @@
|
|||||||
|
"""Tracked snapshot metadata extracted from the local TypeScript archive."""
|
||||||
63
src/reference_data/archive_surface_snapshot.json
Normal file
63
src/reference_data/archive_surface_snapshot.json
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
"archive_root": "archive/claude_code_ts_snapshot/src",
|
||||||
|
"root_files": [
|
||||||
|
"QueryEngine.ts",
|
||||||
|
"Task.ts",
|
||||||
|
"Tool.ts",
|
||||||
|
"commands.ts",
|
||||||
|
"context.ts",
|
||||||
|
"cost-tracker.ts",
|
||||||
|
"costHook.ts",
|
||||||
|
"dialogLaunchers.tsx",
|
||||||
|
"history.ts",
|
||||||
|
"ink.ts",
|
||||||
|
"interactiveHelpers.tsx",
|
||||||
|
"main.tsx",
|
||||||
|
"projectOnboardingState.ts",
|
||||||
|
"query.ts",
|
||||||
|
"replLauncher.tsx",
|
||||||
|
"setup.ts",
|
||||||
|
"tasks.ts",
|
||||||
|
"tools.ts"
|
||||||
|
],
|
||||||
|
"root_dirs": [
|
||||||
|
"assistant",
|
||||||
|
"bootstrap",
|
||||||
|
"bridge",
|
||||||
|
"buddy",
|
||||||
|
"cli",
|
||||||
|
"commands",
|
||||||
|
"components",
|
||||||
|
"constants",
|
||||||
|
"context",
|
||||||
|
"coordinator",
|
||||||
|
"entrypoints",
|
||||||
|
"hooks",
|
||||||
|
"ink",
|
||||||
|
"keybindings",
|
||||||
|
"memdir",
|
||||||
|
"migrations",
|
||||||
|
"moreright",
|
||||||
|
"native-ts",
|
||||||
|
"outputStyles",
|
||||||
|
"plugins",
|
||||||
|
"query",
|
||||||
|
"remote",
|
||||||
|
"schemas",
|
||||||
|
"screens",
|
||||||
|
"server",
|
||||||
|
"services",
|
||||||
|
"skills",
|
||||||
|
"state",
|
||||||
|
"tasks",
|
||||||
|
"tools",
|
||||||
|
"types",
|
||||||
|
"upstreamproxy",
|
||||||
|
"utils",
|
||||||
|
"vim",
|
||||||
|
"voice"
|
||||||
|
],
|
||||||
|
"total_ts_like_files": 1902,
|
||||||
|
"command_entry_count": 207,
|
||||||
|
"tool_entry_count": 184
|
||||||
|
}
|
||||||
1037
src/reference_data/commands_snapshot.json
Normal file
1037
src/reference_data/commands_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
8
src/reference_data/subsystems/assistant.json
Normal file
8
src/reference_data/subsystems/assistant.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "assistant",
|
||||||
|
"package_name": "assistant",
|
||||||
|
"module_count": 1,
|
||||||
|
"sample_files": [
|
||||||
|
"assistant/sessionHistory.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
8
src/reference_data/subsystems/bootstrap.json
Normal file
8
src/reference_data/subsystems/bootstrap.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "bootstrap",
|
||||||
|
"package_name": "bootstrap",
|
||||||
|
"module_count": 1,
|
||||||
|
"sample_files": [
|
||||||
|
"bootstrap/state.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
32
src/reference_data/subsystems/bridge.json
Normal file
32
src/reference_data/subsystems/bridge.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "bridge",
|
||||||
|
"package_name": "bridge",
|
||||||
|
"module_count": 31,
|
||||||
|
"sample_files": [
|
||||||
|
"bridge/bridgeApi.ts",
|
||||||
|
"bridge/bridgeConfig.ts",
|
||||||
|
"bridge/bridgeDebug.ts",
|
||||||
|
"bridge/bridgeEnabled.ts",
|
||||||
|
"bridge/bridgeMain.ts",
|
||||||
|
"bridge/bridgeMessaging.ts",
|
||||||
|
"bridge/bridgePermissionCallbacks.ts",
|
||||||
|
"bridge/bridgePointer.ts",
|
||||||
|
"bridge/bridgeStatusUtil.ts",
|
||||||
|
"bridge/bridgeUI.ts",
|
||||||
|
"bridge/capacityWake.ts",
|
||||||
|
"bridge/codeSessionApi.ts",
|
||||||
|
"bridge/createSession.ts",
|
||||||
|
"bridge/debugUtils.ts",
|
||||||
|
"bridge/envLessBridgeConfig.ts",
|
||||||
|
"bridge/flushGate.ts",
|
||||||
|
"bridge/inboundAttachments.ts",
|
||||||
|
"bridge/inboundMessages.ts",
|
||||||
|
"bridge/initReplBridge.ts",
|
||||||
|
"bridge/jwtUtils.ts",
|
||||||
|
"bridge/pollConfig.ts",
|
||||||
|
"bridge/pollConfigDefaults.ts",
|
||||||
|
"bridge/remoteBridgeCore.ts",
|
||||||
|
"bridge/replBridge.ts",
|
||||||
|
"bridge/replBridgeHandle.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
13
src/reference_data/subsystems/buddy.json
Normal file
13
src/reference_data/subsystems/buddy.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "buddy",
|
||||||
|
"package_name": "buddy",
|
||||||
|
"module_count": 6,
|
||||||
|
"sample_files": [
|
||||||
|
"buddy/CompanionSprite.tsx",
|
||||||
|
"buddy/companion.ts",
|
||||||
|
"buddy/prompt.ts",
|
||||||
|
"buddy/sprites.ts",
|
||||||
|
"buddy/types.ts",
|
||||||
|
"buddy/useBuddyNotification.tsx"
|
||||||
|
]
|
||||||
|
}
|
||||||
26
src/reference_data/subsystems/cli.json
Normal file
26
src/reference_data/subsystems/cli.json
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "cli",
|
||||||
|
"package_name": "cli",
|
||||||
|
"module_count": 19,
|
||||||
|
"sample_files": [
|
||||||
|
"cli/exit.ts",
|
||||||
|
"cli/handlers/agents.ts",
|
||||||
|
"cli/handlers/auth.ts",
|
||||||
|
"cli/handlers/autoMode.ts",
|
||||||
|
"cli/handlers/mcp.tsx",
|
||||||
|
"cli/handlers/plugins.ts",
|
||||||
|
"cli/handlers/util.tsx",
|
||||||
|
"cli/ndjsonSafeStringify.ts",
|
||||||
|
"cli/print.ts",
|
||||||
|
"cli/remoteIO.ts",
|
||||||
|
"cli/structuredIO.ts",
|
||||||
|
"cli/transports/HybridTransport.ts",
|
||||||
|
"cli/transports/SSETransport.ts",
|
||||||
|
"cli/transports/SerialBatchEventUploader.ts",
|
||||||
|
"cli/transports/WebSocketTransport.ts",
|
||||||
|
"cli/transports/WorkerStateUploader.ts",
|
||||||
|
"cli/transports/ccrClient.ts",
|
||||||
|
"cli/transports/transportUtils.ts",
|
||||||
|
"cli/update.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
32
src/reference_data/subsystems/components.json
Normal file
32
src/reference_data/subsystems/components.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "components",
|
||||||
|
"package_name": "components",
|
||||||
|
"module_count": 389,
|
||||||
|
"sample_files": [
|
||||||
|
"components/AgentProgressLine.tsx",
|
||||||
|
"components/App.tsx",
|
||||||
|
"components/ApproveApiKey.tsx",
|
||||||
|
"components/AutoModeOptInDialog.tsx",
|
||||||
|
"components/AutoUpdater.tsx",
|
||||||
|
"components/AutoUpdaterWrapper.tsx",
|
||||||
|
"components/AwsAuthStatusBox.tsx",
|
||||||
|
"components/BaseTextInput.tsx",
|
||||||
|
"components/BashModeProgress.tsx",
|
||||||
|
"components/BridgeDialog.tsx",
|
||||||
|
"components/BypassPermissionsModeDialog.tsx",
|
||||||
|
"components/ChannelDowngradeDialog.tsx",
|
||||||
|
"components/ClaudeCodeHint/PluginHintMenu.tsx",
|
||||||
|
"components/ClaudeInChromeOnboarding.tsx",
|
||||||
|
"components/ClaudeMdExternalIncludesDialog.tsx",
|
||||||
|
"components/ClickableImageRef.tsx",
|
||||||
|
"components/CompactSummary.tsx",
|
||||||
|
"components/ConfigurableShortcutHint.tsx",
|
||||||
|
"components/ConsoleOAuthFlow.tsx",
|
||||||
|
"components/ContextSuggestions.tsx",
|
||||||
|
"components/ContextVisualization.tsx",
|
||||||
|
"components/CoordinatorAgentStatus.tsx",
|
||||||
|
"components/CostThresholdDialog.tsx",
|
||||||
|
"components/CtrlOToExpand.tsx",
|
||||||
|
"components/CustomSelect/SelectMulti.tsx"
|
||||||
|
]
|
||||||
|
}
|
||||||
28
src/reference_data/subsystems/constants.json
Normal file
28
src/reference_data/subsystems/constants.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "constants",
|
||||||
|
"package_name": "constants",
|
||||||
|
"module_count": 21,
|
||||||
|
"sample_files": [
|
||||||
|
"constants/apiLimits.ts",
|
||||||
|
"constants/betas.ts",
|
||||||
|
"constants/common.ts",
|
||||||
|
"constants/cyberRiskInstruction.ts",
|
||||||
|
"constants/errorIds.ts",
|
||||||
|
"constants/figures.ts",
|
||||||
|
"constants/files.ts",
|
||||||
|
"constants/github-app.ts",
|
||||||
|
"constants/keys.ts",
|
||||||
|
"constants/messages.ts",
|
||||||
|
"constants/oauth.ts",
|
||||||
|
"constants/outputStyles.ts",
|
||||||
|
"constants/product.ts",
|
||||||
|
"constants/prompts.ts",
|
||||||
|
"constants/spinnerVerbs.ts",
|
||||||
|
"constants/system.ts",
|
||||||
|
"constants/systemPromptSections.ts",
|
||||||
|
"constants/toolLimits.ts",
|
||||||
|
"constants/tools.ts",
|
||||||
|
"constants/turnCompletionVerbs.ts",
|
||||||
|
"constants/xml.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
8
src/reference_data/subsystems/coordinator.json
Normal file
8
src/reference_data/subsystems/coordinator.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "coordinator",
|
||||||
|
"package_name": "coordinator",
|
||||||
|
"module_count": 1,
|
||||||
|
"sample_files": [
|
||||||
|
"coordinator/coordinatorMode.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
15
src/reference_data/subsystems/entrypoints.json
Normal file
15
src/reference_data/subsystems/entrypoints.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "entrypoints",
|
||||||
|
"package_name": "entrypoints",
|
||||||
|
"module_count": 8,
|
||||||
|
"sample_files": [
|
||||||
|
"entrypoints/agentSdkTypes.ts",
|
||||||
|
"entrypoints/cli.tsx",
|
||||||
|
"entrypoints/init.ts",
|
||||||
|
"entrypoints/mcp.ts",
|
||||||
|
"entrypoints/sandboxTypes.ts",
|
||||||
|
"entrypoints/sdk/controlSchemas.ts",
|
||||||
|
"entrypoints/sdk/coreSchemas.ts",
|
||||||
|
"entrypoints/sdk/coreTypes.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
32
src/reference_data/subsystems/hooks.json
Normal file
32
src/reference_data/subsystems/hooks.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "hooks",
|
||||||
|
"package_name": "hooks",
|
||||||
|
"module_count": 104,
|
||||||
|
"sample_files": [
|
||||||
|
"hooks/fileSuggestions.ts",
|
||||||
|
"hooks/notifs/useAutoModeUnavailableNotification.ts",
|
||||||
|
"hooks/notifs/useCanSwitchToExistingSubscription.tsx",
|
||||||
|
"hooks/notifs/useDeprecationWarningNotification.tsx",
|
||||||
|
"hooks/notifs/useFastModeNotification.tsx",
|
||||||
|
"hooks/notifs/useIDEStatusIndicator.tsx",
|
||||||
|
"hooks/notifs/useInstallMessages.tsx",
|
||||||
|
"hooks/notifs/useLspInitializationNotification.tsx",
|
||||||
|
"hooks/notifs/useMcpConnectivityStatus.tsx",
|
||||||
|
"hooks/notifs/useModelMigrationNotifications.tsx",
|
||||||
|
"hooks/notifs/useNpmDeprecationNotification.tsx",
|
||||||
|
"hooks/notifs/usePluginAutoupdateNotification.tsx",
|
||||||
|
"hooks/notifs/usePluginInstallationStatus.tsx",
|
||||||
|
"hooks/notifs/useRateLimitWarningNotification.tsx",
|
||||||
|
"hooks/notifs/useSettingsErrors.tsx",
|
||||||
|
"hooks/notifs/useStartupNotification.ts",
|
||||||
|
"hooks/notifs/useTeammateShutdownNotification.ts",
|
||||||
|
"hooks/renderPlaceholder.ts",
|
||||||
|
"hooks/toolPermission/PermissionContext.ts",
|
||||||
|
"hooks/toolPermission/handlers/coordinatorHandler.ts",
|
||||||
|
"hooks/toolPermission/handlers/interactiveHandler.ts",
|
||||||
|
"hooks/toolPermission/handlers/swarmWorkerHandler.ts",
|
||||||
|
"hooks/toolPermission/permissionLogging.ts",
|
||||||
|
"hooks/unifiedSuggestions.ts",
|
||||||
|
"hooks/useAfterFirstRender.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
21
src/reference_data/subsystems/keybindings.json
Normal file
21
src/reference_data/subsystems/keybindings.json
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "keybindings",
|
||||||
|
"package_name": "keybindings",
|
||||||
|
"module_count": 14,
|
||||||
|
"sample_files": [
|
||||||
|
"keybindings/KeybindingContext.tsx",
|
||||||
|
"keybindings/KeybindingProviderSetup.tsx",
|
||||||
|
"keybindings/defaultBindings.ts",
|
||||||
|
"keybindings/loadUserBindings.ts",
|
||||||
|
"keybindings/match.ts",
|
||||||
|
"keybindings/parser.ts",
|
||||||
|
"keybindings/reservedShortcuts.ts",
|
||||||
|
"keybindings/resolver.ts",
|
||||||
|
"keybindings/schema.ts",
|
||||||
|
"keybindings/shortcutFormat.ts",
|
||||||
|
"keybindings/template.ts",
|
||||||
|
"keybindings/useKeybinding.ts",
|
||||||
|
"keybindings/useShortcutDisplay.ts",
|
||||||
|
"keybindings/validate.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
15
src/reference_data/subsystems/memdir.json
Normal file
15
src/reference_data/subsystems/memdir.json
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "memdir",
|
||||||
|
"package_name": "memdir",
|
||||||
|
"module_count": 8,
|
||||||
|
"sample_files": [
|
||||||
|
"memdir/findRelevantMemories.ts",
|
||||||
|
"memdir/memdir.ts",
|
||||||
|
"memdir/memoryAge.ts",
|
||||||
|
"memdir/memoryScan.ts",
|
||||||
|
"memdir/memoryTypes.ts",
|
||||||
|
"memdir/paths.ts",
|
||||||
|
"memdir/teamMemPaths.ts",
|
||||||
|
"memdir/teamMemPrompts.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
18
src/reference_data/subsystems/migrations.json
Normal file
18
src/reference_data/subsystems/migrations.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "migrations",
|
||||||
|
"package_name": "migrations",
|
||||||
|
"module_count": 11,
|
||||||
|
"sample_files": [
|
||||||
|
"migrations/migrateAutoUpdatesToSettings.ts",
|
||||||
|
"migrations/migrateBypassPermissionsAcceptedToSettings.ts",
|
||||||
|
"migrations/migrateEnableAllProjectMcpServersToSettings.ts",
|
||||||
|
"migrations/migrateFennecToOpus.ts",
|
||||||
|
"migrations/migrateLegacyOpusToCurrent.ts",
|
||||||
|
"migrations/migrateOpusToOpus1m.ts",
|
||||||
|
"migrations/migrateReplBridgeEnabledToRemoteControlAtStartup.ts",
|
||||||
|
"migrations/migrateSonnet1mToSonnet45.ts",
|
||||||
|
"migrations/migrateSonnet45ToSonnet46.ts",
|
||||||
|
"migrations/resetAutoModeOptInForDefaultOffer.ts",
|
||||||
|
"migrations/resetProToOpusDefault.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
8
src/reference_data/subsystems/moreright.json
Normal file
8
src/reference_data/subsystems/moreright.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "moreright",
|
||||||
|
"package_name": "moreright",
|
||||||
|
"module_count": 1,
|
||||||
|
"sample_files": [
|
||||||
|
"moreright/useMoreRight.tsx"
|
||||||
|
]
|
||||||
|
}
|
||||||
11
src/reference_data/subsystems/native_ts.json
Normal file
11
src/reference_data/subsystems/native_ts.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "native-ts",
|
||||||
|
"package_name": "native_ts",
|
||||||
|
"module_count": 4,
|
||||||
|
"sample_files": [
|
||||||
|
"native-ts/color-diff/index.ts",
|
||||||
|
"native-ts/file-index/index.ts",
|
||||||
|
"native-ts/yoga-layout/enums.ts",
|
||||||
|
"native-ts/yoga-layout/index.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
8
src/reference_data/subsystems/outputStyles.json
Normal file
8
src/reference_data/subsystems/outputStyles.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "outputStyles",
|
||||||
|
"package_name": "outputStyles",
|
||||||
|
"module_count": 1,
|
||||||
|
"sample_files": [
|
||||||
|
"outputStyles/loadOutputStylesDir.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
9
src/reference_data/subsystems/plugins.json
Normal file
9
src/reference_data/subsystems/plugins.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "plugins",
|
||||||
|
"package_name": "plugins",
|
||||||
|
"module_count": 2,
|
||||||
|
"sample_files": [
|
||||||
|
"plugins/builtinPlugins.ts",
|
||||||
|
"plugins/bundled/index.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
11
src/reference_data/subsystems/remote.json
Normal file
11
src/reference_data/subsystems/remote.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "remote",
|
||||||
|
"package_name": "remote",
|
||||||
|
"module_count": 4,
|
||||||
|
"sample_files": [
|
||||||
|
"remote/RemoteSessionManager.ts",
|
||||||
|
"remote/SessionsWebSocket.ts",
|
||||||
|
"remote/remotePermissionBridge.ts",
|
||||||
|
"remote/sdkMessageAdapter.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
8
src/reference_data/subsystems/schemas.json
Normal file
8
src/reference_data/subsystems/schemas.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "schemas",
|
||||||
|
"package_name": "schemas",
|
||||||
|
"module_count": 1,
|
||||||
|
"sample_files": [
|
||||||
|
"schemas/hooks.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
10
src/reference_data/subsystems/screens.json
Normal file
10
src/reference_data/subsystems/screens.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "screens",
|
||||||
|
"package_name": "screens",
|
||||||
|
"module_count": 3,
|
||||||
|
"sample_files": [
|
||||||
|
"screens/Doctor.tsx",
|
||||||
|
"screens/REPL.tsx",
|
||||||
|
"screens/ResumeConversation.tsx"
|
||||||
|
]
|
||||||
|
}
|
||||||
10
src/reference_data/subsystems/server.json
Normal file
10
src/reference_data/subsystems/server.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "server",
|
||||||
|
"package_name": "server",
|
||||||
|
"module_count": 3,
|
||||||
|
"sample_files": [
|
||||||
|
"server/createDirectConnectSession.ts",
|
||||||
|
"server/directConnectManager.ts",
|
||||||
|
"server/types.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
32
src/reference_data/subsystems/services.json
Normal file
32
src/reference_data/subsystems/services.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "services",
|
||||||
|
"package_name": "services",
|
||||||
|
"module_count": 130,
|
||||||
|
"sample_files": [
|
||||||
|
"services/AgentSummary/agentSummary.ts",
|
||||||
|
"services/MagicDocs/magicDocs.ts",
|
||||||
|
"services/MagicDocs/prompts.ts",
|
||||||
|
"services/PromptSuggestion/promptSuggestion.ts",
|
||||||
|
"services/PromptSuggestion/speculation.ts",
|
||||||
|
"services/SessionMemory/prompts.ts",
|
||||||
|
"services/SessionMemory/sessionMemory.ts",
|
||||||
|
"services/SessionMemory/sessionMemoryUtils.ts",
|
||||||
|
"services/analytics/config.ts",
|
||||||
|
"services/analytics/datadog.ts",
|
||||||
|
"services/analytics/firstPartyEventLogger.ts",
|
||||||
|
"services/analytics/firstPartyEventLoggingExporter.ts",
|
||||||
|
"services/analytics/growthbook.ts",
|
||||||
|
"services/analytics/index.ts",
|
||||||
|
"services/analytics/metadata.ts",
|
||||||
|
"services/analytics/sink.ts",
|
||||||
|
"services/analytics/sinkKillswitch.ts",
|
||||||
|
"services/api/adminRequests.ts",
|
||||||
|
"services/api/bootstrap.ts",
|
||||||
|
"services/api/claude.ts",
|
||||||
|
"services/api/client.ts",
|
||||||
|
"services/api/dumpPrompts.ts",
|
||||||
|
"services/api/emptyUsage.ts",
|
||||||
|
"services/api/errorUtils.ts",
|
||||||
|
"services/api/errors.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
27
src/reference_data/subsystems/skills.json
Normal file
27
src/reference_data/subsystems/skills.json
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "skills",
|
||||||
|
"package_name": "skills",
|
||||||
|
"module_count": 20,
|
||||||
|
"sample_files": [
|
||||||
|
"skills/bundled/batch.ts",
|
||||||
|
"skills/bundled/claudeApi.ts",
|
||||||
|
"skills/bundled/claudeApiContent.ts",
|
||||||
|
"skills/bundled/claudeInChrome.ts",
|
||||||
|
"skills/bundled/debug.ts",
|
||||||
|
"skills/bundled/index.ts",
|
||||||
|
"skills/bundled/keybindings.ts",
|
||||||
|
"skills/bundled/loop.ts",
|
||||||
|
"skills/bundled/loremIpsum.ts",
|
||||||
|
"skills/bundled/remember.ts",
|
||||||
|
"skills/bundled/scheduleRemoteAgents.ts",
|
||||||
|
"skills/bundled/simplify.ts",
|
||||||
|
"skills/bundled/skillify.ts",
|
||||||
|
"skills/bundled/stuck.ts",
|
||||||
|
"skills/bundled/updateConfig.ts",
|
||||||
|
"skills/bundled/verify.ts",
|
||||||
|
"skills/bundled/verifyContent.ts",
|
||||||
|
"skills/bundledSkills.ts",
|
||||||
|
"skills/loadSkillsDir.ts",
|
||||||
|
"skills/mcpSkillBuilders.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
13
src/reference_data/subsystems/state.json
Normal file
13
src/reference_data/subsystems/state.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "state",
|
||||||
|
"package_name": "state",
|
||||||
|
"module_count": 6,
|
||||||
|
"sample_files": [
|
||||||
|
"state/AppState.tsx",
|
||||||
|
"state/AppStateStore.ts",
|
||||||
|
"state/onChangeAppState.ts",
|
||||||
|
"state/selectors.ts",
|
||||||
|
"state/store.ts",
|
||||||
|
"state/teammateViewHelpers.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
18
src/reference_data/subsystems/types.json
Normal file
18
src/reference_data/subsystems/types.json
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "types",
|
||||||
|
"package_name": "types",
|
||||||
|
"module_count": 11,
|
||||||
|
"sample_files": [
|
||||||
|
"types/command.ts",
|
||||||
|
"types/generated/events_mono/claude_code/v1/claude_code_internal_event.ts",
|
||||||
|
"types/generated/events_mono/common/v1/auth.ts",
|
||||||
|
"types/generated/events_mono/growthbook/v1/growthbook_experiment_event.ts",
|
||||||
|
"types/generated/google/protobuf/timestamp.ts",
|
||||||
|
"types/hooks.ts",
|
||||||
|
"types/ids.ts",
|
||||||
|
"types/logs.ts",
|
||||||
|
"types/permissions.ts",
|
||||||
|
"types/plugin.ts",
|
||||||
|
"types/textInputTypes.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
9
src/reference_data/subsystems/upstreamproxy.json
Normal file
9
src/reference_data/subsystems/upstreamproxy.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "upstreamproxy",
|
||||||
|
"package_name": "upstreamproxy",
|
||||||
|
"module_count": 2,
|
||||||
|
"sample_files": [
|
||||||
|
"upstreamproxy/relay.ts",
|
||||||
|
"upstreamproxy/upstreamproxy.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
32
src/reference_data/subsystems/utils.json
Normal file
32
src/reference_data/subsystems/utils.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "utils",
|
||||||
|
"package_name": "utils",
|
||||||
|
"module_count": 564,
|
||||||
|
"sample_files": [
|
||||||
|
"utils/CircularBuffer.ts",
|
||||||
|
"utils/Cursor.ts",
|
||||||
|
"utils/QueryGuard.ts",
|
||||||
|
"utils/Shell.ts",
|
||||||
|
"utils/ShellCommand.ts",
|
||||||
|
"utils/abortController.ts",
|
||||||
|
"utils/activityManager.ts",
|
||||||
|
"utils/advisor.ts",
|
||||||
|
"utils/agentContext.ts",
|
||||||
|
"utils/agentId.ts",
|
||||||
|
"utils/agentSwarmsEnabled.ts",
|
||||||
|
"utils/agenticSessionSearch.ts",
|
||||||
|
"utils/analyzeContext.ts",
|
||||||
|
"utils/ansiToPng.ts",
|
||||||
|
"utils/ansiToSvg.ts",
|
||||||
|
"utils/api.ts",
|
||||||
|
"utils/apiPreconnect.ts",
|
||||||
|
"utils/appleTerminalBackup.ts",
|
||||||
|
"utils/argumentSubstitution.ts",
|
||||||
|
"utils/array.ts",
|
||||||
|
"utils/asciicast.ts",
|
||||||
|
"utils/attachments.ts",
|
||||||
|
"utils/attribution.ts",
|
||||||
|
"utils/auth.ts",
|
||||||
|
"utils/authFileDescriptor.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
12
src/reference_data/subsystems/vim.json
Normal file
12
src/reference_data/subsystems/vim.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "vim",
|
||||||
|
"package_name": "vim",
|
||||||
|
"module_count": 5,
|
||||||
|
"sample_files": [
|
||||||
|
"vim/motions.ts",
|
||||||
|
"vim/operators.ts",
|
||||||
|
"vim/textObjects.ts",
|
||||||
|
"vim/transitions.ts",
|
||||||
|
"vim/types.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
8
src/reference_data/subsystems/voice.json
Normal file
8
src/reference_data/subsystems/voice.json
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"archive_name": "voice",
|
||||||
|
"package_name": "voice",
|
||||||
|
"module_count": 1,
|
||||||
|
"sample_files": [
|
||||||
|
"voice/voiceModeEnabled.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
922
src/reference_data/tools_snapshot.json
Normal file
922
src/reference_data/tools_snapshot.json
Normal file
@@ -0,0 +1,922 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "AgentTool",
|
||||||
|
"source_hint": "tools/AgentTool/AgentTool.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/AgentTool.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/AgentTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "agentColorManager",
|
||||||
|
"source_hint": "tools/AgentTool/agentColorManager.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/agentColorManager.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "agentDisplay",
|
||||||
|
"source_hint": "tools/AgentTool/agentDisplay.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/agentDisplay.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "agentMemory",
|
||||||
|
"source_hint": "tools/AgentTool/agentMemory.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/agentMemory.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "agentMemorySnapshot",
|
||||||
|
"source_hint": "tools/AgentTool/agentMemorySnapshot.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/agentMemorySnapshot.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "agentToolUtils",
|
||||||
|
"source_hint": "tools/AgentTool/agentToolUtils.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/agentToolUtils.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "claudeCodeGuideAgent",
|
||||||
|
"source_hint": "tools/AgentTool/built-in/claudeCodeGuideAgent.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/built-in/claudeCodeGuideAgent.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "exploreAgent",
|
||||||
|
"source_hint": "tools/AgentTool/built-in/exploreAgent.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/built-in/exploreAgent.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "generalPurposeAgent",
|
||||||
|
"source_hint": "tools/AgentTool/built-in/generalPurposeAgent.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/built-in/generalPurposeAgent.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "planAgent",
|
||||||
|
"source_hint": "tools/AgentTool/built-in/planAgent.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/built-in/planAgent.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "statuslineSetup",
|
||||||
|
"source_hint": "tools/AgentTool/built-in/statuslineSetup.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/built-in/statuslineSetup.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "verificationAgent",
|
||||||
|
"source_hint": "tools/AgentTool/built-in/verificationAgent.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/built-in/verificationAgent.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "builtInAgents",
|
||||||
|
"source_hint": "tools/AgentTool/builtInAgents.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/builtInAgents.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/AgentTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "forkSubagent",
|
||||||
|
"source_hint": "tools/AgentTool/forkSubagent.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/forkSubagent.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "loadAgentsDir",
|
||||||
|
"source_hint": "tools/AgentTool/loadAgentsDir.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/loadAgentsDir.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/AgentTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "resumeAgent",
|
||||||
|
"source_hint": "tools/AgentTool/resumeAgent.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/resumeAgent.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "runAgent",
|
||||||
|
"source_hint": "tools/AgentTool/runAgent.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AgentTool/runAgent.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "AskUserQuestionTool",
|
||||||
|
"source_hint": "tools/AskUserQuestionTool/AskUserQuestionTool.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AskUserQuestionTool/AskUserQuestionTool.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/AskUserQuestionTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/AskUserQuestionTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BashTool",
|
||||||
|
"source_hint": "tools/BashTool/BashTool.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/BashTool.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BashToolResultMessage",
|
||||||
|
"source_hint": "tools/BashTool/BashToolResultMessage.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/BashToolResultMessage.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/BashTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bashCommandHelpers",
|
||||||
|
"source_hint": "tools/BashTool/bashCommandHelpers.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/bashCommandHelpers.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bashPermissions",
|
||||||
|
"source_hint": "tools/BashTool/bashPermissions.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/bashPermissions.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bashSecurity",
|
||||||
|
"source_hint": "tools/BashTool/bashSecurity.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/bashSecurity.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "commandSemantics",
|
||||||
|
"source_hint": "tools/BashTool/commandSemantics.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/commandSemantics.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "commentLabel",
|
||||||
|
"source_hint": "tools/BashTool/commentLabel.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/commentLabel.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "destructiveCommandWarning",
|
||||||
|
"source_hint": "tools/BashTool/destructiveCommandWarning.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/destructiveCommandWarning.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "modeValidation",
|
||||||
|
"source_hint": "tools/BashTool/modeValidation.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/modeValidation.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pathValidation",
|
||||||
|
"source_hint": "tools/BashTool/pathValidation.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/pathValidation.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/BashTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "readOnlyValidation",
|
||||||
|
"source_hint": "tools/BashTool/readOnlyValidation.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/readOnlyValidation.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sedEditParser",
|
||||||
|
"source_hint": "tools/BashTool/sedEditParser.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/sedEditParser.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sedValidation",
|
||||||
|
"source_hint": "tools/BashTool/sedValidation.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/sedValidation.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "shouldUseSandbox",
|
||||||
|
"source_hint": "tools/BashTool/shouldUseSandbox.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/shouldUseSandbox.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "toolName",
|
||||||
|
"source_hint": "tools/BashTool/toolName.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/toolName.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "utils",
|
||||||
|
"source_hint": "tools/BashTool/utils.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BashTool/utils.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BriefTool",
|
||||||
|
"source_hint": "tools/BriefTool/BriefTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BriefTool/BriefTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/BriefTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BriefTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "attachments",
|
||||||
|
"source_hint": "tools/BriefTool/attachments.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BriefTool/attachments.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/BriefTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BriefTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "upload",
|
||||||
|
"source_hint": "tools/BriefTool/upload.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/BriefTool/upload.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ConfigTool",
|
||||||
|
"source_hint": "tools/ConfigTool/ConfigTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ConfigTool/ConfigTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/ConfigTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ConfigTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/ConfigTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ConfigTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/ConfigTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ConfigTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "supportedSettings",
|
||||||
|
"source_hint": "tools/ConfigTool/supportedSettings.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ConfigTool/supportedSettings.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EnterPlanModeTool",
|
||||||
|
"source_hint": "tools/EnterPlanModeTool/EnterPlanModeTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/EnterPlanModeTool/EnterPlanModeTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/EnterPlanModeTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/EnterPlanModeTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/EnterPlanModeTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/EnterPlanModeTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/EnterPlanModeTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/EnterPlanModeTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "EnterWorktreeTool",
|
||||||
|
"source_hint": "tools/EnterWorktreeTool/EnterWorktreeTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/EnterWorktreeTool/EnterWorktreeTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/EnterWorktreeTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/EnterWorktreeTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/EnterWorktreeTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/EnterWorktreeTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/EnterWorktreeTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/EnterWorktreeTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ExitPlanModeV2Tool",
|
||||||
|
"source_hint": "tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ExitPlanModeTool/ExitPlanModeV2Tool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/ExitPlanModeTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ExitPlanModeTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/ExitPlanModeTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ExitPlanModeTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/ExitPlanModeTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ExitPlanModeTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ExitWorktreeTool",
|
||||||
|
"source_hint": "tools/ExitWorktreeTool/ExitWorktreeTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ExitWorktreeTool/ExitWorktreeTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/ExitWorktreeTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ExitWorktreeTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/ExitWorktreeTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ExitWorktreeTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/ExitWorktreeTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ExitWorktreeTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "FileEditTool",
|
||||||
|
"source_hint": "tools/FileEditTool/FileEditTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileEditTool/FileEditTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/FileEditTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileEditTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/FileEditTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileEditTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/FileEditTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileEditTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "types",
|
||||||
|
"source_hint": "tools/FileEditTool/types.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileEditTool/types.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "utils",
|
||||||
|
"source_hint": "tools/FileEditTool/utils.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileEditTool/utils.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "FileReadTool",
|
||||||
|
"source_hint": "tools/FileReadTool/FileReadTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileReadTool/FileReadTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/FileReadTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileReadTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "imageProcessor",
|
||||||
|
"source_hint": "tools/FileReadTool/imageProcessor.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileReadTool/imageProcessor.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "limits",
|
||||||
|
"source_hint": "tools/FileReadTool/limits.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileReadTool/limits.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/FileReadTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileReadTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "FileWriteTool",
|
||||||
|
"source_hint": "tools/FileWriteTool/FileWriteTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileWriteTool/FileWriteTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/FileWriteTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileWriteTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/FileWriteTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/FileWriteTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GlobTool",
|
||||||
|
"source_hint": "tools/GlobTool/GlobTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/GlobTool/GlobTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/GlobTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/GlobTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/GlobTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/GlobTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GrepTool",
|
||||||
|
"source_hint": "tools/GrepTool/GrepTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/GrepTool/GrepTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/GrepTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/GrepTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/GrepTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/GrepTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "LSPTool",
|
||||||
|
"source_hint": "tools/LSPTool/LSPTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/LSPTool/LSPTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/LSPTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/LSPTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "formatters",
|
||||||
|
"source_hint": "tools/LSPTool/formatters.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/LSPTool/formatters.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/LSPTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/LSPTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "schemas",
|
||||||
|
"source_hint": "tools/LSPTool/schemas.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/LSPTool/schemas.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symbolContext",
|
||||||
|
"source_hint": "tools/LSPTool/symbolContext.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/LSPTool/symbolContext.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ListMcpResourcesTool",
|
||||||
|
"source_hint": "tools/ListMcpResourcesTool/ListMcpResourcesTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ListMcpResourcesTool/ListMcpResourcesTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/ListMcpResourcesTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ListMcpResourcesTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/ListMcpResourcesTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ListMcpResourcesTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "MCPTool",
|
||||||
|
"source_hint": "tools/MCPTool/MCPTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/MCPTool/MCPTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/MCPTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/MCPTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "classifyForCollapse",
|
||||||
|
"source_hint": "tools/MCPTool/classifyForCollapse.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/MCPTool/classifyForCollapse.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/MCPTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/MCPTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "McpAuthTool",
|
||||||
|
"source_hint": "tools/McpAuthTool/McpAuthTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/McpAuthTool/McpAuthTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NotebookEditTool",
|
||||||
|
"source_hint": "tools/NotebookEditTool/NotebookEditTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/NotebookEditTool/NotebookEditTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/NotebookEditTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/NotebookEditTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/NotebookEditTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/NotebookEditTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/NotebookEditTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/NotebookEditTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "PowerShellTool",
|
||||||
|
"source_hint": "tools/PowerShellTool/PowerShellTool.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/PowerShellTool.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/PowerShellTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clmTypes",
|
||||||
|
"source_hint": "tools/PowerShellTool/clmTypes.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/clmTypes.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "commandSemantics",
|
||||||
|
"source_hint": "tools/PowerShellTool/commandSemantics.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/commandSemantics.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "commonParameters",
|
||||||
|
"source_hint": "tools/PowerShellTool/commonParameters.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/commonParameters.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "destructiveCommandWarning",
|
||||||
|
"source_hint": "tools/PowerShellTool/destructiveCommandWarning.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/destructiveCommandWarning.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gitSafety",
|
||||||
|
"source_hint": "tools/PowerShellTool/gitSafety.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/gitSafety.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "modeValidation",
|
||||||
|
"source_hint": "tools/PowerShellTool/modeValidation.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/modeValidation.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pathValidation",
|
||||||
|
"source_hint": "tools/PowerShellTool/pathValidation.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/pathValidation.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "powershellPermissions",
|
||||||
|
"source_hint": "tools/PowerShellTool/powershellPermissions.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/powershellPermissions.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "powershellSecurity",
|
||||||
|
"source_hint": "tools/PowerShellTool/powershellSecurity.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/powershellSecurity.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/PowerShellTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "readOnlyValidation",
|
||||||
|
"source_hint": "tools/PowerShellTool/readOnlyValidation.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/readOnlyValidation.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "toolName",
|
||||||
|
"source_hint": "tools/PowerShellTool/toolName.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/PowerShellTool/toolName.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/REPLTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/REPLTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "primitiveTools",
|
||||||
|
"source_hint": "tools/REPLTool/primitiveTools.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/REPLTool/primitiveTools.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ReadMcpResourceTool",
|
||||||
|
"source_hint": "tools/ReadMcpResourceTool/ReadMcpResourceTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ReadMcpResourceTool/ReadMcpResourceTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/ReadMcpResourceTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ReadMcpResourceTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/ReadMcpResourceTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ReadMcpResourceTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "RemoteTriggerTool",
|
||||||
|
"source_hint": "tools/RemoteTriggerTool/RemoteTriggerTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/RemoteTriggerTool/RemoteTriggerTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/RemoteTriggerTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/RemoteTriggerTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/RemoteTriggerTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/RemoteTriggerTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CronCreateTool",
|
||||||
|
"source_hint": "tools/ScheduleCronTool/CronCreateTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ScheduleCronTool/CronCreateTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CronDeleteTool",
|
||||||
|
"source_hint": "tools/ScheduleCronTool/CronDeleteTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ScheduleCronTool/CronDeleteTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CronListTool",
|
||||||
|
"source_hint": "tools/ScheduleCronTool/CronListTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ScheduleCronTool/CronListTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/ScheduleCronTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ScheduleCronTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/ScheduleCronTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ScheduleCronTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SendMessageTool",
|
||||||
|
"source_hint": "tools/SendMessageTool/SendMessageTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/SendMessageTool/SendMessageTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/SendMessageTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/SendMessageTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/SendMessageTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/SendMessageTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/SendMessageTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/SendMessageTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SkillTool",
|
||||||
|
"source_hint": "tools/SkillTool/SkillTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/SkillTool/SkillTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/SkillTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/SkillTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/SkillTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/SkillTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/SkillTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/SkillTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/SleepTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/SleepTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SyntheticOutputTool",
|
||||||
|
"source_hint": "tools/SyntheticOutputTool/SyntheticOutputTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/SyntheticOutputTool/SyntheticOutputTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TaskCreateTool",
|
||||||
|
"source_hint": "tools/TaskCreateTool/TaskCreateTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskCreateTool/TaskCreateTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/TaskCreateTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskCreateTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/TaskCreateTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskCreateTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TaskGetTool",
|
||||||
|
"source_hint": "tools/TaskGetTool/TaskGetTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskGetTool/TaskGetTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/TaskGetTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskGetTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/TaskGetTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskGetTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TaskListTool",
|
||||||
|
"source_hint": "tools/TaskListTool/TaskListTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskListTool/TaskListTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/TaskListTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskListTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/TaskListTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskListTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TaskOutputTool",
|
||||||
|
"source_hint": "tools/TaskOutputTool/TaskOutputTool.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskOutputTool/TaskOutputTool.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/TaskOutputTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskOutputTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TaskStopTool",
|
||||||
|
"source_hint": "tools/TaskStopTool/TaskStopTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskStopTool/TaskStopTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/TaskStopTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskStopTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/TaskStopTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskStopTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TaskUpdateTool",
|
||||||
|
"source_hint": "tools/TaskUpdateTool/TaskUpdateTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskUpdateTool/TaskUpdateTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/TaskUpdateTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskUpdateTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/TaskUpdateTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TaskUpdateTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TeamCreateTool",
|
||||||
|
"source_hint": "tools/TeamCreateTool/TeamCreateTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TeamCreateTool/TeamCreateTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/TeamCreateTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TeamCreateTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/TeamCreateTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TeamCreateTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/TeamCreateTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TeamCreateTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TeamDeleteTool",
|
||||||
|
"source_hint": "tools/TeamDeleteTool/TeamDeleteTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TeamDeleteTool/TeamDeleteTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/TeamDeleteTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TeamDeleteTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/TeamDeleteTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TeamDeleteTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/TeamDeleteTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TeamDeleteTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TodoWriteTool",
|
||||||
|
"source_hint": "tools/TodoWriteTool/TodoWriteTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TodoWriteTool/TodoWriteTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/TodoWriteTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TodoWriteTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/TodoWriteTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/TodoWriteTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ToolSearchTool",
|
||||||
|
"source_hint": "tools/ToolSearchTool/ToolSearchTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ToolSearchTool/ToolSearchTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "constants",
|
||||||
|
"source_hint": "tools/ToolSearchTool/constants.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ToolSearchTool/constants.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/ToolSearchTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/ToolSearchTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/WebFetchTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/WebFetchTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WebFetchTool",
|
||||||
|
"source_hint": "tools/WebFetchTool/WebFetchTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/WebFetchTool/WebFetchTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "preapproved",
|
||||||
|
"source_hint": "tools/WebFetchTool/preapproved.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/WebFetchTool/preapproved.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/WebFetchTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/WebFetchTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "utils",
|
||||||
|
"source_hint": "tools/WebFetchTool/utils.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/WebFetchTool/utils.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UI",
|
||||||
|
"source_hint": "tools/WebSearchTool/UI.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/WebSearchTool/UI.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "WebSearchTool",
|
||||||
|
"source_hint": "tools/WebSearchTool/WebSearchTool.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/WebSearchTool/WebSearchTool.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "prompt",
|
||||||
|
"source_hint": "tools/WebSearchTool/prompt.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/WebSearchTool/prompt.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "gitOperationTracking",
|
||||||
|
"source_hint": "tools/shared/gitOperationTracking.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/shared/gitOperationTracking.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "spawnMultiAgent",
|
||||||
|
"source_hint": "tools/shared/spawnMultiAgent.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/shared/spawnMultiAgent.ts"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TestingPermissionTool",
|
||||||
|
"source_hint": "tools/testing/TestingPermissionTool.tsx",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/testing/TestingPermissionTool.tsx"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "utils",
|
||||||
|
"source_hint": "tools/utils.ts",
|
||||||
|
"responsibility": "Tool module mirrored from archived TypeScript path tools/utils.ts"
|
||||||
|
}
|
||||||
|
]
|
||||||
16
src/remote/__init__.py
Normal file
16
src/remote/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `remote` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'remote.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
5
src/replLauncher.py
Normal file
5
src/replLauncher.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
|
||||||
|
def build_repl_banner() -> str:
|
||||||
|
return 'Python porting REPL is not interactive yet; use `python3 -m src.main summary` instead.'
|
||||||
55
src/runtime.py
Normal file
55
src/runtime.py
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
from .commands import PORTED_COMMANDS
|
||||||
|
from .tools import PORTED_TOOLS
|
||||||
|
from .models import PortingModule
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class RoutedMatch:
|
||||||
|
kind: str
|
||||||
|
name: str
|
||||||
|
source_hint: str
|
||||||
|
score: int
|
||||||
|
|
||||||
|
|
||||||
|
class PortRuntime:
|
||||||
|
def route_prompt(self, prompt: str, limit: int = 5) -> list[RoutedMatch]:
|
||||||
|
tokens = {token.lower() for token in prompt.replace('/', ' ').replace('-', ' ').split() if token}
|
||||||
|
by_kind = {
|
||||||
|
'command': self._collect_matches(tokens, PORTED_COMMANDS, 'command'),
|
||||||
|
'tool': self._collect_matches(tokens, PORTED_TOOLS, 'tool'),
|
||||||
|
}
|
||||||
|
|
||||||
|
selected: list[RoutedMatch] = []
|
||||||
|
# Prefer at least one representative from each kind when available.
|
||||||
|
for kind in ('command', 'tool'):
|
||||||
|
if by_kind[kind]:
|
||||||
|
selected.append(by_kind[kind].pop(0))
|
||||||
|
|
||||||
|
leftovers = sorted(
|
||||||
|
[match for matches in by_kind.values() for match in matches],
|
||||||
|
key=lambda item: (-item.score, item.kind, item.name),
|
||||||
|
)
|
||||||
|
selected.extend(leftovers[: max(0, limit - len(selected))])
|
||||||
|
return selected[:limit]
|
||||||
|
|
||||||
|
def _collect_matches(self, tokens: set[str], modules: tuple[PortingModule, ...], kind: str) -> list[RoutedMatch]:
|
||||||
|
matches: list[RoutedMatch] = []
|
||||||
|
for module in modules:
|
||||||
|
score = self._score(tokens, module)
|
||||||
|
if score > 0:
|
||||||
|
matches.append(RoutedMatch(kind=kind, name=module.name, source_hint=module.source_hint, score=score))
|
||||||
|
matches.sort(key=lambda item: (-item.score, item.name))
|
||||||
|
return matches
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _score(tokens: set[str], module: PortingModule) -> int:
|
||||||
|
haystacks = [module.name.lower(), module.source_hint.lower(), module.responsibility.lower()]
|
||||||
|
score = 0
|
||||||
|
for token in tokens:
|
||||||
|
if any(token in haystack for haystack in haystacks):
|
||||||
|
score += 1
|
||||||
|
return score
|
||||||
16
src/schemas/__init__.py
Normal file
16
src/schemas/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `schemas` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'schemas.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/screens/__init__.py
Normal file
16
src/screens/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `screens` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'screens.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/server/__init__.py
Normal file
16
src/server/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `server` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'server.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/services/__init__.py
Normal file
16
src/services/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `services` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'services.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
9
src/setup.py
Normal file
9
src/setup.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from dataclasses import dataclass
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class WorkspaceSetup:
|
||||||
|
python_version: str = '3.13+'
|
||||||
|
test_command: str = 'python3 -m unittest discover -s tests -v'
|
||||||
16
src/skills/__init__.py
Normal file
16
src/skills/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `skills` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'skills.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/state/__init__.py
Normal file
16
src/state/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `state` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'state.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
5
src/task.py
Normal file
5
src/task.py
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from .task import PortingTask
|
||||||
|
|
||||||
|
__all__ = ['PortingTask']
|
||||||
11
src/tasks.py
Normal file
11
src/tasks.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from .task import PortingTask
|
||||||
|
|
||||||
|
|
||||||
|
def default_tasks() -> list[PortingTask]:
|
||||||
|
return [
|
||||||
|
PortingTask('root-module-parity', 'Mirror the root module surface of the archived snapshot'),
|
||||||
|
PortingTask('directory-parity', 'Mirror top-level subsystem names as Python packages'),
|
||||||
|
PortingTask('parity-audit', 'Continuously measure parity against the local archive'),
|
||||||
|
]
|
||||||
58
src/tools.py
Normal file
58
src/tools.py
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from functools import lru_cache
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
from .models import PortingBacklog, PortingModule
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent / 'reference_data' / 'tools_snapshot.json'
|
||||||
|
|
||||||
|
|
||||||
|
@lru_cache(maxsize=1)
|
||||||
|
def load_tool_snapshot() -> tuple[PortingModule, ...]:
|
||||||
|
raw_entries = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
return tuple(
|
||||||
|
PortingModule(
|
||||||
|
name=entry['name'],
|
||||||
|
responsibility=entry['responsibility'],
|
||||||
|
source_hint=entry['source_hint'],
|
||||||
|
status='mirrored',
|
||||||
|
)
|
||||||
|
for entry in raw_entries
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
PORTED_TOOLS = load_tool_snapshot()
|
||||||
|
|
||||||
|
|
||||||
|
def build_tool_backlog() -> PortingBacklog:
|
||||||
|
return PortingBacklog(title='Tool surface', modules=list(PORTED_TOOLS))
|
||||||
|
|
||||||
|
|
||||||
|
def tool_names() -> list[str]:
|
||||||
|
return [module.name for module in PORTED_TOOLS]
|
||||||
|
|
||||||
|
|
||||||
|
def get_tool(name: str) -> PortingModule | None:
|
||||||
|
needle = name.lower()
|
||||||
|
for module in PORTED_TOOLS:
|
||||||
|
if module.name.lower() == needle:
|
||||||
|
return module
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def find_tools(query: str, limit: int = 20) -> list[PortingModule]:
|
||||||
|
needle = query.lower()
|
||||||
|
matches = [module for module in PORTED_TOOLS if needle in module.name.lower() or needle in module.source_hint.lower()]
|
||||||
|
return matches[:limit]
|
||||||
|
|
||||||
|
|
||||||
|
def render_tool_index(limit: int = 20, query: str | None = None) -> str:
|
||||||
|
modules = find_tools(query, limit) if query else list(PORTED_TOOLS[:limit])
|
||||||
|
lines = [f'Tool entries: {len(PORTED_TOOLS)}', '']
|
||||||
|
if query:
|
||||||
|
lines.append(f'Filtered by: {query}')
|
||||||
|
lines.append('')
|
||||||
|
lines.extend(f'- {module.name} — {module.source_hint}' for module in modules)
|
||||||
|
return '\n'.join(lines)
|
||||||
16
src/types/__init__.py
Normal file
16
src/types/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `types` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'types.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/upstreamproxy/__init__.py
Normal file
16
src/upstreamproxy/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `upstreamproxy` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'upstreamproxy.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/utils/__init__.py
Normal file
16
src/utils/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `utils` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'utils.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/vim/__init__.py
Normal file
16
src/vim/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `vim` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'vim.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
16
src/voice/__init__.py
Normal file
16
src/voice/__init__.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
"""Python package placeholder for the archived `voice` subsystem."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
SNAPSHOT_PATH = Path(__file__).resolve().parent.parent / 'reference_data' / 'subsystems' / 'voice.json'
|
||||||
|
_SNAPSHOT = json.loads(SNAPSHOT_PATH.read_text())
|
||||||
|
|
||||||
|
ARCHIVE_NAME = _SNAPSHOT['archive_name']
|
||||||
|
MODULE_COUNT = _SNAPSHOT['module_count']
|
||||||
|
SAMPLE_FILES = tuple(_SNAPSHOT['sample_files'])
|
||||||
|
PORTING_NOTE = f"Python placeholder package for '{ARCHIVE_NAME}' with {MODULE_COUNT} archived module references."
|
||||||
|
|
||||||
|
__all__ = ['ARCHIVE_NAME', 'MODULE_COUNT', 'PORTING_NOTE', 'SAMPLE_FILES']
|
||||||
105
tests/test_porting_workspace.py
Normal file
105
tests/test_porting_workspace.py
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
from src.commands import PORTED_COMMANDS
|
||||||
|
from src.parity_audit import run_parity_audit
|
||||||
|
from src.port_manifest import build_port_manifest
|
||||||
|
from src.query_engine import QueryEnginePort
|
||||||
|
from src.tools import PORTED_TOOLS
|
||||||
|
|
||||||
|
|
||||||
|
class PortingWorkspaceTests(unittest.TestCase):
|
||||||
|
def test_manifest_counts_python_files(self) -> None:
|
||||||
|
manifest = build_port_manifest()
|
||||||
|
self.assertGreaterEqual(manifest.total_python_files, 20)
|
||||||
|
self.assertTrue(manifest.top_level_modules)
|
||||||
|
|
||||||
|
def test_query_engine_summary_mentions_workspace(self) -> None:
|
||||||
|
summary = QueryEnginePort.from_workspace().render_summary()
|
||||||
|
self.assertIn('Python Porting Workspace Summary', summary)
|
||||||
|
self.assertIn('Command surface:', summary)
|
||||||
|
self.assertIn('Tool surface:', summary)
|
||||||
|
|
||||||
|
def test_cli_summary_runs(self) -> None:
|
||||||
|
result = subprocess.run(
|
||||||
|
[sys.executable, '-m', 'src.main', 'summary'],
|
||||||
|
check=True,
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
self.assertIn('Python Porting Workspace Summary', result.stdout)
|
||||||
|
|
||||||
|
def test_parity_audit_runs(self) -> None:
|
||||||
|
result = subprocess.run(
|
||||||
|
[sys.executable, '-m', 'src.main', 'parity-audit'],
|
||||||
|
check=True,
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
self.assertIn('Parity Audit', result.stdout)
|
||||||
|
|
||||||
|
def test_root_file_coverage_is_complete_when_local_archive_exists(self) -> None:
|
||||||
|
audit = run_parity_audit()
|
||||||
|
if audit.archive_present:
|
||||||
|
self.assertEqual(audit.root_file_coverage[0], audit.root_file_coverage[1])
|
||||||
|
self.assertGreaterEqual(audit.directory_coverage[0], 28)
|
||||||
|
self.assertGreaterEqual(audit.command_entry_ratio[0], 150)
|
||||||
|
self.assertGreaterEqual(audit.tool_entry_ratio[0], 100)
|
||||||
|
|
||||||
|
def test_command_and_tool_snapshots_are_nontrivial(self) -> None:
|
||||||
|
self.assertGreaterEqual(len(PORTED_COMMANDS), 150)
|
||||||
|
self.assertGreaterEqual(len(PORTED_TOOLS), 100)
|
||||||
|
|
||||||
|
def test_commands_and_tools_cli_run(self) -> None:
|
||||||
|
commands_result = subprocess.run(
|
||||||
|
[sys.executable, '-m', 'src.main', 'commands', '--limit', '5', '--query', 'review'],
|
||||||
|
check=True,
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
tools_result = subprocess.run(
|
||||||
|
[sys.executable, '-m', 'src.main', 'tools', '--limit', '5', '--query', 'MCP'],
|
||||||
|
check=True,
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
self.assertIn('Command entries:', commands_result.stdout)
|
||||||
|
self.assertIn('Tool entries:', tools_result.stdout)
|
||||||
|
|
||||||
|
def test_subsystem_packages_expose_archive_metadata(self) -> None:
|
||||||
|
from src import assistant, bridge, utils
|
||||||
|
|
||||||
|
self.assertGreater(assistant.MODULE_COUNT, 0)
|
||||||
|
self.assertGreater(bridge.MODULE_COUNT, 0)
|
||||||
|
self.assertGreater(utils.MODULE_COUNT, 100)
|
||||||
|
self.assertTrue(utils.SAMPLE_FILES)
|
||||||
|
|
||||||
|
def test_route_and_show_entry_cli_run(self) -> None:
|
||||||
|
route_result = subprocess.run(
|
||||||
|
[sys.executable, '-m', 'src.main', 'route', 'review MCP tool', '--limit', '5'],
|
||||||
|
check=True,
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
show_command = subprocess.run(
|
||||||
|
[sys.executable, '-m', 'src.main', 'show-command', 'review'],
|
||||||
|
check=True,
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
show_tool = subprocess.run(
|
||||||
|
[sys.executable, '-m', 'src.main', 'show-tool', 'MCPTool'],
|
||||||
|
check=True,
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
self.assertIn('review', route_result.stdout.lower())
|
||||||
|
self.assertIn('review', show_command.stdout.lower())
|
||||||
|
self.assertIn('mcptool', show_tool.stdout.lower())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main()
|
||||||
Reference in New Issue
Block a user