@agentronics/sdk 0.7.0 → 0.7.2

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/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _agentronics_protocol from '@agentronics/protocol';
2
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';
3
+ import { T as TraceExporter, G as GovernedTool, P as PolicyEngine, I as InitOptions, A as AgentronicsClient, D as DetectAgentOptions } from './init-only-Cif87Qbc.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-Cif87Qbc.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-C5uwNbnJ.cjs';
6
6
 
7
7
  interface DeclareAgentInput {
8
8
  class: 'webmcp' | 'dom' | 'screenshot' | 'crawler';
@@ -42,8 +42,25 @@ interface GatewayExporterOptions {
42
42
  gatewayUrl: string;
43
43
  publishableKey: string;
44
44
  fetcher?: typeof fetch;
45
+ /** Send queued events this often (ms). Default 2000. */
46
+ flushMs?: number;
47
+ /** Events per request; the API accepts at most 100. Default 50. */
48
+ maxBatch?: number;
49
+ /** Events kept while the API is unreachable; the oldest are dropped first. Default 500. */
50
+ maxQueue?: number;
45
51
  }
46
- declare const createGatewayExporter: ({ gatewayUrl, publishableKey, fetcher, }: GatewayExporterOptions) => TraceExporter;
52
+ interface GatewayExporter extends TraceExporter {
53
+ /** Send everything queued now (`keepalive` lets it outlive the page); settles when the requests do. */
54
+ flush(keepalive?: boolean): Promise<void>;
55
+ }
56
+ /**
57
+ * Sends traces to the Agentronics API from the browser. Events are queued and
58
+ * sent in batches — every couple of seconds, when a batch fills, and when the
59
+ * page is hidden or closed — rather than one request per event, so a busy page
60
+ * stays within the API's per-visitor rate limit. Never throws into the page:
61
+ * a failed send drops that batch.
62
+ */
63
+ declare const createGatewayExporter: ({ gatewayUrl, publishableKey, fetcher, flushMs, maxBatch, maxQueue, }: GatewayExporterOptions) => GatewayExporter;
47
64
 
48
65
  interface WebhookExporterOptions {
49
66
  url: string;
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _agentronics_protocol from '@agentronics/protocol';
2
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';
3
+ import { T as TraceExporter, G as GovernedTool, P as PolicyEngine, I as InitOptions, A as AgentronicsClient, D as DetectAgentOptions } from './init-only-CRvqRvNI.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-CRvqRvNI.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-C5uwNbnJ.js';
6
6
 
7
7
  interface DeclareAgentInput {
8
8
  class: 'webmcp' | 'dom' | 'screenshot' | 'crawler';
@@ -42,8 +42,25 @@ interface GatewayExporterOptions {
42
42
  gatewayUrl: string;
43
43
  publishableKey: string;
44
44
  fetcher?: typeof fetch;
45
+ /** Send queued events this often (ms). Default 2000. */
46
+ flushMs?: number;
47
+ /** Events per request; the API accepts at most 100. Default 50. */
48
+ maxBatch?: number;
49
+ /** Events kept while the API is unreachable; the oldest are dropped first. Default 500. */
50
+ maxQueue?: number;
45
51
  }
46
- declare const createGatewayExporter: ({ gatewayUrl, publishableKey, fetcher, }: GatewayExporterOptions) => TraceExporter;
52
+ interface GatewayExporter extends TraceExporter {
53
+ /** Send everything queued now (`keepalive` lets it outlive the page); settles when the requests do. */
54
+ flush(keepalive?: boolean): Promise<void>;
55
+ }
56
+ /**
57
+ * Sends traces to the Agentronics API from the browser. Events are queued and
58
+ * sent in batches — every couple of seconds, when a batch fills, and when the
59
+ * page is hidden or closed — rather than one request per event, so a busy page
60
+ * stays within the API's per-visitor rate limit. Never throws into the page:
61
+ * a failed send drops that batch.
62
+ */
63
+ declare const createGatewayExporter: ({ gatewayUrl, publishableKey, fetcher, flushMs, maxBatch, maxQueue, }: GatewayExporterOptions) => GatewayExporter;
47
64
 
48
65
  interface WebhookExporterOptions {
49
66
  url: string;