expose manifest-driven project knowledge through MCP
This commit is contained in:
@@ -186,6 +186,54 @@ points. A page returns referenceId, offset, total, text and nextOffset (null at
|
||||
end). Invalid pagination fails; unknown/traversal-like IDs cannot escape the
|
||||
index. Installed packaging and real provider resolution are steps 17–18.
|
||||
|
||||
### 5.1 Manifest and Provider Resolution
|
||||
|
||||
`studio_project_context` resolves an exact, canonical root registered by an open
|
||||
project session. It does not use the focused window, accept a source-directory
|
||||
path as a project root, acquire a manual lease, or require an AI grant. A session
|
||||
is discoverable only after successful opening and until closure begins.
|
||||
Unregistered/closed roots return `PROJECT_NOT_OPEN`.
|
||||
|
||||
Each call reads the saved `prometeu.json` and dependency manifests again. Missing
|
||||
or invalid primary manifests fail explicitly instead of returning cached language
|
||||
metadata. Languages are grouped by declared ID, with the primary flag derived
|
||||
from the main manifest. Unknown IDs retain their identity and expose unsupported
|
||||
build/LSP support; no default frontend is consulted.
|
||||
|
||||
Extensions and source roots come from the installed frontend specification.
|
||||
LSP feature support comes from the same compiler bridge description used by the
|
||||
existing LSP server, not from a duplicated PBS capability list. If that provider
|
||||
cannot describe its LSP, support is UNKNOWN with an explicit limitation. These
|
||||
are installed-provider capabilities, not a promise that the MCP language-query
|
||||
tool is already composed or that any particular source file will compile.
|
||||
|
||||
Language versions remain unknown when no owner metadata exists. Compiler versions
|
||||
use the installed frontend package's `Implementation-Version` only when present.
|
||||
The requested SDK version has manifest provenance; the context distinguishes
|
||||
versions supported by the installed provider from unsupported requests. Multiple
|
||||
SDK requests for the same language yield an unknown aggregate version, an explicit
|
||||
limitation and separate SDK library entries. These identifiers MUST NOT be
|
||||
substituted for one another.
|
||||
|
||||
Dependency paths and registry entries use the compiler's existing resolver,
|
||||
including its main-root-relative local path semantics and registry requirement.
|
||||
Discovery does not create a registry, install dependencies or build sources.
|
||||
Unresolved declarations remain visible with empty roots and limitations. Mixed
|
||||
language graphs are described but reported as unsupported for the current build
|
||||
pipeline. Discovery is bounded to 256 projects and 256 declarations per manifest.
|
||||
|
||||
The editable scope is the canonical project root **minus** read-only roots.
|
||||
Read-only scope takes precedence: external/registry libraries and their transitive
|
||||
dependencies remain protected even when stored beneath the project root or also
|
||||
reachable through a local declaration. Source roots are canonicalized, including
|
||||
symlink targets. SDK entries are always read-only; packaged SDK resources need not
|
||||
have filesystem roots. Scope metadata does not sandbox an external agent's own
|
||||
filesystem tools; the developer remains responsible for those tools and Git.
|
||||
|
||||
Paths in MCP results are absolute filesystem strings, not `file:` URIs. Until
|
||||
step 18 packages the owner-maintained index, references/reference IDs are empty
|
||||
with `DOCUMENTATION_UNAVAILABLE`; no guessed path or reference is advertised.
|
||||
|
||||
## 6. Image Contract
|
||||
|
||||
MCP image content has `type:image`, `mimeType:image/png`, and base64 `data` of
|
||||
@@ -210,7 +258,8 @@ authentication, Origin, endpoint/method/version handling, tool dispatch, malform
|
||||
or oversized input, closure, restart and old-token rejection. Provider doubles
|
||||
exist only in tests. Composition starts/closes transport with Studio.
|
||||
|
||||
Step 16's production registry is empty until functional handlers are composed;
|
||||
The production registry composes `studio_project_context` as of step 17; other
|
||||
tools are advertised only when their functional handlers are connected.
|
||||
DEV configuration-copy stays unavailable until step 21. Passing this transport
|
||||
gate is not the phase 3 or final external-agent acceptance gate. API/Core and
|
||||
JavaFX MUST NOT import MCP/HTTP implementations; architecture tests enforce it.
|
||||
|
||||
Reference in New Issue
Block a user