@agentronics/sdk 0.5.0 → 0.7.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/README.md +96 -76
- package/dist/chunk-3WPDIMJP.js +18 -0
- package/dist/chunk-3WPDIMJP.js.map +1 -0
- package/dist/chunk-6QQS26AP.js +1200 -0
- package/dist/chunk-6QQS26AP.js.map +1 -0
- package/dist/chunk-BPDWJCPY.js +2 -0
- package/dist/chunk-BPDWJCPY.js.map +1 -0
- package/dist/index.cjs +8 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +51 -12
- package/dist/index.d.ts +51 -12
- package/dist/index.global.js +8 -7
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{init-only-7f8_LQAI.d.ts → init-only-C80qhujz.d.ts} +227 -30
- package/dist/{init-only-Cwll8MGz.d.cts → init-only-s9E9bVC0.d.cts} +227 -30
- package/dist/init-only.cjs +8 -7
- package/dist/init-only.cjs.map +1 -1
- package/dist/init-only.d.cts +2 -2
- package/dist/init-only.d.ts +2 -2
- package/dist/init-only.global.js +8 -7
- package/dist/init-only.global.js.map +1 -1
- package/dist/init-only.js +1 -1
- package/dist/lite.cjs +1 -1
- package/dist/lite.cjs.map +1 -1
- package/dist/lite.d.cts +2 -2
- package/dist/lite.d.ts +2 -2
- package/dist/lite.global.js +1 -1
- package/dist/lite.global.js.map +1 -1
- package/dist/lite.js +1 -1
- package/dist/middleware-Dd2T772u.d.cts +429 -0
- package/dist/middleware-Dd2T772u.d.ts +429 -0
- package/dist/next.cjs +1137 -0
- package/dist/next.cjs.map +1 -0
- package/dist/next.d.cts +20 -0
- package/dist/next.d.ts +20 -0
- package/dist/next.js +20 -0
- package/dist/next.js.map +1 -0
- package/dist/server.cjs +1321 -0
- package/dist/server.cjs.map +1 -0
- package/dist/server.d.cts +131 -0
- package/dist/server.d.ts +131 -0
- package/dist/server.js +95 -0
- package/dist/server.js.map +1 -0
- package/dist/webmcp-BgKzHeQ3.d.cts +97 -0
- package/dist/webmcp-BgKzHeQ3.d.ts +97 -0
- package/package.json +38 -6
- package/dist/chunk-77VJ65X2.js +0 -17
- package/dist/chunk-77VJ65X2.js.map +0 -1
- package/dist/chunk-LLD3Y2LZ.js +0 -2
- package/dist/chunk-LLD3Y2LZ.js.map +0 -1
- package/dist/webmcp-C4ikhM4g.d.cts +0 -12
- package/dist/webmcp-C4ikhM4g.d.ts +0 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AgentIdentity, IdentityClaim, TraceEvent, TraceEventType, VerificationResult, AgentClass, PolicyRule, PolicyEvaluation, MemoryScope, MemoryEntry, SiteMemory, SiteMemoryPageContext } from '@agentronics/protocol';
|
|
2
|
-
import { D as DetectWebMcpOptions } from './webmcp-
|
|
2
|
+
import { D as DetectWebMcpOptions, T as ToolAnnotations, a as ModelContextSource, b as ModelContextLike, L as LegacyProvider } from './webmcp-BgKzHeQ3.cjs';
|
|
3
3
|
|
|
4
4
|
type CrawlerCategory = 'ai' | 'search';
|
|
5
5
|
interface CrawlerSignature {
|
|
@@ -45,6 +45,7 @@ interface SignalResult {
|
|
|
45
45
|
declare const SIGNALS: {
|
|
46
46
|
readonly webdriver: () => SignalResult;
|
|
47
47
|
readonly chromedriver: () => SignalResult;
|
|
48
|
+
readonly automationGlobals: () => SignalResult;
|
|
48
49
|
readonly headlessUa: () => SignalResult;
|
|
49
50
|
readonly languages: () => SignalResult;
|
|
50
51
|
readonly permissions: () => SignalResult;
|
|
@@ -86,6 +87,73 @@ interface DetectAgentOptions {
|
|
|
86
87
|
*/
|
|
87
88
|
declare const detectAgent: (options?: DetectAgentOptions) => Promise<AgentIdentity | null>;
|
|
88
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Vision-model ("screenshot") agents — computer-use agents that look at
|
|
92
|
+
* screenshots and drive a real browser with synthetic mouse and keyboard
|
|
93
|
+
* input (ChatGPT agent, Claude computer use, Gemini computer use, …).
|
|
94
|
+
*
|
|
95
|
+
* They run in ordinary browsers, so DOM automation flags often don't fire.
|
|
96
|
+
* What gives them away is how they interact:
|
|
97
|
+
*
|
|
98
|
+
* - **teleport clicks** — a click with no pointer movement leading up to it
|
|
99
|
+
* (the cursor jumps straight to the coordinates the model picked);
|
|
100
|
+
* - **centre clicks** — clicks landing within a pixel or two of an element's
|
|
101
|
+
* exact centre, again and again;
|
|
102
|
+
* - **metronome typing** — key intervals with almost no variance, or text
|
|
103
|
+
* inserted with no key events at all;
|
|
104
|
+
* - **no hover or wheel** — clicks and scroll jumps without any mousemove or
|
|
105
|
+
* wheel activity in between;
|
|
106
|
+
* - **VM-shaped viewport** — exact sizes agent sandboxes use (1024×768, 1280×800…).
|
|
107
|
+
*
|
|
108
|
+
* Each signal is weak alone. The monitor scores them over a short window and
|
|
109
|
+
* reports a `screenshot` agent only when several agree after enough
|
|
110
|
+
* interactions. It reads event coordinates and timing only — never key values
|
|
111
|
+
* or text.
|
|
112
|
+
*/
|
|
113
|
+
interface VisionDetectorOptions {
|
|
114
|
+
/** Score (0–1) at which to report an agent. Default 0.6. */
|
|
115
|
+
threshold?: number;
|
|
116
|
+
/** Interactions (clicks + typing bursts) needed before scoring. Default 3. */
|
|
117
|
+
minInteractions?: number;
|
|
118
|
+
documentRef?: Document;
|
|
119
|
+
/** Called once, when the score first crosses the threshold. */
|
|
120
|
+
onDetect?: (identity: AgentIdentity) => void;
|
|
121
|
+
/** @internal Tests only: count synthetic (isTrusted=false) events. */
|
|
122
|
+
acceptUntrustedEvents?: boolean;
|
|
123
|
+
}
|
|
124
|
+
interface VisionSignals {
|
|
125
|
+
clicks: number;
|
|
126
|
+
teleportClicks: number;
|
|
127
|
+
centreClicks: number;
|
|
128
|
+
keyIntervals: number;
|
|
129
|
+
keyIntervalCv: number | null;
|
|
130
|
+
insertWithoutKeys: number;
|
|
131
|
+
pointerMoves: number;
|
|
132
|
+
wheelEvents: number;
|
|
133
|
+
vmViewport: boolean;
|
|
134
|
+
}
|
|
135
|
+
/** 0–1 score from the collected signals (exported for tests and the console's explanation). */
|
|
136
|
+
declare const scoreVisionSignals: (s: VisionSignals) => number;
|
|
137
|
+
/**
|
|
138
|
+
* Watch the page for vision-agent interaction patterns. Returns a handle with
|
|
139
|
+
* the live signals and score; `onDetect` fires once when the threshold is met.
|
|
140
|
+
*/
|
|
141
|
+
declare const createVisionDetector: (options?: VisionDetectorOptions) => {
|
|
142
|
+
signals: () => VisionSignals;
|
|
143
|
+
score: () => number;
|
|
144
|
+
detected: () => {
|
|
145
|
+
class: "webmcp" | "dom" | "screenshot" | "crawler";
|
|
146
|
+
trust: "detected" | "declared" | "verified" | "linked";
|
|
147
|
+
confidence: number;
|
|
148
|
+
vendor: string | null;
|
|
149
|
+
userAgent: string | null;
|
|
150
|
+
detectionVersion: string;
|
|
151
|
+
signals: Record<string, unknown>;
|
|
152
|
+
} | null;
|
|
153
|
+
stop: () => void;
|
|
154
|
+
};
|
|
155
|
+
type VisionDetector = ReturnType<typeof createVisionDetector>;
|
|
156
|
+
|
|
89
157
|
interface PresentIdentityOptions extends IdentityClaim {
|
|
90
158
|
/**
|
|
91
159
|
* If false, accept the claim as `declared` (no remote verification).
|
|
@@ -178,8 +246,25 @@ interface AuthEngineOptions {
|
|
|
178
246
|
methods?: AuthMethod[];
|
|
179
247
|
context?: AuthContext;
|
|
180
248
|
onTrace?: (input: TraceInput) => void;
|
|
249
|
+
/**
|
|
250
|
+
* `'0.6'` restores the pre-0.7 behaviour: tokens nothing has verified count
|
|
251
|
+
* as `verified` (or `linked` with a user id), and SSO / SPIFFE / mTLS are in
|
|
252
|
+
* the default methods. Insecure — for upgrading without changes; remove it
|
|
253
|
+
* once `auth.verifyToken` is wired. See the 0.7 upgrade guide.
|
|
254
|
+
*/
|
|
255
|
+
compat?: '0.6';
|
|
256
|
+
/** Called once, the first time a credential arrives with no verifier configured. */
|
|
257
|
+
onUnverifiedToken?: (method: AuthMethodName) => void;
|
|
181
258
|
}
|
|
182
|
-
|
|
259
|
+
/**
|
|
260
|
+
* Methods on by default. SSO, SPIFFE (incl. Google Agent Identity) and mTLS are
|
|
261
|
+
* kept but off until they ship — pass `methods: [...defaultAuthMethods(),
|
|
262
|
+
* ...previewAuthMethods()]` to try them.
|
|
263
|
+
*/
|
|
264
|
+
declare const defaultAuthMethods: () => AuthMethod[];
|
|
265
|
+
/** Coming later: enterprise agent SSO, workload identity (SPIFFE) and mTLS. */
|
|
266
|
+
declare const previewAuthMethods: () => AuthMethod[];
|
|
267
|
+
declare const createAuthEngine: ({ compat, methods, context, onTrace, onUnverifiedToken, }?: AuthEngineOptions) => {
|
|
183
268
|
authenticate(input: AuthInput): Promise<AgentIdentity | null>;
|
|
184
269
|
methods(): AuthMethodName[];
|
|
185
270
|
};
|
|
@@ -302,11 +387,40 @@ declare const createMemoryCache: ({ gatewayUrl, siteId, publishableKey, fetcher,
|
|
|
302
387
|
};
|
|
303
388
|
type MemoryCache = ReturnType<typeof createMemoryCache>;
|
|
304
389
|
|
|
390
|
+
/** What a "review" decision asks the person on the page to approve. */
|
|
391
|
+
interface ReviewRequest {
|
|
392
|
+
tool: string;
|
|
393
|
+
title?: string;
|
|
394
|
+
description?: string;
|
|
395
|
+
input: unknown;
|
|
396
|
+
identity: AgentIdentity | null;
|
|
397
|
+
reason: string;
|
|
398
|
+
}
|
|
399
|
+
/** Return true to let the tool run, false to refuse it. */
|
|
400
|
+
type Reviewer = (request: ReviewRequest) => Promise<boolean>;
|
|
401
|
+
interface ReviewPromptOptions {
|
|
402
|
+
documentRef?: Document;
|
|
403
|
+
/** Refuse automatically if nobody answers. Default 120 s. */
|
|
404
|
+
timeoutMs?: number;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* The default browser reviewer: a small modal asking the visitor to allow or
|
|
408
|
+
* refuse the agent's action. Resolves false without a document (server), on
|
|
409
|
+
* "Not now", on Escape, or after the timeout.
|
|
410
|
+
*/
|
|
411
|
+
declare const createReviewPrompt: ({ documentRef, timeoutMs, }?: ReviewPromptOptions) => Reviewer;
|
|
412
|
+
|
|
305
413
|
interface GovernedTool<Input = unknown, Output = unknown> {
|
|
306
414
|
name: string;
|
|
415
|
+
/** Human-readable name agents and browsers may show (WebMCP `title`). */
|
|
416
|
+
title?: string;
|
|
307
417
|
version?: string;
|
|
308
418
|
group?: string;
|
|
309
419
|
description?: string;
|
|
420
|
+
/** WebMCP hints: readOnlyHint, consequentialHint, untrustedContentHint. */
|
|
421
|
+
annotations?: ToolAnnotations;
|
|
422
|
+
/** Other origins whose agents may see this tool (WebMCP `exposedTo`). */
|
|
423
|
+
exposedTo?: string[];
|
|
310
424
|
inputSchema?: Record<string, unknown>;
|
|
311
425
|
outputSchema?: Record<string, unknown>;
|
|
312
426
|
stage?: string;
|
|
@@ -314,6 +428,7 @@ interface GovernedTool<Input = unknown, Output = unknown> {
|
|
|
314
428
|
rateLimit?: PolicyRule['rateLimit'];
|
|
315
429
|
execute: (input: Input, context: {
|
|
316
430
|
identity: AgentIdentity | null;
|
|
431
|
+
signal?: AbortSignal;
|
|
317
432
|
}) => Promise<Output> | Output;
|
|
318
433
|
}
|
|
319
434
|
interface ToolRegistryOptions {
|
|
@@ -335,6 +450,15 @@ interface ToolRegistryOptions {
|
|
|
335
450
|
* - `execute(name, input, identity)` → respected
|
|
336
451
|
*/
|
|
337
452
|
identityResolver?: () => AgentIdentity | null;
|
|
453
|
+
/**
|
|
454
|
+
* Asks a person to approve a call whose policy decision is `review`. Without
|
|
455
|
+
* one, review calls are refused (never silently run).
|
|
456
|
+
*/
|
|
457
|
+
reviewer?: Reviewer;
|
|
458
|
+
}
|
|
459
|
+
interface ExecuteOptions {
|
|
460
|
+
/** Aborted when the agent cancels the call (WebMCP passes one per call). */
|
|
461
|
+
signal?: AbortSignal;
|
|
338
462
|
}
|
|
339
463
|
interface ToolRegistry {
|
|
340
464
|
register(tool: GovernedTool): () => void;
|
|
@@ -346,9 +470,9 @@ interface ToolRegistry {
|
|
|
346
470
|
includeDisabled?: boolean;
|
|
347
471
|
}): GovernedTool[];
|
|
348
472
|
get(name: string): GovernedTool | undefined;
|
|
349
|
-
execute<Input, Output>(name: string, input: Input, identity?: AgentIdentity | null): Promise<Output>;
|
|
473
|
+
execute<Input, Output>(name: string, input: Input, identity?: AgentIdentity | null, options?: ExecuteOptions): Promise<Output>;
|
|
350
474
|
}
|
|
351
|
-
declare const createToolRegistry: ({ evaluate, setPolicies, listPolicies, onTrace, identityResolver, }: ToolRegistryOptions) => ToolRegistry;
|
|
475
|
+
declare const createToolRegistry: ({ evaluate, setPolicies, listPolicies, onTrace, identityResolver, reviewer, }: ToolRegistryOptions) => ToolRegistry;
|
|
352
476
|
|
|
353
477
|
interface ProgressionTransition {
|
|
354
478
|
on: string;
|
|
@@ -417,40 +541,67 @@ interface TokenBudgetReport {
|
|
|
417
541
|
total: number;
|
|
418
542
|
perTool: ToolTokenEstimate[];
|
|
419
543
|
}
|
|
544
|
+
/**
|
|
545
|
+
* What an agent actually receives for a tool — the fields registered with
|
|
546
|
+
* WebMCP (`name`, `title`, `description`, `inputSchema`, `annotations`).
|
|
547
|
+
* Policy, version and grouping stay on the site and cost the agent nothing.
|
|
548
|
+
*/
|
|
549
|
+
declare const modelFacingDescriptor: (tool: Pick<GovernedTool, "name" | "title" | "description" | "inputSchema" | "annotations">) => {
|
|
550
|
+
annotations?: ToolAnnotations;
|
|
551
|
+
inputSchema?: Record<string, unknown>;
|
|
552
|
+
description: string;
|
|
553
|
+
title?: string;
|
|
554
|
+
name: string;
|
|
555
|
+
};
|
|
556
|
+
/** ≈ characters / 4 of the model-facing descriptor. */
|
|
557
|
+
declare const descriptorTokens: (tool: Parameters<typeof modelFacingDescriptor>[0]) => number;
|
|
420
558
|
declare const estimateToolTokens: (tool: GovernedTool) => ToolTokenEstimate;
|
|
421
559
|
declare const estimateBudget: (tools: GovernedTool[]) => TokenBudgetReport;
|
|
422
560
|
|
|
561
|
+
/** @deprecated The pre-2026 `provideContext()` shape; kept for old polyfills. */
|
|
562
|
+
type WebMcpProvider = LegacyProvider;
|
|
423
563
|
interface WebMcpToolDescriptor {
|
|
424
564
|
name: string;
|
|
425
565
|
description?: string;
|
|
426
566
|
inputSchema?: Record<string, unknown>;
|
|
427
567
|
invoke(input?: unknown): Promise<unknown>;
|
|
428
568
|
}
|
|
429
|
-
interface WebMcpProvider {
|
|
430
|
-
provideContext(payload: {
|
|
431
|
-
tools: WebMcpToolDescriptor[];
|
|
432
|
-
}): {
|
|
433
|
-
revoke: () => void;
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
569
|
interface WebMcpAdapterOptions {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
570
|
+
/** Explicit ModelContext (tests, or a host that isn't `globalThis`). */
|
|
571
|
+
modelContext?: ModelContextLike | LegacyProvider;
|
|
572
|
+
/** @deprecated use `modelContext`. */
|
|
573
|
+
provider?: LegacyProvider;
|
|
574
|
+
/** Where to look for `document.modelContext` / `navigator.modelContext`. */
|
|
575
|
+
host?: {
|
|
576
|
+
document?: {
|
|
577
|
+
modelContext?: unknown;
|
|
578
|
+
} | null;
|
|
579
|
+
navigator?: {
|
|
580
|
+
modelContext?: unknown;
|
|
581
|
+
} | null;
|
|
440
582
|
} | null;
|
|
441
|
-
invoke?: (tool: GovernedTool, input: unknown) => Promise<unknown>;
|
|
583
|
+
invoke?: (tool: GovernedTool, input: unknown, signal?: AbortSignal) => Promise<unknown>;
|
|
442
584
|
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
585
|
+
/** Per-tool result of the last publish — the "callable / failed" status the console shows. */
|
|
586
|
+
interface WebMcpRegistration {
|
|
587
|
+
name: string;
|
|
588
|
+
status: 'callable' | 'failed';
|
|
589
|
+
error?: string;
|
|
590
|
+
}
|
|
591
|
+
interface WebMcpPublishResult {
|
|
592
|
+
/** True when a WebMCP surface was found and the previous registrations were withdrawn. */
|
|
593
|
+
revoked: boolean;
|
|
594
|
+
/** Resolves once every tool's registerTool() settled. Empty when WebMCP is unavailable. */
|
|
595
|
+
registrations: Promise<WebMcpRegistration[]>;
|
|
447
596
|
}
|
|
448
597
|
interface WebMcpAdapter {
|
|
449
|
-
publish(tools: GovernedTool[]):
|
|
450
|
-
revoked: boolean;
|
|
451
|
-
};
|
|
598
|
+
publish(tools: GovernedTool[]): WebMcpPublishResult;
|
|
452
599
|
revoke(): void;
|
|
453
600
|
available(): boolean;
|
|
601
|
+
/** Which surface was used: document.modelContext, the navigator alias, or a legacy polyfill. */
|
|
602
|
+
source(): ModelContextSource | null;
|
|
603
|
+
/** Registration status from the most recent publish. */
|
|
604
|
+
status(): WebMcpRegistration[];
|
|
454
605
|
}
|
|
455
606
|
declare const createWebMcpAdapter: (options?: WebMcpAdapterOptions) => WebMcpAdapter;
|
|
456
607
|
|
|
@@ -458,14 +609,15 @@ interface InitOptions {
|
|
|
458
609
|
publishableKey: string;
|
|
459
610
|
siteId?: string;
|
|
460
611
|
/**
|
|
461
|
-
* Override the
|
|
462
|
-
* only** — the only accepted values are `localhost` /
|
|
463
|
-
* `pnpm dev` against a local
|
|
464
|
-
* `init()` time.
|
|
612
|
+
* Override the Agentronics API URL the SDK calls. **Reserved for local
|
|
613
|
+
* development only** — the only accepted values are `localhost` /
|
|
614
|
+
* `127.0.0.1` URLs (so `pnpm dev` against a local API works). Any other
|
|
615
|
+
* value throws at `init()` time.
|
|
465
616
|
*
|
|
466
|
-
* Production deployments must omit this option. The SDK
|
|
467
|
-
*
|
|
468
|
-
*
|
|
617
|
+
* Production deployments must omit this option. The SDK calls
|
|
618
|
+
* `https://api.agentronics.dev` (the retired `gateway.agentronics.dev` is
|
|
619
|
+
* accepted and mapped to it). Custom backends are not supported, by
|
|
620
|
+
* design — see the project README + LICENSE NOTICE.
|
|
469
621
|
*
|
|
470
622
|
* @internal — kept on the public type only so dev tooling type-checks.
|
|
471
623
|
*/
|
|
@@ -476,6 +628,25 @@ interface InitOptions {
|
|
|
476
628
|
auth?: AuthContext;
|
|
477
629
|
progression?: ProgressionConfig;
|
|
478
630
|
tools?: GovernedTool[];
|
|
631
|
+
/**
|
|
632
|
+
* Who approves tool calls whose policy decision is `review`. Default in the
|
|
633
|
+
* browser: a small "Allow / Not now" dialog for the person on the page.
|
|
634
|
+
* Pass your own function to use your UI, or `false` to refuse every review.
|
|
635
|
+
*/
|
|
636
|
+
review?: Reviewer | false;
|
|
637
|
+
/**
|
|
638
|
+
* `'0.6'` keeps the pre-0.7 behaviour while you upgrade: unverified tokens
|
|
639
|
+
* count as `verified`, SSO / SPIFFE / mTLS are on, and `review` rules run
|
|
640
|
+
* without asking. Insecure and temporary — see the 0.7 upgrade guide.
|
|
641
|
+
* @deprecated Remove once you've moved to the 0.7 behaviour.
|
|
642
|
+
*/
|
|
643
|
+
compat?: '0.6';
|
|
644
|
+
/**
|
|
645
|
+
* Approved tool descriptions from the console's Procedural memory page
|
|
646
|
+
* (`createDashboardSync().pullConfig().toolDescriptions`). They replace the
|
|
647
|
+
* code's description when tools are published to agents.
|
|
648
|
+
*/
|
|
649
|
+
toolDescriptions?: Record<string, string>;
|
|
479
650
|
/**
|
|
480
651
|
* Run agent detection automatically on init and keep the resulting
|
|
481
652
|
* identity in agentContext so every subsequent tools.execute() call gets
|
|
@@ -489,6 +660,12 @@ interface InitOptions {
|
|
|
489
660
|
* `ready` promise on the returned client resolves once the cycle finishes.
|
|
490
661
|
*/
|
|
491
662
|
autoDetect?: boolean | DetectAgentOptions;
|
|
663
|
+
/**
|
|
664
|
+
* Watch interactions for vision-model ("screenshot") agents — teleport and
|
|
665
|
+
* centre clicks, metronome typing. On by default in the browser whenever
|
|
666
|
+
* `autoDetect` is on; reads timing and coordinates only, never keystrokes.
|
|
667
|
+
*/
|
|
668
|
+
visionDetection?: boolean | Omit<VisionDetectorOptions, 'onDetect'>;
|
|
492
669
|
trace?: {
|
|
493
670
|
enabled?: boolean;
|
|
494
671
|
bufferSize?: number;
|
|
@@ -516,6 +693,8 @@ interface AgentronicsClient {
|
|
|
516
693
|
readonly tools: ToolRegistry;
|
|
517
694
|
readonly progression: ProgressionStore | null;
|
|
518
695
|
readonly webmcp: WebMcpAdapter;
|
|
696
|
+
/** The vision-agent monitor, when running. */
|
|
697
|
+
readonly vision: VisionDetector | null;
|
|
519
698
|
/**
|
|
520
699
|
* Resolves once the initial autoDetect cycle finishes. Rejects only if the
|
|
521
700
|
* autoDetect configuration itself is invalid; detection failures resolve to
|
|
@@ -535,6 +714,16 @@ interface AgentronicsClient {
|
|
|
535
714
|
}): Promise<PolicyEvaluation>;
|
|
536
715
|
syncPolicies(): Promise<PolicyRule[]>;
|
|
537
716
|
syncSiteMemory(): Promise<SiteMemory | null>;
|
|
717
|
+
/**
|
|
718
|
+
* Pull everything the console manages for this site with the publishable
|
|
719
|
+
* key alone — authorization rules, approved tool descriptions and site
|
|
720
|
+
* memory — and apply it (re-publishing WebMCP tools if they changed).
|
|
721
|
+
*/
|
|
722
|
+
syncConfig(): Promise<{
|
|
723
|
+
policies: PolicyRule[];
|
|
724
|
+
toolDescriptions: Record<string, string>;
|
|
725
|
+
siteMemory: SiteMemory | null;
|
|
726
|
+
}>;
|
|
538
727
|
provideSiteMemory(memory: Partial<SiteMemory>): SiteMemory;
|
|
539
728
|
provideForPage(input: ProvideForPageInput): void;
|
|
540
729
|
installMemoryDelivery(options?: {
|
|
@@ -548,6 +737,8 @@ interface AgentronicsClient {
|
|
|
548
737
|
uninstall: () => void;
|
|
549
738
|
};
|
|
550
739
|
registerTool(tool: GovernedTool): () => void;
|
|
740
|
+
/** Replace the description overrides (see `toolDescriptions`). */
|
|
741
|
+
setToolDescriptions(descriptions: Record<string, string>): void;
|
|
551
742
|
/** Push the full tool registry to the gateway so the dashboard can render
|
|
552
743
|
* the page-wise view (schemas, per-tool tokens, context fullness). */
|
|
553
744
|
syncTools(): Promise<number>;
|
|
@@ -563,11 +754,17 @@ interface AgentronicsClient {
|
|
|
563
754
|
estimateTokens(options?: {
|
|
564
755
|
identity?: AgentIdentity | null;
|
|
565
756
|
}): TokenBudgetReport;
|
|
757
|
+
/**
|
|
758
|
+
* Register the surfaced tools with `document.modelContext`. `registrations`
|
|
759
|
+
* resolves with each tool's status (callable / failed) once the browser
|
|
760
|
+
* has accepted or rejected it.
|
|
761
|
+
*/
|
|
566
762
|
publishToWebMcp(options?: {
|
|
567
763
|
identity?: AgentIdentity | null;
|
|
568
764
|
}): {
|
|
569
765
|
revoked: boolean;
|
|
570
766
|
surfaced: number;
|
|
767
|
+
registrations: Promise<WebMcpRegistration[]>;
|
|
571
768
|
};
|
|
572
769
|
notifyToolInvoked(toolName: string): void;
|
|
573
770
|
traces(): TraceEvent[];
|
|
@@ -590,4 +787,4 @@ interface AgentronicsClient {
|
|
|
590
787
|
}
|
|
591
788
|
declare const init: (options: InitOptions) => AgentronicsClient;
|
|
592
789
|
|
|
593
|
-
export {
|
|
790
|
+
export { type WebMcpRegistration as $, type AgentronicsClient as A, type Reviewer as B, CRAWLER_SIGNATURES as C, type DetectAgentOptions as D, type SiteMemoryStore as E, type SurfacingContext as F, type GovernedTool as G, type SurfacingDecision as H, type InitOptions as I, type TokenBudgetReport as J, type ToolGroupSummary as K, type ToolRegistry as L, type MemoryCache as M, type ToolTokenEstimate as N, type TraceInput as O, type PolicyEngine as P, type Tracer as Q, type RateLimiter as R, type SiteMemoryListener as S, type TraceExporter as T, type VisionDetectorOptions as U, type VisionDetector as V, type VisionSignals as W, type WebMcpAdapter as X, type WebMcpAdapterOptions as Y, type WebMcpProvider as Z, type WebMcpPublishResult as _, type AgentContextListener as a, type WebMcpToolDescriptor as a0, bundledDetectors as a1, createAgentContextStore as a2, createAuthEngine as a3, createDetectorRegistry as a4, createIdentityStore as a5, createMemoryCache as a6, createMemoryStore as a7, createPolicyCache as a8, createPolicyEngine as a9, createProgressionStore as aa, createRateLimiter as ab, createReviewPrompt as ac, createSiteMemoryStore as ad, createToolRegistry as ae, createTracer as af, createVisionDetector as ag, createWebMcpAdapter as ah, decideSurfacing as ai, defaultAuthMethods as aj, descriptorTokens as ak, detectAgent as al, detectCrawler as am, detectDom as an, estimateBudget as ao, estimateToolTokens as ap, explainSurfacing as aq, groupTools as ar, init as as, listGroupNames as at, modelFacingDescriptor as au, previewAuthMethods as av, scoreVisionSignals as aw, surfaceTools as ax, type AgentContextSnapshot as b, type AgentContextStore as c, type AuthEngine as d, type AuthInput as e, type AuthMethod as f, type CrawlerCategory as g, type CrawlerSignature as h, DEFAULT_GROUP as i, type DetectCrawlerOptions as j, type DetectDomOptions as k, type Detector as l, type DetectorRegistry as m, type DetectorStatus as n, type DomSignalName as o, type IdentityStore as p, type MemoryStore as q, type PolicyCache as r, type PresentIdentityOptions as s, type PresentedIdentity as t, type ProgressionConfig as u, type ProgressionStage as v, type ProgressionStore as w, type ProgressionTransition as x, type ProvideForPageInput as y, type ReviewRequest as z };
|