windcode 0.1.0__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.
Files changed (164) hide show
  1. windcode-0.1.0/.github/workflows/publish.yml +116 -0
  2. windcode-0.1.0/.gitignore +19 -0
  3. windcode-0.1.0/.python-version +1 -0
  4. windcode-0.1.0/.windcode/config.toml.example +75 -0
  5. windcode-0.1.0/.windcode/skills/code-review/SKILL.md +36 -0
  6. windcode-0.1.0/.windcode/skills/code-review/agents/openai.yaml +4 -0
  7. windcode-0.1.0/AGENTS.md +78 -0
  8. windcode-0.1.0/LICENSE +201 -0
  9. windcode-0.1.0/PKG-INFO +207 -0
  10. windcode-0.1.0/README.md +172 -0
  11. windcode-0.1.0/assets/image.png +0 -0
  12. windcode-0.1.0/assets/image1.png +0 -0
  13. windcode-0.1.0/assets/image2.png +0 -0
  14. windcode-0.1.0/assets/image3.png +0 -0
  15. windcode-0.1.0/assets/image4.png +0 -0
  16. windcode-0.1.0/examples/01_stateful_chat.py +41 -0
  17. windcode-0.1.0/examples/02_custom_tool.py +61 -0
  18. windcode-0.1.0/examples/03_multi_agent.py +39 -0
  19. windcode-0.1.0/examples/04_mcp_tools.py +45 -0
  20. windcode-0.1.0/examples/05_skill.py +43 -0
  21. windcode-0.1.0/examples/06_stream_and_cancel.py +39 -0
  22. windcode-0.1.0/examples/07_bash_approval.py +37 -0
  23. windcode-0.1.0/examples/README.md +110 -0
  24. windcode-0.1.0/examples/skills/release_notes/SKILL.md +18 -0
  25. windcode-0.1.0/pyproject.toml +77 -0
  26. windcode-0.1.0/src/windcode/__init__.py +6 -0
  27. windcode-0.1.0/src/windcode/__main__.py +4 -0
  28. windcode-0.1.0/src/windcode/auth/__init__.py +11 -0
  29. windcode-0.1.0/src/windcode/auth/store.py +90 -0
  30. windcode-0.1.0/src/windcode/cli.py +181 -0
  31. windcode-0.1.0/src/windcode/config/__init__.py +41 -0
  32. windcode-0.1.0/src/windcode/config/loader.py +117 -0
  33. windcode-0.1.0/src/windcode/config/models.py +203 -0
  34. windcode-0.1.0/src/windcode/config/writer.py +74 -0
  35. windcode-0.1.0/src/windcode/context/__init__.py +18 -0
  36. windcode-0.1.0/src/windcode/context/compactor.py +72 -0
  37. windcode-0.1.0/src/windcode/context/estimator.py +89 -0
  38. windcode-0.1.0/src/windcode/context/truncation.py +87 -0
  39. windcode-0.1.0/src/windcode/domain/__init__.py +1 -0
  40. windcode-0.1.0/src/windcode/domain/errors.py +33 -0
  41. windcode-0.1.0/src/windcode/domain/events.py +597 -0
  42. windcode-0.1.0/src/windcode/domain/messages.py +226 -0
  43. windcode-0.1.0/src/windcode/domain/models.py +73 -0
  44. windcode-0.1.0/src/windcode/domain/subagents.py +263 -0
  45. windcode-0.1.0/src/windcode/domain/tools.py +55 -0
  46. windcode-0.1.0/src/windcode/extensions/__init__.py +27 -0
  47. windcode-0.1.0/src/windcode/extensions/commands.py +25 -0
  48. windcode-0.1.0/src/windcode/extensions/discovery.py +139 -0
  49. windcode-0.1.0/src/windcode/extensions/events.py +58 -0
  50. windcode-0.1.0/src/windcode/extensions/hooks/__init__.py +4 -0
  51. windcode-0.1.0/src/windcode/extensions/hooks/dispatcher.py +107 -0
  52. windcode-0.1.0/src/windcode/extensions/hooks/executor.py +49 -0
  53. windcode-0.1.0/src/windcode/extensions/hooks/loader.py +101 -0
  54. windcode-0.1.0/src/windcode/extensions/hooks/models.py +109 -0
  55. windcode-0.1.0/src/windcode/extensions/mcp/__init__.py +10 -0
  56. windcode-0.1.0/src/windcode/extensions/mcp/adapter.py +101 -0
  57. windcode-0.1.0/src/windcode/extensions/mcp/catalog.py +153 -0
  58. windcode-0.1.0/src/windcode/extensions/mcp/client.py +273 -0
  59. windcode-0.1.0/src/windcode/extensions/mcp/runtime.py +144 -0
  60. windcode-0.1.0/src/windcode/extensions/mcp/tools.py +570 -0
  61. windcode-0.1.0/src/windcode/extensions/models.py +168 -0
  62. windcode-0.1.0/src/windcode/extensions/paths.py +71 -0
  63. windcode-0.1.0/src/windcode/extensions/plugins/__init__.py +3 -0
  64. windcode-0.1.0/src/windcode/extensions/plugins/installer.py +93 -0
  65. windcode-0.1.0/src/windcode/extensions/plugins/manifest.py +166 -0
  66. windcode-0.1.0/src/windcode/extensions/runtime.py +366 -0
  67. windcode-0.1.0/src/windcode/extensions/service.py +437 -0
  68. windcode-0.1.0/src/windcode/extensions/skills/__init__.py +3 -0
  69. windcode-0.1.0/src/windcode/extensions/skills/loader.py +67 -0
  70. windcode-0.1.0/src/windcode/extensions/skills/parser.py +57 -0
  71. windcode-0.1.0/src/windcode/extensions/skills/tools.py +213 -0
  72. windcode-0.1.0/src/windcode/extensions/snapshot.py +57 -0
  73. windcode-0.1.0/src/windcode/extensions/state.py +158 -0
  74. windcode-0.1.0/src/windcode/instructions/__init__.py +8 -0
  75. windcode-0.1.0/src/windcode/instructions/loader.py +50 -0
  76. windcode-0.1.0/src/windcode/memory/__init__.py +57 -0
  77. windcode-0.1.0/src/windcode/memory/extraction.py +83 -0
  78. windcode-0.1.0/src/windcode/memory/models.py +218 -0
  79. windcode-0.1.0/src/windcode/memory/refiner.py +189 -0
  80. windcode-0.1.0/src/windcode/memory/security.py +23 -0
  81. windcode-0.1.0/src/windcode/memory/service.py +179 -0
  82. windcode-0.1.0/src/windcode/memory/store.py +362 -0
  83. windcode-0.1.0/src/windcode/observability/__init__.py +4 -0
  84. windcode-0.1.0/src/windcode/observability/redaction.py +95 -0
  85. windcode-0.1.0/src/windcode/observability/trace.py +115 -0
  86. windcode-0.1.0/src/windcode/policy/__init__.py +22 -0
  87. windcode-0.1.0/src/windcode/policy/engine.py +137 -0
  88. windcode-0.1.0/src/windcode/policy/models.py +69 -0
  89. windcode-0.1.0/src/windcode/providers/__init__.py +29 -0
  90. windcode-0.1.0/src/windcode/providers/_utils.py +19 -0
  91. windcode-0.1.0/src/windcode/providers/anthropic.py +215 -0
  92. windcode-0.1.0/src/windcode/providers/base.py +46 -0
  93. windcode-0.1.0/src/windcode/providers/catalog.py +119 -0
  94. windcode-0.1.0/src/windcode/providers/errors.py +96 -0
  95. windcode-0.1.0/src/windcode/providers/openai_compat.py +231 -0
  96. windcode-0.1.0/src/windcode/providers/openai_responses.py +189 -0
  97. windcode-0.1.0/src/windcode/providers/registry.py +105 -0
  98. windcode-0.1.0/src/windcode/runtime/__init__.py +15 -0
  99. windcode-0.1.0/src/windcode/runtime/control.py +89 -0
  100. windcode-0.1.0/src/windcode/runtime/event_bus.py +67 -0
  101. windcode-0.1.0/src/windcode/runtime/loop.py +510 -0
  102. windcode-0.1.0/src/windcode/runtime/prompts.py +132 -0
  103. windcode-0.1.0/src/windcode/runtime/report.py +64 -0
  104. windcode-0.1.0/src/windcode/runtime/retry.py +73 -0
  105. windcode-0.1.0/src/windcode/runtime/scheduler.py +194 -0
  106. windcode-0.1.0/src/windcode/runtime/subagents/__init__.py +28 -0
  107. windcode-0.1.0/src/windcode/runtime/subagents/approvals.py +88 -0
  108. windcode-0.1.0/src/windcode/runtime/subagents/budgets.py +79 -0
  109. windcode-0.1.0/src/windcode/runtime/subagents/coordinator.py +714 -0
  110. windcode-0.1.0/src/windcode/runtime/subagents/factory.py +311 -0
  111. windcode-0.1.0/src/windcode/runtime/subagents/roles.py +74 -0
  112. windcode-0.1.0/src/windcode/runtime/subagents/verification.py +53 -0
  113. windcode-0.1.0/src/windcode/sandbox/__init__.py +3 -0
  114. windcode-0.1.0/src/windcode/sandbox/bwrap.py +79 -0
  115. windcode-0.1.0/src/windcode/sdk.py +1259 -0
  116. windcode-0.1.0/src/windcode/sessions/__init__.py +23 -0
  117. windcode-0.1.0/src/windcode/sessions/artifacts.py +69 -0
  118. windcode-0.1.0/src/windcode/sessions/models.py +104 -0
  119. windcode-0.1.0/src/windcode/sessions/store.py +167 -0
  120. windcode-0.1.0/src/windcode/sessions/tree.py +35 -0
  121. windcode-0.1.0/src/windcode/tools/__init__.py +10 -0
  122. windcode-0.1.0/src/windcode/tools/apply_patch.py +191 -0
  123. windcode-0.1.0/src/windcode/tools/ask_user.py +58 -0
  124. windcode-0.1.0/src/windcode/tools/builtins.py +44 -0
  125. windcode-0.1.0/src/windcode/tools/edit_file.py +54 -0
  126. windcode-0.1.0/src/windcode/tools/filesystem.py +77 -0
  127. windcode-0.1.0/src/windcode/tools/glob.py +35 -0
  128. windcode-0.1.0/src/windcode/tools/grep.py +66 -0
  129. windcode-0.1.0/src/windcode/tools/memory.py +400 -0
  130. windcode-0.1.0/src/windcode/tools/read_file.py +54 -0
  131. windcode-0.1.0/src/windcode/tools/registry.py +120 -0
  132. windcode-0.1.0/src/windcode/tools/shell.py +159 -0
  133. windcode-0.1.0/src/windcode/tools/subagents/__init__.py +31 -0
  134. windcode-0.1.0/src/windcode/tools/subagents/cancel.py +35 -0
  135. windcode-0.1.0/src/windcode/tools/subagents/integrate.py +54 -0
  136. windcode-0.1.0/src/windcode/tools/subagents/list.py +46 -0
  137. windcode-0.1.0/src/windcode/tools/subagents/spawn.py +86 -0
  138. windcode-0.1.0/src/windcode/tools/subagents/wait.py +74 -0
  139. windcode-0.1.0/src/windcode/tools/write_file.py +61 -0
  140. windcode-0.1.0/src/windcode/tui/__init__.py +3 -0
  141. windcode-0.1.0/src/windcode/tui/app.py +1015 -0
  142. windcode-0.1.0/src/windcode/tui/commands.py +90 -0
  143. windcode-0.1.0/src/windcode/tui/permission_display.py +24 -0
  144. windcode-0.1.0/src/windcode/tui/styles.tcss +591 -0
  145. windcode-0.1.0/src/windcode/tui/widgets/__init__.py +31 -0
  146. windcode-0.1.0/src/windcode/tui/widgets/approval.py +98 -0
  147. windcode-0.1.0/src/windcode/tui/widgets/command_menu.py +90 -0
  148. windcode-0.1.0/src/windcode/tui/widgets/extensions.py +48 -0
  149. windcode-0.1.0/src/windcode/tui/widgets/input.py +110 -0
  150. windcode-0.1.0/src/windcode/tui/widgets/memory.py +143 -0
  151. windcode-0.1.0/src/windcode/tui/widgets/messages.py +299 -0
  152. windcode-0.1.0/src/windcode/tui/widgets/models.py +565 -0
  153. windcode-0.1.0/src/windcode/tui/widgets/question.py +46 -0
  154. windcode-0.1.0/src/windcode/tui/widgets/sessions.py +68 -0
  155. windcode-0.1.0/src/windcode/tui/widgets/status.py +46 -0
  156. windcode-0.1.0/src/windcode/tui/widgets/subagents.py +195 -0
  157. windcode-0.1.0/src/windcode/tui/widgets/tools.py +66 -0
  158. windcode-0.1.0/src/windcode/tui/widgets/welcome.py +149 -0
  159. windcode-0.1.0/src/windcode/types.py +80 -0
  160. windcode-0.1.0/src/windcode/worktrees/__init__.py +24 -0
  161. windcode-0.1.0/src/windcode/worktrees/git.py +92 -0
  162. windcode-0.1.0/src/windcode/worktrees/manager.py +265 -0
  163. windcode-0.1.0/src/windcode/worktrees/models.py +62 -0
  164. windcode-0.1.0/uv.lock +1630 -0
