opencontextengine-client 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 (32) hide show
  1. opencontextengine_client-0.1.0/.github/workflows/ci.yml +84 -0
  2. opencontextengine_client-0.1.0/.github/workflows/release.yml +63 -0
  3. opencontextengine_client-0.1.0/.gitignore +28 -0
  4. opencontextengine_client-0.1.0/CHANGELOG.md +22 -0
  5. opencontextengine_client-0.1.0/LICENSE +202 -0
  6. opencontextengine_client-0.1.0/PKG-INFO +162 -0
  7. opencontextengine_client-0.1.0/README.md +133 -0
  8. opencontextengine_client-0.1.0/pyproject.toml +55 -0
  9. opencontextengine_client-0.1.0/scripts/bump_version.py +157 -0
  10. opencontextengine_client-0.1.0/scripts/generate_changelog.py +187 -0
  11. opencontextengine_client-0.1.0/scripts/release.py +126 -0
  12. opencontextengine_client-0.1.0/skills/oce-client/SKILL.md +136 -0
  13. opencontextengine_client-0.1.0/skills/oce-client/agents/openai.yaml +4 -0
  14. opencontextengine_client-0.1.0/src/oce_client/__init__.py +33 -0
  15. opencontextengine_client-0.1.0/src/oce_client/cli.py +250 -0
  16. opencontextengine_client-0.1.0/src/oce_client/context.py +478 -0
  17. opencontextengine_client-0.1.0/src/oce_client/defaults.py +2 -0
  18. opencontextengine_client-0.1.0/src/oce_client/filesystem.py +62 -0
  19. opencontextengine_client-0.1.0/src/oce_client/http.py +134 -0
  20. opencontextengine_client-0.1.0/src/oce_client/identity.py +17 -0
  21. opencontextengine_client-0.1.0/src/oce_client/ignore.py +84 -0
  22. opencontextengine_client-0.1.0/src/oce_client/indexer.py +265 -0
  23. opencontextengine_client-0.1.0/src/oce_client/mcp_server.py +309 -0
  24. opencontextengine_client-0.1.0/src/oce_client/models.py +102 -0
  25. opencontextengine_client-0.1.0/src/oce_client/ports.py +67 -0
  26. opencontextengine_client-0.1.0/src/oce_client/runtime.py +245 -0
  27. opencontextengine_client-0.1.0/src/oce_client/state.py +288 -0
  28. opencontextengine_client-0.1.0/src/oce_client/watcher.py +57 -0
  29. opencontextengine_client-0.1.0/tests/test_cli.py +73 -0
  30. opencontextengine_client-0.1.0/tests/test_core.py +231 -0
  31. opencontextengine_client-0.1.0/tests/test_mcp.py +403 -0
  32. opencontextengine_client-0.1.0/uv.lock +911 -0
