Compare commits

..
Author SHA1 Message Date
vasily 9252015572 docs: clarify local file connector setup 2026-10-17 13:20:52 +08:00
vasily 511e74d1a3 style(agent): sort test imports for lint gate 2026-10-16 20:13:40 +08:00
7 changed files with 62 additions and 38 deletions

No files matched your search

+2
View File
@@ -28,6 +28,8 @@ Before any source transfer or proposal work, require the operator-supplied authe
For a connected workflow, use MCP discovery and `diagnostics` to confirm the available tools, their advertised input schemas, role, capabilities and scope. Those discovered schemas are authoritative for this session. Routine ingestion does not require reading `manifest.json`, `service-v1.json`, record schemas, README sections or helper-script source to rediscover tools. If a required tool is absent or an advertised schema produces a concrete mismatch, stop before mutation; inspect only the relevant pinned contract entry to diagnose that mismatch, then report it if unresolved. Use the host's native file listing and viewing tools for workspace inventory and pack instructions; do not invoke shell commands just to list files. This pack is bound to the local GEWU v1 contract, but native host workflows are NOT RUN. Do not invent commands or assume another host's custom tools exist. If required tools are unavailable, identify the blocked stage; prepare local drafts only when requested and label them unaccepted.
Local-file ingestion requires both the GEWU service MCP server and the separate local `gewu-connector` stdio MCP server. The HTTP service cannot read agent-machine paths. Follow the capture setup and recovery rules in [CONTRIBUTIONS.md](protocols/CONTRIBUTIONS.md): use a connector-listed file ID, never pass file paths or base64 file content through conversational MCP, and stop with the exact connector/tool setup blocker if local capture is unavailable.
For Antigravity, call MCP tools using the schemas attached to discovered tools and the host-specific argument reminders in [CONTRIBUTIONS.md](protocols/CONTRIBUTIONS.md). Follow this order once per run: `diagnostics`, `get_project_context`, then `run_create`; do not repeat a successful stage or inspect local run files. A staged source candidate is not readable through `get_source`; use its exact candidate in the proposal's `register_source` operation and cite its owned extraction with `source_extraction_block`. Do not use `run_command` or other shell tools for routine ingestion, pack-pin inspection, or schema lookup. Do not read generated per-tool JSON files from `~/.gemini/antigravity-cli/mcp`; after a concrete argument error, inspect only the relevant pinned entry in the pack's `contracts/service-v1.json`, then correct the call once. GEWU's proposal parser tolerates exactly one omitted final outer `}` when the repaired text is valid and contract-conforming; evaluation or submit responses report this as `input_repaired=true`. Other malformed payloads stay invalid. GEWU's Jev assessment runs inside `ingest_review_create`; do not call a separate Jev MCP server. Read only the compact run_pins object from .agents/gewu-install.json when creating a new run; do not inspect other installer state or helper-script implementation during routine ingestion.
Knowledge changes go through typed MCP proposals. Local artifacts under `Drafts/` and `Runs/` support work but are not accepted knowledge. Only a service acceptance receipt establishes acceptance. Keep credentials and source bodies out of status summaries; do not claim a cloud-backed host keeps all content local.
+15 -3
View File
@@ -1,6 +1,6 @@
# GEWU local research-agent pack
Version 0.20.20. Adds claim-bound online verification observations with URL provenance and explicit limits; web pages are not uploaded or treated as archived evidence. Adds exact answer-basis references for citation-free governing-rule answers while retaining source-citation checks. Requires an explicit operator identity handoff before source transfer and bounds resumed work by learning unit. Fixes Windows updater path handling. Adds safe pack update scripts for Windows and POSIX workspaces. Clarifies Antigravity's MCP argument envelope and required project/budget fields, enforces the one-pass diagnostics/context/run sequence, and distinguishes staged sources from registered sources. It keeps prepared proposal JSON byte-for-byte intact, records safe recovery from one missing outer brace in a copied proposal, distinguishes malformed proposals from valid policy holds, makes clear that run state is created through GEWU MCP rather than local run files, avoids headless shell/cache lookups and run-ID reuse across pack changes, groups proposals by semantic learning, guards against placeholder probes, uses server-side canonical digest preparation, stores compact run pins, makes shared scope opt-in, checks duplicates, bounds citation reads and checkpoints per-source budgets. It clarifies that the service's 50,000 `budget_tokens` cap measures serialized response codepoints rather than model context tokens and recommends separate runs for independently resumable sources.
Version 0.20.21. Clarifies that local-file ingestion requires the GEWU service MCP and a separate local `gewu-connector` stdio server. Documents connector setup and requires the agent to stop with a setup blocker when the connector or selected file is unavailable, without streaming file bytes as base64 or inventing an upload script. Adds claim-bound online verification observations with URL provenance and explicit limits; web pages are not uploaded or treated as archived evidence. Adds exact answer-basis references for citation-free governing-rule answers while retaining source-citation checks. Requires an explicit operator identity handoff before source transfer and bounds resumed work by learning unit. Fixes Windows updater path handling. Adds safe pack update scripts for Windows and POSIX workspaces. Clarifies Antigravity's MCP argument envelope and required project/budget fields, enforces the one-pass diagnostics/context/run sequence, and distinguishes staged sources from registered sources. It keeps prepared proposal JSON byte-for-byte intact, records safe recovery from one missing outer brace in a copied proposal, distinguishes malformed proposals from valid policy holds, makes clear that run state is created through GEWU MCP rather than local run files, avoids headless shell/cache lookups and run-ID reuse across pack changes, groups proposals by semantic learning, guards against placeholder probes, uses server-side canonical digest preparation, stores compact run pins, makes shared scope opt-in, checks duplicates, bounds citation reads and checkpoints per-source budgets. It clarifies that the service's 50,000 `budget_tokens` cap measures serialized response codepoints rather than model context tokens and recommends separate runs for independently resumable sources.
This pack contains the [agent profile](AGENTS.md), Claude harness pointer ([CLAUDE.md](CLAUDE.md)), shared protocols, four skills and separate pipeline procedures. An existing local host supplies the model and tools. There is no standalone agent engine here.
@@ -67,8 +67,20 @@ GEWU can be deployed in two configurations: a **dedicated research workspace** o
```
Use `--mode dedicated` for a workspace reserved for research. The installer refuses an occupied GEWU destination and will not replace a pre-existing root instruction file.
3. **Configure host MCP connections:**
Configure the selected host's project MCP entry for the service's authenticated Streamable HTTP endpoint, normally `<service-url>/mcp`, using a bearer credential supplied through that host's secure environment or credential mechanism. Do not put a live token in a checked-in project config. The local `gewu-connector` command is a separate, explicit-file upload bridge; it is not the general GEWU service MCP client. It returns a typed source candidate and never returns the selected path or bytes. Omit `source_revision_id` to derive a content-bound local revision with an exact retry checkpoint, or pass the original ID when resuming an existing workflow. `source_capture_text` archives and extracts explicitly supplied UTF-8 text or Markdown up to 1 MB and returns a candidate marked as pasted text; it does not register the source. To enable URL capture, the service operator may set `GEWU_FETCH_ALLOWED_HOSTS` to comma-separated exact public hostnames. The capture tool archives UTF-8 text, Markdown, HTML and PDF. HTML extraction produces visible text, not markup-byte offsets. PDF extraction currently requires Linux bubblewrap, Poppler and prlimit, runs without network access; mixed text/blank pages are partial and image-only PDFs report `PDF_NO_TEXT` as unavailable.
3. **Configure the service and local-file MCP servers:**
Local-file ingestion needs two separate MCP server entries. The authenticated Streamable HTTP server at `<service-url>/mcp` provides GEWU workflow tools but cannot read files from the agent's machine. Configure it with the operator-provisioned bearer credential through the host's secure credential mechanism. The `gewu-connector` stdio server must run on the machine that can access the source file and receive the same appropriately scoped `GEWU_TOKEN` through its protected environment.
Configure the connector with its service URL and explicit file allowlist. Its launch arguments have this shape (the host's MCP config syntax varies):
```text
gewu-connector --url <service-url>/mcp --file <stable-id>=<absolute-local-path>
```
This command is the long-running stdio MCP server process; the host starts it and owns its lifetime. If the package is not installed in the host's Python environment, configure the host to launch the checkout through `uv run --project <path-to-GEWU> gewu-connector ...` instead. The connector must run where the selected file path exists, and its process must receive `GEWU_TOKEN` through the host's protected environment.
Add one `--file ID=PATH` for each selected source, and supply `GEWU_TOKEN` through the host's protected environment or secret store. Never put the token in the command arguments, prompt, or checked-in config. The connector provides `list_selected_files` and `upload_selected_file`; the agent must use a listed file ID and the authorized project ID. It streams and resumes bytes internally and returns metadata plus a staged source candidate, not the path or bytes. Do not send whole-file base64 through conversational MCP calls or suggest a one-shot upload script. If the host cannot start the connector, stop and report that setup blocker without claiming upload success. See the [local-file contribution protocol](protocols/CONTRIBUTIONS.md#capture-local-files-through-the-connector) for limits and failure behavior.
`source_capture_text` is only for UTF-8 plain text or Markdown explicitly supplied by the user (up to 1 MB); it archives and extracts that text but does not register the candidate. `source_capture_url` is available only for public hosts the service operator has allowlisted. It supports UTF-8 text, Markdown, HTML and PDF; HTML citations point into visible-text extraction. PDF extraction requires Linux bubblewrap, Poppler and prlimit, and scanned PDFs report `PDF_NO_TEXT`.
Supply the non-secret authenticated principal ID alongside the project, selected files and turn budget. For example: `principal_id=agent-pilot; project_id=dome-performance; sources=2017bouillot.pdf; budget=one evidence-backed learning unit this turn`. Keep bearer credentials in the connector/host secret mechanism. If the principal ID is missing, the agent must stop before capture instead of searching credential/configuration files.
+3 -3
View File
@@ -1049,7 +1049,7 @@
"name": "source_capture_url"
},
{
"description": "Begin a bounded source upload scoped to an authorized project.",
"description": "Begin a low-level upload for a byte-capable client such as gewu-connector.\n\nFor files on the agent's machine, configure and use the local stdio\nconnector instead of sending source bytes through conversational calls.\n",
"input_schema": {
"properties": {
"byte_length": {
@@ -1103,7 +1103,7 @@
"name": "source_upload_status"
},
{
"description": "Transfer one integrity-checked upload chunk.",
"description": "Transfer one integrity-checked chunk for a byte-capable upload client.\n\nThis low-level endpoint is used internally by gewu-connector. Do not\nsend whole-file base64 through conversational MCP; configure the local\nconnector for files on the agent's machine.\n",
"input_schema": {
"properties": {
"chunk_sha256": {
@@ -1135,7 +1135,7 @@
"name": "source_upload_chunk"
},
{
"description": "Finalize and content-address a supported file or UTF-8 transcript artifact.",
"description": "Finalize a low-level upload after all verified chunks are present.\n\nLocal-file connector workflows handle upload and finalization internally.\n",
"input_schema": {
"properties": {
"upload_id": {
+27 -27
View File
@@ -1,6 +1,6 @@
{
"pack_id": "gewu-research",
"pack_version": "0.20.20",
"pack_version": "0.20.21",
"manifest_version": "1.0.0",
"status": "local-contract-and-checkpoint-bound-hosts-not-qualified",
"execution": "existing-local-agent-host",
@@ -10,7 +10,7 @@
"contract_id": "gewu.service.v1",
"contract_version": 1,
"path": "contracts/service-v1.json",
"sha256": "1fc71ad76a464cfc031e5e6a4c12e0856a02146056e03e3633f4b18b961ac302",
"sha256": "8b52a4cea6b4de506c95f1a2c15454f1e48e0e1cbed61ded6661732161da53e6",
"scope": "Generated local MCP tool input schemas and v1 record schemas; native host workflows remain NOT RUN."
}
],
@@ -29,10 +29,10 @@
"skills": [
{
"id": "kb-ingest",
"version": "0.6.2",
"version": "0.6.3",
"entry": "skills/kb-ingest/SKILL.md",
"pipeline": "pipelines/ingest.md",
"pipeline_version": "0.5.1"
"pipeline_version": "0.5.2"
},
{
"id": "kb-query",
@@ -74,8 +74,8 @@
"requires_contracts": [
"gewu.protocol.evidence@0.1.0",
"gewu.protocol.scope@0.1.0",
"gewu.protocol.contributions@0.4.0",
"gewu.skill.kb-ingest@0.6.2",
"gewu.protocol.contributions@0.4.1",
"gewu.skill.kb-ingest@0.6.3",
"gewu.skill.kb-query@0.2.0",
"gewu.skill.kb-curate@0.1.0",
"gewu.skill.kb-synthesize@0.2.0"
@@ -95,7 +95,7 @@
"compatible_checkpoint_contracts": [
"gewu.local-checkpoint@0.1.0"
],
"sha256": "a5f090db5b3a3b26fb98bf3049a962d2f347efc6b347e3b3292dbc3ebbcf6b6c",
"sha256": "3ceabc51d1263de3041d65f9f553db6326f55b273d4a652068add382e5db71a0",
"hash_encoding": "utf8-no-bom-lf"
},
{
@@ -156,10 +156,10 @@
"module_id": "contributions",
"kind": "protocol",
"entry": "protocols/CONTRIBUTIONS.md",
"implementation_version": "0.11.2",
"implementation_version": "0.11.3",
"provided_contract": {
"id": "gewu.protocol.contributions",
"version": "0.4.0"
"version": "0.4.1"
},
"requires_contracts": [
"gewu.local-checkpoint@0.1.0"
@@ -178,22 +178,22 @@
"compatible_checkpoint_contracts": [
"gewu.local-checkpoint@0.1.0"
],
"sha256": "cc67fc3aa7fdd60ef14f213a568a6f8357dea7ed8c0538ede80b4430b54a3063",
"sha256": "d3f2e93f0e6862bceb513da62c209f7de30a15409ca71d68f26fb69f8354d8bd",
"hash_encoding": "utf8-no-bom-lf"
},
{
"module_id": "kb-ingest",
"kind": "skill",
"entry": "skills/kb-ingest/SKILL.md",
"implementation_version": "0.15.4",
"implementation_version": "0.15.5",
"provided_contract": {
"id": "gewu.skill.kb-ingest",
"version": "0.6.2"
"version": "0.6.3"
},
"requires_contracts": [
"gewu.protocol.evidence@0.1.0",
"gewu.protocol.scope@0.1.0",
"gewu.protocol.contributions@0.4.0",
"gewu.protocol.contributions@0.4.1",
"gewu.pipeline.kb-ingest-pipeline@0.5.0",
"gewu.protocol.online-verification@0.1.0"
],
@@ -210,22 +210,22 @@
"compatible_checkpoint_contracts": [
"gewu.local-checkpoint@0.1.0"
],
"sha256": "6c023193cdf95f7a291d5f214219b04c1baa70b8c9a1738ede7380f7e334c60d",
"sha256": "2e42fff082990b4261f603d0db1b306350364ebef2119b0df3c59073aad062a7",
"hash_encoding": "utf8-no-bom-lf"
},
{
"module_id": "kb-ingest-pipeline",
"kind": "pipeline",
"entry": "pipelines/ingest.md",
"implementation_version": "0.6.1",
"implementation_version": "0.6.2",
"provided_contract": {
"id": "gewu.pipeline.kb-ingest-pipeline",
"version": "0.5.1"
"version": "0.5.2"
},
"requires_contracts": [
"gewu.protocol.evidence@0.1.0",
"gewu.protocol.scope@0.1.0",
"gewu.protocol.contributions@0.4.0",
"gewu.protocol.contributions@0.4.1",
"gewu.protocol.online-verification@0.1.0"
],
"required_service_capabilities": [
@@ -241,7 +241,7 @@
"compatible_checkpoint_contracts": [
"gewu.local-checkpoint@0.1.0"
],
"sha256": "bc416eacdb5f7e8cae018f57b87294d41408ec3a6b6dd683d0ce7311b5d53062",
"sha256": "df3fe1d042aac9ebccaa6f8048c37cbd768bf13e0be2a428c677f5a1e834e9fb",
"hash_encoding": "utf8-no-bom-lf"
},
{
@@ -256,7 +256,7 @@
"requires_contracts": [
"gewu.protocol.evidence@0.1.0",
"gewu.protocol.scope@0.1.0",
"gewu.protocol.contributions@0.4.0",
"gewu.protocol.contributions@0.4.1",
"gewu.pipeline.kb-query-pipeline@0.2.0",
"gewu.protocol.online-verification@0.1.0"
],
@@ -282,7 +282,7 @@
"requires_contracts": [
"gewu.protocol.evidence@0.1.0",
"gewu.protocol.scope@0.1.0",
"gewu.protocol.contributions@0.4.0"
"gewu.protocol.contributions@0.4.1"
],
"required_service_capabilities": [
"knowledge:read"
@@ -306,7 +306,7 @@
"requires_contracts": [
"gewu.protocol.evidence@0.1.0",
"gewu.protocol.scope@0.1.0",
"gewu.protocol.contributions@0.4.0",
"gewu.protocol.contributions@0.4.1",
"gewu.pipeline.kb-curate-pipeline@0.1.0",
"gewu.protocol.online-verification@0.1.0"
],
@@ -338,7 +338,7 @@
"requires_contracts": [
"gewu.protocol.evidence@0.1.0",
"gewu.protocol.scope@0.1.0",
"gewu.protocol.contributions@0.4.0"
"gewu.protocol.contributions@0.4.1"
],
"required_service_capabilities": [
"knowledge:read",
@@ -368,7 +368,7 @@
"requires_contracts": [
"gewu.protocol.evidence@0.1.0",
"gewu.protocol.scope@0.1.0",
"gewu.protocol.contributions@0.4.0",
"gewu.protocol.contributions@0.4.1",
"gewu.pipeline.kb-synthesize-pipeline@0.2.0",
"gewu.protocol.online-verification@0.1.0"
],
@@ -394,7 +394,7 @@
"requires_contracts": [
"gewu.protocol.evidence@0.1.0",
"gewu.protocol.scope@0.1.0",
"gewu.protocol.contributions@0.4.0"
"gewu.protocol.contributions@0.4.1"
],
"required_service_capabilities": [
"knowledge:read"
@@ -421,7 +421,7 @@
"compatible_checkpoint_contracts": [
"gewu.local-checkpoint@0.1.0"
],
"sha256": "cae69ee2a7941e9b914ed23e850d7f72246ac9382cf711103c5b4cff59914981",
"sha256": "bada5e9f07d6f961a8bb0048621d5e8b50df381afa7fbdf11d8a5ebaff5e3eb5",
"hash_encoding": "utf8-no-bom-lf"
},
{
@@ -459,7 +459,7 @@
"compatible_checkpoint_contracts": [
"gewu.local-checkpoint@0.1.0"
],
"sha256": "1fc71ad76a464cfc031e5e6a4c12e0856a02146056e03e3633f4b18b961ac302",
"sha256": "8b52a4cea6b4de506c95f1a2c15454f1e48e0e1cbed61ded6661732161da53e6",
"hash_encoding": "utf8-no-bom-lf"
},
{
@@ -540,6 +540,6 @@
"snapshot": {
"algorithm": "sha256",
"scope": "modules array serialized as UTF-8 JSON with sorted keys and compact separators",
"digest": "8134dfbc437112c5a10d18913f545423344c015b5f34d174f5a435c5a5f0cdd9"
"digest": "d34b41efea76c93208f107f297da08e2ff60d740796def557bd5ca1d7c2c1895"
}
}
+2 -2
View File
@@ -1,11 +1,11 @@
# Ingestion pipeline
Version 0.5.1. Host-executed procedure for `kb-ingest`; not a background scheduler. Follow the contribution protocol for budgets, checkpoints and retry identity.
Version 0.5.2. Host-executed procedure for `kb-ingest`; not a background scheduler. Follow the contribution protocol for budgets, checkpoints and retry identity.
| Stage | Input | Output / checkpoint | Gate |
| --- | --- | --- | --- |
| Context | User-selected material, explicit project and `get_project_context` lens | Objective, authorized project lens including four default research lenses and saved guidance, scope, run identity and pinned pack versions | Required tools/schema are available; otherwise report blocked. |
| Capture | Explicitly selected local files, user-pasted text or an allowlisted public URL | Verified artifact digest, stable source ID, content-bound revision ID, metadata candidate and extraction availability | Use the connector for local files, `source_capture_text` for explicitly supplied UTF-8 text/Markdown (maximum 1 MB), or `source_capture_url` for a configured public host. Pasted text requires a stable capture ID and source key, and returns an archived artifact, extraction and candidate marked `pasted-text`; retry with the same ID and identical inputs after uncertainty, since changed inputs conflict. The service retains at most 1,024 private capture receipts. The capture does not register the source. The connector returns a typed `source_candidate`; `.vtt` and `.srt` files are parsed into cue-timed blocks and tagged `transcript`. Cite the precise cue times together with the quote span. The connector can record a declared NotebookLM export provenance for supported text, Markdown or PDF files, but does not verify that provenance; omit `source_revision_id` to derive a revision from file identity, content digest and its durable retry checkpoint, or supply a stable revision ID when resuming an existing workflow. Submit candidates through `proposal_submit`; staging alone does not register a source. Failed fetches return a `capture-failed` candidate without artifact bytes; register it only when a bookmark is useful. PDF extraction currently requires the supported Linux sandbox. HTML citations refer to visible extracted text, not markup-byte offsets. |
| Capture | Explicitly selected local files, user-pasted text or an allowlisted public URL | Verified artifact digest, stable source ID, content-bound revision ID, metadata candidate and extraction availability | For local files, require the separate local `gewu-connector` MCP server, discover `list_selected_files`, then upload a listed file ID with the authorized project ID. The service HTTP MCP cannot read local paths; the connector streams and checkpoints file bytes internally. If it is unavailable, report the connector/file setup blocker. Never send a whole-file base64 payload through conversational MCP or invent a one-shot upload script. Use `source_capture_text` only for text/Markdown explicitly supplied by the user (maximum 1 MB), or `source_capture_url` for a configured public host. Pasted text requires a stable capture ID and source key, and returns an archived artifact, extraction and candidate marked `pasted-text`; retry with the same ID and identical inputs after uncertainty, since changed inputs conflict. The service retains at most 1,024 private capture receipts. The capture does not register the source. The connector returns a typed `source_candidate`; `.vtt` and `.srt` files are parsed into cue-timed blocks and tagged `transcript`. Cite the precise cue times together with the quote span. The connector can record a declared NotebookLM export provenance for supported text, Markdown or PDF files, but does not verify that provenance; omit `source_revision_id` to derive a revision from file identity, content digest and its durable retry checkpoint, or supply a stable revision ID when resuming an existing workflow. Submit candidates through `proposal_submit`; staging alone does not register a source. Failed fetches return a `capture-failed` candidate without artifact bytes; register it only when a bookmark is useful. PDF extraction currently requires the supported Linux sandbox. HTML citations refer to visible extracted text, not markup-byte offsets. |
| Budget checkpoint | Current source stage and run budget | Per-source coverage checkpoint, remaining file/section plan and resume point | Process one source at a time. Use metadata to target relevant bounded slices; retain concise notes and exact evidence excerpts, not full source text. Checkpoint after each source. If quota or tool budget is near exhaustion, save the exact resume point and report remaining coverage without dropping a research lens. |
| Triage | Source plus project lens and four default lenses (technical, conceptual, cultural-historical, financial-market) | Included sections, explicit clear-exclusion reasons and review flags | Treat lenses as coverage prompts, not quotas. Historical, philosophical, cultural or commercial evidence is not automatically out of scope. Exclude only clearly unrelated or unavailable material, or user-excluded topics. Continue normal evidence-backed proposal processing for plausible material; add `ingest_review_create` as a follow-up notification/filter flag when human relevance review would help. |
| Duplicate check | Candidate findings and explicit readable project/shared scope | Existing-node candidates, reuse/update decision, or explicit unresolved-review flag | Before creating a node, run multiple lexical searches over its title, distinctive terms and likely synonyms, then inspect plausible matches with `get_node`. Reuse the stable node ID and preserve supported content for a true update; do not create a second node when it represents the same concept. Keep materially distinct conditions as distinct records. The backend flags exact entity name/alias matches only and does not deduplicate other node types. |
+11 -1
View File
@@ -8,6 +8,16 @@ Require the authenticated principal ID from the operator before capture or propo
For a resumed run, first resolve run_status and reuse its run identity, source references and unchanged pack pins. Work on one bounded learning unit, retain a compact cited draft, then prepare/evaluate/submit it and checkpoint coverage before changing source. A successful read of a new passage is progress even before a checkpoint; measure tool-level progress as well as durable state. After two identical read/status calls without a changed input or a stated recovery reason, stop that loop and checkpoint the exact blocker. On a time/tool budget boundary, checkpoint pending sections and return an honest partial report.
## Capture local files through the connector
GEWU uses two MCP servers for local-file ingestion. The authenticated Streamable HTTP server at `<service-url>/mcp` provides GEWU workflow tools. A separate local stdio server, `gewu-connector`, can read only files the operator explicitly allowlists at process startup and transfers their bytes to the service. The HTTP server cannot read paths on the agent's machine, and a remote service path is never a local-file path.
The host must launch the connector as its own MCP server with the service URL, one or more stable `--file ID=PATH` entries, and `GEWU_TOKEN` supplied through the host's protected environment or secret store. The connector executable is registered by the GEWU package as `gewu-connector`; this is an MCP server command, not a one-shot upload script. Keep the token out of arguments, prompts and checked-in config. Connector paths are resolved on the machine running the stdio process. The connector rejects unavailable, symlinked, non-regular or empty files and enforces the service's 50 MiB file limit.
At runtime, discover both configured servers. Use the local connector's `list_selected_files` to get the configured file IDs, then call its `upload_selected_file` with that exact `file_id` and the authorized `project_id`. Do not pass a filesystem path to the service HTTP tools, serialize file bytes as base64 in a model-visible call, or invent a local upload script. The connector streams and resumes bounded chunks internally; its receipt contains metadata and the staged source candidate, not the path or bytes. A successful upload still requires normal extraction review and proposal registration before the source is registered.
If the connector or selected file is unavailable, stop at capture and report which MCP server/tool or configured file ID is missing, along with the host setup action required. Do not retry discovery loops or claim a source was uploaded. For text the user explicitly supplies in the conversation, `source_capture_text` is a separate path for UTF-8 plain text or Markdown up to 1 MB; it is not a binary-file substitute. Use `source_capture_url` only for public hosts the operator has allowlisted.
## Compact factual draft contract
Use the advertised tool schema for call arguments. For a factual learning bundle, the proposal operations are `{operation: "register_source", source: <exact returned candidate>}` when the revision is new, `{operation: "upsert_node", node: <complete node>}` for a new stable node, and `{operation: "update_node", target_id: <existing stable node ID>, node: <complete enriched node>}` when new source evidence supports an existing node. The complete proposal envelope is described below. Do not submit incomplete objects to discover their shape.
@@ -20,7 +30,7 @@ Each claim requires `{claim_id, text, evidence_type, evidence, assessment}`; evi
## Antigravity call argument reminders
Antigravity may expose MCP through a generic `call_mcp_tool` wrapper. Use the discovered server/tool names and its advertised schema; do not infer nested `scope` objects when the operation accepts flat scope fields. The wrapper's outer arguments are `ServerName`, `ToolName` and `Arguments`; `Arguments` contains only the target MCP tool's input object. For example, `get_source` is called as `{ServerName:"gewu-dome-pilot", ToolName:"get_source", Arguments:{project_id:"dome-performance", revision_id:"<exact revision id>"}}`. Do not nest the wrapper object inside `Arguments`. For common GEWU calls, the required arguments are: `gewu-dome-files/list_selected_files` `{}`; `upload_selected_file` `{file_id, project_id}`; `get_project_context` `{project_id}`; `get_source` `{project_id, revision_id}`; `source_extraction_block` `{project_id, extraction_id, block_id, offset, length}`; `list_sources` `{projects, include_shared, all_projects:false, limit, budget_tokens}`; `search` `{query, projects, include_shared, all_projects:false, limit, budget_tokens}`; `run_create` and `run_checkpoint` `{request_json}`; `proposal_prepare`, `proposal_evaluate`, and `proposal_submit` `{proposal_json}`; `ingest_review_create` `{review_json}`. The request/proposal/review values are serialized JSON strings that must follow their pinned record schemas. Never omit `project_id` from a selected-file upload or source read, or put `scope` inside search/list-source arguments. `get_source` reads registered sources only. A newly captured/uploaded source is staged; do not call `get_source` for it. Register its exact returned `source_candidate` in the same proposal that cites it, and read its evidence through the returned staged `extraction_id`.
Antigravity may expose MCP through a generic `call_mcp_tool` wrapper. Use the discovered server/tool names and their advertised schemas; do not infer nested `scope` objects when an operation accepts flat scope fields. The wrapper's outer arguments are `ServerName`, `ToolName` and `Arguments`; `Arguments` contains only the target MCP tool's input object. For example, `get_source` is called as `{ServerName:"gewu-dome-pilot", ToolName:"get_source", Arguments:{project_id:"dome-performance", revision_id:"<exact revision id>"}}`. Do not nest the wrapper object inside `Arguments`. The local connector is a separate MCP server: `list_selected_files` takes `{}` and `upload_selected_file` takes `{file_id, project_id}`. Use the exact file ID returned by the connector; do not pass a path, file bytes or base64 through the wrapper. For common service calls, the required arguments are: `get_project_context` `{project_id}`; `get_source` `{project_id, revision_id}`; `source_extraction_block` `{project_id, extraction_id, block_id, offset, length}`; `list_sources` `{projects, include_shared, all_projects:false, limit, budget_tokens}`; `search` `{query, projects, include_shared, all_projects:false, limit, budget_tokens}`; `run_create` and `run_checkpoint` `{request_json}`; `proposal_prepare`, `proposal_evaluate`, and `proposal_submit` `{proposal_json}`; `ingest_review_create` `{review_json}`. The request/proposal/review values are serialized JSON strings that must follow their pinned record schemas. Never omit `project_id` from a selected-file upload or source read, or put `scope` inside search/list-source arguments. `get_source` reads registered sources only. A newly captured/uploaded source is staged; do not call `get_source` for it. Register its exact returned `source_candidate` in the same proposal that cites it, and read its evidence through the returned staged `extraction_id`.
For Antigravity, call `diagnostics`, `get_project_context` and `run_create` once each in that order. After a successful call, keep its returned IDs/context and move to the next stage. If a generic-wrapper call gets an argument validation error, inspect only the pinned entry for that tool, correct the outer wrapper once, and stop if the corrected call fails.
+2 -2
View File
@@ -8,11 +8,11 @@ Preflight: require the operator-supplied authenticated principal ID before trans
Read the pack's [evidence](../../protocols/EVIDENCE.md), [scope](../../protocols/SCOPE.md), [contribution](../../protocols/CONTRIBUTIONS.md) and, when online verification is enabled, [online verification](../../protocols/ONLINE_VERIFICATION.md) protocols, then use the [ingestion pipeline](../../pipelines/ingest.md).
If the configured selected-file connector is missing or fails to initialize because `GEWU_TOKEN` is absent, stop at source capture and report the exact host-connector setup error. Do not inspect Antigravity configuration, credentials, environment variables, host files or MCP cache; do not launch repeated sessions to rediscover the same unavailable tool. Continue only after the operator repairs the connector environment. This is a host setup failure, not a reason to switch tools or synthesize a source candidate.
Local file capture requires the separate `gewu-connector` stdio MCP server as well as the GEWU service MCP server. Discover the connector's `list_selected_files` and `upload_selected_file` tools; use a listed file ID and the authorized project ID. The connector reads only files explicitly allowlisted by the operator and streams their bytes internally. If the connector, either tool, or selected file is unavailable, stop at capture and report the exact missing server/tool or file ID and the host setup action required. Do not pass file paths or file bytes to the service MCP, send base64 file content in conversational tool calls, suggest a nonexistent one-shot upload script, or synthesize a source candidate. Do not inspect Antigravity configuration, credentials, environment variables, host files or MCP cache, or launch repeated sessions to rediscover the same unavailable tool. Continue only after the operator repairs the connector setup.
Keep each source run bounded. During ingestion, use MCP responses and the selected source's extraction as the source of truth. Do not search or read repository reports, tests, backend implementation, database files or unrelated source files to answer the research question. The only local workflow data allowed is the single `run_pins` object in `.agents/gewu-install.json` when creating a new run; for a concrete tool-schema error, inspect only that tool's pinned contract entry. A `run_create` call is a real durable workflow action, never a schema probe: assemble its complete request with every required field and non-empty module pins before calling it. Never test it with placeholder IDs, missing fields or empty arrays. If a required value cannot be obtained from the prescribed context or pins, stop and report the missing value rather than iterating on guesses.
Inputs are the selected source(s), explicit project and the user's research objective. Use `get_project_context` for the project's north star, key questions, watch list, taxonomy extensions, research lenses and saved ingest guidance. Every project defaults to four research lenses: technical, conceptual, cultural-historical and financial-market. Treat these as coverage prompts, not quotas. Confirm required tools and arguments from MCP discovery and `diagnostics`; use the schema attached to each discovered tool and the Antigravity argument reminders in CONTRIBUTIONS.md. For Antigravity, do not use shell tools or inspect the host MCP cache. On a schema mismatch, use only the relevant pinned entry in `contracts/service-v1.json` and correct once. Use GEWU tools only; Jev runs inside the backend through `ingest_review_create`, not a standalone Jev MCP server. In Antigravity, call `diagnostics`, `get_project_context` and `run_create` once each in order; after a successful call, reuse its returned state rather than repeating it. Do not call `get_source` for a staged candidate: use its exact returned candidate in the proposal's `register_source` operation and read the source's citation through its staged extraction. Create the durable service run with `run_create` after diagnostics and project context; pass its `request_json` envelope using current `run_pins` from `.agents/gewu-install.json`. Do not look for a local `Runs/<run_id>` file before creation; run state is service-owned. Never reuse a run ID after changing the pack or create payload. Use the connector for local byte transfer; `upload_selected_file` requires both the configured `file_id` and the authorized `project_id`. It returns a typed source metadata candidate without exposing the selected path or bytes. Selected `.vtt` and `.srt` files produce timestamped transcript cues; cite exact cue start/end times and the quote span. A declared NotebookLM export label is metadata only and is not export verification. For text explicitly pasted by the user, use `source_capture_text` with a stable capture ID and source key; it accepts UTF-8 plain text or Markdown up to 1 MB, archives and extracts it, and returns a typed candidate marked `capture_method=pasted-text`. Retry uncertain calls with the same capture ID and identical inputs; changed input under that ID conflicts. It does not register the candidate. `source_capture_url` fetches only operator-allowlisted public hosts and stages supported text, Markdown, HTML or PDF bytes; it also returns a source metadata candidate but does not register it. Add each new source's exact candidate as `register_source` in the proposal that cites it, or verify the source was already registered and readable. Use the candidate's `revision_id` and capture's `extraction_id`; never invent or substitute these IDs. Submit candidates with the normal typed proposal flow, and use `capture-failed` candidates only as bookmarks, never as factual evidence. URL source IDs follow the sanitized URL; local source IDs follow the connector's configured file ID; pasted-text source IDs are derived from the supplied stable key and revision IDs include the content digest. PDF extraction currently requires Linux bubblewrap, Poppler and prlimit. Unsupported formats and unavailable parsers must be reported without inventing an extraction. If the service is unavailable, report the blocked stage and only prepare an unaccepted local draft when that work was requested.
Inputs are the selected source(s), explicit project and the user's research objective. Use `get_project_context` for the project's north star, key questions, watch list, taxonomy extensions, research lenses and saved ingest guidance. Every project defaults to four research lenses: technical, conceptual, cultural-historical and financial-market. Treat these as coverage prompts, not quotas. Confirm required tools and arguments from MCP discovery and `diagnostics`; use the schema attached to each discovered tool and the Antigravity argument reminders in CONTRIBUTIONS.md. For Antigravity, do not use shell tools or inspect the host MCP cache. On a schema mismatch, use only the relevant pinned entry in `contracts/service-v1.json` and correct once. Use GEWU tools only; Jev runs inside the backend through `ingest_review_create`, not a standalone Jev MCP server. In Antigravity, call `diagnostics`, `get_project_context` and `run_create` once each in order; after a successful call, reuse its returned state rather than repeating it. Do not call `get_source` for a staged candidate: use its exact returned candidate in the proposal's `register_source` operation and read the source's citation through its staged extraction. Create the durable service run with `run_create` after diagnostics and project context; pass its `request_json` envelope using current `run_pins` from `.agents/gewu-install.json`. Do not look for a local `Runs/<run_id>` file before creation; run state is service-owned. Never reuse a run ID after changing the pack or create payload. Use the separate local connector for local-file byte transfer; first call its `list_selected_files`, then call `upload_selected_file` with the exact listed `file_id` and authorized `project_id`. The connector reads its operator-configured allowlist and streams/resumes bytes without returning the path or file content. Selected `.vtt` and `.srt` files produce timestamped transcript cues; cite exact cue start/end times and the quote span. A declared NotebookLM export label is metadata only and is not export verification. For text explicitly pasted by the user, use `source_capture_text` with a stable capture ID and source key; it accepts UTF-8 plain text or Markdown up to 1 MB, archives and extracts it, and returns a typed candidate marked `capture_method=pasted-text`. Retry uncertain calls with the same capture ID and identical inputs; changed input under that ID conflicts. It does not register the candidate. `source_capture_url` fetches only operator-allowlisted public hosts and stages supported text, Markdown, HTML or PDF bytes; it also returns a source metadata candidate but does not register it. Add each new source's exact candidate as `register_source` in the proposal that cites it, or verify the source was already registered and readable. Use the candidate's `revision_id` and capture's `extraction_id`; never invent or substitute these IDs. Submit candidates with the normal typed proposal flow, and use `capture-failed` candidates only as bookmarks, never as factual evidence. Do not send file paths, whole-file contents or base64 payloads through conversational MCP calls and do not suggest an upload script; when the connector is absent, report its setup blocker. URL source IDs follow the sanitized URL; local source IDs follow the connector's configured file ID; pasted-text source IDs are derived from the supplied stable key and revision IDs include the content digest. PDF extraction currently requires Linux bubblewrap, Poppler and prlimit. Unsupported formats and unavailable parsers must be reported without inventing an extraction. If the service is unavailable, report the blocked stage and only prepare an unaccepted local draft when that work was requested.
Extract useful atomic assertions, problems, techniques or cases with their conditions across all four lenses where the source contains relevant material. Consider cultural history, philosophical context and market/financial evidence as project data when they explain the project's origins, concepts, adoption, audience, costs or viability; they are not automatically peripheral. First try to connect uncertain material to the north star, a key question, a saved rule or one of the lenses. Exclude only clearly unrelated material, unavailable evidence, or material the user explicitly excluded. Do not defer a section merely because its relevance is indirect, non-technical or historical. Continue normal evidence-backed proposal evaluation/submission for all plausible useful findings. When human relevance/categorization feedback or explicit Jev label normalization is needed, call `ingest_review_create` with a single `review_json` string, the complete `IngestReviewCreate` fields, and the exact extraction excerpt/locator. The required rationale field is `relevance_rationale`, not `reason`; include `review_id` and `extraction_id`. This persists a non-blocking notification and never blocks the evidence-backed proposal flow.