@tangle-network/agent-integrations 0.74.0 → 0.75.0
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.
- package/data/bundled-adapter-manifests.json +1 -1
- package/dist/{adapters-CngYgl1W.js → adapters-DaB11fTq.js} +797 -33
- package/dist/{adapters-CngYgl1W.js.map → adapters-DaB11fTq.js.map} +1 -1
- package/dist/{bundled-manifest-data-DituXLws.js → bundled-manifest-data-wF0xOtEq.js} +465 -13
- package/dist/{bundled-manifest-data-DituXLws.js.map → bundled-manifest-data-wF0xOtEq.js.map} +1 -1
- package/dist/connectors/adapters/index.d.ts +2 -2
- package/dist/connectors/adapters/index.js +2 -2
- package/dist/connectors/index.d.ts +3 -3
- package/dist/connectors/index.js +3 -3
- package/dist/{consumer-DaKqPDG-.d.ts → consumer-BafUQUla.d.ts} +2 -2
- package/dist/{consumer-DaKqPDG-.d.ts.map → consumer-BafUQUla.d.ts.map} +1 -1
- package/dist/consumer.d.ts +1 -1
- package/dist/{index-udV3gGjx.d.ts → index-BKTHRkGz.d.ts} +40 -2
- package/dist/{index-udV3gGjx.d.ts.map → index-BKTHRkGz.d.ts.map} +1 -1
- package/dist/{index-b05PzTtX.d.ts → index-CHD_8Gn2.d.ts} +2 -2
- package/dist/{index-b05PzTtX.d.ts.map → index-CHD_8Gn2.d.ts.map} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -5
- package/dist/internal/bundled-manifest-runtime.js +1 -1
- package/dist/mcp.d.ts +1 -1
- package/dist/mcp.js +1 -1
- package/dist/registry.js +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/sandbox.d.ts +1 -1
- package/dist/{specs-BeC45S22.js → specs-Bc-lDDtj.js} +2 -2
- package/dist/{specs-BeC45S22.js.map → specs-Bc-lDDtj.js.map} +1 -1
- package/dist/specs.js +1 -1
- package/dist/{src-B4-qkoxS.js → src-A1u2lVRw.js} +3 -3
- package/dist/{src-B4-qkoxS.js.map → src-A1u2lVRw.js.map} +1 -1
- package/docs/knowledge-provider-contracts.md +86 -0
- package/package.json +2 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Knowledge ingestion provider contracts
|
|
2
|
+
|
|
3
|
+
These are provider operations, not a managed knowledge service. The product owns
|
|
4
|
+
source selection, ingestion jobs, tenant authorization, refresh checkpoints,
|
|
5
|
+
embedding configuration, and the ownership of derived indexes. `agent-knowledge`
|
|
6
|
+
remains the evidence/knowledge record owner. Reuse Hub connections, grants,
|
|
7
|
+
capabilities and `IntegrationConnection.secretRef`; never send provider credentials
|
|
8
|
+
to an app or sandbox UI.
|
|
9
|
+
|
|
10
|
+
## S3 sources
|
|
11
|
+
|
|
12
|
+
`amazon-s3.files.list` takes `{ bucket, prefix?, maxKeys?, continuationToken? }`.
|
|
13
|
+
`maxKeys` is 1–1000. `bucket` can be omitted only when the AWS credential bundle
|
|
14
|
+
already contains a bucket. It must be a bucket name, not `s3://...` or an HTTPS URL.
|
|
15
|
+
The adapter calls ListObjectsV2 and returns:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{"objects":[{"key":"docs/a.txt","etag":"\"version-hash\"","size":42}],"isTruncated":true,"nextContinuationToken":"opaque-token"}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The result is in the normal read result's `data`. Follow the opaque token until
|
|
22
|
+
`isTruncated` is false, even when an intermediate page is empty. There is no
|
|
23
|
+
adapter page-count cap. The host must enforce its own total object, byte, time,
|
|
24
|
+
and cost budgets and report a limit explicitly rather than call a partial import
|
|
25
|
+
complete. XML parsing is provider-owned; malformed pages, DTD/entity declarations,
|
|
26
|
+
missing cursors, >1000 objects and responses larger than 2 MiB fail closed.
|
|
27
|
+
|
|
28
|
+
`amazon-s3.files.readBytes` takes `{ bucket, key, versionId? }` and returns
|
|
29
|
+
`data: { base64, contentType? }` and an optional read-result `etag`. Decode base64
|
|
30
|
+
before extraction, hashing or evidence registration. The 32 MiB response budget is
|
|
31
|
+
enforced while streaming as well as against Content-Length. `files.read` retains
|
|
32
|
+
JSON-or-text decoding for existing callers; source ingestion should use readBytes
|
|
33
|
+
so JSON formatting and binary files are preserved. Keys are exact bucket-relative
|
|
34
|
+
strings (1–1024 UTF-8 bytes). Nested slashes remain slashes, percent escapes are
|
|
35
|
+
literal key text, and `.`/`..` path segments are rejected before fetch. Object URL
|
|
36
|
+
parsing belongs at the product boundary: produce a bucket/key, never fetch an
|
|
37
|
+
arbitrary URL using the provider credential.
|
|
38
|
+
|
|
39
|
+
AWS credentials are resolved from the existing connection secret as the supported
|
|
40
|
+
JSON bundle `{accessKeyId, secretAccessKey, region, sessionToken?, endpoint?, bucket?}`.
|
|
41
|
+
Requests use SigV4. An explicit endpoint overrides the regional S3 endpoint;
|
|
42
|
+
endpoint custody and network policy stay with the host. Knowledge import hosts must restrict to official AWS endpoints or use a DNS-pinned public-HTTPS transport for custom hosts; merely selecting a saved connection does not make an arbitrary endpoint safe. These reads reject redirects. This does not create a new
|
|
43
|
+
authentication or credential-storage model. Source detach does not delete source
|
|
44
|
+
objects. The legacy upload/copy/move/presign capabilities are not part of this
|
|
45
|
+
read-only knowledge ingestion contract.
|
|
46
|
+
|
|
47
|
+
## Existing vector databases and embeddings
|
|
48
|
+
|
|
49
|
+
| Provider | Connection metadata | Discover/connect | Create derived index | Write/query/delete |
|
|
50
|
+
| --- | --- | --- | --- | --- |
|
|
51
|
+
| Qdrant | `qdrantUrl` | `collections.list`, `collections.get` (`collection_name`) | `collections.create` (`collection_name`, `vectors: {size, distance}` or named vector map) | `points.upsert`, `points.query`/`points.search`, `points.delete`; all collection-scoped |
|
|
52
|
+
| Pinecone | `indexHost` for vector data | `indexes.list`, `indexes.describe` (`indexName`); retain returned host | `indexes.create` (`name`, `dimension`, `metric`, `spec`) | `vectors.upsert`, `vectors.query` (`top_k`, `vector`, optional `namespace`, `filter`), `vectors.delete` |
|
|
53
|
+
| Weaviate | `clusterUrl` | `schema.list`, `schema.get` (`className`) | `schema.create` (`class`, optional `vectorizer`, `properties`, configs) | `objects.create`/`batch.objects.create`, `graphql.query`, `objects.delete`/`batch.objects.delete` |
|
|
54
|
+
| OpenAI embeddings | Optional `baseUrl` | Existing OpenAI connection | Not an index service | `embeddings.create` (`model`, `input`, optional `dimensions`, `encoding_format`) |
|
|
55
|
+
|
|
56
|
+
All are executable adapter primitives. They do not automatically provision a
|
|
57
|
+
hosted cluster or import a corpus. The host must record embedding model, dimension,
|
|
58
|
+
metric and optional vector name and verify compatibility before querying an
|
|
59
|
+
existing collection. Existing remote vectors must have a declared mapping to text
|
|
60
|
+
and source provenance; connecting a database does not create valid evidence by
|
|
61
|
+
itself. Weaviate may use its configured server vectorizer or explicit vectors.
|
|
62
|
+
|
|
63
|
+
Managed index creation and connecting an existing index are different operations.
|
|
64
|
+
Track which derived collection/index and vector IDs the host owns. Refresh must
|
|
65
|
+
fetch source revisions, re-extract/re-embed changed content, and remove stale
|
|
66
|
+
owned vector IDs; do not append duplicate chunks indefinitely. Detaching an
|
|
67
|
+
external index must not delete it. Deleting managed derived data must be explicit
|
|
68
|
+
and scoped to the recorded owned resource. Provider upsert/delete APIs exist;
|
|
69
|
+
knowledge refresh jobs and lifecycle orchestration remain product responsibilities.
|
|
70
|
+
|
|
71
|
+
## Git repository sources
|
|
72
|
+
|
|
73
|
+
Resolve a mutable branch/tag/HEAD with `github.repos.getCommit({owner, repo, ref})`.
|
|
74
|
+
Its result preserves GitHub's `{sha, commit: {tree: {sha}}}` shape. Persist the
|
|
75
|
+
resolved commit SHA and use `commit.tree.sha` with `git.getTree`; read selected
|
|
76
|
+
blob SHAs with `git.getBlob`. `git.getCommit` is a different endpoint accepting an
|
|
77
|
+
immutable SHA only, so do not send `HEAD` to it. The repository commit read rejects
|
|
78
|
+
redirects and limits responses to 8 MiB. The subsequent immutable tree and blob reads also reject redirects and cap responses at 8 MiB and 32 MiB respectively. Slash-containing refs remain one encoded
|
|
79
|
+
path parameter. Hosts must reject truncated tree listings or explicitly walk
|
|
80
|
+
subtrees, bound total source bytes/count, and retain revision provenance.
|
|
81
|
+
|
|
82
|
+
Qdrant collection list/get/exists/create/delete and point query/search/scroll/upsert/delete
|
|
83
|
+
reject redirects (including redirects that could forward the custom api-key
|
|
84
|
+
header) and cap responses at 8 MiB. Knowledge hosts still must enforce official
|
|
85
|
+
Cloud endpoints or use a maintained DNS-pinned public transport for custom hosts;
|
|
86
|
+
this adapter-level guard is not a general custom-endpoint SSRF defense.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-integrations",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.75.0",
|
|
4
4
|
"description": "Vendor-neutral integration contracts and runtime helpers for sandbox and agent apps.",
|
|
5
5
|
"homepage": "https://github.com/tangle-network/agent-integrations#readme",
|
|
6
6
|
"repository": {
|
|
@@ -170,6 +170,7 @@
|
|
|
170
170
|
"amqplib": "2.1.0",
|
|
171
171
|
"csv-parse": "7.0.3",
|
|
172
172
|
"csv-stringify": "6.9.0",
|
|
173
|
+
"fast-xml-parser": "^5.11.2",
|
|
173
174
|
"hyparquet": "1.31.2",
|
|
174
175
|
"hyparquet-writer": "0.16.10",
|
|
175
176
|
"ipaddr.js": "2.5.0",
|