archivebox-api 2.5.4__tar.gz → 2.5.6__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.
- archivebox_api-2.5.6/.pre-commit-config.yaml +32 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/AGENTS.md +1 -1
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/CHANGELOG.md +10 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/PKG-INFO +3 -9
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/README.md +0 -2
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/__init__.py +13 -0
- archivebox_api-2.5.6/archivebox_api/__main__.py +4 -0
- archivebox_api-2.5.6/archivebox_api/connector_sources.py +117 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/kg_ingest.py +16 -8
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/mcp_server.py +0 -68
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/ontology/archivebox.ttl +4 -2
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/ontology/certification.json +6 -9
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/ontology/mappings/source.yaml +1 -1
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/prompts/web_archivist_specialist.json +0 -2
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api.egg-info/PKG-INFO +3 -9
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api.egg-info/SOURCES.txt +1 -11
- archivebox_api-2.5.6/archivebox_api.egg-info/entry_points.txt +8 -0
- archivebox_api-2.5.6/archivebox_api.egg-info/requires.txt +7 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api.egg-info/top_level.txt +0 -1
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/pyproject.toml +17 -18
- archivebox_api-2.5.6/release-readiness.json +6334 -0
- archivebox_api-2.5.6/requirements.txt +1 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/tests/test_archivebox_api_brute_force_coverage.py +0 -21
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/tests/test_archivebox_coverage.py +0 -73
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/tests/test_archivebox_coverage_extra.py +0 -104
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/tests/test_conformance.py +2 -1
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/tests/test_web_source.py +0 -47
- archivebox_api-2.5.4/.pre-commit-config.yaml +0 -165
- archivebox_api-2.5.4/archivebox_api/__main__.py +0 -4
- archivebox_api-2.5.4/archivebox_api/connector_manifest.yml +0 -172
- archivebox_api-2.5.4/archivebox_api/connectors/__init__.py +0 -0
- archivebox_api-2.5.4/archivebox_api/connectors/mcp_source_presets.json +0 -18
- archivebox_api-2.5.4/archivebox_api/connectors/tool_schema_fingerprints.json +0 -8
- archivebox_api-2.5.4/archivebox_api/prompts/__init__.py +0 -0
- archivebox_api-2.5.4/archivebox_api/skills/__init__.py +0 -0
- archivebox_api-2.5.4/archivebox_api.egg-info/entry_points.txt +0 -17
- archivebox_api-2.5.4/archivebox_api.egg-info/requires.txt +0 -13
- archivebox_api-2.5.4/connector_manifest.yml +0 -172
- archivebox_api-2.5.4/opencode.json +0 -18
- archivebox_api-2.5.4/release-readiness.json +0 -16198
- archivebox_api-2.5.4/requirements.txt +0 -1
- archivebox_api-2.5.4/scripts/security_sanitizer.py +0 -318
- archivebox_api-2.5.4/scripts/verify_api_integration.py +0 -320
- archivebox_api-2.5.4/tests/test_default_content_surfaces.py +0 -43
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/CLAUDE.md +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/LICENSE +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/MANIFEST.in +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/api/__init__.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/api/api_client_auth.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/api/api_client_base.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/api/api_client_cli.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/api/api_client_core.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/api_client.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/auth.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/mcp_config.json +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/ontology/__init__.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/ontology/fixtures/records.json +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/ontology/migrations/manifest.json +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/ontology/shapes/connector.shacl.ttl +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/skills/archivebox-api-operations/SKILL.md +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/skills/archivebox-api-operations/agents/openai.yaml +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/skills/archivebox-api-operations/references/catalog.md +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/skills/archivebox-kg-ingestion/SKILL.md +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/skills/archivebox-kg-ingestion/WORKFLOW.md +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/skills/archivebox-snapshot-search/SKILL.md +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/skills/archivebox-snapshot-search/WORKFLOW.md +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/skills/archivebox-web-archiving/SKILL.md +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/skills/archivebox-web-archiving/WORKFLOW.md +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/web_source.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/web_source_contract.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api.egg-info/dependency_links.txt +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/mkdocs.yml +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/setup.cfg +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/tests/conftest.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/tests/test_action_discovery.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/tests/test_basic.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/tests/test_init_dynamics.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/tests/test_kg_ingest.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/tests/test_kg_media.py +0 -0
- {archivebox_api-2.5.4 → archivebox_api-2.5.6}/tests/test_sdk_transport.py +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# The whole pre-commit configuration of a connector (PIPE-VALIDATION-R001.9). Everything a
|
|
2
|
+
# connector used to copy lives in pipelines at `rev: main`: the sanitizer, the standard-file
|
|
3
|
+
# check, the codespell defaults and the gate set. A change to a shared check reaches every
|
|
4
|
+
# connector with no edit here. Per-repo options go in pyproject.toml tables only.
|
|
5
|
+
default_install_hook_types: [pre-commit, pre-push]
|
|
6
|
+
default_stages: [pre-commit]
|
|
7
|
+
repos:
|
|
8
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
9
|
+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
|
|
10
|
+
hooks:
|
|
11
|
+
- id: trailing-whitespace
|
|
12
|
+
- id: end-of-file-fixer
|
|
13
|
+
- id: check-merge-conflict
|
|
14
|
+
- id: check-yaml
|
|
15
|
+
args: [--unsafe]
|
|
16
|
+
- id: check-toml
|
|
17
|
+
- id: check-json
|
|
18
|
+
- id: detect-private-key
|
|
19
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
20
|
+
rev: cb8c523fd4835aba42af70f4cad5568db4df0b6c # v0.16.0
|
|
21
|
+
hooks:
|
|
22
|
+
- id: ruff-check
|
|
23
|
+
- id: ruff-format
|
|
24
|
+
- repo: https://github.com/Knuckles-Team/pipelines
|
|
25
|
+
rev: main
|
|
26
|
+
hooks:
|
|
27
|
+
- id: connector-standard
|
|
28
|
+
- id: secrets
|
|
29
|
+
- id: spec
|
|
30
|
+
stages: [pre-push]
|
|
31
|
+
- id: tests-fast
|
|
32
|
+
stages: [pre-push]
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Tool-neutral rules for any AI agent or human working in this repository. This block is maintained by the fleet standard; edit outside the markers.
|
|
7
7
|
|
|
8
8
|
- **Owner boundary:** this repository owns one external system's calls, mappings and MCP tools (spec prefix `CONN-ARCHIVEBOX-API-`); it depends on the connector SDK only. Feature routing across repositories: [ecosystem boundaries](https://github.com/Knuckles-Team/pipelines/blob/main/reference/ecosystem-boundaries.md).
|
|
9
|
-
- **Setup:** run `
|
|
9
|
+
- **Setup:** run `uv sync --locked`, then `uvx pre-commit install --hook-type pre-commit --hook-type pre-push`.
|
|
10
10
|
- **Gates:** `uvx pre-commit run --all-files` must pass before you push. Do not bypass hooks to get green.
|
|
11
11
|
- **Commits:** one logical change per commit with a `Spec: <ID>` trailer (or `Spec: none (<reason>)`), plus a `Co-Authored-By:` trailer naming the assisting agent. Stage explicit paths only; never `git add -A` or `git add .`. Use your own configured Git identity, never a tool or bot name.
|
|
12
12
|
- **Org rules:** [organization AGENTS.md](https://github.com/Knuckles-Team/.github/blob/main/AGENTS.md).
|
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.5.6] - 2026-10-24
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- Central connector migration: requires `agent-connector-sdk>=0.5.3`; server bootstrap, version, containers, ontology artifacts, security scaffold and pre-commit config are provided centrally.
|
|
12
|
+
|
|
13
|
+
## [2.5.5] - 2026-10-23
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- Requires `agent-connector-sdk>=0.4.1`; data sources are declared in code (`connector_sources`).
|
|
17
|
+
|
|
8
18
|
## [Unreleased]
|
|
9
19
|
|
|
10
20
|
### Added
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: archivebox-api
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.6
|
|
4
4
|
Summary: Pythonic ArchiveBox API Wrapper and Fast MCP Server for Agentic AI use!
|
|
5
|
-
Author-email:
|
|
5
|
+
Author-email: Repository Maintainers <maintainers@knuckles.team>
|
|
6
6
|
License: MIT
|
|
7
7
|
Classifier: Development Status :: 5 - Production/Stable
|
|
8
8
|
Classifier: License :: Public Domain
|
|
@@ -12,11 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: <3.15,>=3.12
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: agent-connector-sdk[mcp]<
|
|
16
|
-
Provides-Extra: mcp
|
|
17
|
-
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.3.18; extra == "mcp"
|
|
18
|
-
Provides-Extra: all
|
|
19
|
-
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.3.18; extra == "all"
|
|
15
|
+
Requires-Dist: agent-connector-sdk[mcp]<0.6.0,>=0.5.3
|
|
20
16
|
Provides-Extra: test
|
|
21
17
|
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
|
|
22
18
|
Requires-Dist: pytest>=9.1.1; extra == "test"
|
|
@@ -46,8 +42,6 @@ Dynamic: license-file
|
|
|
46
42
|

|
|
47
43
|

|
|
48
44
|
|
|
49
|
-
*Version: 2.5.4*
|
|
50
|
-
|
|
51
45
|
> **Documentation** — Installation, deployment, usage across the API, CLI, MCP, and
|
|
52
46
|
> A2A agent interfaces, and guidance for provisioning the ArchiveBox platform are
|
|
53
47
|
> maintained in the [official documentation](https://knuckles-team.github.io/archivebox-api/).
|
|
@@ -20,8 +20,6 @@
|
|
|
20
20
|

|
|
21
21
|

|
|
22
22
|
|
|
23
|
-
*Version: 2.5.4*
|
|
24
|
-
|
|
25
23
|
> **Documentation** — Installation, deployment, usage across the API, CLI, MCP, and
|
|
26
24
|
> A2A agent interfaces, and guidance for provisioning the ArchiveBox platform are
|
|
27
25
|
> maintained in the [official documentation](https://knuckles-team.github.io/archivebox-api/).
|
|
@@ -85,3 +85,16 @@ def __getattr__(name: str) -> Any:
|
|
|
85
85
|
|
|
86
86
|
def __dir__() -> list[str]:
|
|
87
87
|
return sorted(list(globals().keys()) + __all__)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
from agent_connector_sdk.connector import Connector
|
|
91
|
+
|
|
92
|
+
from archivebox_api.api_client import Api
|
|
93
|
+
from archivebox_api.auth import get_client
|
|
94
|
+
|
|
95
|
+
connector = Connector(
|
|
96
|
+
api=Api,
|
|
97
|
+
get_client=get_client,
|
|
98
|
+
tools="archivebox_api.mcp_server",
|
|
99
|
+
instructions="archivebox-api MCP Server — one typed tool per API operation.",
|
|
100
|
+
)
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"""Data sources of this connector, declared by tool name (generated by connector-ontology-map migrate).
|
|
2
|
+
|
|
3
|
+
Served live as ``connector://resources``. Regenerate by editing the declarations, not the tools.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from agent_connector_sdk.ingest.live_declaration import source_meta
|
|
12
|
+
|
|
13
|
+
SOURCES: tuple[Any, ...] = (
|
|
14
|
+
source_meta(
|
|
15
|
+
tool="archivebox_get_snapshots",
|
|
16
|
+
source_id="archivebox-snapshots",
|
|
17
|
+
record_type="Snapshot",
|
|
18
|
+
id_field="abid",
|
|
19
|
+
cursor_field="modified_at",
|
|
20
|
+
page_param="page",
|
|
21
|
+
page_size_param="limit",
|
|
22
|
+
pagination="page",
|
|
23
|
+
preset={
|
|
24
|
+
"doc_type": "web_snapshot",
|
|
25
|
+
"page_kind": "number",
|
|
26
|
+
"params_style": "args",
|
|
27
|
+
},
|
|
28
|
+
records_path="items",
|
|
29
|
+
server="archivebox-mcp",
|
|
30
|
+
text_field="title",
|
|
31
|
+
title_field="url",
|
|
32
|
+
),
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
SCHEMA_VERSION = 2
|
|
36
|
+
|
|
37
|
+
FIELD_SETS: dict[str, dict[str, str]] = {
|
|
38
|
+
"fields_1": {
|
|
39
|
+
"abid": "xsd:string",
|
|
40
|
+
"archiveStatus": "xsd:string",
|
|
41
|
+
"bookmarkedAt": "xsd:dateTime",
|
|
42
|
+
"extractor": "xsd:string",
|
|
43
|
+
"output": "xsd:string",
|
|
44
|
+
"sourceUrl": "xsd:string",
|
|
45
|
+
"timestamp": "xsd:string",
|
|
46
|
+
},
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
SCHEMA_MAPPINGS: dict[str, Any] = {
|
|
50
|
+
"ArchiveResult": {
|
|
51
|
+
"field_sets": ["fields_1"],
|
|
52
|
+
"ontology_class": None,
|
|
53
|
+
},
|
|
54
|
+
"Chunk": {
|
|
55
|
+
"fields": {
|
|
56
|
+
"backend": "xsd:string",
|
|
57
|
+
"char_end": "xsd:integer",
|
|
58
|
+
"char_start": "xsd:integer",
|
|
59
|
+
"chunk_index": "xsd:integer",
|
|
60
|
+
"content_hash": "xsd:string",
|
|
61
|
+
"document_id": "xsd:string",
|
|
62
|
+
"source_uri": "xsd:string",
|
|
63
|
+
"text": "xsd:string",
|
|
64
|
+
"title": "xsd:string",
|
|
65
|
+
},
|
|
66
|
+
"ontology_class": "Chunk",
|
|
67
|
+
},
|
|
68
|
+
"Document": {
|
|
69
|
+
"fields": {
|
|
70
|
+
"author": "xsd:string",
|
|
71
|
+
"backend": "xsd:string",
|
|
72
|
+
"canonical_url": "xsd:string",
|
|
73
|
+
"chunk_count": "xsd:integer",
|
|
74
|
+
"content_hash": "xsd:string",
|
|
75
|
+
"content_sha256": "xsd:string",
|
|
76
|
+
"fallback_from": "xsd:string",
|
|
77
|
+
"fetch_mode": "xsd:string",
|
|
78
|
+
"published": "xsd:string",
|
|
79
|
+
"search_engine": "xsd:string",
|
|
80
|
+
"search_query": "xsd:string",
|
|
81
|
+
"search_rank": "xsd:integer",
|
|
82
|
+
"site_name": "xsd:string",
|
|
83
|
+
"source_uri": "xsd:string",
|
|
84
|
+
"text": "xsd:string",
|
|
85
|
+
"title": "xsd:string",
|
|
86
|
+
"url": "xsd:string",
|
|
87
|
+
},
|
|
88
|
+
"ontology_class": "Document",
|
|
89
|
+
},
|
|
90
|
+
"Snapshot": {
|
|
91
|
+
"field_sets": ["fields_1"],
|
|
92
|
+
"ontology_class": None,
|
|
93
|
+
},
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
RESOURCES: tuple[dict[str, str], ...] = (
|
|
97
|
+
{
|
|
98
|
+
"id_prefix": "archiveresult",
|
|
99
|
+
"label": "Archive Result",
|
|
100
|
+
"name": "ArchiveResult",
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id_prefix": "snapshot",
|
|
104
|
+
"label": "Snapshot",
|
|
105
|
+
"name": "Snapshot",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id_prefix": "document",
|
|
109
|
+
"label": "Document",
|
|
110
|
+
"name": "Document",
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"id_prefix": "chunk",
|
|
114
|
+
"label": "Chunk",
|
|
115
|
+
"name": "Chunk",
|
|
116
|
+
},
|
|
117
|
+
)
|
|
@@ -14,7 +14,7 @@ every applicable modality (the "maximum ingestion" bar):
|
|
|
14
14
|
Everything rides the shared ``agent_connector_sdk.ingest`` knowledge-ingest facade. Engine
|
|
15
15
|
failures are explicit; the connector never acknowledges a partial or absent write. Node ids
|
|
16
16
|
follow ``archivebox:<class>:<externalId>`` and ``node_type`` matches a class the package's
|
|
17
|
-
``
|
|
17
|
+
``archivebox_api.connector_sources`` declares.
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
20
|
from __future__ import annotations
|
|
@@ -22,6 +22,7 @@ from __future__ import annotations
|
|
|
22
22
|
import logging
|
|
23
23
|
from typing import Any
|
|
24
24
|
|
|
25
|
+
from agent_connector_sdk.connector_identity import connector_name
|
|
25
26
|
from agent_connector_sdk.ingest import (
|
|
26
27
|
ChangeSet,
|
|
27
28
|
Document,
|
|
@@ -37,7 +38,7 @@ from agent_connector_sdk.ingest import (
|
|
|
37
38
|
|
|
38
39
|
logger = logging.getLogger("archivebox_api.kg")
|
|
39
40
|
|
|
40
|
-
_SOURCE = "
|
|
41
|
+
_SOURCE = connector_name("archivebox_api")
|
|
41
42
|
_DOMAIN = "archivebox"
|
|
42
43
|
|
|
43
44
|
_BINDING = IngestBinding(connector="archivebox-mcp", stream=_DOMAIN)
|
|
@@ -52,14 +53,21 @@ _BLOB_BINDING = IngestBinding(
|
|
|
52
53
|
)
|
|
53
54
|
|
|
54
55
|
|
|
56
|
+
def _required_text(record: dict[str, Any], key: str) -> str:
|
|
57
|
+
value = record.get(key)
|
|
58
|
+
if not isinstance(value, str) or not value:
|
|
59
|
+
from agent_connector_sdk.ingest import IngestError
|
|
60
|
+
|
|
61
|
+
raise IngestError(
|
|
62
|
+
f"every entity needs an id and a node_type, got {key}={value!r}"
|
|
63
|
+
)
|
|
64
|
+
return value
|
|
65
|
+
|
|
66
|
+
|
|
55
67
|
def _to_entity(record: dict[str, Any]) -> Entity:
|
|
56
|
-
# id/node_type are intentionally read with .get(): a missing one must reach
|
|
57
|
-
# the SDK's own request builder (agent_connector_sdk.ingest.request._record),
|
|
58
|
-
# which raises IngestError("every entity needs an id and a node_type") —
|
|
59
|
-
# don't duplicate that validation here.
|
|
60
68
|
return Entity(
|
|
61
|
-
id=record
|
|
62
|
-
node_type=record
|
|
69
|
+
id=_required_text(record, "id"),
|
|
70
|
+
node_type=_required_text(record, "node_type"),
|
|
63
71
|
properties={k: v for k, v in record.items() if k not in ("id", "node_type")},
|
|
64
72
|
)
|
|
65
73
|
|
|
@@ -7,26 +7,17 @@ Provides dynamic tool registration and stdio/SSE/http interfaces using FastMCP.
|
|
|
7
7
|
|
|
8
8
|
# Telemetry & Observability
|
|
9
9
|
import logging
|
|
10
|
-
import sys
|
|
11
10
|
from typing import Any
|
|
12
11
|
|
|
13
|
-
from agent_connector_sdk.config import load_config
|
|
14
12
|
from agent_connector_sdk.mcp.action_dispatch import resolve_action
|
|
15
13
|
from agent_connector_sdk.mcp.concurrency import run_blocking
|
|
16
|
-
from agent_connector_sdk.mcp.server import create_mcp_server
|
|
17
|
-
from agent_connector_sdk.mcp.tool_surface import register_tool_surface
|
|
18
14
|
from fastmcp import Context, FastMCP
|
|
19
15
|
from fastmcp.dependencies import Depends
|
|
20
16
|
from fastmcp.utilities.logging import get_logger
|
|
21
17
|
from pydantic import Field
|
|
22
|
-
from starlette.requests import Request
|
|
23
|
-
from starlette.responses import JSONResponse
|
|
24
18
|
|
|
25
|
-
from archivebox_api.api_client import Api
|
|
26
19
|
from archivebox_api.auth import get_client
|
|
27
20
|
|
|
28
|
-
__version__ = "2.5.4"
|
|
29
|
-
|
|
30
21
|
# Telemetry & Observability
|
|
31
22
|
logger = get_logger(name="archivebox-api")
|
|
32
23
|
logger.setLevel(logging.INFO)
|
|
@@ -355,62 +346,3 @@ def register_web_tools(mcp: FastMCP):
|
|
|
355
346
|
from agent_connector_sdk.ports.web_source import register_web_source_tools
|
|
356
347
|
|
|
357
348
|
register_web_source_tools(mcp, get_contract_source)
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
def get_mcp_instance() -> tuple[Any, ...]:
|
|
361
|
-
"""Initialize and return the MCP instance."""
|
|
362
|
-
load_config()
|
|
363
|
-
from pathlib import Path
|
|
364
|
-
|
|
365
|
-
from agent_connector_sdk.mcp.content import ConnectorContent
|
|
366
|
-
|
|
367
|
-
package_root = Path(__file__).resolve().parent
|
|
368
|
-
args, mcp, middlewares = create_mcp_server(
|
|
369
|
-
name="archivebox-api MCP",
|
|
370
|
-
version=__version__,
|
|
371
|
-
instructions="archivebox-api MCP Server — one typed tool per API operation.",
|
|
372
|
-
content=ConnectorContent(
|
|
373
|
-
connector="archivebox-mcp",
|
|
374
|
-
package_root=package_root,
|
|
375
|
-
package_version=__version__,
|
|
376
|
-
manifest_path=package_root / "connector_manifest.yml",
|
|
377
|
-
),
|
|
378
|
-
)
|
|
379
|
-
|
|
380
|
-
@mcp.custom_route("/health", methods=["GET"])
|
|
381
|
-
async def health_check(request: Request) -> JSONResponse:
|
|
382
|
-
return JSONResponse({"status": "OK"})
|
|
383
|
-
|
|
384
|
-
register_tool_surface(
|
|
385
|
-
mcp,
|
|
386
|
-
client_cls=Api,
|
|
387
|
-
get_client=get_client,
|
|
388
|
-
service="archivebox-api",
|
|
389
|
-
tools_module=sys.modules[__name__],
|
|
390
|
-
)
|
|
391
|
-
|
|
392
|
-
for mw in middlewares:
|
|
393
|
-
mcp.add_middleware(mw)
|
|
394
|
-
return mcp, args, middlewares
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
def mcp_server() -> None:
|
|
398
|
-
mcp, args, middlewares = get_mcp_instance()
|
|
399
|
-
print(f"archivebox-api MCP v{__version__}", file=sys.stderr)
|
|
400
|
-
print("\nStarting MCP Server", file=sys.stderr)
|
|
401
|
-
print(f" Transport: {args.transport.upper()}", file=sys.stderr)
|
|
402
|
-
print(f" Auth: {args.auth_type}", file=sys.stderr)
|
|
403
|
-
|
|
404
|
-
if args.transport == "stdio":
|
|
405
|
-
mcp.run(transport="stdio")
|
|
406
|
-
elif args.transport == "streamable-http":
|
|
407
|
-
mcp.run(transport="streamable-http", host=args.host, port=args.port)
|
|
408
|
-
elif args.transport == "sse":
|
|
409
|
-
mcp.run(transport="sse", host=args.host, port=args.port)
|
|
410
|
-
else:
|
|
411
|
-
logger.error("Invalid transport", extra={"transport": args.transport})
|
|
412
|
-
sys.exit(1)
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
if __name__ == "__main__":
|
|
416
|
-
mcp_server()
|
|
@@ -95,5 +95,7 @@
|
|
|
95
95
|
the per-extractor archive results they yield, their tags, extracted page-text documents,
|
|
96
96
|
and the raw web-capture blobs (HTML, screenshot, PDF, WARC) — federated into the
|
|
97
97
|
agent-connector-sdk knowledge-graph hub. Reuses the shared :Document, :Tag, :AssetOccurrence,
|
|
98
|
-
:Blob and :Person classes."""
|
|
99
|
-
|
|
98
|
+
:Blob and :Person classes.""" .
|
|
99
|
+
|
|
100
|
+
# ontology-codemod R4
|
|
101
|
+
<http://knuckles.team/kg#Snapshot> rdfs:subClassOf <http://knuckles.team/kg#Artifact> .
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"api_version": "
|
|
2
|
+
"api_version": "graphos.io/v1",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"archivebox_api/
|
|
5
|
-
"archivebox_api/connectors/tool_schema_fingerprints.json": "491095a82caad04c805ddef3c9f0c60958a1d9a483b53a2c1bfec5a5d7a868bd",
|
|
6
|
-
"archivebox_api/ontology/archivebox.ttl": "c04cd401a48b9a8fac59039afe1455c359387aff4a606b0dc861cfee7d6051b2",
|
|
4
|
+
"archivebox_api/ontology/archivebox.ttl": "db33f205707ef8bac5741b650698d38983fbd1ad787f552933ad5f12b642b7f1",
|
|
7
5
|
"archivebox_api/ontology/fixtures/records.json": "dd1e07464a2be222f78443652363eadcf93250f97b2e2a456d5458e1f138c9c9",
|
|
8
|
-
"archivebox_api/ontology/mappings/source.yaml": "
|
|
6
|
+
"archivebox_api/ontology/mappings/source.yaml": "db82464dd78924eab2ba6c77b6f934c5f4a8c416bb17ac9365c97ba1c170d951",
|
|
9
7
|
"archivebox_api/ontology/migrations/manifest.json": "45125750a384f7077b2714d1392c91a630d12f8f0fa2aa1f86a345cd34582540",
|
|
10
|
-
"archivebox_api/ontology/shapes/connector.shacl.ttl": "528406ea4d138e8f6bcc1e24f24675827ad52f772df96ad1e6cf0b14833a050e"
|
|
11
|
-
"connector_manifest.yml": "9909456f2d76d4b76ff0c066f9050dfb0a8ec4f9d549a6781f4166c38b629f6c"
|
|
8
|
+
"archivebox_api/ontology/shapes/connector.shacl.ttl": "528406ea4d138e8f6bcc1e24f24675827ad52f772df96ad1e6cf0b14833a050e"
|
|
12
9
|
},
|
|
13
10
|
"checks": {
|
|
14
11
|
"declared_tool_schema": "passed",
|
|
@@ -18,7 +15,7 @@
|
|
|
18
15
|
"synthetic_fixture_contract": "passed"
|
|
19
16
|
},
|
|
20
17
|
"compatibility": {
|
|
21
|
-
"
|
|
18
|
+
"agent_utilities": ">=2.5.0,<3",
|
|
22
19
|
"bundle_schema": "2",
|
|
23
20
|
"epistemic_graph": ">=2.27.0,<3"
|
|
24
21
|
},
|
|
@@ -32,5 +29,5 @@
|
|
|
32
29
|
"signer": "UNSIGNED-PREVIEW",
|
|
33
30
|
"signing_public_key": "",
|
|
34
31
|
"status": "source-validated",
|
|
35
|
-
"validated_at": "2026-
|
|
32
|
+
"validated_at": "2026-10-24T07:40:18Z"
|
|
36
33
|
}
|
{archivebox_api-2.5.4 → archivebox_api-2.5.6}/archivebox_api/prompts/web_archivist_specialist.json
RENAMED
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
"schema_version": "1.0",
|
|
5
5
|
"prompt_version": "0.1.0",
|
|
6
6
|
"source": "archivebox-api",
|
|
7
|
-
"extends": "agent-connector-sdk:base",
|
|
8
|
-
"compose": "append",
|
|
9
7
|
"description": "ArchiveBox web-archivist specialist: capture, search, and knowledge-graph-ingest web snapshots over the archivebox-api MCP server.",
|
|
10
8
|
"metadata": {
|
|
11
9
|
"topic": "ArchiveBox web archiving",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: archivebox-api
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.6
|
|
4
4
|
Summary: Pythonic ArchiveBox API Wrapper and Fast MCP Server for Agentic AI use!
|
|
5
|
-
Author-email:
|
|
5
|
+
Author-email: Repository Maintainers <maintainers@knuckles.team>
|
|
6
6
|
License: MIT
|
|
7
7
|
Classifier: Development Status :: 5 - Production/Stable
|
|
8
8
|
Classifier: License :: Public Domain
|
|
@@ -12,11 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: <3.15,>=3.12
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: agent-connector-sdk[mcp]<
|
|
16
|
-
Provides-Extra: mcp
|
|
17
|
-
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.3.18; extra == "mcp"
|
|
18
|
-
Provides-Extra: all
|
|
19
|
-
Requires-Dist: agent-connector-sdk[mcp]<1.0.0,>=0.3.18; extra == "all"
|
|
15
|
+
Requires-Dist: agent-connector-sdk[mcp]<0.6.0,>=0.5.3
|
|
20
16
|
Provides-Extra: test
|
|
21
17
|
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
|
|
22
18
|
Requires-Dist: pytest>=9.1.1; extra == "test"
|
|
@@ -46,8 +42,6 @@ Dynamic: license-file
|
|
|
46
42
|

|
|
47
43
|

|
|
48
44
|
|
|
49
|
-
*Version: 2.5.4*
|
|
50
|
-
|
|
51
45
|
> **Documentation** — Installation, deployment, usage across the API, CLI, MCP, and
|
|
52
46
|
> A2A agent interfaces, and guidance for provisioning the ArchiveBox platform are
|
|
53
47
|
> maintained in the [official documentation](https://knuckles-team.github.io/archivebox-api/).
|
|
@@ -5,9 +5,7 @@ CLAUDE.md
|
|
|
5
5
|
LICENSE
|
|
6
6
|
MANIFEST.in
|
|
7
7
|
README.md
|
|
8
|
-
connector_manifest.yml
|
|
9
8
|
mkdocs.yml
|
|
10
|
-
opencode.json
|
|
11
9
|
pyproject.toml
|
|
12
10
|
release-readiness.json
|
|
13
11
|
requirements.txt
|
|
@@ -15,7 +13,7 @@ archivebox_api/__init__.py
|
|
|
15
13
|
archivebox_api/__main__.py
|
|
16
14
|
archivebox_api/api_client.py
|
|
17
15
|
archivebox_api/auth.py
|
|
18
|
-
archivebox_api/
|
|
16
|
+
archivebox_api/connector_sources.py
|
|
19
17
|
archivebox_api/kg_ingest.py
|
|
20
18
|
archivebox_api/mcp_config.json
|
|
21
19
|
archivebox_api/mcp_server.py
|
|
@@ -32,9 +30,6 @@ archivebox_api/api/api_client_auth.py
|
|
|
32
30
|
archivebox_api/api/api_client_base.py
|
|
33
31
|
archivebox_api/api/api_client_cli.py
|
|
34
32
|
archivebox_api/api/api_client_core.py
|
|
35
|
-
archivebox_api/connectors/__init__.py
|
|
36
|
-
archivebox_api/connectors/mcp_source_presets.json
|
|
37
|
-
archivebox_api/connectors/tool_schema_fingerprints.json
|
|
38
33
|
archivebox_api/ontology/__init__.py
|
|
39
34
|
archivebox_api/ontology/archivebox.ttl
|
|
40
35
|
archivebox_api/ontology/certification.json
|
|
@@ -42,9 +37,7 @@ archivebox_api/ontology/fixtures/records.json
|
|
|
42
37
|
archivebox_api/ontology/mappings/source.yaml
|
|
43
38
|
archivebox_api/ontology/migrations/manifest.json
|
|
44
39
|
archivebox_api/ontology/shapes/connector.shacl.ttl
|
|
45
|
-
archivebox_api/prompts/__init__.py
|
|
46
40
|
archivebox_api/prompts/web_archivist_specialist.json
|
|
47
|
-
archivebox_api/skills/__init__.py
|
|
48
41
|
archivebox_api/skills/archivebox-api-operations/SKILL.md
|
|
49
42
|
archivebox_api/skills/archivebox-api-operations/agents/openai.yaml
|
|
50
43
|
archivebox_api/skills/archivebox-api-operations/references/catalog.md
|
|
@@ -54,8 +47,6 @@ archivebox_api/skills/archivebox-snapshot-search/SKILL.md
|
|
|
54
47
|
archivebox_api/skills/archivebox-snapshot-search/WORKFLOW.md
|
|
55
48
|
archivebox_api/skills/archivebox-web-archiving/SKILL.md
|
|
56
49
|
archivebox_api/skills/archivebox-web-archiving/WORKFLOW.md
|
|
57
|
-
scripts/security_sanitizer.py
|
|
58
|
-
scripts/verify_api_integration.py
|
|
59
50
|
tests/conftest.py
|
|
60
51
|
tests/test_action_discovery.py
|
|
61
52
|
tests/test_archivebox_api_brute_force_coverage.py
|
|
@@ -63,7 +54,6 @@ tests/test_archivebox_coverage.py
|
|
|
63
54
|
tests/test_archivebox_coverage_extra.py
|
|
64
55
|
tests/test_basic.py
|
|
65
56
|
tests/test_conformance.py
|
|
66
|
-
tests/test_default_content_surfaces.py
|
|
67
57
|
tests/test_init_dynamics.py
|
|
68
58
|
tests/test_kg_ingest.py
|
|
69
59
|
tests/test_kg_media.py
|
|
@@ -4,40 +4,29 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "archivebox-api"
|
|
7
|
-
version = "2.5.
|
|
7
|
+
version = "2.5.6"
|
|
8
8
|
description = "Pythonic ArchiveBox API Wrapper and Fast MCP Server for Agentic AI use!"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
classifiers = [ "Development Status :: 5 - Production/Stable", "License :: Public Domain", "Environment :: Console", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3",]
|
|
11
11
|
requires-python = ">=3.12, <3.15"
|
|
12
|
-
dependencies = [ "agent-connector-sdk[mcp]>=0.3
|
|
12
|
+
dependencies = [ "agent-connector-sdk[mcp]>=0.5.3,<0.6.0",]
|
|
13
13
|
[[project.authors]]
|
|
14
|
-
name = "
|
|
15
|
-
email = "maintainers@
|
|
14
|
+
name = "Repository Maintainers"
|
|
15
|
+
email = "maintainers@knuckles.team"
|
|
16
16
|
|
|
17
17
|
[project.license]
|
|
18
18
|
text = "MIT"
|
|
19
19
|
|
|
20
20
|
[project.optional-dependencies]
|
|
21
|
-
mcp = [ "agent-connector-sdk[mcp]>=0.3.18,<1.0.0",]
|
|
22
|
-
all = [ "agent-connector-sdk[mcp]>=0.3.18,<1.0.0",]
|
|
23
21
|
test = [
|
|
24
22
|
"pytest-xdist>=3.8.0", "pytest>=9.1.1", "pytest-asyncio>=1.4.0", "pytest-cov>=7.1.0",]
|
|
25
23
|
|
|
26
24
|
[project.scripts]
|
|
27
|
-
archivebox-mcp = "
|
|
25
|
+
archivebox-mcp = "agent_connector_sdk.cli:serve"
|
|
28
26
|
|
|
29
27
|
# The one declared connector identity: the fleet name (SDK-CONNECTOR-CONTROL-R071).
|
|
30
28
|
[project.entry-points."agent_connector_sdk.connector"]
|
|
31
|
-
archivebox-mcp = "archivebox_api"
|
|
32
|
-
|
|
33
|
-
[project.entry-points."agent_connector_sdk.skill_providers"]
|
|
34
|
-
archivebox-api = "archivebox_api.skills"
|
|
35
|
-
|
|
36
|
-
[project.entry-points."agent_connector_sdk.ontology_providers"]
|
|
37
|
-
archivebox-api = "archivebox_api.ontology"
|
|
38
|
-
|
|
39
|
-
[project.entry-points."agent_connector_sdk.source_connector_providers"]
|
|
40
|
-
archivebox-api = "archivebox_api.connectors"
|
|
29
|
+
archivebox-mcp = "archivebox_api:connector"
|
|
41
30
|
|
|
42
31
|
[project.entry-points."agent_connector_sdk.prompt_providers"]
|
|
43
32
|
archivebox-api = "archivebox_api.prompts"
|
|
@@ -54,6 +43,7 @@ override-dependencies = [
|
|
|
54
43
|
]
|
|
55
44
|
|
|
56
45
|
[tool.ruff]
|
|
46
|
+
extend-exclude = ["tests", "scripts"]
|
|
57
47
|
line-length = 88
|
|
58
48
|
target-version = "py312"
|
|
59
49
|
|
|
@@ -68,7 +58,7 @@ dev = [
|
|
|
68
58
|
]
|
|
69
59
|
|
|
70
60
|
[tool.setuptools.package-data]
|
|
71
|
-
archivebox_api = [ "
|
|
61
|
+
archivebox_api = [ "mcp_config.json", "agent_data/**", "prompts/**", "skills/**", "ontology/**", "connectors/**",]
|
|
72
62
|
|
|
73
63
|
[tool.ruff.lint]
|
|
74
64
|
select = [ "E", "F", "I", "UP", "B",]
|
|
@@ -82,3 +72,12 @@ ignore_names = ["request", "config", "connector"]
|
|
|
82
72
|
|
|
83
73
|
[tool.pipelines_hooks.ste]
|
|
84
74
|
exempt = ["specs/*", "specs/**/*"]
|
|
75
|
+
|
|
76
|
+
[tool.pipelines.container]
|
|
77
|
+
debug_apt = ["default-jre", "ripgrep", "tree", "fd-find", "curl", "nano", "build-essential", "cmake", "libssl-dev", "libcurl4-openssl-dev", "pkg-config", "cargo", "rustc"]
|
|
78
|
+
|
|
79
|
+
[tool.pipelines.codespell]
|
|
80
|
+
ignore_words = ["asser", "fo", "updat"]
|
|
81
|
+
|
|
82
|
+
[tool.pipelines.api_integration]
|
|
83
|
+
baseline = 26.6
|