@agentronics/sdk 0.3.0 → 0.5.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-77VJ65X2.js +17 -0
- package/dist/chunk-77VJ65X2.js.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -3
- package/dist/index.d.ts +48 -3
- package/dist/index.global.js +3 -3
- 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.cjs +2 -2
- package/dist/init-only.global.js +2 -2
- package/dist/init-only.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-4FJRAPA6.js +0 -17
- package/dist/chunk-4FJRAPA6.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _agentronics_protocol from '@agentronics/protocol';
|
|
2
2
|
import { AgentIdentity, TraceEvent, TrustLevel, SiteMemory } from '@agentronics/protocol';
|
|
3
|
-
import { T as TraceExporter, P as PolicyEngine, I as InitOptions, A as AgentronicsClient, D as DetectAgentOptions } from './init-only-Cwll8MGz.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,
|
|
3
|
+
import { T as TraceExporter, G as GovernedTool, P as PolicyEngine, I as InitOptions, A as AgentronicsClient, D as DetectAgentOptions } from './init-only-Cwll8MGz.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, S as SiteMemoryListener, z as SiteMemoryStore, B as SurfacingContext, E as SurfacingDecision, F as TokenBudgetReport, H as ToolGroupSummary, J as ToolRegistry, K as ToolTokenEstimate, L as TraceInput, N as Tracer, W as WebMcpAdapter, O as WebMcpAdapterOptions, Q as WebMcpProvider, U as WebMcpToolDescriptor, V as bundledDetectors, X as createAgentContextStore, Y as createAuthEngine, Z as createDetectorRegistry, _ as createIdentityStore, $ as createMemoryCache, a0 as createMemoryStore, a1 as createPolicyCache, a2 as createPolicyEngine, a3 as createProgressionStore, a4 as createRateLimiter, a5 as createSiteMemoryStore, a6 as createToolRegistry, a7 as createTracer, a8 as createWebMcpAdapter, a9 as decideSurfacing, aa as detectAgent, ab as detectCrawler, ac as detectDom, ad as estimateBudget, ae as estimateToolTokens, af as explainSurfacing, ag as groupTools, ah as init, ai as listGroupNames, aj as surfaceTools } from './init-only-Cwll8MGz.cjs';
|
|
5
5
|
export { D as DetectWebMcpOptions, d as detectWebMcp } from './webmcp-C4ikhM4g.cjs';
|
|
6
6
|
|
|
7
7
|
interface DeclareAgentInput {
|
|
@@ -51,6 +51,51 @@ interface WebhookExporterOptions {
|
|
|
51
51
|
}
|
|
52
52
|
declare const createWebhookExporter: ({ url, fetcher, maxRetries, queueLimit, }: WebhookExporterOptions) => TraceExporter;
|
|
53
53
|
|
|
54
|
+
interface IntelExporterOptions {
|
|
55
|
+
/**
|
|
56
|
+
* Intelligence API base URL (e.g. `https://intel-api-….run.app`) — the
|
|
57
|
+
* `/v1/sdk/events` path is appended automatically — or the full ingest URL.
|
|
58
|
+
*/
|
|
59
|
+
url: string;
|
|
60
|
+
/**
|
|
61
|
+
* Per-tenant SDK ingest key (`agtx_ik_…`), minted in the dashboard Settings.
|
|
62
|
+
* This is a **secret**: use this exporter in your backend only, never in the
|
|
63
|
+
* browser. (The browser SDK should forward traces to your backend, which
|
|
64
|
+
* relays them with the key.)
|
|
65
|
+
*/
|
|
66
|
+
ingestKey: string;
|
|
67
|
+
fetcher?: typeof fetch;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Stream governed-action traces to the Agentronics Intelligence dashboard.
|
|
71
|
+
* POSTs a `TraceBatch` to the intel-api ingest endpoint with the ingest key.
|
|
72
|
+
* Intended for Node/server use (the existing webhook exporter is browser-bound
|
|
73
|
+
* and can't send an auth header).
|
|
74
|
+
*/
|
|
75
|
+
declare const createIntelExporter: ({ url, ingestKey, fetcher, }: IntelExporterOptions) => TraceExporter;
|
|
76
|
+
interface IntelSyncOptions {
|
|
77
|
+
/** Intelligence API base URL (e.g. `https://intel-api-….run.app`). */
|
|
78
|
+
url: string;
|
|
79
|
+
/** Per-tenant SDK ingest key (`agtx_ik_…`). Backend-only — never the browser. */
|
|
80
|
+
ingestKey: string;
|
|
81
|
+
/** The site these tools/memory belong to (matches your SDK `siteId`). */
|
|
82
|
+
siteId: string;
|
|
83
|
+
fetcher?: typeof fetch;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Push the authoritative tool registry + site-memory snapshot to the
|
|
87
|
+
* Intelligence dashboard — the full data the WebMCP Tools + Knaph pages need,
|
|
88
|
+
* which is too large for the lightweight trace stream. Call after `syncTools()`
|
|
89
|
+
* / `provideSiteMemory(...)`. Backend/server use only (the key is secret).
|
|
90
|
+
*/
|
|
91
|
+
interface IntelSync {
|
|
92
|
+
/** POST the registry to /v1/sdk/tools. Returns the number of tools sent. */
|
|
93
|
+
pushTools(tools: GovernedTool[]): Promise<number>;
|
|
94
|
+
/** POST the site-memory snapshot (+ optional quality score) to /v1/sdk/memory. */
|
|
95
|
+
pushMemory(snapshot: object, score?: number): Promise<void>;
|
|
96
|
+
}
|
|
97
|
+
declare const createIntelSync: ({ url, ingestKey, siteId, fetcher, }: IntelSyncOptions) => IntelSync;
|
|
98
|
+
|
|
54
99
|
interface TrustDerivationInput {
|
|
55
100
|
detected?: boolean;
|
|
56
101
|
declared?: boolean;
|
|
@@ -143,4 +188,4 @@ declare const Agentronics: {
|
|
|
143
188
|
};
|
|
144
189
|
declare const VERSION = "0.1.0";
|
|
145
190
|
|
|
146
|
-
export { Agentronics, AgentronicsClient, type DeclareAgentInput, DetectAgentOptions, InitOptions, PolicyEngine, TraceExporter, VERSION, WELL_KNOWN_PATH, type WebMcpContextOptions, type WebMcpContextTool, createConsoleExporter, createGatewayExporter, createSignatureLoader, createTraceBuffer, createWebMcpContextTool, createWebhookExporter, declareAgent, deriveTrustLevel, fetchWellKnownContext, highestTrust, installDomEnforcer, installMemoryOverlay, installMetaTags, serializeWellKnownContext, showDenyOverlay };
|
|
191
|
+
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, createGatewayExporter, createIntelExporter, createIntelSync, createSignatureLoader, createTraceBuffer, createWebMcpContextTool, createWebhookExporter, declareAgent, deriveTrustLevel, fetchWellKnownContext, highestTrust, installDomEnforcer, installMemoryOverlay, installMetaTags, serializeWellKnownContext, showDenyOverlay };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _agentronics_protocol from '@agentronics/protocol';
|
|
2
2
|
import { AgentIdentity, TraceEvent, TrustLevel, SiteMemory } from '@agentronics/protocol';
|
|
3
|
-
import { T as TraceExporter, P as PolicyEngine, I as InitOptions, A as AgentronicsClient, D as DetectAgentOptions } from './init-only-7f8_LQAI.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,
|
|
3
|
+
import { T as TraceExporter, G as GovernedTool, P as PolicyEngine, I as InitOptions, A as AgentronicsClient, D as DetectAgentOptions } from './init-only-7f8_LQAI.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, S as SiteMemoryListener, z as SiteMemoryStore, B as SurfacingContext, E as SurfacingDecision, F as TokenBudgetReport, H as ToolGroupSummary, J as ToolRegistry, K as ToolTokenEstimate, L as TraceInput, N as Tracer, W as WebMcpAdapter, O as WebMcpAdapterOptions, Q as WebMcpProvider, U as WebMcpToolDescriptor, V as bundledDetectors, X as createAgentContextStore, Y as createAuthEngine, Z as createDetectorRegistry, _ as createIdentityStore, $ as createMemoryCache, a0 as createMemoryStore, a1 as createPolicyCache, a2 as createPolicyEngine, a3 as createProgressionStore, a4 as createRateLimiter, a5 as createSiteMemoryStore, a6 as createToolRegistry, a7 as createTracer, a8 as createWebMcpAdapter, a9 as decideSurfacing, aa as detectAgent, ab as detectCrawler, ac as detectDom, ad as estimateBudget, ae as estimateToolTokens, af as explainSurfacing, ag as groupTools, ah as init, ai as listGroupNames, aj as surfaceTools } from './init-only-7f8_LQAI.js';
|
|
5
5
|
export { D as DetectWebMcpOptions, d as detectWebMcp } from './webmcp-C4ikhM4g.js';
|
|
6
6
|
|
|
7
7
|
interface DeclareAgentInput {
|
|
@@ -51,6 +51,51 @@ interface WebhookExporterOptions {
|
|
|
51
51
|
}
|
|
52
52
|
declare const createWebhookExporter: ({ url, fetcher, maxRetries, queueLimit, }: WebhookExporterOptions) => TraceExporter;
|
|
53
53
|
|
|
54
|
+
interface IntelExporterOptions {
|
|
55
|
+
/**
|
|
56
|
+
* Intelligence API base URL (e.g. `https://intel-api-….run.app`) — the
|
|
57
|
+
* `/v1/sdk/events` path is appended automatically — or the full ingest URL.
|
|
58
|
+
*/
|
|
59
|
+
url: string;
|
|
60
|
+
/**
|
|
61
|
+
* Per-tenant SDK ingest key (`agtx_ik_…`), minted in the dashboard Settings.
|
|
62
|
+
* This is a **secret**: use this exporter in your backend only, never in the
|
|
63
|
+
* browser. (The browser SDK should forward traces to your backend, which
|
|
64
|
+
* relays them with the key.)
|
|
65
|
+
*/
|
|
66
|
+
ingestKey: string;
|
|
67
|
+
fetcher?: typeof fetch;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Stream governed-action traces to the Agentronics Intelligence dashboard.
|
|
71
|
+
* POSTs a `TraceBatch` to the intel-api ingest endpoint with the ingest key.
|
|
72
|
+
* Intended for Node/server use (the existing webhook exporter is browser-bound
|
|
73
|
+
* and can't send an auth header).
|
|
74
|
+
*/
|
|
75
|
+
declare const createIntelExporter: ({ url, ingestKey, fetcher, }: IntelExporterOptions) => TraceExporter;
|
|
76
|
+
interface IntelSyncOptions {
|
|
77
|
+
/** Intelligence API base URL (e.g. `https://intel-api-….run.app`). */
|
|
78
|
+
url: string;
|
|
79
|
+
/** Per-tenant SDK ingest key (`agtx_ik_…`). Backend-only — never the browser. */
|
|
80
|
+
ingestKey: string;
|
|
81
|
+
/** The site these tools/memory belong to (matches your SDK `siteId`). */
|
|
82
|
+
siteId: string;
|
|
83
|
+
fetcher?: typeof fetch;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Push the authoritative tool registry + site-memory snapshot to the
|
|
87
|
+
* Intelligence dashboard — the full data the WebMCP Tools + Knaph pages need,
|
|
88
|
+
* which is too large for the lightweight trace stream. Call after `syncTools()`
|
|
89
|
+
* / `provideSiteMemory(...)`. Backend/server use only (the key is secret).
|
|
90
|
+
*/
|
|
91
|
+
interface IntelSync {
|
|
92
|
+
/** POST the registry to /v1/sdk/tools. Returns the number of tools sent. */
|
|
93
|
+
pushTools(tools: GovernedTool[]): Promise<number>;
|
|
94
|
+
/** POST the site-memory snapshot (+ optional quality score) to /v1/sdk/memory. */
|
|
95
|
+
pushMemory(snapshot: object, score?: number): Promise<void>;
|
|
96
|
+
}
|
|
97
|
+
declare const createIntelSync: ({ url, ingestKey, siteId, fetcher, }: IntelSyncOptions) => IntelSync;
|
|
98
|
+
|
|
54
99
|
interface TrustDerivationInput {
|
|
55
100
|
detected?: boolean;
|
|
56
101
|
declared?: boolean;
|
|
@@ -143,4 +188,4 @@ declare const Agentronics: {
|
|
|
143
188
|
};
|
|
144
189
|
declare const VERSION = "0.1.0";
|
|
145
190
|
|
|
146
|
-
export { Agentronics, AgentronicsClient, type DeclareAgentInput, DetectAgentOptions, InitOptions, PolicyEngine, TraceExporter, VERSION, WELL_KNOWN_PATH, type WebMcpContextOptions, type WebMcpContextTool, createConsoleExporter, createGatewayExporter, createSignatureLoader, createTraceBuffer, createWebMcpContextTool, createWebhookExporter, declareAgent, deriveTrustLevel, fetchWellKnownContext, highestTrust, installDomEnforcer, installMemoryOverlay, installMetaTags, serializeWellKnownContext, showDenyOverlay };
|
|
191
|
+
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, createGatewayExporter, createIntelExporter, createIntelSync, createSignatureLoader, createTraceBuffer, createWebMcpContextTool, createWebhookExporter, declareAgent, deriveTrustLevel, fetchWellKnownContext, highestTrust, installDomEnforcer, installMemoryOverlay, installMetaTags, serializeWellKnownContext, showDenyOverlay };
|