@40rty/ams-sdk 0.5.0 → 0.5.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.js +816 -548
- package/dist/types/sdk/src/analytics/index.d.ts +1 -1
- package/dist/types/sdk/src/analytics/outbox.d.ts +2 -0
- package/dist/types/sdk/src/analytics/scope-context.d.ts +2 -0
- package/dist/types/sdk/src/analytics/scope.d.ts +7 -0
- package/dist/types/sdk/src/host/host-modules.d.ts +275 -36
- package/dist/types/spacestation/src/analytics/envelope.d.ts +24 -0
- package/dist/types/spacestation/src/attachment/attachment.d.ts +8 -5
- package/dist/types/spacestation/src/catalog/element-filled.d.ts +2 -2
- package/dist/types/spacestation/src/catalog/wire/index.d.ts +2 -0
- package/dist/types/spacestation/src/catalog/wire/package-bundle-ref.d.ts +30 -0
- package/dist/types/spacestation/src/catalog/wire/package-release.d.ts +20 -0
- package/dist/types/spacestation/src/catalog/wire/sdk-compat.d.ts +43 -0
- package/dist/types/spacestation/src/contracts/socket-ticket-param.d.ts +9 -0
- package/dist/types/spacestation/src/contracts/wire-protocol.d.ts +25 -0
- package/dist/types/spacestation/src/index.d.ts +5 -1
- package/dist/types/spacestation/src/space/agent-directive.d.ts +239 -0
- package/dist/types/spacestation/src/space/session-queue.d.ts +24 -24
- package/dist/types/spacestation/src/space/trace.d.ts +12 -12
- package/dist/types/spacestation/src/trace/trace-diagnostics.d.ts +8 -0
- package/dist/types/spacestation/src/trace/trace-events.d.ts +1 -0
- package/dist/types/spacestation/src/widgets/presence/index.d.ts +1 -1
- package/dist/types/spacestation/src/widgets/presence/scan.d.ts +21 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createAnalyticsScope } from './scope';
|
|
2
2
|
export type { AnalyticsScope, AnalyticsScopeConfig, AnalyticsScopeStats, AnalyticsSink, SinkGuard, } from './scope';
|
|
3
|
-
export { AnalyticsSinkProvider, useAnalyticsSink, useOptionalAnalyticsSink } from './scope-context';
|
|
3
|
+
export { AnalyticsSinkProvider, TurnScopeProvider, useAnalyticsSink, useOptionalAnalyticsSink } from './scope-context';
|
|
4
4
|
export { SURFACE_DISPOSITION, surfaceEmits, surfaceSuppressionReason } from './surface';
|
|
5
5
|
export type { SurfaceDisposition } from './surface';
|
|
6
6
|
export { CONSENT_DISPOSITION, consentDisposition } from './consent';
|
|
@@ -39,6 +39,8 @@ export interface HeldEvent {
|
|
|
39
39
|
readonly payload: Record<string, unknown>;
|
|
40
40
|
/** `null` until `attributeHeld` stamps it. Never re-stamped once set. */
|
|
41
41
|
readonly sessionId: string | null;
|
|
42
|
+
/** The agent turn whose canvas this came from; `null` outside any turn. */
|
|
43
|
+
readonly turnId: string | null;
|
|
42
44
|
}
|
|
43
45
|
/**
|
|
44
46
|
* Is this value shaped like a wire payload?
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { AnalyticsSink } from './scope';
|
|
2
2
|
/** Filled by `@fourty/react`'s `AnalyticsScopeMount`, once per mount. */
|
|
3
3
|
export declare const AnalyticsSinkProvider: import("react").Provider<AnalyticsSink | null>;
|
|
4
|
+
/** Filled by `@fourty/react`'s `ElementWrapper`, once per canvas element. */
|
|
5
|
+
export declare const TurnScopeProvider: import("react").Provider<string | null>;
|
|
4
6
|
/**
|
|
5
7
|
* The sink for THIS mount. THROWS when no mount is upstream.
|
|
6
8
|
*
|
|
@@ -30,6 +30,13 @@ export type SinkGuard<Kind extends ClientEventKind> = Identical<PayloadOf<Kind>,
|
|
|
30
30
|
*/
|
|
31
31
|
export interface AnalyticsSink {
|
|
32
32
|
emit<Kind extends ClientEventKind>(kind: Kind, payload: PayloadOf<Kind>, ...guard: SinkGuard<Kind>): void;
|
|
33
|
+
/**
|
|
34
|
+
* The same sink, with every emit attributed to `turnId` — the agent turn
|
|
35
|
+
* whose canvas the emit came from. Called by the React seam
|
|
36
|
+
* (`useAnalyticsSink` reads the enclosing turn), never by an emit site, so
|
|
37
|
+
* the turn stays envelope the call site cannot get wrong.
|
|
38
|
+
*/
|
|
39
|
+
forTurn(turnId: string): AnalyticsSink;
|
|
33
40
|
}
|
|
34
41
|
/** What the mount can see without draining anything. */
|
|
35
42
|
export interface AnalyticsScopeStats {
|