searchio 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.
- searchio-0.1.0/.dockerignore +16 -0
- searchio-0.1.0/.env.example +96 -0
- searchio-0.1.0/.github/workflows/image.yml +76 -0
- searchio-0.1.0/.github/workflows/publish.yml +62 -0
- searchio-0.1.0/.gitignore +21 -0
- searchio-0.1.0/Dockerfile +83 -0
- searchio-0.1.0/LICENSE +201 -0
- searchio-0.1.0/PKG-INFO +29 -0
- searchio-0.1.0/README.md +359 -0
- searchio-0.1.0/docker/Dockerfile +58 -0
- searchio-0.1.0/docker-compose.yml +26 -0
- searchio-0.1.0/packaging/npm/README.md +51 -0
- searchio-0.1.0/packaging/npm/bin/searchio-mcp.js +116 -0
- searchio-0.1.0/packaging/npm/package.json +32 -0
- searchio-0.1.0/pyproject.toml +49 -0
- searchio-0.1.0/src/searchio/__init__.py +0 -0
- searchio-0.1.0/src/searchio/cli.py +494 -0
- searchio-0.1.0/src/searchio/config.py +298 -0
- searchio-0.1.0/src/searchio/engine.py +322 -0
- searchio-0.1.0/src/searchio/errors.py +133 -0
- searchio-0.1.0/src/searchio/extract.py +515 -0
- searchio-0.1.0/src/searchio/fuse.py +343 -0
- searchio-0.1.0/src/searchio/mcp.py +316 -0
- searchio-0.1.0/src/searchio/models.py +235 -0
- searchio-0.1.0/src/searchio/net/__init__.py +0 -0
- searchio-0.1.0/src/searchio/net/_sqlite.py +69 -0
- searchio-0.1.0/src/searchio/net/blocks.py +427 -0
- searchio-0.1.0/src/searchio/net/cache.py +151 -0
- searchio-0.1.0/src/searchio/net/clearance.py +291 -0
- searchio-0.1.0/src/searchio/net/ladder.py +2138 -0
- searchio-0.1.0/src/searchio/net/login_handoff.py +284 -0
- searchio-0.1.0/src/searchio/net/pdf.py +136 -0
- searchio-0.1.0/src/searchio/net/persona.py +232 -0
- searchio-0.1.0/src/searchio/net/profiles.py +204 -0
- searchio-0.1.0/src/searchio/net/ratelimit.py +127 -0
- searchio-0.1.0/src/searchio/net/robots.py +307 -0
- searchio-0.1.0/src/searchio/net/sidecar.py +858 -0
- searchio-0.1.0/src/searchio/providers/__init__.py +0 -0
- searchio-0.1.0/src/searchio/providers/apis.py +429 -0
- searchio-0.1.0/src/searchio/providers/base.py +133 -0
- searchio-0.1.0/src/searchio/providers/engines.py +610 -0
- searchio-0.1.0/src/searchio/providers/facebook.py +917 -0
- searchio-0.1.0/src/searchio/providers/marketplace.py +392 -0
- searchio-0.1.0/src/searchio/providers/registry.py +88 -0
- searchio-0.1.0/src/searchio/providers/youtube.py +369 -0
- searchio-0.1.0/src/searchio/router.py +377 -0
- searchio-0.1.0/src/searchio/server.py +340 -0
- searchio-0.1.0/src/searchio/swarm/__init__.py +0 -0
- searchio-0.1.0/src/searchio/swarm/budget.py +106 -0
- searchio-0.1.0/src/searchio/swarm/llm.py +366 -0
- searchio-0.1.0/src/searchio/swarm/orchestrator.py +413 -0
- searchio-0.1.0/src/searchio/swarm/tools.py +534 -0
- searchio-0.1.0/src/searchio/swarm/worker.py +289 -0
- searchio-0.1.0/tests/__init__.py +0 -0
- searchio-0.1.0/tests/fixtures/fb-relay-search.html +1 -0
- searchio-0.1.0/tests/fixtures/fb_marketplace.html +186 -0
- searchio-0.1.0/tests/fixtures/youtube_results.html +23 -0
- searchio-0.1.0/tests/test_agent_language.py +87 -0
- searchio-0.1.0/tests/test_apis_providers.py +237 -0
- searchio-0.1.0/tests/test_apis_youtube_third80.py +107 -0
- searchio-0.1.0/tests/test_blocks.py +260 -0
- searchio-0.1.0/tests/test_blocks_second_pass.py +122 -0
- searchio-0.1.0/tests/test_clearance.py +99 -0
- searchio-0.1.0/tests/test_clearance_drop65.py +88 -0
- searchio-0.1.0/tests/test_engine_second_pass.py +59 -0
- searchio-0.1.0/tests/test_engine_second_pass_b.py +104 -0
- searchio-0.1.0/tests/test_engines_swarm.py +1342 -0
- searchio-0.1.0/tests/test_extract_second_pass.py +196 -0
- searchio-0.1.0/tests/test_facebook.py +701 -0
- searchio-0.1.0/tests/test_facebook_concurrency72.py +198 -0
- searchio-0.1.0/tests/test_fuse_extract.py +585 -0
- searchio-0.1.0/tests/test_identity.py +261 -0
- searchio-0.1.0/tests/test_ladder_capture_notes.py +189 -0
- searchio-0.1.0/tests/test_ladder_cert70.py +59 -0
- searchio-0.1.0/tests/test_ladder_executor64.py +61 -0
- searchio-0.1.0/tests/test_ladder_lifecycle63.py +26 -0
- searchio-0.1.0/tests/test_ladder_redirect_scheme76.py +88 -0
- searchio-0.1.0/tests/test_ladder_rendered_first.py +173 -0
- searchio-0.1.0/tests/test_ladder_router.py +2644 -0
- searchio-0.1.0/tests/test_ladder_starvation64.py +63 -0
- searchio-0.1.0/tests/test_ladder_throttle81.py +111 -0
- searchio-0.1.0/tests/test_ladder_trust_cookies.py +250 -0
- searchio-0.1.0/tests/test_ladder_vendor73.py +184 -0
- searchio-0.1.0/tests/test_ladder_warmup74.py +98 -0
- searchio-0.1.0/tests/test_llm_backend.py +263 -0
- searchio-0.1.0/tests/test_login_handoff.py +540 -0
- searchio-0.1.0/tests/test_marketplace.py +44 -0
- searchio-0.1.0/tests/test_mcp.py +103 -0
- searchio-0.1.0/tests/test_netpolicy.py +238 -0
- searchio-0.1.0/tests/test_operator_surface.py +264 -0
- searchio-0.1.0/tests/test_orchestrator.py +201 -0
- searchio-0.1.0/tests/test_pdf_extract.py +94 -0
- searchio-0.1.0/tests/test_persona_currency64.py +55 -0
- searchio-0.1.0/tests/test_robots_singleflight77.py +69 -0
- searchio-0.1.0/tests/test_router_skipped72.py +155 -0
- searchio-0.1.0/tests/test_se_serve.py +1680 -0
- searchio-0.1.0/tests/test_second_pass_apis_marketplace.py +261 -0
- searchio-0.1.0/tests/test_server_api.py +230 -0
- searchio-0.1.0/tests/test_server_disconnect65.py +169 -0
- searchio-0.1.0/tests/test_sidecar_concurrency71.py +97 -0
- searchio-0.1.0/tests/test_sidecar_listings_backend.py +506 -0
- searchio-0.1.0/tests/test_tenant_cookies.py +137 -0
- searchio-0.1.0/tests/test_worker_blank_report72.py +77 -0
- searchio-0.1.0/tests/test_worker_forcesubmit_budget87.py +60 -0
- searchio-0.1.0/tests/test_worker_second_pass.py +108 -0
- searchio-0.1.0/tests/test_youtube.py +375 -0
- searchio-0.1.0/tests/test_youtube_second_pass.py +41 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# searchio configuration. Every value is optional -- `searchio search` works
|
|
2
|
+
# with this file absent entirely. Copy to .env to use.
|
|
3
|
+
|
|
4
|
+
# ── The swarm (the only thing that needs a key) ──────────────────────────────
|
|
5
|
+
# Backend: anthropic (default) or deepseek / any OpenAI-compatible endpoint.
|
|
6
|
+
# SEARCHIO_LLM_PROVIDER=anthropic
|
|
7
|
+
# ANTHROPIC_API_KEY=sk-ant-...
|
|
8
|
+
# SEARCHIO_MODEL=claude-opus-5
|
|
9
|
+
#
|
|
10
|
+
# OpenAI-compatible backend (DeepSeek, self-hosted vLLM, ...).
|
|
11
|
+
# DEEPSEEK_API_KEY=sk-...
|
|
12
|
+
# SEARCHIO_DEEPSEEK_MODEL=deepseek-v4-pro
|
|
13
|
+
# SEARCHIO_DEEPSEEK_BASE_URL=https://api.deepseek.com
|
|
14
|
+
#
|
|
15
|
+
# Token prices in USD per million, used only to report a cost estimate.
|
|
16
|
+
# Anthropic rates are built in; set these for any other backend, or the
|
|
17
|
+
# run reports tokens without a dollar figure rather than guessing.
|
|
18
|
+
# SEARCHIO_PRICE_IN_PER_MTOK=0.28
|
|
19
|
+
# SEARCHIO_PRICE_OUT_PER_MTOK=0.42
|
|
20
|
+
# SEARCHIO_LEAD_EFFORT=high
|
|
21
|
+
# SEARCHIO_WORKER_EFFORT=low
|
|
22
|
+
# SEARCHIO_MAX_WORKERS=5
|
|
23
|
+
# SEARCHIO_MAX_TOOL_CALLS_PER_WORKER=12
|
|
24
|
+
# SEARCHIO_SWARM_TOKEN_BUDGET=400000
|
|
25
|
+
# SEARCHIO_SWARM_WALL_CLOCK_S=600
|
|
26
|
+
|
|
27
|
+
# ── Acquisition ladder ───────────────────────────────────────────────────────
|
|
28
|
+
# 0 = plain HTTP only, 1 = + TLS impersonation, 2 = + stealth browser.
|
|
29
|
+
# Set to 1 to guarantee searchio never spawns a browser.
|
|
30
|
+
# SEARCHIO_MAX_TIER=2
|
|
31
|
+
# SEARCHIO_MIN_TEXT_CHARS=120
|
|
32
|
+
# SEARCHIO_TIER0_TIMEOUT_S=8
|
|
33
|
+
# SEARCHIO_TIER1_TIMEOUT_S=15
|
|
34
|
+
# SEARCHIO_TIER2_TIMEOUT_S=90
|
|
35
|
+
|
|
36
|
+
# ── Politeness (also what keeps you unblocked -- see README) ─────────────────
|
|
37
|
+
# SEARCHIO_PER_DOMAIN_RPS=0.75
|
|
38
|
+
# SEARCHIO_PER_DOMAIN_BURST=3
|
|
39
|
+
# SEARCHIO_PER_DOMAIN_MAX_RPS=4.0
|
|
40
|
+
# SEARCHIO_GLOBAL_CONCURRENCY=24
|
|
41
|
+
# enforce | warn | off
|
|
42
|
+
# SEARCHIO_ROBOTS_POLICY=warn
|
|
43
|
+
#
|
|
44
|
+
# Egress proxy, applied to all three tiers. IP reputation is the one input
|
|
45
|
+
# to an anti-bot decision that fingerprint work cannot move.
|
|
46
|
+
# SEARCHIO_PROXY=http://user:pass@host:8080
|
|
47
|
+
# Browser-tier-only override, for when residential bandwidth is metered.
|
|
48
|
+
# SEARCHIO_BROWSER_PROXY=
|
|
49
|
+
# Interpreter for the sidecar; empty auto-detects one with patchright.
|
|
50
|
+
# SEARCHIO_SIDECAR_PYTHON=
|
|
51
|
+
# Optional contact string advertised on requests when you want to be identifiable.
|
|
52
|
+
# SEARCHIO_USER_AGENT_CONTACT=+https://example.com/bot
|
|
53
|
+
|
|
54
|
+
# ── SwarmIO browser sidecar (tier 2) ─────────────────────────────────────────
|
|
55
|
+
# Auto-discovered at ~/Documents/GitHub/SwarmIO if present. Otherwise point at
|
|
56
|
+
# crates/swarm-tools/python/browser_sidecar.py, or at an already-running one.
|
|
57
|
+
# SEARCHIO_SIDECAR_SCRIPT=C:/Users/you/Documents/GitHub/SwarmIO/crates/swarm-tools/python/browser_sidecar.py
|
|
58
|
+
# SEARCHIO_SIDECAR_URL=http://127.0.0.1:8899
|
|
59
|
+
# SEARCHIO_SIDECAR_PORT=8899
|
|
60
|
+
# SEARCHIO_SIDECAR_TOKEN=
|
|
61
|
+
# SEARCHIO_SIDECAR_AUTOSTART=true
|
|
62
|
+
|
|
63
|
+
# ── Cache and state ──────────────────────────────────────────────────────────
|
|
64
|
+
# SEARCHIO_STATE_DIR=~/.searchio
|
|
65
|
+
# SEARCHIO_CACHE_TTL_S=3600
|
|
66
|
+
# SEARCHIO_CACHE_ENABLED=true
|
|
67
|
+
|
|
68
|
+
# ── Providers ────────────────────────────────────────────────────────────────
|
|
69
|
+
# SEARCHIO_FANOUT=4
|
|
70
|
+
# SEARCHIO_PROVIDER_TIMEOUT_S=12
|
|
71
|
+
# Optional; raises the GitHub rate limit from 60/hr to 5000/hr.
|
|
72
|
+
# SEARCHIO_GITHUB_TOKEN=
|
|
73
|
+
|
|
74
|
+
# ── Facebook Marketplace ─────────────────────────────────────────────────────
|
|
75
|
+
# Marketplace is geolocated by exit IP. Without a city, a query answered from a
|
|
76
|
+
# container returns that datacentre's metro -- confidently and wrongly. Use the
|
|
77
|
+
# slug as it appears in the Marketplace URL.
|
|
78
|
+
# SEARCHIO_FACEBOOK_CITY=nyc
|
|
79
|
+
#
|
|
80
|
+
# Optional Playwright storage_state JSON. Logged out, a search caps at ~14
|
|
81
|
+
# listings; a session lifts that. Create the file by logging in BY HAND through
|
|
82
|
+
# SwarmIO's interactive_login (headed browser, no credentials captured).
|
|
83
|
+
# A scripted login from a fresh automation profile is the fastest way to get an
|
|
84
|
+
# account checkpointed, and a checkpointed account returns fewer listings than
|
|
85
|
+
# none at all.
|
|
86
|
+
# SEARCHIO_FACEBOOK_SESSION=/path/to/fb-session.json
|
|
87
|
+
# Commercial SERP adapters are not wired up in this build -- the keyless path
|
|
88
|
+
# and the stealth tier cover the same ground. These are reserved names.
|
|
89
|
+
# SEARCHIO_SERPAPI_KEY=
|
|
90
|
+
# SEARCHIO_BRAVE_KEY=
|
|
91
|
+
# SEARCHIO_TAVILY_KEY=
|
|
92
|
+
|
|
93
|
+
# ── Docker (see docker-compose.yml) ──────────────────────────────────────────
|
|
94
|
+
# Path to your SwarmIO checkout, used to build the browser-worker image.
|
|
95
|
+
# SWARMIO_PATH=../SwarmIO
|
|
96
|
+
# SEARCHIO_PORT=8080
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: image
|
|
2
|
+
|
|
3
|
+
# Builds the all-in-one image (python tiers + Rust engine sidecar + Chromium)
|
|
4
|
+
# and pushes it to ghcr. Runs on every main push (rolling :latest) and on
|
|
5
|
+
# version tags (the tag becomes the image tag, minus the leading v).
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
push:
|
|
9
|
+
branches: [main]
|
|
10
|
+
tags: ["v*"]
|
|
11
|
+
|
|
12
|
+
env:
|
|
13
|
+
# Docker requires lowercase repository names and github.repository_owner is
|
|
14
|
+
# mixed-case (IOServicesLabs), so pin the lowercase form rather than
|
|
15
|
+
# deriving it.
|
|
16
|
+
IMAGE: ghcr.io/ioserviceslabs/searchio-mcp
|
|
17
|
+
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
packages: write
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
build-push:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- uses: docker/setup-buildx-action@v3
|
|
29
|
+
|
|
30
|
+
- uses: docker/login-action@v3
|
|
31
|
+
with:
|
|
32
|
+
registry: ghcr.io
|
|
33
|
+
username: ${{ github.actor }}
|
|
34
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
35
|
+
|
|
36
|
+
- name: Resolve tags
|
|
37
|
+
id: meta
|
|
38
|
+
run: |
|
|
39
|
+
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
|
|
40
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
41
|
+
echo "tags=${IMAGE}:${tag},${IMAGE}:latest" >> "$GITHUB_OUTPUT"
|
|
42
|
+
else
|
|
43
|
+
echo "tags=${IMAGE}:latest" >> "$GITHUB_OUTPUT"
|
|
44
|
+
fi
|
|
45
|
+
env:
|
|
46
|
+
IMAGE: ${{ env.IMAGE }}
|
|
47
|
+
|
|
48
|
+
- name: Resolve engine clone token
|
|
49
|
+
id: engine
|
|
50
|
+
env:
|
|
51
|
+
TOKEN: ${{ secrets.ENGINE_CLONE_TOKEN }}
|
|
52
|
+
# build-push-action rejects an empty entry in `secrets:`, so the secret
|
|
53
|
+
# line is built here and left blank when the token is unset (the
|
|
54
|
+
# public-repo case -- the Dockerfile then clones anonymously).
|
|
55
|
+
run: |
|
|
56
|
+
if [ -n "$TOKEN" ]; then
|
|
57
|
+
echo "secrets=engine_token=$TOKEN" >> "$GITHUB_OUTPUT"
|
|
58
|
+
else
|
|
59
|
+
echo "secrets=" >> "$GITHUB_OUTPUT"
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
- uses: docker/build-push-action@v6
|
|
63
|
+
with:
|
|
64
|
+
context: .
|
|
65
|
+
push: true
|
|
66
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
67
|
+
# The engine stage clones the searchio-engine repo. When the repo
|
|
68
|
+
# secret ENGINE_CLONE_TOKEN (fine-grained PAT, Contents:read on the
|
|
69
|
+
# engine repo) is set -- needed only while the engine repo is
|
|
70
|
+
# private -- it is mounted as the build secret `engine_token`.
|
|
71
|
+
# Once engine releases exist, pin ENGINE_REF to a release tag.
|
|
72
|
+
build-args: |
|
|
73
|
+
ENGINE_REF=main
|
|
74
|
+
secrets: ${{ steps.engine.outputs.secrets }}
|
|
75
|
+
cache-from: type=gha,scope=image
|
|
76
|
+
cache-to: type=gha,mode=max,scope=image
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
# Publishes the npm wrapper and the Python package on version tags (v*).
|
|
4
|
+
# Both jobs stamp the package version from the tag, so the tag is the single
|
|
5
|
+
# source of truth.
|
|
6
|
+
#
|
|
7
|
+
# Requires (one-time setup, see README "Releasing"):
|
|
8
|
+
# npm — repo secret NPM_TOKEN: granular access token at npmjs.com with
|
|
9
|
+
# publish scope on @ioserviceslabs/searchio-mcp
|
|
10
|
+
# PyPI — EITHER Trusted Publishing configured on pypi.org for this repo +
|
|
11
|
+
# this workflow filename (no secret needed; the OIDC exchange in
|
|
12
|
+
# gh-action-pypi-publish takes over when no password is set)
|
|
13
|
+
# OR the repo secret PYPI_API_TOKEN
|
|
14
|
+
#
|
|
15
|
+
# These only start succeeding once the repos/packages go public: the npm
|
|
16
|
+
# package is @ioserviceslabs/searchio-mcp (org-scoped) and PyPI serves the
|
|
17
|
+
# sdist/wheel built here.
|
|
18
|
+
|
|
19
|
+
on:
|
|
20
|
+
push:
|
|
21
|
+
tags: ["v*"]
|
|
22
|
+
|
|
23
|
+
permissions:
|
|
24
|
+
contents: read
|
|
25
|
+
|
|
26
|
+
jobs:
|
|
27
|
+
npm:
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
- uses: actions/setup-node@v4
|
|
32
|
+
with:
|
|
33
|
+
node-version: 20
|
|
34
|
+
registry-url: https://registry.npmjs.org
|
|
35
|
+
- name: Sync version from tag
|
|
36
|
+
working-directory: packaging/npm
|
|
37
|
+
run: npm version --no-git-tag-version "${GITHUB_REF_NAME#v}"
|
|
38
|
+
- name: Publish
|
|
39
|
+
working-directory: packaging/npm
|
|
40
|
+
env:
|
|
41
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
42
|
+
run: npm publish --access public
|
|
43
|
+
|
|
44
|
+
pypi:
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
permissions:
|
|
47
|
+
id-token: write # Trusted Publishing (used when PYPI_API_TOKEN is unset)
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
- uses: actions/setup-python@v5
|
|
51
|
+
with:
|
|
52
|
+
python-version: "3.12"
|
|
53
|
+
- name: Sync version from tag
|
|
54
|
+
run: sed -i "s/^version = .*/version = \"${GITHUB_REF_NAME#v}\"/" pyproject.toml
|
|
55
|
+
- name: Build sdist + wheel
|
|
56
|
+
run: |
|
|
57
|
+
python -m pip install --upgrade build
|
|
58
|
+
python -m build
|
|
59
|
+
- name: Publish
|
|
60
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
61
|
+
with:
|
|
62
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.venv/
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.pyc
|
|
4
|
+
.env
|
|
5
|
+
.env.*
|
|
6
|
+
!.env.example
|
|
7
|
+
.searchio/
|
|
8
|
+
*.egg-info/
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
.mypy_cache/
|
|
11
|
+
.ruff_cache/
|
|
12
|
+
bench/out/
|
|
13
|
+
*.log
|
|
14
|
+
|
|
15
|
+
# Local agent/worktree settings
|
|
16
|
+
.claude/
|
|
17
|
+
|
|
18
|
+
# Development-only content: kept locally, never published
|
|
19
|
+
bench/
|
|
20
|
+
docs/
|
|
21
|
+
scripts/
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# syntax=docker/dockerfile:1
|
|
2
|
+
# ─────────────────────────────────────────────────────────────────────────────
|
|
3
|
+
# searchio all-in-one image.
|
|
4
|
+
#
|
|
5
|
+
# One container = the Python acquisition ladder + MCP server + the Rust
|
|
6
|
+
# engine sidecar + a real Chromium (patchright) for the challenge tier.
|
|
7
|
+
#
|
|
8
|
+
# stdio MCP (Claude Desktop, Cursor, any LLM client):
|
|
9
|
+
# docker run -i --rm ghcr.io/ioserviceslabs/searchio-mcp
|
|
10
|
+
#
|
|
11
|
+
# SSE/HTTP MCP (remote clients):
|
|
12
|
+
# docker run -p 8080:8080 ghcr.io/ioserviceslabs/searchio-mcp \
|
|
13
|
+
# searchio-mcp --transport sse --host 0.0.0.0 --port 8080
|
|
14
|
+
#
|
|
15
|
+
# Keep clearance/cookies across restarts:
|
|
16
|
+
# docker run -i --rm -v searchio-state:/root/.searchio ...
|
|
17
|
+
#
|
|
18
|
+
# The engine is built from the searchio-engine repo. The repo is private for
|
|
19
|
+
# now: mount a read token as the BuildKit secret `engine_token` and the clone
|
|
20
|
+
# authenticates via an http extraHeader (never a URL, never an image layer).
|
|
21
|
+
# GitHub Actions: image.yml passes the ENGINE_CLONE_TOKEN repo secret.
|
|
22
|
+
# Local: docker build --secret id=engine_token,env=ENGINE_CLONE_TOKEN ...
|
|
23
|
+
# Once the repo is public, drop the secret and the anonymous clone just works.
|
|
24
|
+
# ARG ENGINE_REF pins an engine tag/branch (a release tag once they exist).
|
|
25
|
+
#
|
|
26
|
+
ARG PYTHON_VERSION=3.12
|
|
27
|
+
ARG ENGINE_REF=main
|
|
28
|
+
|
|
29
|
+
# ── Stage 1: Rust engine sidecar ─────────────────────────────────────────────
|
|
30
|
+
FROM rust:1-bookworm AS engine
|
|
31
|
+
ARG ENGINE_REF
|
|
32
|
+
RUN --mount=type=secret,id=engine_token,required=false \
|
|
33
|
+
set -eux; \
|
|
34
|
+
apt-get update; \
|
|
35
|
+
apt-get install -y --no-install-recommends git ca-certificates; \
|
|
36
|
+
rm -rf /var/lib/apt/lists/*; \
|
|
37
|
+
if [ -s /run/secrets/engine_token ]; then \
|
|
38
|
+
git -c "http.extraHeader=AUTHORIZATION: bearer $(cat /run/secrets/engine_token)" \
|
|
39
|
+
clone --depth 1 --branch "${ENGINE_REF}" \
|
|
40
|
+
https://github.com/IOServicesLabs/searchio-engine /engine; \
|
|
41
|
+
else \
|
|
42
|
+
git clone --depth 1 --branch "${ENGINE_REF}" \
|
|
43
|
+
https://github.com/IOServicesLabs/searchio-engine /engine; \
|
|
44
|
+
fi
|
|
45
|
+
WORKDIR /engine
|
|
46
|
+
RUN cargo build --release --bin se-serve
|
|
47
|
+
|
|
48
|
+
# ── Stage 2: runtime ─────────────────────────────────────────────────────────
|
|
49
|
+
FROM python:${PYTHON_VERSION}-bookworm
|
|
50
|
+
|
|
51
|
+
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
52
|
+
PYTHONUNBUFFERED=1 \
|
|
53
|
+
# Engine is the primary tier-2 backend; the container boots it lazily on
|
|
54
|
+
# first escalation. The challenge tier (patchright) is configured via
|
|
55
|
+
# SEARCHIO_SIDECAR_* env at run time if wanted.
|
|
56
|
+
SEARCHIO_SIDECAR_ENGINE=1 \
|
|
57
|
+
SEARCHIO_SIDECAR_AUTOSTART=1 \
|
|
58
|
+
SEARCHIO_ENGINE_BIN=/usr/local/bin/se-serve
|
|
59
|
+
|
|
60
|
+
# The challenge tier's Chromium system libraries are installed by patchright
|
|
61
|
+
# itself (--with-deps installs the distro set; bookworm is supported), so the
|
|
62
|
+
# list stays correct as Chromium's needs change. Fonts are for readable
|
|
63
|
+
# screenshots. The sidecar adds --no-sandbox/--disable-dev-shm-usage itself
|
|
64
|
+
# when it detects a container.
|
|
65
|
+
RUN apt-get update \
|
|
66
|
+
&& apt-get install -y --no-install-recommends \
|
|
67
|
+
ca-certificates fonts-liberation fonts-noto-color-emoji \
|
|
68
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
69
|
+
|
|
70
|
+
COPY --from=engine /engine/target/release/se-serve /usr/local/bin/se-serve
|
|
71
|
+
|
|
72
|
+
WORKDIR /app
|
|
73
|
+
COPY pyproject.toml README.md LICENSE ./
|
|
74
|
+
COPY src ./src
|
|
75
|
+
RUN pip install --no-cache-dir '.[mcp]' patchright \
|
|
76
|
+
&& patchright install --with-deps chromium
|
|
77
|
+
|
|
78
|
+
# Clearance bank + tenant sessions live under ~/.searchio; mount a volume to
|
|
79
|
+
# keep them across container restarts.
|
|
80
|
+
VOLUME /root/.searchio
|
|
81
|
+
|
|
82
|
+
# stdio MCP by default (pair with `docker run -i`).
|
|
83
|
+
CMD ["searchio-mcp"]
|
searchio-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" 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" 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 necessary
|
|
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 2026 IOServices Labs
|
|
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.
|
searchio-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: searchio
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: LLM-assisted search: a research swarm over a blocking-resistant acquisition ladder.
|
|
5
|
+
License-File: LICENSE
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Requires-Dist: anthropic>=0.69
|
|
8
|
+
Requires-Dist: brotli>=1.1
|
|
9
|
+
Requires-Dist: curl-cffi>=0.7
|
|
10
|
+
Requires-Dist: fastapi>=0.115
|
|
11
|
+
Requires-Dist: httpx[brotli,http2,zstd]>=0.27
|
|
12
|
+
Requires-Dist: pydantic-settings>=2.3
|
|
13
|
+
Requires-Dist: pydantic>=2.7
|
|
14
|
+
Requires-Dist: pypdf>=4
|
|
15
|
+
Requires-Dist: rich>=13.7
|
|
16
|
+
Requires-Dist: selectolax>=0.3.21
|
|
17
|
+
Requires-Dist: sse-starlette>=2.1
|
|
18
|
+
Requires-Dist: tenacity>=8.2
|
|
19
|
+
Requires-Dist: trafilatura>=1.12
|
|
20
|
+
Requires-Dist: typer>=0.12
|
|
21
|
+
Requires-Dist: uvicorn[standard]>=0.30
|
|
22
|
+
Requires-Dist: zstandard>=0.22
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
25
|
+
Requires-Dist: pytest>=8; extra == 'dev'
|
|
26
|
+
Requires-Dist: respx>=0.21; extra == 'dev'
|
|
27
|
+
Requires-Dist: youtube-transcript-api>=0.6; extra == 'dev'
|
|
28
|
+
Provides-Extra: mcp
|
|
29
|
+
Requires-Dist: mcp<2,>=1.8; extra == 'mcp'
|