@zackbart/connecta 0.8.0 → 0.8.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.
- package/CHANGELOG.md +87 -0
- package/README.md +31 -55
- package/dist/activity.d.ts +0 -8
- package/dist/activity.d.ts.map +1 -1
- package/dist/activity.js +0 -1
- package/dist/activity.js.map +1 -1
- package/dist/auth/bearer.d.ts +1 -7
- package/dist/auth/bearer.d.ts.map +1 -1
- package/dist/auth/bearer.js +2 -23
- package/dist/auth/bearer.js.map +1 -1
- package/dist/auth/clerk.d.ts +2 -11
- package/dist/auth/clerk.d.ts.map +1 -1
- package/dist/auth/clerk.js +31 -46
- package/dist/auth/clerk.js.map +1 -1
- package/dist/call-admission.d.ts.map +1 -1
- package/dist/call-admission.js +0 -1
- package/dist/call-admission.js.map +1 -1
- package/dist/catalog-service.d.ts +1 -2
- package/dist/catalog-service.d.ts.map +1 -1
- package/dist/catalog-service.js +12 -18
- package/dist/catalog-service.js.map +1 -1
- package/dist/catalog.d.ts +6 -0
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +51 -0
- package/dist/catalog.js.map +1 -1
- package/dist/connectors/remote-mcp.d.ts.map +1 -1
- package/dist/connectors/remote-mcp.js +9 -22
- package/dist/connectors/remote-mcp.js.map +1 -1
- package/dist/errors.d.ts +18 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/execute.d.ts +1 -8
- package/dist/execute.d.ts.map +1 -1
- package/dist/execute.js +3 -13
- package/dist/execute.js.map +1 -1
- package/dist/executor-result.js +1 -1
- package/dist/executor-result.js.map +1 -1
- package/dist/index.d.ts +3 -82
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -90
- package/dist/index.js.map +1 -1
- package/dist/invocation.d.ts +5 -0
- package/dist/invocation.d.ts.map +1 -1
- package/dist/invocation.js +46 -10
- package/dist/invocation.js.map +1 -1
- package/dist/meta-tools.d.ts +3 -11
- package/dist/meta-tools.d.ts.map +1 -1
- package/dist/meta-tools.js +105 -157
- package/dist/meta-tools.js.map +1 -1
- package/dist/operator-ui/generated.d.ts +2 -2
- package/dist/operator-ui/generated.d.ts.map +1 -1
- package/dist/operator-ui/generated.js +2 -2
- package/dist/operator-ui/generated.js.map +1 -1
- package/dist/operator-ui/model.d.ts +1 -22
- package/dist/operator-ui/model.d.ts.map +1 -1
- package/dist/operator-ui/model.js.map +1 -1
- package/dist/registry.d.ts +11 -178
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +52 -330
- package/dist/registry.js.map +1 -1
- package/dist/retired-toolkits.d.ts +3 -0
- package/dist/retired-toolkits.d.ts.map +1 -0
- package/dist/retired-toolkits.js +9 -0
- package/dist/retired-toolkits.js.map +1 -0
- package/dist/routes/activity.d.ts.map +1 -1
- package/dist/routes/activity.js +2 -5
- package/dist/routes/activity.js.map +1 -1
- package/dist/routes/credentials.d.ts.map +1 -1
- package/dist/routes/credentials.js +1 -12
- package/dist/routes/credentials.js.map +1 -1
- package/dist/routes/mcp.d.ts.map +1 -1
- package/dist/routes/mcp.js +32 -145
- package/dist/routes/mcp.js.map +1 -1
- package/dist/routes/oauth.d.ts.map +1 -1
- package/dist/routes/oauth.js +2 -7
- package/dist/routes/oauth.js.map +1 -1
- package/dist/routes/shared.d.ts +7 -28
- package/dist/routes/shared.d.ts.map +1 -1
- package/dist/routes/shared.js +10 -69
- package/dist/routes/shared.js.map +1 -1
- package/dist/routes/ui.d.ts.map +1 -1
- package/dist/routes/ui.js +4 -10
- package/dist/routes/ui.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +1 -31
- package/dist/server.js.map +1 -1
- package/dist/skills.d.ts +3 -6
- package/dist/skills.d.ts.map +1 -1
- package/dist/skills.js +9 -38
- package/dist/skills.js.map +1 -1
- package/dist/timeout.d.ts.map +1 -1
- package/dist/timeout.js +2 -4
- package/dist/timeout.js.map +1 -1
- package/dist/types.d.ts +2 -59
- package/dist/types.d.ts.map +1 -1
- package/dist/ui.d.ts +1 -2
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +5 -35
- package/dist/ui.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/activity.ts +0 -9
- package/src/auth/bearer.ts +3 -32
- package/src/auth/clerk.ts +35 -48
- package/src/call-admission.ts +0 -1
- package/src/catalog-service.ts +23 -23
- package/src/catalog.ts +55 -0
- package/src/connectors/remote-mcp.ts +11 -23
- package/src/errors.ts +20 -0
- package/src/execute.ts +3 -18
- package/src/executor-result.ts +1 -1
- package/src/index.ts +24 -208
- package/src/invocation.ts +63 -10
- package/src/meta-tools.ts +122 -174
- package/src/operator-ui/browser.css +1 -54
- package/src/operator-ui/browser.ts +16 -150
- package/src/operator-ui/generated.ts +2 -2
- package/src/operator-ui/model.ts +1 -23
- package/src/registry.ts +59 -429
- package/src/retired-toolkits.ts +14 -0
- package/src/routes/activity.ts +1 -6
- package/src/routes/credentials.ts +0 -12
- package/src/routes/mcp.ts +40 -186
- package/src/routes/oauth.ts +1 -7
- package/src/routes/shared.ts +8 -98
- package/src/routes/ui.ts +2 -12
- package/src/server.ts +1 -31
- package/src/skills.ts +9 -38
- package/src/timeout.ts +2 -4
- package/src/types.ts +1 -60
- package/src/ui.ts +9 -46
- package/src/version.ts +1 -1
- package/dist/credential-health.d.ts +0 -205
- package/dist/credential-health.d.ts.map +0 -1
- package/dist/credential-health.js +0 -610
- package/dist/credential-health.js.map +0 -1
- package/dist/toolkits.d.ts +0 -124
- package/dist/toolkits.d.ts.map +0 -1
- package/dist/toolkits.js +0 -322
- package/dist/toolkits.js.map +0 -1
- package/src/credential-health.ts +0 -835
- package/src/toolkits.ts +0 -461
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/operator-ui/model.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/operator-ui/model.ts"],"names":[],"mappings":"AAyEA;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAChC,UAAyB,EACzB,KAAa;IAEb,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACrC,MAAM,QAAQ,GAA0B,EAAE,CAAC;IAC3C,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,MAAM,aAAa,GAAG;YACpB,SAAS,CAAC,EAAE;YACZ,SAAS,CAAC,KAAK;YACf,SAAS,CAAC,WAAW;YACrB,SAAS,CAAC,MAAM;SACjB;aACE,IAAI,CAAC,GAAG,CAAC;aACT,WAAW,EAAE,CAAC;QACjB,MAAM,gBAAgB,GAAG,OAAO,CAAC,CAAC,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;QACjE,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,MAAM,CAClC,CAAC,IAAI,EAAE,EAAE,CACP,CAAC,CAAC;YACF,gBAAgB;YAChB,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,IAAI,EAAE,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CACrE,CAAC;QACF,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,gBAAgB;YAAE,SAAS;QAC3D,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IACtC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
package/dist/registry.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import type { Connector, ConnectorContext, ConnectorStatus, KVStorage, Logger, ToolDef } from "./types.js";
|
|
2
2
|
import { type CredentialVault } from "./credentials.js";
|
|
3
|
-
import { type CredentialCheckOptions, type CredentialCheckResult, type CredentialHealthConfig, type CredentialHealthRecord } from "./credential-health.js";
|
|
4
3
|
import { type CallAdmissionPermit, type ConnectorCallAdmissionSnapshot } from "./call-admission.js";
|
|
5
|
-
import type { DeferredWork } from "./connector-scope.js";
|
|
6
|
-
import { type Toolkit } from "./toolkits.js";
|
|
7
4
|
/**
|
|
8
5
|
* Smallest accepted inline-result cap. One byte is pathological but harmless:
|
|
9
6
|
* `alignEndToCharBoundary` widens a window narrower than the codepoint at the
|
|
@@ -40,23 +37,6 @@ export interface HealthObservation {
|
|
|
40
37
|
consecutiveFailures: number;
|
|
41
38
|
lastError?: string;
|
|
42
39
|
}
|
|
43
|
-
/**
|
|
44
|
-
* Recent real-call outcomes per connector, as observed by ONE view.
|
|
45
|
-
*
|
|
46
|
-
* The deployment keeps one log, and each toolkit keeps its own. That split is a
|
|
47
|
-
* scope boundary, not bookkeeping: `lastError` is a downstream error string
|
|
48
|
-
* that routinely names the tool that failed, and `list_connectors` returns the
|
|
49
|
-
* observation verbatim. Sharing one log would let a toolkit read back the tools
|
|
50
|
-
* and failures of a sibling toolkit through a connector they happen to share —
|
|
51
|
-
* and let a sibling's failures flip this view's reported status. A scoped view
|
|
52
|
-
* reads back only the calls it made itself.
|
|
53
|
-
*/
|
|
54
|
-
export declare class HealthLog {
|
|
55
|
-
private readonly observations;
|
|
56
|
-
recordSuccess(id: string, latencyMs: number): void;
|
|
57
|
-
recordFailure(id: string, latencyMs: number, error: unknown): void;
|
|
58
|
-
get(id: string): HealthObservation | undefined;
|
|
59
|
-
}
|
|
60
40
|
export interface RegistryOptions {
|
|
61
41
|
storage: KVStorage;
|
|
62
42
|
logger: Logger;
|
|
@@ -75,8 +55,6 @@ export interface RegistryOptions {
|
|
|
75
55
|
* of bytes >= 1; anything else warns and falls back to 100_000.
|
|
76
56
|
*/
|
|
77
57
|
maxBatchResultBytes?: number;
|
|
78
|
-
/** Tuning for the credential liveness checks (issue #24). */
|
|
79
|
-
credentialHealth?: CredentialHealthConfig;
|
|
80
58
|
}
|
|
81
59
|
export type ConnectorOperationOptions = Pick<ConnectorContext, "signal" | "timeoutMs">;
|
|
82
60
|
/**
|
|
@@ -84,12 +62,9 @@ export type ConnectorOperationOptions = Pick<ConnectorContext, "signal" | "timeo
|
|
|
84
62
|
* (`src/meta-tools.ts`) and the `execute_code` sandbox bridge (`src/execute.ts`)
|
|
85
63
|
* is typed against THIS, never against the concrete `Registry`.
|
|
86
64
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* here is a compile error, and adding one here is a compile error until
|
|
91
|
-
* `ScopedRegistry` filters it — so a new meta-tool cannot quietly step around
|
|
92
|
-
* the boundary.
|
|
65
|
+
* The read-only seam remains useful even without scoped views: meta-tools can
|
|
66
|
+
* consume registry behavior without depending on the concrete implementation
|
|
67
|
+
* or its construction-only methods.
|
|
93
68
|
*/
|
|
94
69
|
export interface RegistryView {
|
|
95
70
|
/** Deployment-wide result-size cap threaded to the meta-tools. */
|
|
@@ -106,10 +81,7 @@ export interface RegistryView {
|
|
|
106
81
|
refreshTools(id: string, baseUrl: string, requestScope?: object, callOptions?: ConnectorOperationOptions): Promise<ToolDef[]>;
|
|
107
82
|
peekTools(id: string): ToolDef[] | undefined;
|
|
108
83
|
contextFor(id: string, baseUrl: string, requestScope?: object, callOptions?: ConnectorOperationOptions): ConnectorContext;
|
|
109
|
-
/**
|
|
110
|
-
* Acquire the connector's shared downstream-call permit. Scoped views
|
|
111
|
-
* delegate to the base registry so every toolkit contends on the same pool.
|
|
112
|
-
*/
|
|
84
|
+
/** Acquire the connector's shared downstream-call permit. */
|
|
113
85
|
admitCall(id: string, input: {
|
|
114
86
|
toolName: string;
|
|
115
87
|
args: unknown;
|
|
@@ -120,12 +92,9 @@ export interface RegistryView {
|
|
|
120
92
|
recordFailure(id: string, latencyMs: number, error: unknown): void;
|
|
121
93
|
healthFor(id: string): HealthObservation | undefined;
|
|
122
94
|
hasObservedSuccess(id: string): boolean;
|
|
123
|
-
/** When ANY view last saw a successful call to `id`, deployment-wide. */
|
|
124
95
|
observedSuccessAt(id: string): string | undefined;
|
|
125
|
-
/**
|
|
126
|
-
|
|
127
|
-
/** Store a liveness verdict a live status check just produced. */
|
|
128
|
-
recordCredentialHealth(id: string, record: CredentialHealthRecord): Promise<void>;
|
|
96
|
+
/** Local declared-vs-stored credential mismatch, with no downstream I/O. */
|
|
97
|
+
credentialDriftFor(id: string): Promise<string | undefined>;
|
|
129
98
|
statusFor(id: string, baseUrl: string, requestScope?: object, callOptions?: ConnectorOperationOptions): Promise<ConnectorStatus>;
|
|
130
99
|
invalidateStored(id: string): Promise<void>;
|
|
131
100
|
}
|
|
@@ -155,8 +124,6 @@ export declare class Registry implements RegistryView {
|
|
|
155
124
|
readonly maxResultBytes: number;
|
|
156
125
|
/** Final batch envelope cap threaded to the meta-tools. */
|
|
157
126
|
readonly maxBatchResultBytes: number;
|
|
158
|
-
/** Proactive liveness checks over stored downstream credentials (issue #24). */
|
|
159
|
-
private readonly credentialHealth;
|
|
160
127
|
constructor(connectors: Connector[], opts: RegistryOptions);
|
|
161
128
|
/**
|
|
162
129
|
* Warn once per unusable result cap, at construction time — the same
|
|
@@ -233,152 +200,18 @@ export declare class Registry implements RegistryView {
|
|
|
233
200
|
recordSuccess(id: string, latencyMs: number): void;
|
|
234
201
|
recordFailure(id: string, latencyMs: number, error: unknown): void;
|
|
235
202
|
healthFor(id: string): HealthObservation | undefined;
|
|
236
|
-
/**
|
|
237
|
-
* Whether ANY view of this deployment has seen a successful call to `id` —
|
|
238
|
-
* a bare boolean, never the observation. Connector liveness (reachable,
|
|
239
|
-
* credentials still valid) is a deployment-level fact, not a per-view one, so
|
|
240
|
-
* `list_connectors` may classify a connector as ok/unknown from it. The
|
|
241
|
-
* observation itself — `lastError` above all, which names the tool that
|
|
242
|
-
* failed — stays strictly per view.
|
|
243
|
-
*/
|
|
203
|
+
/** Whether this deployment has seen a successful call to `id`. */
|
|
244
204
|
hasObservedSuccess(id: string): boolean;
|
|
245
|
-
/**
|
|
246
|
-
* The timestamp behind `hasObservedSuccess`, on the same deployment-wide
|
|
247
|
-
* terms and for the same reason: it says only *when* the connector last
|
|
248
|
-
* answered, never what was called or what failed. Credential health reads it
|
|
249
|
-
* to decide whether a failed verdict has been overtaken by real traffic.
|
|
250
|
-
*/
|
|
205
|
+
/** The timestamp behind `hasObservedSuccess`. */
|
|
251
206
|
observedSuccessAt(id: string): string | undefined;
|
|
252
|
-
|
|
253
|
-
* The last credential-liveness verdict for `id` — the layer that lets a cached
|
|
254
|
-
* status read report `auth_required` before a real call discovers it. Read
|
|
255
|
-
* from storage (mirrored in memory for a few seconds) rather than held in
|
|
256
|
-
* memory alone, because on Workers the isolate that ran the check is usually
|
|
257
|
-
* not the isolate answering this read.
|
|
258
|
-
*/
|
|
259
|
-
credentialHealthFor(id: string): Promise<CredentialHealthRecord | undefined>;
|
|
260
|
-
recordCredentialHealth(id: string, record: CredentialHealthRecord): Promise<void>;
|
|
261
|
-
/**
|
|
262
|
-
* Check stored downstream credentials now and return one outcome per
|
|
263
|
-
* connector considered. THE operator-facing entry point behind
|
|
264
|
-
* `Connecta.checkCredentials()`: wire it to a Worker cron trigger or a Node
|
|
265
|
-
* interval. Never rejects; connectors checked recently are reported as
|
|
266
|
-
* `fresh` unless `force` is set.
|
|
267
|
-
*/
|
|
268
|
-
checkCredentialHealth(baseUrl: string, opts?: CredentialCheckOptions, defer?: DeferredWork): Promise<CredentialCheckResult[]>;
|
|
269
|
-
/**
|
|
270
|
-
* The traffic-triggered sweep: a promise for the caller to defer (Workers:
|
|
271
|
-
* `ctx.waitUntil`), or `undefined` when nothing is due — which is the common
|
|
272
|
-
* case and costs no I/O. Called by the server after an authenticated request;
|
|
273
|
-
* the checker owns the rate limiting.
|
|
274
|
-
*/
|
|
275
|
-
sweepCredentialHealthIfDue(baseUrl: string, defer?: DeferredWork): Promise<CredentialCheckResult[]> | undefined;
|
|
276
|
-
/**
|
|
277
|
-
* Drop a connector's liveness verdict, because its credential just changed
|
|
278
|
-
* under us (OAuth callback completed, credential stored or removed on
|
|
279
|
-
* /credentials). A
|
|
280
|
-
* stale `auth_required` must not outlive the re-authorization that fixed it —
|
|
281
|
-
* that is the difference between recovery working and needing a restart.
|
|
282
|
-
*/
|
|
283
|
-
clearCredentialHealth(id: string): Promise<void>;
|
|
207
|
+
credentialDriftFor(id: string): Promise<string | undefined>;
|
|
284
208
|
/** Best-effort connector status for list_connectors. */
|
|
285
209
|
statusFor(id: string, baseUrl: string, requestScope?: object, callOptions?: ConnectorOperationOptions): Promise<ConnectorStatus>;
|
|
210
|
+
private markCatalogInvalid;
|
|
211
|
+
private deleteStoredCatalog;
|
|
286
212
|
/** Drop a connector's cached tool list (e.g. after auth completes). */
|
|
287
213
|
invalidate(id: string): void;
|
|
288
214
|
/** Drop both in-memory and persisted tool catalogs. */
|
|
289
215
|
invalidateStored(id: string): Promise<void>;
|
|
290
216
|
}
|
|
291
|
-
/**
|
|
292
|
-
* THE toolkit enforcement point (issue #22).
|
|
293
|
-
*
|
|
294
|
-
* A filtered VIEW of one long-lived `Registry`: same connectors, same tool
|
|
295
|
-
* caches, same health — narrowed to the connectors and tool addresses one
|
|
296
|
-
* toolkit selects. `serveMcp` builds it once per scoped connection and hands it
|
|
297
|
-
* to `registerMetaTools`/`registerExecuteTool`, so `list_connectors`,
|
|
298
|
-
* `search_tools`, `describe_tools`, `call_tool`, `call_destructive_tool`,
|
|
299
|
-
* `batch_call`, `authorize_connector`, `get_result`, `skills`, and the
|
|
300
|
-
* `execute_code` host bridge all inherit the boundary from here instead of
|
|
301
|
-
* re-implementing nine checks.
|
|
302
|
-
*
|
|
303
|
-
* Two invariants make it reviewable:
|
|
304
|
-
*
|
|
305
|
-
* 1. **Indistinguishability.** Out-of-scope input fails through the SAME code
|
|
306
|
-
* path, with the same error class and message, as input naming something
|
|
307
|
-
* that does not exist at all. An out-of-scope CONNECTOR disappears from
|
|
308
|
-
* `resolveAddress`/`getConnector` (→ `Unknown address` / `Unknown
|
|
309
|
-
* connector`); an out-of-scope TOOL disappears from the catalog this view
|
|
310
|
-
* returns (→ `Unknown tool "<t>" on connector "<c>"`), which is exactly the
|
|
311
|
-
* error a misspelled tool name already produced. Scoping deliberately does
|
|
312
|
-
* NOT reject at `resolveAddress` for tools: that would answer with the
|
|
313
|
-
* connector-level message and make "hidden here" distinguishable from
|
|
314
|
-
* "never existed".
|
|
315
|
-
* 2. **It filters views, never state.** Every read delegates to the shared
|
|
316
|
-
* registry and filters the returned array, so the tool cache, the persisted
|
|
317
|
-
* catalog, and the health map stay whole and shared across scopes.
|
|
318
|
-
*/
|
|
319
|
-
export declare class ScopedRegistry implements RegistryView {
|
|
320
|
-
private readonly base;
|
|
321
|
-
private readonly toolkit;
|
|
322
|
-
/** This toolkit's own health observations — see HealthLog. */
|
|
323
|
-
private readonly health;
|
|
324
|
-
constructor(base: Registry, toolkit: Toolkit);
|
|
325
|
-
get maxResultBytes(): number;
|
|
326
|
-
get maxBatchResultBytes(): number;
|
|
327
|
-
/** In scope AND actually registered. */
|
|
328
|
-
private visible;
|
|
329
|
-
/** Byte-identical to what the unscoped registry throws for an unknown id. */
|
|
330
|
-
private unknownConnector;
|
|
331
|
-
private inScopeTools;
|
|
332
|
-
listConnectors(): Connector[];
|
|
333
|
-
getConnector(id: string): Connector | undefined;
|
|
334
|
-
resolveAddress(address: string): {
|
|
335
|
-
connector: Connector;
|
|
336
|
-
toolName: string;
|
|
337
|
-
} | null;
|
|
338
|
-
getTools(id: string, baseUrl: string, requestScope?: object, callOptions?: ConnectorOperationOptions): Promise<ToolDef[]>;
|
|
339
|
-
refreshTools(id: string, baseUrl: string, requestScope?: object, callOptions?: ConnectorOperationOptions): Promise<ToolDef[]>;
|
|
340
|
-
peekTools(id: string): ToolDef[] | undefined;
|
|
341
|
-
contextFor(id: string, baseUrl: string, requestScope?: object, callOptions?: ConnectorOperationOptions): ConnectorContext;
|
|
342
|
-
admitCall(id: string, input: {
|
|
343
|
-
toolName: string;
|
|
344
|
-
args: unknown;
|
|
345
|
-
signal?: AbortSignal;
|
|
346
|
-
}): Promise<CallAdmissionPermit>;
|
|
347
|
-
/**
|
|
348
|
-
* Stashed oversized results are bound to the scope that produced them: a
|
|
349
|
-
* scoped session cannot page a result it could not have produced, and an id
|
|
350
|
-
* from another scope reads back as the ordinary "Unknown or expired result
|
|
351
|
-
* id". Unscoped sessions keep the historical `results:` prefix untouched.
|
|
352
|
-
*/
|
|
353
|
-
resultsStorage(): KVStorage;
|
|
354
|
-
recordSuccess(id: string, latencyMs: number): void;
|
|
355
|
-
recordFailure(id: string, latencyMs: number, error: unknown): void;
|
|
356
|
-
healthFor(id: string): HealthObservation | undefined;
|
|
357
|
-
/**
|
|
358
|
-
* Deliberately NOT per view: whether the connector has ever answered is a
|
|
359
|
-
* fact about the connector, not about a team's traffic, and withholding it
|
|
360
|
-
* would report every remote connector as "unknown" to a scoped session that
|
|
361
|
-
* has not called it yet. It carries no tool name, error text, or count — the
|
|
362
|
-
* per-view isolation of those, above, is unchanged.
|
|
363
|
-
*/
|
|
364
|
-
hasObservedSuccess(id: string): boolean;
|
|
365
|
-
/** Deployment-wide for the same reason as `hasObservedSuccess` above. */
|
|
366
|
-
observedSuccessAt(id: string): string | undefined;
|
|
367
|
-
/**
|
|
368
|
-
* Also deliberately NOT per view, for the same reason as
|
|
369
|
-
* `hasObservedSuccess`: whether the credential connecta stores for a connector
|
|
370
|
-
* still works is a fact about the deployment's credential, not about a team's
|
|
371
|
-
* traffic. Withholding it would leave a scoped session unable to see that the
|
|
372
|
-
* connector it shares needs re-authorization. The verdict carries the
|
|
373
|
-
* connector's own connector-level reason — never a tool name — so the per-view
|
|
374
|
-
* isolation of `lastError` above is unchanged.
|
|
375
|
-
*/
|
|
376
|
-
credentialHealthFor(id: string): Promise<CredentialHealthRecord | undefined>;
|
|
377
|
-
recordCredentialHealth(id: string, record: CredentialHealthRecord): Promise<void>;
|
|
378
|
-
statusFor(id: string, baseUrl: string, requestScope?: object, callOptions?: {
|
|
379
|
-
signal?: AbortSignal;
|
|
380
|
-
timeoutMs?: number;
|
|
381
|
-
}): Promise<ConnectorStatus>;
|
|
382
|
-
invalidateStored(id: string): Promise<void>;
|
|
383
|
-
}
|
|
384
217
|
//# sourceMappingURL=registry.d.ts.map
|
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,MAAM,EACN,OAAO,EACR,MAAM,YAAY,CAAC;AACpB,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEL,KAAK,
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,MAAM,EACN,OAAO,EACR,MAAM,YAAY,CAAC;AACpB,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,EACpC,MAAM,qBAAqB,CAAC;AAqC7B;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE5D;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,SAAS,EAAE,MAAM,GAChB,MAAM,CAIR;AAuCD,MAAM,WAAW,iBAAiB;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,M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