@agentronics/sdk 0.3.0 → 0.4.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/index.d.cts CHANGED
@@ -51,6 +51,29 @@ 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
+
54
77
  interface TrustDerivationInput {
55
78
  detected?: boolean;
56
79
  declared?: boolean;
@@ -143,4 +166,4 @@ declare const Agentronics: {
143
166
  };
144
167
  declare const VERSION = "0.1.0";
145
168
 
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 };
169
+ export { Agentronics, AgentronicsClient, type DeclareAgentInput, DetectAgentOptions, InitOptions, type IntelExporterOptions, PolicyEngine, TraceExporter, VERSION, WELL_KNOWN_PATH, type WebMcpContextOptions, type WebMcpContextTool, createConsoleExporter, createGatewayExporter, createIntelExporter, createSignatureLoader, createTraceBuffer, createWebMcpContextTool, createWebhookExporter, declareAgent, deriveTrustLevel, fetchWellKnownContext, highestTrust, installDomEnforcer, installMemoryOverlay, installMetaTags, serializeWellKnownContext, showDenyOverlay };
package/dist/index.d.ts CHANGED
@@ -51,6 +51,29 @@ 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
+
54
77
  interface TrustDerivationInput {
55
78
  detected?: boolean;
56
79
  declared?: boolean;
@@ -143,4 +166,4 @@ declare const Agentronics: {
143
166
  };
144
167
  declare const VERSION = "0.1.0";
145
168
 
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 };
169
+ export { Agentronics, AgentronicsClient, type DeclareAgentInput, DetectAgentOptions, InitOptions, type IntelExporterOptions, PolicyEngine, TraceExporter, VERSION, WELL_KNOWN_PATH, type WebMcpContextOptions, type WebMcpContextTool, createConsoleExporter, createGatewayExporter, createIntelExporter, createSignatureLoader, createTraceBuffer, createWebMcpContextTool, createWebhookExporter, declareAgent, deriveTrustLevel, fetchWellKnownContext, highestTrust, installDomEnforcer, installMemoryOverlay, installMetaTags, serializeWellKnownContext, showDenyOverlay };