@agenthoney/analytics 0.0.0-stage → 0.14.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/LICENSE +21 -0
- package/README.md +85 -2
- package/dist/answers.cjs +20034 -0
- package/dist/answers.cjs.map +1 -0
- package/dist/answers.d.ts +148 -0
- package/dist/answers.js +139 -0
- package/dist/answers.js.map +1 -0
- package/dist/chunk-CD4WLJX7.js +48 -0
- package/dist/chunk-CD4WLJX7.js.map +1 -0
- package/dist/chunk-F3PRHEXB.js +20143 -0
- package/dist/chunk-F3PRHEXB.js.map +1 -0
- package/dist/chunk-L22VERBM.js +911 -0
- package/dist/chunk-L22VERBM.js.map +1 -0
- package/dist/chunk-OH4H2B7O.js +150 -0
- package/dist/chunk-OH4H2B7O.js.map +1 -0
- package/dist/chunk-R76CTIBG.js +701 -0
- package/dist/chunk-R76CTIBG.js.map +1 -0
- package/dist/chunk-UG3REZCJ.js +147 -0
- package/dist/chunk-UG3REZCJ.js.map +1 -0
- package/dist/core/breaker.d.ts +33 -0
- package/dist/core/collector.d.ts +51 -0
- package/dist/core/config.d.ts +124 -0
- package/dist/core/encode.d.ts +32 -0
- package/dist/core/queue.d.ts +39 -0
- package/dist/core/record-gate.d.ts +17 -0
- package/dist/core/safe.d.ts +17 -0
- package/dist/core/transport.d.ts +45 -0
- package/dist/express.cjs +21789 -0
- package/dist/express.cjs.map +1 -0
- package/dist/express.d.ts +65 -0
- package/dist/express.js +6 -0
- package/dist/express.js.map +1 -0
- package/dist/index.cjs +22118 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/next.cjs +21186 -0
- package/dist/next.cjs.map +1 -0
- package/dist/next.d.ts +90 -0
- package/dist/next.js +5 -0
- package/dist/next.js.map +1 -0
- package/dist/observe/client-ip.d.ts +109 -0
- package/dist/observe/next-router.d.ts +22 -0
- package/dist/observe/redact.d.ts +58 -0
- package/dist/observe/request.d.ts +75 -0
- package/dist/observe/response.d.ts +24 -0
- package/dist/runtime.d.ts +27 -0
- package/dist/serve/accept.d.ts +7 -0
- package/dist/serve/discovery.d.ts +56 -0
- package/dist/serve/hosted.d.ts +135 -0
- package/dist/serve/source.d.ts +48 -0
- package/dist/serve/tag-asset.generated.d.ts +14 -0
- package/dist/serve/tag.d.ts +131 -0
- package/dist/serve/twin.d.ts +162 -0
- package/dist/web.cjs +21225 -0
- package/dist/web.cjs.map +1 -0
- package/dist/web.d.ts +52 -0
- package/dist/web.js +6 -0
- package/dist/web.js.map +1 -0
- package/install.md +463 -0
- package/package.json +76 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export { createCollector, type Collector, type CollectorDeps, type CollectorStats, } from "./core/collector.js";
|
|
2
|
+
export { DEFAULTS, AgentHoneyConfigError,
|
|
3
|
+
/**
|
|
4
|
+
* ⚠️ Exported deliberately, not only for the test that pins it to ingest's
|
|
5
|
+
* parser. A customer can check their own credential's SHAPE offline, with no
|
|
6
|
+
* network call and no secret — which is exactly the check that would have
|
|
7
|
+
* saved two hours on 2026-09-17.
|
|
8
|
+
*/
|
|
9
|
+
looksLikeKey, redact, resolveConfig, UNSET_SITE_ID, type DisabledReason, type AgentHoneyConfig, type ResolvedConfig, } from "./core/config.js";
|
|
10
|
+
export { createBreaker, type Breaker, type BreakerState } from "./core/breaker.js";
|
|
11
|
+
export { encodeBatch, MAX_BODY_BYTES, type EncodedBatch } from "./core/encode.js";
|
|
12
|
+
export { BoundedQueue } from "./core/queue.js";
|
|
13
|
+
export { safe, safeAsync } from "./core/safe.js";
|
|
14
|
+
export { fetchTransport, outcomeForStatus, type SendOutcome, type Transport, } from "./core/transport.js";
|
|
15
|
+
export { observe, type ObserveOptions, type WebHandler } from "./web.js";
|
|
16
|
+
export { agenthoney, type ExpressOptions } from "./express.js";
|
|
17
|
+
export { proxy, type ProxyOptions, type ProxyResult } from "./next.js";
|
|
18
|
+
export { CAMPAIGN_PARAMS, normalisePath, observeRequest, referrerOrigin, type ObservedRequest, type RequestFacts, } from "./observe/request.js";
|
|
19
|
+
export { observeResponse, type ResponseFacts } from "./observe/response.js";
|
|
20
|
+
export { looksLikeSecret, redactPath, REDACTED, type RedactionResult } from "./observe/redact.js";
|
|
21
|
+
export { newEventId, runtimeName } from "./runtime.js";
|
|
22
|
+
export { MARKDOWN_TYPES, parseAccept, prefersMarkdown, type MediaRange } from "./serve/accept.js";
|
|
23
|
+
export { advertiseHeader, buildTwinResponse, decideTwin, DEFAULT_TWIN_CACHE_CONTROL, DEFAULT_TWIN_CONTENT_TYPE, stripMdSuffix, twinPathFor, type Twin, type TwinDecision, type TwinOptions, type TwinResponse, } from "./serve/twin.js";
|
|
24
|
+
export { INSTALL_GUIDE_VERSION, renderInstallMd, renderLlmsFullTxt, renderLlmsTxt, type DiscoveryOptions, type TwinEntry, } from "./serve/discovery.js";
|
|
25
|
+
export { hostedTwins, type HostedTwins, type HostedTwinsOptions } from "./serve/hosted.js";
|
|
26
|
+
/**
|
|
27
|
+
* ⚠️ Exported for hosts the adapters cannot serve from.
|
|
28
|
+
*
|
|
29
|
+
* Express and Web serve `/_agenthoney/t.js` themselves, so nothing inside
|
|
30
|
+
* this package needed these. A **Next** app cannot: `./next` is a proxy that
|
|
31
|
+
* deliberately never imports `next/server`, so it can set no body -- its only
|
|
32
|
+
* route is a route handler that calls `renderTag` itself.
|
|
33
|
+
*
|
|
34
|
+
* ⚠️ **The directory is `%5Fagenthoney`, not `_agenthoney`.** A folder
|
|
35
|
+
* whose name starts with `_` is a PRIVATE FOLDER in the App Router: Next
|
|
36
|
+
* excludes it and everything under it from routing, so the route silently does
|
|
37
|
+
* not exist. `%5F` is the URL-encoded underscore and is the documented way back
|
|
38
|
+
* in. The SERVED path is still `/_agenthoney/t.js`.
|
|
39
|
+
*
|
|
40
|
+
* // app/%5Fagenthoney/t.js/route.ts <- %5F, not _
|
|
41
|
+
* import { renderTag } from "@agenthoney/analytics";
|
|
42
|
+
*
|
|
43
|
+
* export const runtime = "nodejs";
|
|
44
|
+
* export const dynamic = "force-dynamic";
|
|
45
|
+
*
|
|
46
|
+
* export function GET() {
|
|
47
|
+
* const { body, headers } = renderTag({ publicKey, endpoint, harvest: true });
|
|
48
|
+
* return new Response(body, { headers });
|
|
49
|
+
* }
|
|
50
|
+
*/
|
|
51
|
+
export { renderTag, TAG_PATH, type RenderedTag, type TagOptions } from "./serve/tag.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { INSTALL_GUIDE_VERSION, agenthoney, renderInstallMd, renderLlmsFullTxt, renderLlmsTxt } from './chunk-R76CTIBG.js';
|
|
2
|
+
export { proxy } from './chunk-OH4H2B7O.js';
|
|
3
|
+
export { observe } from './chunk-UG3REZCJ.js';
|
|
4
|
+
export { TAG_PATH, renderTag } from './chunk-CD4WLJX7.js';
|
|
5
|
+
export { AgentHoneyConfigError, BoundedQueue, DEFAULTS, DEFAULT_TWIN_CACHE_CONTROL, DEFAULT_TWIN_CONTENT_TYPE, MARKDOWN_TYPES, MAX_BODY_BYTES, UNSET_SITE_ID, advertiseHeader, buildTwinResponse, createBreaker, createCollector, decideTwin, encodeBatch, fetchTransport, hostedTwins, looksLikeKey, newEventId, observeResponse, outcomeForStatus, parseAccept, prefersMarkdown, redact, resolveConfig, runtimeName, safe, safeAsync, stripMdSuffix, twinPathFor } from './chunk-L22VERBM.js';
|
|
6
|
+
export { CAMPAIGN_PARAMS, REDACTED, looksLikeSecret, normalisePath, observeRequest, redactPath, referrerOrigin } from './chunk-F3PRHEXB.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|