@mondaydotcomorg/z2h-shared-utils 0.3.1 → 0.3.3

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.
@@ -1,9 +1,4 @@
1
- /**
2
- * BI event names tracked via `trackEvent`, grouped by the part of the backend
3
- * runner that emits them. Single source of truth for what's tracked — add a
4
- * new event here first, then reference it, instead of a string literal at the
5
- * call site.
6
- */
1
+ /** BI events tracked in zth-backend-runner, grouped by domain. */
7
2
  export declare const BackendRunnerEvents: {
8
3
  readonly invoke: {
9
4
  readonly succeeded: "z2h_backend_invoke_succeeded";
@@ -21,4 +16,35 @@ export declare const BackendRunnerEvents: {
21
16
  readonly connectDeclined: "z2h_integration_connect_declined";
22
17
  };
23
18
  };
19
+ /** Metric names emitted by `bigbrain-zth`, grouped by domain. */
20
+ export declare const Z2hServiceEvents: {
21
+ readonly snowflake: {
22
+ readonly queryDurationMs: "z2h_snowflake_query_duration_ms";
23
+ readonly queryFailed: "z2h_snowflake_query_failed";
24
+ readonly queryUnexpectedError: "z2h_snowflake_query_unexpected_error";
25
+ readonly cacheHit: "z2h_snowflake_cache_hit";
26
+ };
27
+ readonly npmProxy: {
28
+ readonly failure: "z2h_npm_proxy_failure";
29
+ };
30
+ readonly apps: {
31
+ readonly deleted: "z2h_app_deleted";
32
+ readonly grantChanged: "z2h_grant_changed";
33
+ readonly grantsLimitHit: "z2h_grants_limit_hit";
34
+ };
35
+ readonly screenshot: {
36
+ readonly captureDurationMs: "z2h_screenshot_capture_duration_ms";
37
+ readonly captureFailed: "z2h_screenshot_capture_failed";
38
+ };
39
+ };
40
+ /** Metric/event emitted by `bigbrain-zth-agent`. */
41
+ export declare const Z2hAgentEvents: {
42
+ readonly subagents: {
43
+ readonly cliHelpUnavailable: "z2h.subagents.cli_help_unavailable";
44
+ };
45
+ readonly toolCall: {
46
+ readonly softFailureMetric: "z2h.agent_tool_call.soft_failure";
47
+ readonly biEvent: "z2h_agent_tool_call";
48
+ };
49
+ };
24
50
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/observability/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;CAgBtB,CAAC"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/observability/events.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;CAgBtB,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;CAmBnB,CAAC;AAEX,oDAAoD;AACpD,eAAO,MAAM,cAAc;;;;;;;;CAQjB,CAAC"}
@@ -1,9 +1,4 @@
1
- /**
2
- * BI event names tracked via `trackEvent`, grouped by the part of the backend
3
- * runner that emits them. Single source of truth for what's tracked — add a
4
- * new event here first, then reference it, instead of a string literal at the
5
- * call site.
6
- */
1
+ /** BI events tracked in zth-backend-runner, grouped by domain. */
7
2
  const BackendRunnerEvents = {
8
3
  invoke: {
9
4
  succeeded: 'z2h_backend_invoke_succeeded',
@@ -21,5 +16,36 @@ const BackendRunnerEvents = {
21
16
  connectDeclined: 'z2h_integration_connect_declined',
22
17
  },
23
18
  };
19
+ /** Metric names emitted by `bigbrain-zth`, grouped by domain. */
20
+ const Z2hServiceEvents = {
21
+ snowflake: {
22
+ queryDurationMs: 'z2h_snowflake_query_duration_ms',
23
+ queryFailed: 'z2h_snowflake_query_failed',
24
+ queryUnexpectedError: 'z2h_snowflake_query_unexpected_error',
25
+ cacheHit: 'z2h_snowflake_cache_hit',
26
+ },
27
+ npmProxy: {
28
+ failure: 'z2h_npm_proxy_failure',
29
+ },
30
+ apps: {
31
+ deleted: 'z2h_app_deleted',
32
+ grantChanged: 'z2h_grant_changed',
33
+ grantsLimitHit: 'z2h_grants_limit_hit',
34
+ },
35
+ screenshot: {
36
+ captureDurationMs: 'z2h_screenshot_capture_duration_ms',
37
+ captureFailed: 'z2h_screenshot_capture_failed',
38
+ },
39
+ };
40
+ /** Metric/event emitted by `bigbrain-zth-agent`. */
41
+ const Z2hAgentEvents = {
42
+ subagents: {
43
+ cliHelpUnavailable: 'z2h.subagents.cli_help_unavailable',
44
+ },
45
+ toolCall: {
46
+ softFailureMetric: 'z2h.agent_tool_call.soft_failure',
47
+ biEvent: 'z2h_agent_tool_call',
48
+ },
49
+ };
24
50
 
25
- export { BackendRunnerEvents };
51
+ export { BackendRunnerEvents, Z2hAgentEvents, Z2hServiceEvents };
@@ -1,5 +1,5 @@
1
1
  export { trackEvent } from './tracker';
2
2
  export { createHttpTracker } from './httpTracker';
3
3
  export type { HttpTrackerDeps } from './httpTracker';
4
- export { BackendRunnerEvents } from './events';
4
+ export { BackendRunnerEvents, Z2hServiceEvents, Z2hAgentEvents } from './events';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/observability/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/observability/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export { trackEvent } from './tracker.mjs';
2
2
  export { createHttpTracker } from './httpTracker.mjs';
3
- export { BackendRunnerEvents } from './events.mjs';
3
+ export { BackendRunnerEvents, Z2hAgentEvents, Z2hServiceEvents } from './events.mjs';
@@ -1,9 +1,4 @@
1
- /**
2
- * BI event names tracked via `trackEvent`, grouped by the part of the backend
3
- * runner that emits them. Single source of truth for what's tracked — add a
4
- * new event here first, then reference it, instead of a string literal at the
5
- * call site.
6
- */
1
+ /** BI events tracked in zth-backend-runner, grouped by domain. */
7
2
  export declare const BackendRunnerEvents: {
8
3
  readonly invoke: {
9
4
  readonly succeeded: "z2h_backend_invoke_succeeded";
@@ -21,4 +16,35 @@ export declare const BackendRunnerEvents: {
21
16
  readonly connectDeclined: "z2h_integration_connect_declined";
22
17
  };
23
18
  };
19
+ /** Metric names emitted by `bigbrain-zth`, grouped by domain. */
20
+ export declare const Z2hServiceEvents: {
21
+ readonly snowflake: {
22
+ readonly queryDurationMs: "z2h_snowflake_query_duration_ms";
23
+ readonly queryFailed: "z2h_snowflake_query_failed";
24
+ readonly queryUnexpectedError: "z2h_snowflake_query_unexpected_error";
25
+ readonly cacheHit: "z2h_snowflake_cache_hit";
26
+ };
27
+ readonly npmProxy: {
28
+ readonly failure: "z2h_npm_proxy_failure";
29
+ };
30
+ readonly apps: {
31
+ readonly deleted: "z2h_app_deleted";
32
+ readonly grantChanged: "z2h_grant_changed";
33
+ readonly grantsLimitHit: "z2h_grants_limit_hit";
34
+ };
35
+ readonly screenshot: {
36
+ readonly captureDurationMs: "z2h_screenshot_capture_duration_ms";
37
+ readonly captureFailed: "z2h_screenshot_capture_failed";
38
+ };
39
+ };
40
+ /** Metric/event emitted by `bigbrain-zth-agent`. */
41
+ export declare const Z2hAgentEvents: {
42
+ readonly subagents: {
43
+ readonly cliHelpUnavailable: "z2h.subagents.cli_help_unavailable";
44
+ };
45
+ readonly toolCall: {
46
+ readonly softFailureMetric: "z2h.agent_tool_call.soft_failure";
47
+ readonly biEvent: "z2h_agent_tool_call";
48
+ };
49
+ };
24
50
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/observability/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;CAgBtB,CAAC"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/observability/events.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;CAgBtB,CAAC;AAEX,iEAAiE;AACjE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;CAmBnB,CAAC;AAEX,oDAAoD;AACpD,eAAO,MAAM,cAAc;;;;;;;;CAQjB,CAAC"}
@@ -1,11 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
- /**
4
- * BI event names tracked via `trackEvent`, grouped by the part of the backend
5
- * runner that emits them. Single source of truth for what's tracked — add a
6
- * new event here first, then reference it, instead of a string literal at the
7
- * call site.
8
- */
3
+ /** BI events tracked in zth-backend-runner, grouped by domain. */
9
4
  const BackendRunnerEvents = {
10
5
  invoke: {
11
6
  succeeded: 'z2h_backend_invoke_succeeded',
@@ -23,5 +18,38 @@ const BackendRunnerEvents = {
23
18
  connectDeclined: 'z2h_integration_connect_declined',
24
19
  },
25
20
  };
21
+ /** Metric names emitted by `bigbrain-zth`, grouped by domain. */
22
+ const Z2hServiceEvents = {
23
+ snowflake: {
24
+ queryDurationMs: 'z2h_snowflake_query_duration_ms',
25
+ queryFailed: 'z2h_snowflake_query_failed',
26
+ queryUnexpectedError: 'z2h_snowflake_query_unexpected_error',
27
+ cacheHit: 'z2h_snowflake_cache_hit',
28
+ },
29
+ npmProxy: {
30
+ failure: 'z2h_npm_proxy_failure',
31
+ },
32
+ apps: {
33
+ deleted: 'z2h_app_deleted',
34
+ grantChanged: 'z2h_grant_changed',
35
+ grantsLimitHit: 'z2h_grants_limit_hit',
36
+ },
37
+ screenshot: {
38
+ captureDurationMs: 'z2h_screenshot_capture_duration_ms',
39
+ captureFailed: 'z2h_screenshot_capture_failed',
40
+ },
41
+ };
42
+ /** Metric/event emitted by `bigbrain-zth-agent`. */
43
+ const Z2hAgentEvents = {
44
+ subagents: {
45
+ cliHelpUnavailable: 'z2h.subagents.cli_help_unavailable',
46
+ },
47
+ toolCall: {
48
+ softFailureMetric: 'z2h.agent_tool_call.soft_failure',
49
+ biEvent: 'z2h_agent_tool_call',
50
+ },
51
+ };
26
52
 
27
53
  exports.BackendRunnerEvents = BackendRunnerEvents;
54
+ exports.Z2hAgentEvents = Z2hAgentEvents;
55
+ exports.Z2hServiceEvents = Z2hServiceEvents;
@@ -1,5 +1,5 @@
1
1
  export { trackEvent } from './tracker';
2
2
  export { createHttpTracker } from './httpTracker';
3
3
  export type { HttpTrackerDeps } from './httpTracker';
4
- export { BackendRunnerEvents } from './events';
4
+ export { BackendRunnerEvents, Z2hServiceEvents, Z2hAgentEvents } from './events';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/observability/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/observability/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC"}
@@ -9,3 +9,5 @@ const observability_events = require('./events.js');
9
9
  exports.trackEvent = observability_tracker.trackEvent;
10
10
  exports.createHttpTracker = observability_httpTracker.createHttpTracker;
11
11
  exports.BackendRunnerEvents = observability_events.BackendRunnerEvents;
12
+ exports.Z2hAgentEvents = observability_events.Z2hAgentEvents;
13
+ exports.Z2hServiceEvents = observability_events.Z2hServiceEvents;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mondaydotcomorg/z2h-shared-utils",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {
@@ -1,9 +1,4 @@
1
- /**
2
- * BI event names tracked via `trackEvent`, grouped by the part of the backend
3
- * runner that emits them. Single source of truth for what's tracked — add a
4
- * new event here first, then reference it, instead of a string literal at the
5
- * call site.
6
- */
1
+ /** BI events tracked in zth-backend-runner, grouped by domain. */
7
2
  export const BackendRunnerEvents = {
8
3
  invoke: {
9
4
  succeeded: 'z2h_backend_invoke_succeeded',
@@ -21,3 +16,36 @@ export const BackendRunnerEvents = {
21
16
  connectDeclined: 'z2h_integration_connect_declined',
22
17
  },
23
18
  } as const;
19
+
20
+ /** Metric names emitted by `bigbrain-zth`, grouped by domain. */
21
+ export const Z2hServiceEvents = {
22
+ snowflake: {
23
+ queryDurationMs: 'z2h_snowflake_query_duration_ms',
24
+ queryFailed: 'z2h_snowflake_query_failed',
25
+ queryUnexpectedError: 'z2h_snowflake_query_unexpected_error',
26
+ cacheHit: 'z2h_snowflake_cache_hit',
27
+ },
28
+ npmProxy: {
29
+ failure: 'z2h_npm_proxy_failure',
30
+ },
31
+ apps: {
32
+ deleted: 'z2h_app_deleted',
33
+ grantChanged: 'z2h_grant_changed',
34
+ grantsLimitHit: 'z2h_grants_limit_hit',
35
+ },
36
+ screenshot: {
37
+ captureDurationMs: 'z2h_screenshot_capture_duration_ms',
38
+ captureFailed: 'z2h_screenshot_capture_failed',
39
+ },
40
+ } as const;
41
+
42
+ /** Metric/event emitted by `bigbrain-zth-agent`. */
43
+ export const Z2hAgentEvents = {
44
+ subagents: {
45
+ cliHelpUnavailable: 'z2h.subagents.cli_help_unavailable',
46
+ },
47
+ toolCall: {
48
+ softFailureMetric: 'z2h.agent_tool_call.soft_failure',
49
+ biEvent: 'z2h_agent_tool_call',
50
+ },
51
+ } as const;
@@ -1,4 +1,4 @@
1
1
  export { trackEvent } from './tracker';
2
2
  export { createHttpTracker } from './httpTracker';
3
3
  export type { HttpTrackerDeps } from './httpTracker';
4
- export { BackendRunnerEvents } from './events';
4
+ export { BackendRunnerEvents, Z2hServiceEvents, Z2hAgentEvents } from './events';