@@ -0,0 +1,116 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ concurrency:
8
+ group: pypi-${{ github.event.release.tag_name }}
9
+ cancel-in-progress: false
10
+
11
+ jobs:
12
+ build:
13
+ name: Build and verify distribution
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: read
17
+
18
+ steps:
19
+ - name: Check out repository
20
+ uses: actions/checkout@v4
21
+
22
+ - name: Install uv
23
+ uses: astral-sh/setup-uv@v7
24
+ with:
25
+ enable-cache: true
26
+
27
+ - name: Install Python
28
+ run: uv python install 3.12
29
+
30
+ - name: Verify release tag matches package version
31
+ env:
32
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
33
+ run: |
34
+ PACKAGE_VERSION="$(uv run --no-project python -c \
35
+ 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')"
36
+ test "${RELEASE_TAG#v}" = "$PACKAGE_VERSION" || {
37
+ echo "Release tag $RELEASE_TAG does not match package version $PACKAGE_VERSION"
38
+ exit 1
39
+ }
40
+
41
+ - name: Install locked dependencies
42
+ run: uv sync --frozen --all-groups
43
+
44
+ - name: Verify runtime version
45
+ env:
46
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
47
+ run: |
48
+ uv run python - <<'PY'
49
+ import os
50
+ import windcode
51
+
52
+ expected = os.environ["RELEASE_TAG"].removeprefix("v")
53
+ if windcode.__version__ != expected:
54
+ raise SystemExit(
55
+ f"windcode.__version__={windcode.__version__} does not match {expected}"
56
+ )
57
+ PY
58
+
59
+ - name: Run quality checks
60
+ run: |
61
+ uv run ruff format --check .
62
+ uv run ruff check .
63
+
64
+ - name: Run tests when present in the checkout
65
+ run: |
66
+ if [ -d tests ] && find tests -type f -name 'test_*.py' -print -quit | grep -q .; then
67
+ uv run pytest -q
68
+ else
69
+ echo "No tracked tests are present in this checkout; skipping pytest."
70
+ fi
71
+
72
+ - name: Build distributions
73
+ run: uv build --no-sources
74
+
75
+ - name: Verify distribution contents
76
+ run: |
77
+ uv run --with twine twine check dist/*
78
+ uv run --no-project python - <<'PY'
79
+ from pathlib import Path
80
+ import zipfile
81
+
82
+ wheel = next(Path("dist").glob("*.whl"))
83
+ with zipfile.ZipFile(wheel) as archive:
84
+ names = archive.namelist()
85
+ required = ("windcode/__init__.py", "windcode/tui/styles.tcss")
86
+ missing = [item for item in required if not any(name.endswith(item) for name in names)]
87
+ if missing:
88
+ raise SystemExit(f"Wheel is missing required files: {', '.join(missing)}")
89
+ PY
90
+
91
+ - name: Upload distributions
92
+ uses: actions/upload-artifact@v4
93
+ with:
94
+ name: python-distributions
95
+ path: dist/
96
+ if-no-files-found: error
97
+
98
+ publish:
99
+ name: Publish distribution
100
+ needs: build
101
+ runs-on: ubuntu-latest
102
+ environment:
103
+ name: pypi
104
+ url: https://pypi.org/project/windcode/
105
+ permissions:
106
+ id-token: write
107
+
108
+ steps:
109
+ - name: Download distributions
110
+ uses: actions/download-artifact@v4
111
+ with:
112
+ name: python-distributions
113
+ path: dist/
114
+
115
+ - name: Publish to PyPI
116
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,19 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+ .ruff_cache/
9
+ .pytest_cache/
10
+ # Virtual environments
11
+ .venv
12
+
13
+ tests/
14
+
15
+ .windcode/config.toml
16
+ .windcode/state/
17
+
18
+
19
+ spec/
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,75 @@
1
+ fallback_chain = []
2
+ enabled_providers = [
3
+ "deepseek",
4
+ ]
5
+ primary_provider = "deepseek"
6
+
7
+ [providers.deepseek]
8
+ protocol = "openai_compatible"
9
+ model = "deepseek-v4-flash"
10
+ provider_id = "deepseek"
11
+ api_key_env = "DEEPSEEK_API_KEY"
12
+ credential_id = "deepseek"
13
+ base_url = "https://api.deepseek.com/v1"
14
+
15
+ [budgets]
16
+ max_model_steps = 40
17
+ max_tool_calls = 100
18
+ max_runtime_seconds = 1800
19
+ shell_timeout_seconds = 120
20
+
21
+ [permission]
22
+ mode = "default"
23
+
24
+ [sandbox]
25
+ enabled = true
26
+ network_enabled = true
27
+
28
+ [context]
29
+ window_tokens = 128000
30
+ compaction_threshold = 0.8
31
+ preserve_recent_turns = 8
32
+ max_tool_result_chars = 20000
33
+
34
+ [trace]
35
+ enabled = true
36
+ include_tool_arguments = false
37
+ include_transient_events = false
38
+ retention_days = 7
39
+ max_total_mb = 100
40
+
41
+
42
+ [extensions]
43
+ enabled = true
44
+
45
+ [extensions.mcp_servers.tavily-mcp]
46
+ transport = "streamable_http"
47
+ enable = false
48
+ url =
49
+
50
+ [extensions.mcp_servers.gaodemap-mcp]
51
+ transport = "streamable_http"
52
+ enable = true
53
+ url =
54
+ required = true
55
+
56
+ [storage]
57
+ project_state_root = ".windcode/state"
58
+ user_storage_root = "~/.local/state/windcode/state"
59
+
60
+ [memory]
61
+ enabled = true
62
+ extraction_enabled = true
63
+ recall_limit = 5
64
+ recall_max_chars = 12000
65
+ baseline_max_records = 30
66
+ baseline_max_chars = 6000
67
+ extraction_max_chars = 20000
68
+ extraction_max_output_tokens = 600
69
+ candidate_retention_days = 90
70
+ stale_after_days = 30
71
+ user_profile_enabled = true
72
+ project_knowledge_enabled = true
73
+ experience_enabled = true
74
+ sop_enabled = true
75
+ reference_enabled = true
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: code-review
3
+ description: Review code changes for correctness defects, behavioral regressions, security risks, and missing tests. Use when asked to inspect a diff, branch, pull request, commit, or uncommitted changes before merge.
4
+ ---
5
+
6
+ # Code Review
7
+
8
+ Review the requested change as a senior engineer. Prioritize behavior and evidence over style.
9
+
10
+ ## Workflow
11
+
12
+ 1. Establish the review scope from the user's request. If no scope is given, inspect the current
13
+ working-tree diff and relevant surrounding code without modifying files.
14
+ 2. Read repository instructions and identify the contracts, callers, and tests affected by each
15
+ change.
16
+ 3. Verify suspicious behavior against concrete code paths. Run focused, non-mutating checks when
17
+ they materially increase confidence.
18
+ 4. Look specifically for incorrect state transitions, incomplete error handling, async or resource
19
+ lifecycle issues, security boundary violations, compatibility breaks, and missing regression
20
+ coverage.
21
+ 5. Report only actionable findings. Do not invent a finding to make the review look complete.
22
+
23
+ ## Output
24
+
25
+ Lead with findings ordered by severity. For every finding:
26
+
27
+ - State the observable failure or risk, not merely the implementation detail.
28
+ - Cite the exact file and line.
29
+ - Explain the triggering conditions and likely impact.
30
+ - Suggest the smallest reasonable direction for correction when it is not obvious.
31
+
32
+ After the findings, list open questions or assumptions only when they affect the verdict. End with a
33
+ brief summary and remaining test gaps. If no findings exist, say so clearly and state any residual
34
+ risk or validation that was not performed.
35
+
36
+ Do not edit code unless the user explicitly asks for fixes after or as part of the review.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Code Review"
3
+ short_description: "Find correctness risks and missing test coverage"
4
+ default_prompt: "Use $code-review to review the current code changes."
@@ -0,0 +1,78 @@
1
+ # Repository Guidelines
2
+
3
+ ## Command Routing
4
+
5
+ - Only invoke the `mew-spec` workflow when the user's first non-whitespace token is exactly
6
+ `/spec`, or when the user explicitly names `$mew-spec`.
7
+ - Do not infer spec mode from ordinary requests such as “功能开发” or “先澄清需求”.
8
+
9
+ ## Project Structure
10
+
11
+ Windcode is a Python 3.12 terminal coding agent. Production code lives under `src/windcode/`:
12
+
13
+ - `domain/`: core messages, events, models, errors, and tool contracts.
14
+ - `runtime/`: agent loop, scheduling, budgets, subagents, prompts, and orchestration.
15
+ - `providers/`: model protocol adapters and transport error normalization.
16
+ - `tools/`: built-in callable tools and the tool registry.
17
+ - `extensions/`: MCP, skills, hooks, plugins, discovery, and extension state.
18
+ - `memory/`: long-term memory extraction, activation, indexing, and recall.
19
+ - `tui/`: Textual application, commands, screens, and widgets.
20
+ - `config/`, `sessions/`, `context/`, `policy/`, `sandbox/`, and `observability/` own their
21
+ corresponding infrastructure concerns.
22
+
23
+ Local tests mirror behavior in `tests/unit/`, `tests/contract/`, `tests/integration/`, `tests/e2e/`,
24
+ and `tests/smoke/`. Product requirements and checklists live under `spec/`. Both directories are
25
+ intentionally Git-ignored and must not be force-added unless the user explicitly requests it.
26
+
27
+ ## Development Commands
28
+
29
+ - `uv sync --frozen --all-groups`: install locked development dependencies.
30
+ - `uv run windcode /path/to/project`: launch the TUI.
31
+ - `uv run ruff format --check .`: verify formatting.
32
+ - `uv run ruff check .`: run lint and import-order checks.
33
+ - `uv run pyright`: run strict type checking.
34
+ - `uv run pytest -q`: run the local test suite.
35
+ - `uv build`: build the source and wheel distributions.
36
+
37
+ ## Engineering Conventions
38
+
39
+ Use four-space indentation, Python 3.12 syntax, and type annotations for public APIs and non-trivial
40
+ internals. Ruff enforces a 100-character line length and the `E`, `F`, `I`, `UP`, `B`, `ASYNC`, and
41
+ `RUF` rule sets. Use `snake_case` for modules and functions, `PascalCase` for classes, and
42
+ `UPPER_SNAKE_CASE` for constants.
43
+
44
+ Keep domain logic independent of Textual and provider-specific payloads. Preserve explicit async
45
+ boundaries. Prefer existing registries, stores, event types, and configuration models over parallel
46
+ abstractions. Add focused tests for local rules and integration coverage for runtime, provider, MCP,
47
+ memory, session, or TUI behavior.
48
+
49
+ ## State And Configuration
50
+
51
+ All runtime state uses one selected root:
52
+
53
+ ```text
54
+ explicit SDK state_root
55
+ -> configured project_state_root
56
+ -> user_storage_root
57
+ ```
58
+
59
+ The root contains `memory/`, `sessions/`, `traces/`, `extensions/`, and `worktrees/`.
60
+ `.windcode/config.toml`, `.windcode/state/`, `tests/`, and `spec/` are local-only ignored paths.
61
+ Never remove, rewrite, force-add, or commit them without an explicit user request.
62
+
63
+ For MCP servers, `enable` controls discovery and runtime visibility; `required` only controls startup
64
+ requirements for an enabled server. Disabled servers must not connect, appear in default server
65
+ lists, participate in tool search, or enter the system prompt. Explicit extension reload invalidates
66
+ MCP catalog and selected-tool caches.
67
+
68
+ ## Security
69
+
70
+ Never commit API keys, tokens, credential-bearing URLs, local state, or trace data. Project TOML may
71
+ contain environment-variable names or credential IDs, not secret values. Use
72
+ `.windcode/config.toml.example` as the public configuration reference.
73
+
74
+ ## Commits And Reviews
75
+
76
+ Use short imperative conventional subjects, for example `fix(tui): 允许取消空会话选择` or
77
+ `feat(memory): 增加分层上下文召回`. Keep unrelated user changes intact. Reviews should lead with
78
+ behavioral bugs and risks, include file references, and state remaining test gaps.
windcode-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.