@agentronics/sdk 0.6.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/dist/chunk-3WPDIMJP.js +18 -0
- package/dist/chunk-3WPDIMJP.js.map +1 -0
- package/dist/{chunk-X7NFMFN6.js → chunk-6QQS26AP.js} +264 -69
- 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 +39 -7
- package/dist/index.d.ts +39 -7
- 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 +239 -64
- package/dist/next.cjs.map +1 -1
- package/dist/next.d.cts +2 -2
- package/dist/next.d.ts +2 -2
- package/dist/next.js +2 -2
- package/dist/server.cjs +361 -66
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +103 -308
- package/dist/server.d.ts +103 -308
- package/dist/server.js +93 -1
- package/dist/server.js.map +1 -1
- package/dist/webmcp-BgKzHeQ3.d.cts +97 -0
- package/dist/webmcp-BgKzHeQ3.d.ts +97 -0
- package/package.json +4 -4
- package/dist/chunk-LLD3Y2LZ.js +0 -2
- package/dist/chunk-LLD3Y2LZ.js.map +0 -1
- package/dist/chunk-X7NFMFN6.js.map +0 -1
- package/dist/chunk-Y7JYD5RA.js +0 -17
- package/dist/chunk-Y7JYD5RA.js.map +0 -1
- package/dist/webmcp-C4ikhM4g.d.cts +0 -12
- package/dist/webmcp-C4ikhM4g.d.ts +0 -12
package/dist/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _agentronics_protocol from '@agentronics/protocol';
|
|
2
|
-
import { AgentIdentity, TraceEvent, TrustLevel, SiteMemory } from '@agentronics/protocol';
|
|
3
|
-
import { T as TraceExporter, G as GovernedTool, P as PolicyEngine, I as InitOptions, A as AgentronicsClient, D as DetectAgentOptions } from './init-only-
|
|
4
|
-
export { a as AgentContextListener, b as AgentContextSnapshot, c as AgentContextStore, d as AuthEngine, e as AuthInput, f as AuthMethod, C as CRAWLER_SIGNATURES, g as CrawlerCategory, h as CrawlerSignature, i as DEFAULT_GROUP, j as DetectCrawlerOptions, k as DetectDomOptions, l as Detector, m as DetectorRegistry, n as DetectorStatus, o as DomSignalName, p as IdentityStore, M as MemoryCache, q as MemoryStore, r as PolicyCache, s as PresentIdentityOptions, t as PresentedIdentity, u as ProgressionConfig, v as ProgressionStage, w as ProgressionStore, x as ProgressionTransition, y as ProvideForPageInput, R as RateLimiter, S as SiteMemoryListener,
|
|
5
|
-
export { D as DetectWebMcpOptions, d as detectWebMcp } from './webmcp-
|
|
2
|
+
import { AgentIdentity, TraceEvent, PolicyRule, TrustLevel, SiteMemory } from '@agentronics/protocol';
|
|
3
|
+
import { T as TraceExporter, G as GovernedTool, P as PolicyEngine, I as InitOptions, A as AgentronicsClient, D as DetectAgentOptions } from './init-only-s9E9bVC0.cjs';
|
|
4
|
+
export { a as AgentContextListener, b as AgentContextSnapshot, c as AgentContextStore, d as AuthEngine, e as AuthInput, f as AuthMethod, C as CRAWLER_SIGNATURES, g as CrawlerCategory, h as CrawlerSignature, i as DEFAULT_GROUP, j as DetectCrawlerOptions, k as DetectDomOptions, l as Detector, m as DetectorRegistry, n as DetectorStatus, o as DomSignalName, p as IdentityStore, M as MemoryCache, q as MemoryStore, r as PolicyCache, s as PresentIdentityOptions, t as PresentedIdentity, u as ProgressionConfig, v as ProgressionStage, w as ProgressionStore, x as ProgressionTransition, y as ProvideForPageInput, R as RateLimiter, z as ReviewRequest, B as Reviewer, S as SiteMemoryListener, E as SiteMemoryStore, F as SurfacingContext, H as SurfacingDecision, J as TokenBudgetReport, K as ToolGroupSummary, L as ToolRegistry, N as ToolTokenEstimate, O as TraceInput, Q as Tracer, V as VisionDetector, U as VisionDetectorOptions, W as VisionSignals, X as WebMcpAdapter, Y as WebMcpAdapterOptions, Z as WebMcpProvider, _ as WebMcpPublishResult, $ as WebMcpRegistration, a0 as WebMcpToolDescriptor, a1 as bundledDetectors, a2 as createAgentContextStore, a3 as createAuthEngine, a4 as createDetectorRegistry, a5 as createIdentityStore, a6 as createMemoryCache, a7 as createMemoryStore, a8 as createPolicyCache, a9 as createPolicyEngine, aa as createProgressionStore, ab as createRateLimiter, ac as createReviewPrompt, ad as createSiteMemoryStore, ae as createToolRegistry, af as createTracer, ag as createVisionDetector, ah as createWebMcpAdapter, ai as decideSurfacing, aj as defaultAuthMethods, ak as descriptorTokens, al as detectAgent, am as detectCrawler, an as detectDom, ao as estimateBudget, ap as estimateToolTokens, aq as explainSurfacing, ar as groupTools, as as init, at as listGroupNames, au as modelFacingDescriptor, av as previewAuthMethods, aw as scoreVisionSignals, ax as surfaceTools } from './init-only-s9E9bVC0.cjs';
|
|
5
|
+
export { D as DetectWebMcpOptions, M as ModelContextTool, T as ToolAnnotations, W as WebMcpActivity, d as detectWebMcp, o as onWebMcpActivity, r as resolveModelContext, w as webMcpSupport } from './webmcp-BgKzHeQ3.cjs';
|
|
6
6
|
|
|
7
7
|
interface DeclareAgentInput {
|
|
8
8
|
class: 'webmcp' | 'dom' | 'screenshot' | 'crawler';
|
|
@@ -20,9 +20,11 @@ interface DetectorSignature {
|
|
|
20
20
|
}
|
|
21
21
|
interface SignatureLoaderOptions {
|
|
22
22
|
gatewayUrl: string;
|
|
23
|
+
/** Your publishable key — the Agentronics API requires it. */
|
|
24
|
+
publishableKey?: string;
|
|
23
25
|
fetcher?: typeof fetch;
|
|
24
26
|
}
|
|
25
|
-
declare const createSignatureLoader: ({ gatewayUrl, fetcher }: SignatureLoaderOptions) => {
|
|
27
|
+
declare const createSignatureLoader: ({ gatewayUrl, publishableKey, fetcher }: SignatureLoaderOptions) => {
|
|
26
28
|
snapshot(): DetectorSignature[];
|
|
27
29
|
sync(): Promise<DetectorSignature[]>;
|
|
28
30
|
};
|
|
@@ -51,6 +53,13 @@ interface WebhookExporterOptions {
|
|
|
51
53
|
}
|
|
52
54
|
declare const createWebhookExporter: ({ url, fetcher, maxRetries, queueLimit, }: WebhookExporterOptions) => TraceExporter;
|
|
53
55
|
|
|
56
|
+
/** Mirrors ApiKeyIdentity in @agentronics/sdk/server (kept structural to avoid a server import). */
|
|
57
|
+
interface ApiKeyIdentity {
|
|
58
|
+
agentId: string;
|
|
59
|
+
name?: string;
|
|
60
|
+
vendor?: string;
|
|
61
|
+
scopes?: string[];
|
|
62
|
+
}
|
|
54
63
|
interface IntelExporterOptions {
|
|
55
64
|
/**
|
|
56
65
|
* Agentronics API base URL (shown in the console under Settings) — the
|
|
@@ -95,6 +104,28 @@ interface IntelSync {
|
|
|
95
104
|
pushTools(tools: GovernedTool[]): Promise<number>;
|
|
96
105
|
/** POST the site-memory snapshot (+ optional quality score) to /v1/sdk/memory. */
|
|
97
106
|
pushMemory(snapshot: object, score?: number): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Fetch what the console manages for this site: authorization rules and the
|
|
109
|
+
* tool descriptions you approved in Procedural memory. Pass them to the
|
|
110
|
+
* browser SDK — `init({ policies, toolDescriptions })`.
|
|
111
|
+
*/
|
|
112
|
+
pullConfig(): Promise<DashboardConfig>;
|
|
113
|
+
/**
|
|
114
|
+
* An agent-API-key verifier for `createAgentAuth({ apiKey: { verify } })`
|
|
115
|
+
* that checks keys minted in the console, live — revoking a key in the
|
|
116
|
+
* console takes effect within `cacheSeconds` (default 60).
|
|
117
|
+
*/
|
|
118
|
+
keyVerifier(options?: {
|
|
119
|
+
cacheSeconds?: number;
|
|
120
|
+
}): (key: string) => Promise<ApiKeyIdentity | null>;
|
|
121
|
+
}
|
|
122
|
+
interface DashboardConfig {
|
|
123
|
+
policies: PolicyRule[];
|
|
124
|
+
/** tool name → approved description (replaces the code's description when published). */
|
|
125
|
+
toolDescriptions: Record<string, string>;
|
|
126
|
+
/** The site-memory snapshot last pushed for this site (null if none). */
|
|
127
|
+
siteMemory: Record<string, unknown> | null;
|
|
128
|
+
fetchedAt: string;
|
|
98
129
|
}
|
|
99
130
|
/** @deprecated Use createDashboardSync (same function). */
|
|
100
131
|
declare const createIntelSync: ({ url, ingestKey, siteId, fetcher, }: IntelSyncOptions) => IntelSync;
|
|
@@ -188,11 +219,12 @@ interface ServeWellKnownOptions {
|
|
|
188
219
|
*/
|
|
189
220
|
declare const serializeWellKnownContext: ({ snapshot }: ServeWellKnownOptions) => string;
|
|
190
221
|
|
|
222
|
+
declare const SDK_VERSION = "0.1.2";
|
|
223
|
+
|
|
191
224
|
declare const Agentronics: {
|
|
192
225
|
init: (options: InitOptions) => AgentronicsClient;
|
|
193
226
|
declareAgent: (input: DeclareAgentInput) => _agentronics_protocol.AgentIdentity;
|
|
194
227
|
detectAgent: (options?: DetectAgentOptions) => Promise<_agentronics_protocol.AgentIdentity | null>;
|
|
195
228
|
};
|
|
196
|
-
declare const VERSION = "0.1.0";
|
|
197
229
|
|
|
198
|
-
export { Agentronics, AgentronicsClient, type DeclareAgentInput, DetectAgentOptions, GovernedTool, InitOptions, type IntelExporterOptions, type IntelSync, type IntelSyncOptions, PolicyEngine, TraceExporter, VERSION, WELL_KNOWN_PATH, type WebMcpContextOptions, type WebMcpContextTool, createConsoleExporter, createDashboardExporter, createDashboardSync, createGatewayExporter, createIntelExporter, createIntelSync, createSignatureLoader, createTraceBuffer, createWebMcpContextTool, createWebhookExporter, declareAgent, deriveTrustLevel, fetchWellKnownContext, highestTrust, installDomEnforcer, installMemoryOverlay, installMetaTags, serializeWellKnownContext, showDenyOverlay };
|
|
230
|
+
export { Agentronics, AgentronicsClient, type DashboardConfig, type DeclareAgentInput, DetectAgentOptions, GovernedTool, InitOptions, type IntelExporterOptions, type IntelSync, type IntelSyncOptions, PolicyEngine, TraceExporter, SDK_VERSION as VERSION, WELL_KNOWN_PATH, type WebMcpContextOptions, type WebMcpContextTool, createConsoleExporter, createDashboardExporter, createDashboardSync, createGatewayExporter, createIntelExporter, createIntelSync, createSignatureLoader, createTraceBuffer, createWebMcpContextTool, createWebhookExporter, declareAgent, deriveTrustLevel, fetchWellKnownContext, highestTrust, installDomEnforcer, installMemoryOverlay, installMetaTags, serializeWellKnownContext, showDenyOverlay };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _agentronics_protocol from '@agentronics/protocol';
|
|
2
|
-
import { AgentIdentity, TraceEvent, TrustLevel, SiteMemory } from '@agentronics/protocol';
|
|
3
|
-
import { T as TraceExporter, G as GovernedTool, P as PolicyEngine, I as InitOptions, A as AgentronicsClient, D as DetectAgentOptions } from './init-only-
|
|
4
|
-
export { a as AgentContextListener, b as AgentContextSnapshot, c as AgentContextStore, d as AuthEngine, e as AuthInput, f as AuthMethod, C as CRAWLER_SIGNATURES, g as CrawlerCategory, h as CrawlerSignature, i as DEFAULT_GROUP, j as DetectCrawlerOptions, k as DetectDomOptions, l as Detector, m as DetectorRegistry, n as DetectorStatus, o as DomSignalName, p as IdentityStore, M as MemoryCache, q as MemoryStore, r as PolicyCache, s as PresentIdentityOptions, t as PresentedIdentity, u as ProgressionConfig, v as ProgressionStage, w as ProgressionStore, x as ProgressionTransition, y as ProvideForPageInput, R as RateLimiter, S as SiteMemoryListener,
|
|
5
|
-
export { D as DetectWebMcpOptions, d as detectWebMcp } from './webmcp-
|
|
2
|
+
import { AgentIdentity, TraceEvent, PolicyRule, TrustLevel, SiteMemory } from '@agentronics/protocol';
|
|
3
|
+
import { T as TraceExporter, G as GovernedTool, P as PolicyEngine, I as InitOptions, A as AgentronicsClient, D as DetectAgentOptions } from './init-only-C80qhujz.js';
|
|
4
|
+
export { a as AgentContextListener, b as AgentContextSnapshot, c as AgentContextStore, d as AuthEngine, e as AuthInput, f as AuthMethod, C as CRAWLER_SIGNATURES, g as CrawlerCategory, h as CrawlerSignature, i as DEFAULT_GROUP, j as DetectCrawlerOptions, k as DetectDomOptions, l as Detector, m as DetectorRegistry, n as DetectorStatus, o as DomSignalName, p as IdentityStore, M as MemoryCache, q as MemoryStore, r as PolicyCache, s as PresentIdentityOptions, t as PresentedIdentity, u as ProgressionConfig, v as ProgressionStage, w as ProgressionStore, x as ProgressionTransition, y as ProvideForPageInput, R as RateLimiter, z as ReviewRequest, B as Reviewer, S as SiteMemoryListener, E as SiteMemoryStore, F as SurfacingContext, H as SurfacingDecision, J as TokenBudgetReport, K as ToolGroupSummary, L as ToolRegistry, N as ToolTokenEstimate, O as TraceInput, Q as Tracer, V as VisionDetector, U as VisionDetectorOptions, W as VisionSignals, X as WebMcpAdapter, Y as WebMcpAdapterOptions, Z as WebMcpProvider, _ as WebMcpPublishResult, $ as WebMcpRegistration, a0 as WebMcpToolDescriptor, a1 as bundledDetectors, a2 as createAgentContextStore, a3 as createAuthEngine, a4 as createDetectorRegistry, a5 as createIdentityStore, a6 as createMemoryCache, a7 as createMemoryStore, a8 as createPolicyCache, a9 as createPolicyEngine, aa as createProgressionStore, ab as createRateLimiter, ac as createReviewPrompt, ad as createSiteMemoryStore, ae as createToolRegistry, af as createTracer, ag as createVisionDetector, ah as createWebMcpAdapter, ai as decideSurfacing, aj as defaultAuthMethods, ak as descriptorTokens, al as detectAgent, am as detectCrawler, an as detectDom, ao as estimateBudget, ap as estimateToolTokens, aq as explainSurfacing, ar as groupTools, as as init, at as listGroupNames, au as modelFacingDescriptor, av as previewAuthMethods, aw as scoreVisionSignals, ax as surfaceTools } from './init-only-C80qhujz.js';
|
|
5
|
+
export { D as DetectWebMcpOptions, M as ModelContextTool, T as ToolAnnotations, W as WebMcpActivity, d as detectWebMcp, o as onWebMcpActivity, r as resolveModelContext, w as webMcpSupport } from './webmcp-BgKzHeQ3.js';
|
|
6
6
|
|
|
7
7
|
interface DeclareAgentInput {
|
|
8
8
|
class: 'webmcp' | 'dom' | 'screenshot' | 'crawler';
|
|
@@ -20,9 +20,11 @@ interface DetectorSignature {
|
|
|
20
20
|
}
|
|
21
21
|
interface SignatureLoaderOptions {
|
|
22
22
|
gatewayUrl: string;
|
|
23
|
+
/** Your publishable key — the Agentronics API requires it. */
|
|
24
|
+
publishableKey?: string;
|
|
23
25
|
fetcher?: typeof fetch;
|
|
24
26
|
}
|
|
25
|
-
declare const createSignatureLoader: ({ gatewayUrl, fetcher }: SignatureLoaderOptions) => {
|
|
27
|
+
declare const createSignatureLoader: ({ gatewayUrl, publishableKey, fetcher }: SignatureLoaderOptions) => {
|
|
26
28
|
snapshot(): DetectorSignature[];
|
|
27
29
|
sync(): Promise<DetectorSignature[]>;
|
|
28
30
|
};
|
|
@@ -51,6 +53,13 @@ interface WebhookExporterOptions {
|
|
|
51
53
|
}
|
|
52
54
|
declare const createWebhookExporter: ({ url, fetcher, maxRetries, queueLimit, }: WebhookExporterOptions) => TraceExporter;
|
|
53
55
|
|
|
56
|
+
/** Mirrors ApiKeyIdentity in @agentronics/sdk/server (kept structural to avoid a server import). */
|
|
57
|
+
interface ApiKeyIdentity {
|
|
58
|
+
agentId: string;
|
|
59
|
+
name?: string;
|
|
60
|
+
vendor?: string;
|
|
61
|
+
scopes?: string[];
|
|
62
|
+
}
|
|
54
63
|
interface IntelExporterOptions {
|
|
55
64
|
/**
|
|
56
65
|
* Agentronics API base URL (shown in the console under Settings) — the
|
|
@@ -95,6 +104,28 @@ interface IntelSync {
|
|
|
95
104
|
pushTools(tools: GovernedTool[]): Promise<number>;
|
|
96
105
|
/** POST the site-memory snapshot (+ optional quality score) to /v1/sdk/memory. */
|
|
97
106
|
pushMemory(snapshot: object, score?: number): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Fetch what the console manages for this site: authorization rules and the
|
|
109
|
+
* tool descriptions you approved in Procedural memory. Pass them to the
|
|
110
|
+
* browser SDK — `init({ policies, toolDescriptions })`.
|
|
111
|
+
*/
|
|
112
|
+
pullConfig(): Promise<DashboardConfig>;
|
|
113
|
+
/**
|
|
114
|
+
* An agent-API-key verifier for `createAgentAuth({ apiKey: { verify } })`
|
|
115
|
+
* that checks keys minted in the console, live — revoking a key in the
|
|
116
|
+
* console takes effect within `cacheSeconds` (default 60).
|
|
117
|
+
*/
|
|
118
|
+
keyVerifier(options?: {
|
|
119
|
+
cacheSeconds?: number;
|
|
120
|
+
}): (key: string) => Promise<ApiKeyIdentity | null>;
|
|
121
|
+
}
|
|
122
|
+
interface DashboardConfig {
|
|
123
|
+
policies: PolicyRule[];
|
|
124
|
+
/** tool name → approved description (replaces the code's description when published). */
|
|
125
|
+
toolDescriptions: Record<string, string>;
|
|
126
|
+
/** The site-memory snapshot last pushed for this site (null if none). */
|
|
127
|
+
siteMemory: Record<string, unknown> | null;
|
|
128
|
+
fetchedAt: string;
|
|
98
129
|
}
|
|
99
130
|
/** @deprecated Use createDashboardSync (same function). */
|
|
100
131
|
declare const createIntelSync: ({ url, ingestKey, siteId, fetcher, }: IntelSyncOptions) => IntelSync;
|
|
@@ -188,11 +219,12 @@ interface ServeWellKnownOptions {
|
|
|
188
219
|
*/
|
|
189
220
|
declare const serializeWellKnownContext: ({ snapshot }: ServeWellKnownOptions) => string;
|
|
190
221
|
|
|
222
|
+
declare const SDK_VERSION = "0.1.2";
|
|
223
|
+
|
|
191
224
|
declare const Agentronics: {
|
|
192
225
|
init: (options: InitOptions) => AgentronicsClient;
|
|
193
226
|
declareAgent: (input: DeclareAgentInput) => _agentronics_protocol.AgentIdentity;
|
|
194
227
|
detectAgent: (options?: DetectAgentOptions) => Promise<_agentronics_protocol.AgentIdentity | null>;
|
|
195
228
|
};
|
|
196
|
-
declare const VERSION = "0.1.0";
|
|
197
229
|
|
|
198
|
-
export { Agentronics, AgentronicsClient, type DeclareAgentInput, DetectAgentOptions, GovernedTool, InitOptions, type IntelExporterOptions, type IntelSync, type IntelSyncOptions, PolicyEngine, TraceExporter, VERSION, WELL_KNOWN_PATH, type WebMcpContextOptions, type WebMcpContextTool, createConsoleExporter, createDashboardExporter, createDashboardSync, createGatewayExporter, createIntelExporter, createIntelSync, createSignatureLoader, createTraceBuffer, createWebMcpContextTool, createWebhookExporter, declareAgent, deriveTrustLevel, fetchWellKnownContext, highestTrust, installDomEnforcer, installMemoryOverlay, installMetaTags, serializeWellKnownContext, showDenyOverlay };
|
|
230
|
+
export { Agentronics, AgentronicsClient, type DashboardConfig, type DeclareAgentInput, DetectAgentOptions, GovernedTool, InitOptions, type IntelExporterOptions, type IntelSync, type IntelSyncOptions, PolicyEngine, TraceExporter, SDK_VERSION as VERSION, WELL_KNOWN_PATH, type WebMcpContextOptions, type WebMcpContextTool, createConsoleExporter, createDashboardExporter, createDashboardSync, createGatewayExporter, createIntelExporter, createIntelSync, createSignatureLoader, createTraceBuffer, createWebMcpContextTool, createWebhookExporter, declareAgent, deriveTrustLevel, fetchWellKnownContext, highestTrust, installDomEnforcer, installMemoryOverlay, installMetaTags, serializeWellKnownContext, showDenyOverlay };
|