@hydradb/mcp 1.3.0 → 1.4.1

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.
@@ -15,6 +15,7 @@
15
15
  */
16
16
  import { HydraDBClient } from "@hydradb/sdk";
17
17
  import type { HydraDB as SDK } from "@hydradb/sdk";
18
+ import { type RawTransport } from "./transport.js";
18
19
  import { GraphResource } from "./graph.js";
19
20
  export type ContextKind = "memory" | "knowledge";
20
21
  /**
@@ -67,6 +68,8 @@ export interface HydraConfig {
67
68
  timeoutSeconds?: number;
68
69
  /** Retries per call. The SDK defaults to 2; set explicitly so it is a choice. */
69
70
  maxRetries?: number;
71
+ /** Test seam for the hand-rolled HTTP path; production never sets it. */
72
+ fetchFn?: typeof fetch;
70
73
  }
71
74
  export interface QueryParams {
72
75
  query: string;
@@ -93,10 +96,37 @@ export interface QueryParams {
93
96
  ids?: string[];
94
97
  /** Exact-match filters over stored metadata. No ranges, no partial matches. */
95
98
  metadataFilters?: Record<string, unknown>;
99
+ /**
100
+ * Principals to answer as (PRO-1684 document ACLs): an email, a
101
+ * `domain:<host>`, or a `group:<provider>:<id>`. Results are restricted to
102
+ * documents whose access list admits at least one of them.
103
+ *
104
+ * Omitted means NO ACL scoping — every document this key can reach. An empty
105
+ * array is treated the SAME as omitted by the API (verified against staging:
106
+ * `acl: []` and no `acl` both returned 134 sources where an unknown
107
+ * principal returned 130), so it is not a way to ask for "nobody"; the
108
+ * design doc's rule is that absent and `[]` alike mean unrestricted.
109
+ *
110
+ * A principal the deployment does not know fails CLOSED: it matches only
111
+ * documents carrying no access list of their own, never a restricted one.
112
+ */
113
+ acl?: string[];
96
114
  /** Adjacent chunks pulled in alongside each match, for surrounding context. */
97
115
  numRelatedChunks?: number;
116
+ /**
117
+ * App-aware knowledge retrieval: exact IDs and actors, thread reconstruction,
118
+ * and parent/child expansion over connector-ingested sources. Applies to
119
+ * knowledge hybrid queries; the server ignores it elsewhere.
120
+ */
121
+ queryApps?: boolean;
98
122
  /** Per-call collection override. */
99
123
  collection?: string;
124
+ /**
125
+ * Multi-collection scope: a list for equal weighting, or a {collection:
126
+ * weight} object to rank some higher than others. Mutually exclusive with
127
+ * `collection` — see the guard in `query`.
128
+ */
129
+ collections?: SDK.SearchQueryRequestCollections;
100
130
  /** Per-call database override. */
101
131
  database?: string;
102
132
  }
@@ -142,6 +172,19 @@ export interface ListParams {
142
172
  ids?: string[];
143
173
  page?: number;
144
174
  pageSize?: number;
175
+ /**
176
+ * Principals to answer as (PRO-1684 document ACLs): an email, a
177
+ * `domain:<host>`, or a `group:<provider>:<id>`. Results are restricted to
178
+ * documents whose access list admits at least one of them.
179
+ *
180
+ * Omitted means NO ACL scoping — every document this key can reach. An empty
181
+ * array is treated the SAME as omitted by the API, so it is not a way to ask
182
+ * for "nobody" (design doc: absent and `[]` alike mean unrestricted).
183
+ *
184
+ * A principal the deployment does not know fails CLOSED: it matches only
185
+ * documents carrying no access list of their own, never a restricted one.
186
+ */
187
+ acl?: string[];
145
188
  collection?: string;
146
189
  /** Per-call database override. */
147
190
  database?: string;
@@ -150,6 +193,19 @@ export interface InspectParams {
150
193
  id: string;
151
194
  mode?: string;
152
195
  expirySeconds?: number;
196
+ /**
197
+ * Principals to answer as (PRO-1684 document ACLs): an email, a
198
+ * `domain:<host>`, or a `group:<provider>:<id>`. Results are restricted to
199
+ * documents whose access list admits at least one of them.
200
+ *
201
+ * Omitted means NO ACL scoping — every document this key can reach. An empty
202
+ * array is treated the SAME as omitted by the API, so it is not a way to ask
203
+ * for "nobody" (design doc: absent and `[]` alike mean unrestricted).
204
+ *
205
+ * A principal the deployment does not know fails CLOSED: it matches only
206
+ * documents carrying no access list of their own, never a restricted one.
207
+ */
208
+ acl?: string[];
153
209
  collection?: string;
154
210
  /** Per-call database override. */
155
211
  database?: string;
@@ -160,11 +216,88 @@ export interface IngestionStatusParams {
160
216
  /** Per-call database override. */
161
217
  database?: string;
162
218
  }
219
+ /** One member of a connected subgraph (wire shape, unchanged from the API). */
220
+ export interface SubgraphMember {
221
+ source_id: string;
222
+ title?: string;
223
+ app_kind?: string;
224
+ app_provider?: string;
225
+ app_external_id?: string;
226
+ thread_id?: string;
227
+ /** Hops from the seed; 0 is the seed itself. */
228
+ depth: number;
229
+ hydration?: string;
230
+ discovered_via?: string;
231
+ discovered_relation?: string;
232
+ }
233
+ /**
234
+ * One edge of the subgraph. `source` and `target` are Source nodes, so their
235
+ * `entity_id` is the member's item id; `relations[0].canonical_predicate` is
236
+ * the edge type (`relates_to`, `same_thread`, `child_of`, ...).
237
+ */
238
+ export interface SubgraphRelation {
239
+ source?: {
240
+ entity_id?: string;
241
+ name?: string;
242
+ };
243
+ target?: {
244
+ entity_id?: string;
245
+ name?: string;
246
+ };
247
+ relations?: {
248
+ canonical_predicate?: string;
249
+ }[];
250
+ }
251
+ export interface SubgraphResult {
252
+ seed_source_id: string;
253
+ sources: SubgraphMember[];
254
+ relations: SubgraphRelation[];
255
+ auxiliary_relations: unknown[];
256
+ auxiliary_truncated: boolean;
257
+ is_truncated: boolean;
258
+ max_depth_reached: number;
259
+ success: boolean;
260
+ message: string;
261
+ }
262
+ export interface SubgraphParams {
263
+ /** The item whose connected subgraph to return. */
264
+ id: string;
265
+ kind?: ContextKind;
266
+ /** Max traversal depth in hops (server default 5). */
267
+ depth?: number;
268
+ /** Max members returned (server default 200). */
269
+ maxSources?: number;
270
+ /**
271
+ * Principals to answer as (PRO-1684 document ACLs): an email, a
272
+ * `domain:<host>`, or a `group:<provider>:<id>`. The subgraph contains
273
+ * only items those principals may see, filtered at every hop.
274
+ *
275
+ * Omitted means NO ACL scoping. An empty array is treated the SAME as
276
+ * omitted by the API, so it is not a way to ask for "nobody".
277
+ */
278
+ acl?: string[];
279
+ collection?: string;
280
+ /** Per-call database override. */
281
+ database?: string;
282
+ }
163
283
  export interface RelationsParams {
164
284
  id?: string;
165
285
  kind?: ContextKind;
166
286
  limit?: number;
167
287
  cursor?: number;
288
+ /**
289
+ * Principals to answer as (PRO-1684 document ACLs): an email, a
290
+ * `domain:<host>`, or a `group:<provider>:<id>`. Results are restricted to
291
+ * documents whose access list admits at least one of them.
292
+ *
293
+ * Omitted means NO ACL scoping — every document this key can reach. An empty
294
+ * array is treated the SAME as omitted by the API, so it is not a way to ask
295
+ * for "nobody" (design doc: absent and `[]` alike mean unrestricted).
296
+ *
297
+ * A principal the deployment does not know fails CLOSED: it matches only
298
+ * documents carrying no access list of their own, never a restricted one.
299
+ */
300
+ acl?: string[];
168
301
  collection?: string;
169
302
  /** Per-call database override. */
170
303
  database?: string;
@@ -181,10 +314,18 @@ export interface CreateDatabaseParams {
181
314
  databaseMetadataSchema?: SDK.TenantsCustomPropertyDefinition[];
182
315
  embeddingsDimension?: number;
183
316
  }
317
+ export interface DeleteCollectionParams {
318
+ database: string;
319
+ collection: string;
320
+ }
184
321
  type ScopeFields = {
185
322
  database: string;
186
323
  collection?: string;
187
324
  };
325
+ type MultiScopeFields = {
326
+ database: string;
327
+ collections: SDK.SearchQueryRequestCollections;
328
+ };
188
329
  /**
189
330
  * A per-call `database` named one the connection is not allowed to touch.
190
331
  *
@@ -218,12 +359,38 @@ declare abstract class Resource {
218
359
  private readonly collection?;
219
360
  private readonly allowedDatabases?;
220
361
  private readonly allowedCollections?;
221
- protected constructor(sdk: HydraDBClient, database: string, collection?: string | undefined, allowedDatabases?: readonly string[] | undefined, allowedCollections?: readonly string[] | undefined);
362
+ /**
363
+ * The hand-rolled HTTP path, for the endpoints the SDK does not expose
364
+ * (CONTRACT §2 rule 7). Optional only so tests that inject a fake SDK and
365
+ * never touch such an endpoint need not build one.
366
+ */
367
+ protected readonly raw?: RawTransport | undefined;
368
+ protected constructor(sdk: HydraDBClient, database: string, collection?: string | undefined, allowedDatabases?: readonly string[] | undefined, allowedCollections?: readonly string[] | undefined,
369
+ /**
370
+ * The hand-rolled HTTP path, for the endpoints the SDK does not expose
371
+ * (CONTRACT §2 rule 7). Optional only so tests that inject a fake SDK and
372
+ * never touch such an endpoint need not build one.
373
+ */
374
+ raw?: RawTransport | undefined);
222
375
  protected scope(override?: string, dbOverride?: string): ScopeFields;
376
+ /**
377
+ * Scope for a query that names SEVERAL collections.
378
+ *
379
+ * Deliberately does NOT fall back to the configured default collection. The
380
+ * server folds the singular `collection` into the deprecated `sub_tenant_id`
381
+ * and refuses any request that carries it alongside a multi-scope selector,
382
+ * so injecting the default here would turn every `collections` call on a
383
+ * scoped connection into a 400. Naming the collections IS the scope.
384
+ *
385
+ * Confinement is enforced on the same path as `scope`: every named
386
+ * collection is checked, so a multi-scope selector cannot reach past what an
387
+ * OAuth connection was confined to.
388
+ */
389
+ protected multiScope(collections: SDK.SearchQueryRequestCollections, dbOverride?: string): MultiScopeFields;
223
390
  protected call<T>(path: string, fn: () => Promise<unknown>): Promise<T>;
224
391
  }
225
392
  export declare class ContextResource extends Resource {
226
- constructor(sdk: HydraDBClient, database: string, collection?: string, allowedDatabases?: readonly string[], allowedCollections?: readonly string[]);
393
+ constructor(sdk: HydraDBClient, database: string, collection?: string, allowedDatabases?: readonly string[], allowedCollections?: readonly string[], raw?: RawTransport);
227
394
  /**
228
395
  * The single retrieval entry point (SDK `client.query`).
229
396
  *
@@ -238,20 +405,31 @@ export declare class ContextResource extends Resource {
238
405
  * Every other failure in this wrapper rejects, and a caller that only handles
239
406
  * `.catch()` would otherwise see this one escape as a synchronous throw.
240
407
  */
241
- ingest(params: IngestParams, opts?: RequestOptions): Promise<SDK.IngestionV2SourceUploadResponse>;
408
+ ingest(params: IngestParams, opts?: RequestOptions): Promise<SDK.IngestionV2IngestResponse>;
242
409
  /** List memories or knowledge sources (SDK `context.list`). */
243
- list(params?: ListParams, opts?: RequestOptions): Promise<SDK.ListV2SourceListResponse>;
410
+ list(params?: ListParams, opts?: RequestOptions): Promise<SDK.ListV2ListResponse>;
244
411
  /** Fetch a source's content (SDK `context.inspect`; was "fetch content"). */
245
412
  inspect(params: InspectParams, opts?: RequestOptions): Promise<SDK.FetchV2SourceFetchResponse>;
246
413
  /** Per-source indexing progress (SDK `context.status`). */
247
414
  ingestionStatus(params: IngestionStatusParams, opts?: RequestOptions): Promise<SDK.IngestionV2BatchProcessingStatus>;
415
+ /**
416
+ * The connected subgraph of one item (`GET /context/{id}/subgraph`): every
417
+ * item reachable from it through item-level relations — explicit links, a
418
+ * shared thread, parent/child — plus the relations among the members and
419
+ * the structural graph around them.
420
+ *
421
+ * No SDK resource for this yet, so it takes the raw path (CONTRACT §2 rule
422
+ * 7): same header, same envelope unwrap, same error type as everything else
423
+ * here. When the SDK grows `context.subgraph`, only this method changes.
424
+ */
425
+ subgraph(params: SubgraphParams, opts?: RequestOptions): Promise<SubgraphResult>;
248
426
  /** Knowledge-graph relations (SDK `context.relations`). */
249
427
  relations(params?: RelationsParams): Promise<SDK.GraphGraphRelationsResponse>;
250
428
  /** Delete memories or knowledge sources (SDK `context.delete`). */
251
429
  delete(params: DeleteParams, opts?: RequestOptions): Promise<SDK.SourcesMemoryDeleteResponse>;
252
430
  }
253
431
  export declare class DatabasesResource extends Resource {
254
- constructor(sdk: HydraDBClient, database: string, collection?: string, allowedDatabases?: readonly string[], allowedCollections?: readonly string[]);
432
+ constructor(sdk: HydraDBClient, database: string, collection?: string, allowedDatabases?: readonly string[], allowedCollections?: readonly string[], raw?: RawTransport);
255
433
  create(params: CreateDatabaseParams): Promise<SDK.TenantsTenantCreateAcceptedResponse>;
256
434
  delete(database: string): Promise<SDK.TenantsTenantDeleteResponse>;
257
435
  list(): Promise<SDK.TenantsTenantIdsResponse>;
@@ -259,6 +437,17 @@ export declare class DatabasesResource extends Resource {
259
437
  stats(database: string): Promise<SDK.TenantsTenantStatsResponse>;
260
438
  /** Infra provisioning readiness — renamed away from `status` (SDK `databases.status`). */
261
439
  readiness(database: string): Promise<SDK.TenantsInfraStatusResponseV2>;
440
+ /**
441
+ * Permanently delete one collection and all of its data
442
+ * (`DELETE /databases/collections`). Not yet on the pinned SDK, so this
443
+ * is a hand-rolled path matching GraphResource.
444
+ */
445
+ deleteCollection(params: DeleteCollectionParams, opts?: RequestOptions): Promise<{
446
+ database?: string;
447
+ collection?: string;
448
+ status?: string;
449
+ message?: string;
450
+ }>;
262
451
  }
263
452
  /**
264
453
  * The canonical HydraDB client surface. Construct once per process from config;
@@ -16,7 +16,8 @@
16
16
  import { Buffer } from "node:buffer";
17
17
  import { HydraDBClient } from "@hydradb/sdk";
18
18
  import { unwrap } from "./envelope.js";
19
- import { translateError } from "./errors.js";
19
+ import { newRawTransport, sendRaw } from "./transport.js";
20
+ import { HydraWrapperError, translateError } from "./errors.js";
20
21
  import { GraphResource } from "./graph.js";
21
22
  /**
22
23
  * Sized to fit inside a typical MCP host's tool timeout rather than outlast it,
@@ -88,12 +89,19 @@ export function assertCollectionAllowed(collection, allowed) {
88
89
  }
89
90
  }
90
91
  class Resource {
91
- constructor(sdk, database, collection, allowedDatabases, allowedCollections) {
92
+ constructor(sdk, database, collection, allowedDatabases, allowedCollections,
93
+ /**
94
+ * The hand-rolled HTTP path, for the endpoints the SDK does not expose
95
+ * (CONTRACT §2 rule 7). Optional only so tests that inject a fake SDK and
96
+ * never touch such an endpoint need not build one.
97
+ */
98
+ raw) {
92
99
  this.sdk = sdk;
93
100
  this.database = database;
94
101
  this.collection = collection;
95
102
  this.allowedDatabases = allowedDatabases;
96
103
  this.allowedCollections = allowedCollections;
104
+ this.raw = raw;
97
105
  }
98
106
  scope(override, dbOverride) {
99
107
  const database = dbOverride?.trim() || this.database;
@@ -109,6 +117,37 @@ class Resource {
109
117
  ? { database, collection }
110
118
  : { database };
111
119
  }
120
+ /**
121
+ * Scope for a query that names SEVERAL collections.
122
+ *
123
+ * Deliberately does NOT fall back to the configured default collection. The
124
+ * server folds the singular `collection` into the deprecated `sub_tenant_id`
125
+ * and refuses any request that carries it alongside a multi-scope selector,
126
+ * so injecting the default here would turn every `collections` call on a
127
+ * scoped connection into a 400. Naming the collections IS the scope.
128
+ *
129
+ * Confinement is enforced on the same path as `scope`: every named
130
+ * collection is checked, so a multi-scope selector cannot reach past what an
131
+ * OAuth connection was confined to.
132
+ */
133
+ multiScope(collections, dbOverride) {
134
+ const database = dbOverride?.trim() || this.database;
135
+ if (database !== this.database)
136
+ assertDatabaseAllowed(database, this.allowedDatabases);
137
+ const names = Array.isArray(collections)
138
+ ? collections
139
+ : Object.keys(collections);
140
+ if (names.length === 0) {
141
+ throw new Error("collections was empty — pass at least one collection name, or omit " +
142
+ "collections to search the connection's default scope.");
143
+ }
144
+ for (const name of names) {
145
+ if (name !== this.collection) {
146
+ assertCollectionAllowed(name, this.allowedCollections);
147
+ }
148
+ }
149
+ return { database, collections };
150
+ }
112
151
  async call(path, fn) {
113
152
  try {
114
153
  return unwrap(await fn());
@@ -126,8 +165,8 @@ export class ContextResource extends Resource {
126
165
  // The base constructor is `protected`, so this one is what makes the class
127
166
  // instantiable from outside the file. Removing it fails with TS2674.
128
167
  // biome-ignore lint/complexity/noUselessConstructor: widens visibility
129
- constructor(sdk, database, collection, allowedDatabases, allowedCollections) {
130
- super(sdk, database, collection, allowedDatabases, allowedCollections);
168
+ constructor(sdk, database, collection, allowedDatabases, allowedCollections, raw) {
169
+ super(sdk, database, collection, allowedDatabases, allowedCollections, raw);
131
170
  }
132
171
  /**
133
172
  * The single retrieval entry point (SDK `client.query`).
@@ -154,8 +193,20 @@ export class ContextResource extends Resource {
154
193
  `hybrid retrieval, or pass queryBy "text" to match on the terms.`);
155
194
  }
156
195
  const queryBy = params.queryBy ?? (params.operator != null ? "text" : undefined);
196
+ // One scope selector per request. The server rejects a multi-scope
197
+ // selector sent alongside the singular one it folds `collection` into, so
198
+ // a caller that sets both has stated two different scopes and only they
199
+ // can say which they meant — the same stance taken on operator/queryBy
200
+ // above, rather than silently dropping one.
201
+ if (params.collections != null && params.collection != null) {
202
+ throw new Error("pass either collection (one scope) or collections (several) — not " +
203
+ "both. Hydra DB refuses a request carrying both selectors.");
204
+ }
205
+ const scope = params.collections != null
206
+ ? this.multiScope(params.collections, params.database)
207
+ : this.scope(params.collection, params.database);
157
208
  return this.call("/query", () => this.sdk.query({
158
- ...this.scope(params.collection, params.database),
209
+ ...scope,
159
210
  query: params.query,
160
211
  type: params.kind,
161
212
  operator: params.operator,
@@ -165,9 +216,11 @@ export class ContextResource extends Resource {
165
216
  graphContext: params.graphContext,
166
217
  alpha: params.alpha,
167
218
  recencyBias: params.recencyBias,
219
+ queryApps: params.queryApps,
168
220
  ids: params.ids,
169
221
  metadataFilters: params.metadataFilters,
170
222
  numRelatedChunks: params.numRelatedChunks,
223
+ acl: params.acl,
171
224
  }, req(opts)));
172
225
  }
173
226
  /**
@@ -262,6 +315,7 @@ export class ContextResource extends Resource {
262
315
  ids: params.ids,
263
316
  page: params.page,
264
317
  pageSize: params.pageSize,
318
+ acl: params.acl,
265
319
  }, req(opts)));
266
320
  }
267
321
  /** Fetch a source's content (SDK `context.inspect`; was "fetch content"). */
@@ -271,6 +325,7 @@ export class ContextResource extends Resource {
271
325
  id: params.id,
272
326
  mode: params.mode,
273
327
  expirySeconds: params.expirySeconds,
328
+ acl: params.acl,
274
329
  }, req(opts)));
275
330
  }
276
331
  /** Per-source indexing progress (SDK `context.status`). */
@@ -280,6 +335,46 @@ export class ContextResource extends Resource {
280
335
  ids: params.ids,
281
336
  }, req(opts)));
282
337
  }
338
+ /**
339
+ * The connected subgraph of one item (`GET /context/{id}/subgraph`): every
340
+ * item reachable from it through item-level relations — explicit links, a
341
+ * shared thread, parent/child — plus the relations among the members and
342
+ * the structural graph around them.
343
+ *
344
+ * No SDK resource for this yet, so it takes the raw path (CONTRACT §2 rule
345
+ * 7): same header, same envelope unwrap, same error type as everything else
346
+ * here. When the SDK grows `context.subgraph`, only this method changes.
347
+ */
348
+ async subgraph(params, opts) {
349
+ // `async` for the same reason `query` and `ingest` are: the scope check
350
+ // below throws, and a caller awaiting this must see a rejection, not a
351
+ // synchronous exception from the call site.
352
+ if (!this.raw) {
353
+ throw new HydraWrapperError("Hydra DB /context/{id}/subgraph → ERR: no HTTP transport configured", "/context/{id}/subgraph");
354
+ }
355
+ // Blank is the one id the wrapper rejects locally: it would build
356
+ // "/context//subgraph" and fail as a remote routing error instead of a
357
+ // legible one. Everything else goes out byte for byte — ingest stores a
358
+ // source_id verbatim, so trimming here could address a different item.
359
+ if (params.id.trim() === "") {
360
+ throw new HydraWrapperError("Hydra DB /context/{id}/subgraph → ERR: id must not be empty", "/context/{id}/subgraph");
361
+ }
362
+ const query = new URLSearchParams(this.scope(params.collection, params.database));
363
+ if (params.kind)
364
+ query.set("type", params.kind);
365
+ if (params.depth != null)
366
+ query.set("depth", String(params.depth));
367
+ if (params.maxSources != null)
368
+ query.set("max_sources", String(params.maxSources));
369
+ // Repeated params, like the dashboard and the CLI: the API reads both
370
+ // repeated (acl=a&acl=b) and comma-separated forms. An empty array is
371
+ // the same as omitted server-side, so sending nothing keeps the
372
+ // request faithful to what the caller said.
373
+ for (const principal of params.acl ?? [])
374
+ query.append("acl", principal);
375
+ const path = `/context/${encodeURIComponent(params.id)}/subgraph?${query.toString()}`;
376
+ return sendRaw(this.raw, path, "GET", undefined, opts);
377
+ }
283
378
  /** Knowledge-graph relations (SDK `context.relations`). */
284
379
  relations(params = {}) {
285
380
  return this.call("/context/relations", () => this.sdk.context.relations({
@@ -288,6 +383,7 @@ export class ContextResource extends Resource {
288
383
  type: params.kind,
289
384
  limit: params.limit,
290
385
  cursor: params.cursor,
386
+ acl: params.acl,
291
387
  }));
292
388
  }
293
389
  /** Delete memories or knowledge sources (SDK `context.delete`). */
@@ -303,8 +399,8 @@ export class DatabasesResource extends Resource {
303
399
  // The base constructor is `protected`, so this one is what makes the class
304
400
  // instantiable from outside the file. Removing it fails with TS2674.
305
401
  // biome-ignore lint/complexity/noUselessConstructor: widens visibility
306
- constructor(sdk, database, collection, allowedDatabases, allowedCollections) {
307
- super(sdk, database, collection, allowedDatabases, allowedCollections);
402
+ constructor(sdk, database, collection, allowedDatabases, allowedCollections, raw) {
403
+ super(sdk, database, collection, allowedDatabases, allowedCollections, raw);
308
404
  }
309
405
  create(params) {
310
406
  return this.call("/databases", () => this.sdk.databases.create({
@@ -329,6 +425,33 @@ export class DatabasesResource extends Resource {
329
425
  readiness(database) {
330
426
  return this.call("/databases/status", () => this.sdk.databases.status({ database }));
331
427
  }
428
+ /**
429
+ * Permanently delete one collection and all of its data
430
+ * (`DELETE /databases/collections`). Not yet on the pinned SDK, so this
431
+ * is a hand-rolled path matching GraphResource.
432
+ */
433
+ async deleteCollection(params, opts) {
434
+ // Hand-rolled for the same reason `context.subgraph` is (CONTRACT §2
435
+ // rule 7): the pinned SDK has no `databases.delete_collection`. It goes
436
+ // through the same raw transport, so it shares the retry, envelope
437
+ // unwrap and error type of every other call here.
438
+ if (!this.raw) {
439
+ throw new HydraWrapperError("Hydra DB /databases/collections → ERR: no HTTP transport configured", "/databases/collections");
440
+ }
441
+ // A caller who already cancelled is not waiting for the request to go
442
+ // out: reject a pre-aborted signal rather than send and then unwind.
443
+ if (opts?.signal?.aborted) {
444
+ throw translateError("/databases/collections", opts.signal.reason ?? new Error("aborted"));
445
+ }
446
+ if (params.collection.trim() === "") {
447
+ throw new HydraWrapperError("Hydra DB /databases/collections → ERR: collection must not be empty", "/databases/collections");
448
+ }
449
+ // scope() resolves the default database, enforces any confinement, and
450
+ // returns the canonical `database`/`collection` names the API expects.
451
+ const query = new URLSearchParams(this.scope(params.collection, params.database));
452
+ const path = `/databases/collections?${query.toString()}`;
453
+ return sendRaw(this.raw, path, "DELETE", undefined, opts);
454
+ }
332
455
  }
333
456
  /**
334
457
  * The canonical HydraDB client surface. Construct once per process from config;
@@ -355,8 +478,12 @@ export class HydraDB {
355
478
  this.collection = config.collection;
356
479
  this.allowedDatabases = config.allowedDatabases;
357
480
  this.allowedCollections = config.allowedCollections;
358
- this.context = new ContextResource(client, config.database, config.collection, config.allowedDatabases, config.allowedCollections);
359
- this.databases = new DatabasesResource(client, config.database, config.collection, config.allowedDatabases, config.allowedCollections);
481
+ const raw = newRawTransport(config, {
482
+ timeoutSeconds: DEFAULT_TIMEOUT_SECONDS,
483
+ maxRetries: DEFAULT_MAX_RETRIES,
484
+ });
485
+ this.context = new ContextResource(client, config.database, config.collection, config.allowedDatabases, config.allowedCollections, raw);
486
+ this.databases = new DatabasesResource(client, config.database, config.collection, config.allowedDatabases, config.allowedCollections, raw);
360
487
  this.graph = new GraphResource({
361
488
  token: config.token,
362
489
  ...(config.baseUrl != null ? { baseUrl: config.baseUrl } : {}),
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/hydra/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAoBrC;;;;;;;;;;;GAWG;AACH,MAAM,aAAa,GAAG;IACrB,KAAK,EAAE,CAAC,OAAe,EAAE,GAAG,IAAe,EAAE,EAAE,CAC9C,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjD,IAAI,EAAE,CAAC,OAAe,EAAE,GAAG,IAAe,EAAE,EAAE,CAC7C,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjD,IAAI,EAAE,CAAC,OAAe,EAAE,GAAG,IAAe,EAAE,EAAE,CAC7C,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjD,KAAK,EAAE,CAAC,OAAe,E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AC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC9D,cAAc,EAAE,MAAM,CAAC,cAAc,IAAI,uBAAuB;YAChE,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,mBAAmB;SACpD,CAAC,CAAC;IACJ,CAAC;CACD"}
@@ -40,10 +40,7 @@ export interface RequestOptions {
40
40
  signal?: AbortSignal;
41
41
  }
42
42
  export declare class GraphResource {
43
- private readonly config;
44
- private readonly baseUrl;
45
- private readonly timeoutMs;
46
- private readonly maxRetries;
43
+ private readonly transport;
47
44
  constructor(config: GraphConfig);
48
45
  /**
49
46
  * Run Cypher against one collection (`POST /byog/query`).
@@ -78,5 +75,4 @@ export declare class GraphResource {
78
75
  deleted_collections?: string[];
79
76
  }>;
80
77
  private send;
81
- private attempt;
82
78
  }