fcontext 1.0.1__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fcontext-1.0.1 → fcontext-1.0.2}/PKG-INFO +4 -3
- {fcontext-1.0.1 → fcontext-1.0.2}/README.md +3 -2
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext/cli.py +3 -3
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext/init.py +8 -2
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext.egg-info/PKG-INFO +4 -3
- {fcontext-1.0.1 → fcontext-1.0.2}/pyproject.toml +1 -1
- {fcontext-1.0.1 → fcontext-1.0.2}/tests/test_enable.py +14 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/tests/test_index.py +36 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/LICENSE +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext/__init__.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext/experience.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext/indexer.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext/requirements.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext/topics.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext/workspace_map.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext.egg-info/SOURCES.txt +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext.egg-info/dependency_links.txt +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext.egg-info/entry_points.txt +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext.egg-info/requires.txt +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/fcontext.egg-info/top_level.txt +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/setup.cfg +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/tests/conftest.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/tests/test_cli.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/tests/test_experience.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/tests/test_init.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/tests/test_req.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/tests/test_reset.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/tests/test_topic.py +0 -0
- {fcontext-1.0.1 → fcontext-1.0.2}/tests/test_workspace_map.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fcontext
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Context continuity across AI agents & sessions. Team knowledge collaboration. Industrial-grade AI delivery.
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Requires-Python: >=3.9
|
|
@@ -18,7 +18,7 @@ Dynamic: license-file
|
|
|
18
18
|
[](https://pypi.org/project/fcontext/)
|
|
19
19
|
[](https://pypi.org/project/fcontext/)
|
|
20
20
|
[](LICENSE)
|
|
21
|
-
[](#supported-agents)
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -96,6 +96,7 @@ In production environments, context is fragmented: requirements live in document
|
|
|
96
96
|
| Claude Code | `fcontext enable claude` | `.claude/rules/*.md` |
|
|
97
97
|
| Cursor | `fcontext enable cursor` | `.cursor/rules/*.md` |
|
|
98
98
|
| Trae | `fcontext enable trae` | `.trae/rules/*.md` |
|
|
99
|
+
| Qwen-Code | `fcontext enable qwen` | `.qwen/rules/*.md` |
|
|
99
100
|
| OpenCode | `fcontext enable opencode` | Uses Claude format |
|
|
100
101
|
| OpenClaw | `fcontext enable openclaw` | `skills/` only |
|
|
101
102
|
|
|
@@ -131,7 +132,7 @@ cd your-project
|
|
|
131
132
|
fcontext init
|
|
132
133
|
|
|
133
134
|
# 2. Activate your AI agent
|
|
134
|
-
fcontext enable copilot # or: claude, cursor, trae, opencode, openclaw
|
|
135
|
+
fcontext enable copilot # or: claude, cursor, trae, qwen, opencode, openclaw
|
|
135
136
|
|
|
136
137
|
# 3. Index your documents
|
|
137
138
|
fcontext index docs/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://pypi.org/project/fcontext/)
|
|
6
6
|
[](https://pypi.org/project/fcontext/)
|
|
7
7
|
[](LICENSE)
|
|
8
|
-
[](#supported-agents)
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -83,6 +83,7 @@ In production environments, context is fragmented: requirements live in document
|
|
|
83
83
|
| Claude Code | `fcontext enable claude` | `.claude/rules/*.md` |
|
|
84
84
|
| Cursor | `fcontext enable cursor` | `.cursor/rules/*.md` |
|
|
85
85
|
| Trae | `fcontext enable trae` | `.trae/rules/*.md` |
|
|
86
|
+
| Qwen-Code | `fcontext enable qwen` | `.qwen/rules/*.md` |
|
|
86
87
|
| OpenCode | `fcontext enable opencode` | Uses Claude format |
|
|
87
88
|
| OpenClaw | `fcontext enable openclaw` | `skills/` only |
|
|
88
89
|
|
|
@@ -118,7 +119,7 @@ cd your-project
|
|
|
118
119
|
fcontext init
|
|
119
120
|
|
|
120
121
|
# 2. Activate your AI agent
|
|
121
|
-
fcontext enable copilot # or: claude, cursor, trae, opencode, openclaw
|
|
122
|
+
fcontext enable copilot # or: claude, cursor, trae, qwen, opencode, openclaw
|
|
122
123
|
|
|
123
124
|
# 3. Index your documents
|
|
124
125
|
fcontext index docs/
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
Usage:
|
|
5
5
|
fcontext init Initialize .fcontext/ in current workspace
|
|
6
|
-
fcontext enable <agent> Activate an AI agent (copilot/claude/cursor/trae/opencode/openclaw)
|
|
6
|
+
fcontext enable <agent> Activate an AI agent (copilot/claude/cursor/trae/qwen/opencode/openclaw)
|
|
7
7
|
fcontext index Scan & convert binary files to Markdown
|
|
8
8
|
fcontext status Show index statistics
|
|
9
9
|
fcontext clean Clear all cached files and reset index
|
|
@@ -281,8 +281,8 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
281
281
|
p_init.set_defaults(func=cmd_init)
|
|
282
282
|
|
|
283
283
|
# --- enable ---
|
|
284
|
-
p_enable = sub.add_parser("enable", help="Activate an AI agent (copilot/claude/cursor/trae/opencode/openclaw)")
|
|
285
|
-
p_enable.add_argument("agent", help="Agent name: copilot, claude, cursor, trae, opencode, openclaw (or 'list' to show status)")
|
|
284
|
+
p_enable = sub.add_parser("enable", help="Activate an AI agent (copilot/claude/cursor/trae/qwen/opencode/openclaw)")
|
|
285
|
+
p_enable.add_argument("agent", help="Agent name: copilot, claude, cursor, trae, qwen, opencode, openclaw (or 'list' to show status)")
|
|
286
286
|
p_enable.add_argument("-f", "--force", action="store_true", help="Overwrite existing agent config")
|
|
287
287
|
p_enable.set_defaults(func=cmd_enable)
|
|
288
288
|
|
|
@@ -119,7 +119,7 @@ After gaining significant new understanding about the project (domain concepts,
|
|
|
119
119
|
|
|
120
120
|
```
|
|
121
121
|
fcontext init # initialize .fcontext/
|
|
122
|
-
fcontext enable <agent> # activate agent (copilot/claude/cursor/trae/opencode)
|
|
122
|
+
fcontext enable <agent> # activate agent (copilot/claude/cursor/trae/qwen/opencode)
|
|
123
123
|
fcontext status # index statistics
|
|
124
124
|
fcontext clean # clear cache
|
|
125
125
|
fcontext reset # delete all .fcontext/ data
|
|
@@ -261,6 +261,7 @@ fcontext topic clean # remove empty topic files
|
|
|
261
261
|
# Claude → .claude/rules/fcontext.md + .claude/skills/*/SKILL.md
|
|
262
262
|
# Cursor → .cursor/rules/fcontext.md + .cursor/skills/*/SKILL.md
|
|
263
263
|
# Trae → .trae/rules/fcontext.md + .trae/skills/*/SKILL.md
|
|
264
|
+
# Qwen-Code→ .qwen/rules/fcontext.md + .qwen/skills/*/SKILL.md
|
|
264
265
|
# OpenCode → alias for claude (.claude/)
|
|
265
266
|
# OpenClaw → skills/ only (no rules, personal AI assistant)
|
|
266
267
|
|
|
@@ -324,7 +325,7 @@ Always check these BEFORE searching source files:
|
|
|
324
325
|
- **NEVER modify** anything under `_experiences/` — it is read-only imported knowledge
|
|
325
326
|
"""
|
|
326
327
|
|
|
327
|
-
# Rules content for agents that use a rules/ directory (claude, cursor, trae).
|
|
328
|
+
# Rules content for agents that use a rules/ directory (claude, cursor, trae, qwen).
|
|
328
329
|
# Same content as COPILOT_INSTRUCTIONS but without the YAML frontmatter wrapper.
|
|
329
330
|
AGENT_RULES_BODY = """# fcontext
|
|
330
331
|
|
|
@@ -399,6 +400,11 @@ AGENT_CONFIGS = {
|
|
|
399
400
|
"skills_dir": ".trae/skills",
|
|
400
401
|
"detect": ".trae",
|
|
401
402
|
},
|
|
403
|
+
"qwen": {
|
|
404
|
+
"rules_path": ".qwen/rules/fcontext.md",
|
|
405
|
+
"skills_dir": ".qwen/skills",
|
|
406
|
+
"detect": ".qwen",
|
|
407
|
+
},
|
|
402
408
|
"opencode": {
|
|
403
409
|
"alias": "claude",
|
|
404
410
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fcontext
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Context continuity across AI agents & sessions. Team knowledge collaboration. Industrial-grade AI delivery.
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Requires-Python: >=3.9
|
|
@@ -18,7 +18,7 @@ Dynamic: license-file
|
|
|
18
18
|
[](https://pypi.org/project/fcontext/)
|
|
19
19
|
[](https://pypi.org/project/fcontext/)
|
|
20
20
|
[](LICENSE)
|
|
21
|
-
[](#supported-agents)
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -96,6 +96,7 @@ In production environments, context is fragmented: requirements live in document
|
|
|
96
96
|
| Claude Code | `fcontext enable claude` | `.claude/rules/*.md` |
|
|
97
97
|
| Cursor | `fcontext enable cursor` | `.cursor/rules/*.md` |
|
|
98
98
|
| Trae | `fcontext enable trae` | `.trae/rules/*.md` |
|
|
99
|
+
| Qwen-Code | `fcontext enable qwen` | `.qwen/rules/*.md` |
|
|
99
100
|
| OpenCode | `fcontext enable opencode` | Uses Claude format |
|
|
100
101
|
| OpenClaw | `fcontext enable openclaw` | `skills/` only |
|
|
101
102
|
|
|
@@ -131,7 +132,7 @@ cd your-project
|
|
|
131
132
|
fcontext init
|
|
132
133
|
|
|
133
134
|
# 2. Activate your AI agent
|
|
134
|
-
fcontext enable copilot # or: claude, cursor, trae, opencode, openclaw
|
|
135
|
+
fcontext enable copilot # or: claude, cursor, trae, qwen, opencode, openclaw
|
|
135
136
|
|
|
136
137
|
# 3. Index your documents
|
|
137
138
|
fcontext index docs/
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "fcontext"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.2"
|
|
8
8
|
description = "Context continuity across AI agents & sessions. Team knowledge collaboration. Industrial-grade AI delivery."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -70,6 +70,20 @@ class TestEnable:
|
|
|
70
70
|
skill = skills_dir / name / "SKILL.md"
|
|
71
71
|
assert skill.exists(), f"{name}/SKILL.md missing"
|
|
72
72
|
|
|
73
|
+
def test_enable_qwen(self, workspace: Path):
|
|
74
|
+
rc = enable_agent(workspace, "qwen")
|
|
75
|
+
assert rc == 0
|
|
76
|
+
# Rules file
|
|
77
|
+
rules = workspace / ".qwen" / "rules" / "fcontext.md"
|
|
78
|
+
assert rules.exists()
|
|
79
|
+
assert "Workflow Rules" in rules.read_text()
|
|
80
|
+
# Skills
|
|
81
|
+
skills_dir = workspace / ".qwen" / "skills"
|
|
82
|
+
for name in ("fcontext", "fcontext-index", "fcontext-req", "fcontext-topic"):
|
|
83
|
+
skill = skills_dir / name / "SKILL.md"
|
|
84
|
+
assert skill.exists(), f"{name}/SKILL.md missing"
|
|
85
|
+
assert f"name: {name}" in skill.read_text()
|
|
86
|
+
|
|
73
87
|
def test_enable_opencode_is_claude_alias(self, workspace: Path):
|
|
74
88
|
rc = enable_agent(workspace, "opencode")
|
|
75
89
|
assert rc == 0
|
|
@@ -309,6 +309,42 @@ class TestLoadIndexExisting:
|
|
|
309
309
|
assert data == {}
|
|
310
310
|
|
|
311
311
|
|
|
312
|
+
class TestConvertFileSuccess:
|
|
313
|
+
"""Cover _convert_file success path (L94-100)."""
|
|
314
|
+
|
|
315
|
+
def test_convert_file_success(self, tmp_path: Path):
|
|
316
|
+
import sys
|
|
317
|
+
from unittest.mock import MagicMock
|
|
318
|
+
|
|
319
|
+
source = tmp_path / "doc.pdf"
|
|
320
|
+
source.write_bytes(b"%PDF-1.4 content")
|
|
321
|
+
cache_path = tmp_path / "output.md"
|
|
322
|
+
|
|
323
|
+
# Create a fake markitdown module with MarkItDown class
|
|
324
|
+
fake_result = MagicMock()
|
|
325
|
+
fake_result.text_content = "Converted text"
|
|
326
|
+
fake_converter = MagicMock()
|
|
327
|
+
fake_converter.convert.return_value = fake_result
|
|
328
|
+
fake_module = MagicMock()
|
|
329
|
+
fake_module.MarkItDown.return_value = fake_converter
|
|
330
|
+
|
|
331
|
+
real_mod = sys.modules.get("markitdown")
|
|
332
|
+
try:
|
|
333
|
+
sys.modules["markitdown"] = fake_module
|
|
334
|
+
result = _convert_file(source, cache_path, "doc.pdf")
|
|
335
|
+
finally:
|
|
336
|
+
if real_mod is not None:
|
|
337
|
+
sys.modules["markitdown"] = real_mod
|
|
338
|
+
else:
|
|
339
|
+
sys.modules.pop("markitdown", None)
|
|
340
|
+
|
|
341
|
+
assert result is True
|
|
342
|
+
assert cache_path.exists()
|
|
343
|
+
content = cache_path.read_text()
|
|
344
|
+
assert "<!-- source: doc.pdf -->" in content
|
|
345
|
+
assert "Converted text" in content
|
|
346
|
+
|
|
347
|
+
|
|
312
348
|
class TestConvertFileError:
|
|
313
349
|
"""Cover _convert_file failure path (L101-103)."""
|
|
314
350
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|