@@ -0,0 +1,84 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+ workflow_dispatch:
9
+
10
+ concurrency:
11
+ group: ci-${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ permissions:
15
+ contents: read
16
+
17
+ jobs:
18
+ test:
19
+ name: test (py${{ matrix.python-version }})
20
+ runs-on: ubuntu-latest
21
+ strategy:
22
+ fail-fast: false
23
+ matrix:
24
+ python-version: ["3.11", "3.13"]
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+
28
+ - name: Set up uv and Python
29
+ uses: astral-sh/setup-uv@v5
30
+ with:
31
+ python-version: ${{ matrix.python-version }}
32
+ enable-cache: true
33
+
34
+ - name: Install locked dependencies
35
+ run: uv sync --extra dev --extra mcp --locked
36
+
37
+ - name: Smoke import
38
+ run: uv run python -c "import oce_client; from oce_client.mcp_server import create_server; print(oce_client.__version__)"
39
+
40
+ - name: Run tests
41
+ run: uv run pytest -q
42
+
43
+ build:
44
+ name: build (packaging)
45
+ runs-on: ubuntu-latest
46
+ steps:
47
+ - uses: actions/checkout@v4
48
+
49
+ - name: Set up uv and Python
50
+ uses: astral-sh/setup-uv@v5
51
+ with:
52
+ python-version: "3.13"
53
+ enable-cache: true
54
+
55
+ - name: Build sdist and wheel
56
+ run: uv build
57
+
58
+ - name: Validate bundled skill
59
+ shell: bash
60
+ run: |
61
+ python - <<'PY'
62
+ import glob
63
+ import zipfile
64
+
65
+ wheel = glob.glob("dist/*.whl")
66
+ if len(wheel) != 1:
67
+ raise SystemExit(f"expected one wheel, found: {wheel}")
68
+ with zipfile.ZipFile(wheel[0]) as archive:
69
+ names = set(archive.namelist())
70
+ required = {
71
+ "oce_client/skill/SKILL.md",
72
+ "oce_client/skill/agents/openai.yaml",
73
+ }
74
+ missing = required - names
75
+ if missing:
76
+ raise SystemExit(f"wheel is missing bundled skill files: {sorted(missing)}")
77
+ PY
78
+
79
+ - name: Upload dist artifacts
80
+ uses: actions/upload-artifact@v4
81
+ with:
82
+ name: dist
83
+ path: dist/*
84
+ if-no-files-found: error
@@ -0,0 +1,63 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags: ["v*.*.*"]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ concurrency:
11
+ group: release-${{ github.ref }}
12
+ cancel-in-progress: false
13
+
14
+ jobs:
15
+ test:
16
+ name: release validation
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Set up uv and Python
22
+ uses: astral-sh/setup-uv@v5
23
+ with:
24
+ python-version: "3.13"
25
+ enable-cache: true
26
+
27
+ - name: Install locked dependencies
28
+ run: uv sync --extra dev --extra mcp --locked
29
+
30
+ - name: Validate tag version
31
+ shell: bash
32
+ run: |
33
+ tag_version="${GITHUB_REF_NAME#v}"
34
+ project_version="$(uv run python -c 'from importlib.metadata import version; print(version("opencontextengine-client"))')"
35
+ if [[ "${project_version}" != "${tag_version}" ]]; then
36
+ echo "pyproject version ${project_version} does not match tag ${tag_version}"
37
+ exit 1
38
+ fi
39
+
40
+ - name: Run tests
41
+ run: uv run pytest -q
42
+
43
+ python-package:
44
+ name: publish Python package
45
+ needs: test
46
+ runs-on: ubuntu-latest
47
+ permissions:
48
+ contents: read
49
+ id-token: write
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+
53
+ - name: Set up uv and Python
54
+ uses: astral-sh/setup-uv@v5
55
+ with:
56
+ python-version: "3.13"
57
+ enable-cache: true
58
+
59
+ - name: Build sdist and wheel
60
+ run: uv build
61
+
62
+ - name: Publish to PyPI
63
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,28 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[cod]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info/
8
+
9
+ # Virtual environments
10
+ .venv/
11
+
12
+ # Test and tooling caches
13
+ .pytest_cache/
14
+ .ruff_cache/
15
+ .mypy_cache/
16
+ .coverage
17
+ htmlcov/
18
+
19
+ # IDE and operating-system files
20
+ .idea/
21
+ .vscode/
22
+ *.swp
23
+ .DS_Store
24
+
25
+ # Local client state and secrets
26
+ .oce-client/
27
+ .env
28
+ .env.*
@@ -0,0 +1,22 @@
1
+ # Changelog
2
+
3
+ This project follows [Semantic Versioning](https://semver.org/).
4
+ Entries are generated from Conventional Commits.
5
+
6
+ ## [Unreleased]
7
+
8
+ ## [0.1.0] - 2026-08-30
9
+
10
+ ### Added
11
+
12
+ - **mcp**: add background incremental indexing
13
+ - **mcp**: expose unified codebase retrieval tool
14
+ - initialize oce-client
15
+
16
+ ### Changed
17
+
18
+ - **skill**: keep interface guidance CLI-only
19
+ - **skill**: clarify CLI agent workflow
20
+ - **cli**: keep MCP as standalone entry point
21
+ - **config**: unify cli and mcp settings
22
+ - **client**: remove unsupported retrieval endpoints
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ Copyright 2026 OpenContextEngine Contributors
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ 1. Definitions.
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction,
12
+ and distribution as defined by Sections 1 through 9 of this document.
13
+
14
+ "Licensor" shall mean the copyright owner or entity authorized by
15
+ the copyright owner that is granting the License.
16
+
17
+ "Legal Entity" shall mean the union of the acting entity and all
18
+ other entities that control, are controlled by, or are under common
19
+ control with that entity. For the purposes of this definition,
20
+ "control" means (i) the power, direct or indirect, to cause the
21
+ direction or management of such entity, whether by contract or
22
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
23
+ outstanding shares, or (iii) beneficial ownership of such entity.
24
+
25
+ "You" (or "Your") shall mean an individual or Legal Entity
26
+ exercising permissions granted by this License.
27
+
28
+ "Source" form shall mean the preferred form for making modifications,
29
+ including but not limited to software source code, documentation
30
+ source, and configuration files.
31
+
32
+ "Object" form shall mean any form resulting from mechanical
33
+ transformation or translation of a Source form, including but
34
+ not limited to compiled object code, generated documentation,
35
+ and conversions to other media types.
36
+
37
+ "Work" shall mean the work of authorship, whether in Source or
38
+ Object form, made available under the License, as indicated by a
39
+ copyright notice that is included in or attached to the work
40
+ (an example is provided in the Appendix below).
41
+
42
+ "Derivative Works" shall mean any work, whether in Source or Object
43
+ form, that is based on (or derived from) the Work and for which the
44
+ editorial revisions, annotations, elaborations, or other modifications
45
+ represent, as a whole, an original work of authorship. For the purposes
46
+ of this License, Derivative Works shall not include works that remain
47
+ separable from, or merely link (or bind by name) to the interfaces of,
48
+ the Work and Derivative Works thereof.
49
+
50
+ "Contribution" shall mean any work of authorship, including
51
+ the original version of the Work and any modifications or additions
52
+ to that Work or Derivative Works thereof, that is intentionally
53
+ submitted to Licensor for inclusion in the Work by the copyright owner
54
+ or by an individual or Legal Entity authorized to submit on behalf of
55
+ the copyright owner. For the purposes of this definition, "submitted"
56
+ means any form of electronic, verbal, or written communication sent
57
+ to the Licensor or its representatives, including but not limited to
58
+ communication on electronic mailing lists, source code control systems,
59
+ and issue tracking systems that are managed by, or on behalf of, the
60
+ Licensor for the purpose of discussing and improving the Work, but
61
+ excluding communication that is conspicuously marked or otherwise
62
+ designated in writing by the copyright owner as "Not a Contribution."
63
+
64
+ "Contributor" shall mean Licensor and any individual or Legal Entity
65
+ on behalf of whom a Contribution has been received by Licensor and
66
+ subsequently incorporated within the Work.
67
+
68
+ 2. Grant of Copyright License. Subject to the terms and conditions of
69
+ this License, each Contributor hereby grants to You a perpetual,
70
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71
+ copyright license to reproduce, prepare Derivative Works of,
72
+ publicly display, publicly perform, sublicense, and distribute the
73
+ Work and such Derivative Works in Source or Object form.
74
+
75
+ 3. Grant of Patent License. Subject to the terms and conditions of
76
+ this License, each Contributor hereby grants to You a perpetual,
77
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78
+ (except as stated in this section) patent license to make, have made,
79
+ use, offer to sell, sell, import, and otherwise transfer the Work,
80
+ where such license applies only to those patent claims licensable
81
+ by such Contributor that are necessarily infringed by their
82
+ Contribution(s) alone or by combination of their Contribution(s)
83
+ with the Work to which such Contribution(s) was submitted. If You
84
+ institute patent litigation against any entity (including a
85
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
86
+ or a Contribution incorporated within the Work constitutes direct
87
+ or contributory patent infringement, then any patent licenses
88
+ granted to You under this License for that Work shall terminate
89
+ as of the date such litigation is filed.
90
+
91
+ 4. Redistribution. You may reproduce and distribute copies of the
92
+ Work or Derivative Works thereof in any medium, with or without
93
+ modifications, and in Source or Object form, provided that You
94
+ meet the following conditions:
95
+
96
+ (a) You must give any other recipients of the Work or
97
+ Derivative Works a copy of this License; and
98
+
99
+ (b) You must cause any modified files to carry prominent notices
100
+ stating that You changed the files; and
101
+
102
+ (c) You must retain, in the Source form of any Derivative Works
103
+ that You distribute, all copyright, patent, trademark, and
104
+ attribution notices from the Source form of the Work,
105
+ excluding those notices that do not pertain to any part of
106
+ the Derivative Works; and
107
+
108
+ (d) If the Work includes a "NOTICE" text file as part of its
109
+ distribution, then any Derivative Works that You distribute must
110
+ include a readable copy of the attribution notices contained
111
+ within such NOTICE file, excluding those notices that do not
112
+ pertain to any part of the Derivative Works, in at least one
113
+ of the following places: within a NOTICE text file distributed
114
+ as part of the Derivative Works; within the Source form or
115
+ documentation, if provided along with the Derivative Works; or,
116
+ within a display generated by the Derivative Works, if and
117
+ wherever such third-party notices normally appear. The contents
118
+ of the NOTICE file are for informational purposes only and
119
+ do not modify the License. You may add Your own attribution
120
+ notices within Derivative Works, alongside or as an addendum to
121
+ the NOTICE text from the Work, provided that such additional
122
+ attribution notices cannot be construed as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.5
2
+ Name: opencontextengine-client
3
+ Version: 0.1.0
4
+ Summary: Standalone workspace and blob synchronization client for OpenContextEngine
5
+ Project-URL: Homepage, https://github.com/oce-ai/oce-client
6
+ Project-URL: Repository, https://github.com/oce-ai/oce-client
7
+ Project-URL: Documentation, https://github.com/oce-ai/oce-client/blob/master/README.md
8
+ Project-URL: Issues, https://github.com/oce-ai/oce-client/issues
9
+ Author: OpenContextEngine Contributors
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ Keywords: ai,code,context,mcp,retrieval
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Requires-Python: >=3.11
21
+ Requires-Dist: httpx>=0.25.0
22
+ Requires-Dist: pathspec>=0.12.1
23
+ Requires-Dist: watchfiles>=1.0.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=8.0; extra == 'dev'
26
+ Provides-Extra: mcp
27
+ Requires-Dist: mcp<2,>=1.0.0; extra == 'mcp'
28
+ Description-Content-Type: text/markdown
29
+
30
+ # opencontextengine-client
31
+
32
+ Standalone synchronous Python client for OpenContextEngine workspace and blob
33
+ management. The package owns local inventory, ignore rules, upload planning,
34
+ checkpoint state, and retrieval adapters. It does not depend on Auggie SDK.
35
+
36
+ Install the distribution package with `uv add opencontextengine-client` (or
37
+ `pip install opencontextengine-client`). The installed command remains
38
+ `oce-client`.
39
+
40
+ ## Version Information
41
+
42
+ Run `oce-client --version` to print the installed client version.
43
+
44
+ | Item | Value |
45
+ | --- | --- |
46
+ | PyPI distribution | `opencontextengine-client` |
47
+ | Python package | `oce_client` |
48
+ | CLI | `oce-client` |
49
+ | MCP server | `oce-client-mcp` (separate interface) |
50
+ | Version command | `oce-client --version` |
51
+
52
+ The authoritative version is declared in `pyproject.toml` and mirrored by
53
+ `oce_client.__version__`.
54
+
55
+ ## Release Preparation
56
+
57
+ The first release uses the current version because the repository has no
58
+ release tag yet:
59
+
60
+ ```powershell
61
+ uv run python scripts/release.py 0.1.0 --dry-run
62
+ uv run python scripts/release.py 0.1.0
63
+ ```
64
+
65
+ For later releases, use `major`, `minor`, `patch`, or an exact higher version.
66
+ The script updates version metadata, generates the changelog, builds the
67
+ package, creates a release commit, and creates an annotated tag locally. It
68
+ never pushes or publishes automatically; review the result before pushing the
69
+ branch and tag.
70
+
71
+ ## CLI
72
+
73
+ Install the package with `uv` and configure the service endpoint and key through
74
+ the environment:
75
+
76
+ ```powershell
77
+ # These are the built-in defaults; override them only when needed.
78
+ $env:OCE_API_URL = "http://127.0.0.1:8986"
79
+ $env:OCE_API_KEY = "sk-opencontextengine"
80
+ $env:OCE_WORKSPACE = (Get-Location).Path
81
+ uv run oce-client sync
82
+ uv run oce-client retrieve "where is request authentication implemented?"
83
+ ```
84
+
85
+ If unset, `OCE_API_URL` defaults to `http://127.0.0.1:8986` and `OCE_API_KEY`
86
+ defaults to `sk-opencontextengine`. `status` is local-only and does not require
87
+ an API key. `observe` and `remove`
88
+ stage explicit editor changes in SQLite; run `sync` to publish them. Add
89
+ `--json` to `sync`, `status`, `retrieve`, `observe`, or `remove` for
90
+ machine-readable output. CLI options are placed before the subcommand, for
91
+ example `oce-client --root C:\src\project sync`; `--root` falls back to
92
+ `OCE_WORKSPACE`, and `--api-url`, `--state-path`, and repeated `--ignore`
93
+ override `OCE_API_URL`, `OCE_STATE_PATH`, and `OCE_IGNORE`.
94
+
95
+ The two interfaces have different lifecycles:
96
+
97
+ | Interface | Workspace selection | State selection | Index lifecycle |
98
+ | --- | --- | --- | --- |
99
+ | CLI | one `--root` or `OCE_WORKSPACE` | `--state-path` or `OCE_STATE_PATH` | explicit `sync`, optional `watch` |
100
+ | MCP | repeated `--workspace`, `OCE_WORKSPACE`, or `OCE_WORKSPACES` | one `--state-path`, or per-workspace `--state-dir` | process-owned background and incremental sync |
101
+
102
+ ## MCP
103
+
104
+ Install the optional MCP extra and expose the stdio server to an MCP host:
105
+
106
+ ```powershell
107
+ uv sync --extra mcp
108
+ uv run oce-client-mcp --workspace C:\path\to\workspace
109
+ ```
110
+
111
+ The server exposes one tool, `codebase-retrieval`. Workspace indexing belongs
112
+ to the MCP process rather than the coding agent: the server starts the initial
113
+ index in the background, watches the filesystem, and synchronizes only changed
114
+ paths. Unchanged files are identified by stored filesystem metadata and are not
115
+ read or rehashed on restart.
116
+
117
+ Declare each allowed workspace with a repeated `--workspace` argument. With one
118
+ workspace, the tool's `workspace_folder` input is optional. With multiple
119
+ workspaces it is required and must exactly match an allowed path. Other paths
120
+ are rejected. For an environment-only setup, use `OCE_WORKSPACE` for one path
121
+ or `OCE_WORKSPACES` with paths separated by the platform path separator. MCP
122
+ does not fall back to the process current directory.
123
+
124
+ ```powershell
125
+ oce-client-mcp `
126
+ --workspace C:\src\project-a `
127
+ --workspace C:\src\project-b `
128
+ --state-dir $env:LOCALAPPDATA\oce-client `
129
+ --initial-sync background `
130
+ --debounce-ms 500 `
131
+ --ready-timeout 3
132
+ ```
133
+
134
+ `--initial-sync` accepts `background` (default), `blocking`, or `off`; `off`
135
+ defers initialization until the first retrieval call. A tool call waits up to
136
+ `--ready-timeout` seconds for the latest observed filesystem generation. Its
137
+ result status is `ready`, `indexing`, or `error`; only a `ready` result contains
138
+ retrieval context. `OCE_API_URL`, `OCE_API_KEY`, `OCE_STATE_PATH`, `OCE_STATE_DIR`, `OCE_IGNORE`,
139
+ `OCE_DEBOUNCE_MS`, `OCE_INITIAL_SYNC`, `OCE_READY_TIMEOUT`, and
140
+ `OCE_LOG_LEVEL` provide environment equivalents. `--state-path` and
141
+ `OCE_STATE_PATH` are for one workspace; use `--state-dir` or `OCE_STATE_DIR`
142
+ for multiple workspaces. Keep the API key in the environment rather than
143
+ command arguments.
144
+
145
+ The service endpoint, API key, and ignore patterns are shared through the same
146
+ environment variables. State selection follows the interface table above. A
147
+ Codex-ready skill with the host configuration and command guidance is included
148
+ at `skills/oce-client/SKILL.md`.
149
+
150
+ After installing a wheel, locate or install that skill with:
151
+
152
+ ```powershell
153
+ uv run oce-client skill path
154
+ uv run oce-client skill install
155
+ ```
156
+
157
+ The default installation target is `$CODEX_HOME/skills/oce-client` or
158
+ `$HOME/.codex/skills/oce-client`. Existing skill directories are preserved;
159
+ pass `--force` only when intentionally updating one.
160
+
161
+ Keep `OCE_API_KEY` in the host's environment or secret manager; do not commit it
162
+ to an MCP configuration file.