@miniaxolotl/grove 1.11.6 → 1.11.11

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/bridge.js CHANGED
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
36
  var define_GROVE_TELEMETRY_default;
37
37
  var init_define_GROVE_TELEMETRY = __esm({
38
38
  "<define:__GROVE_TELEMETRY__>"() {
39
- define_GROVE_TELEMETRY_default = { enabled: true, revision: "1b6af4e6f4a611824fc080e0025685a008cd73fb", version: "1.11.6", component: "cli", key: "phc_AqVrjhk7W2X2pFjyngY7uWxcSSRREfJhgr8mBmKbXYEh", cliDsn: "https://3f6d0711b5890dea4ce8e6ccf2a1a7fd@o4511632209346560.ingest.us.sentry.io/4512290791620608", apiDsn: "https://4524e8910e318110277babdfe818999b@o4511632209346560.ingest.us.sentry.io/4512290791489536" };
39
+ define_GROVE_TELEMETRY_default = { enabled: true, revision: "2184499fc2e07596be2203c9409bd42270fe4990", version: "1.11.11", component: "cli", key: "phc_AqVrjhk7W2X2pFjyngY7uWxcSSRREfJhgr8mBmKbXYEh", cliDsn: "https://3f6d0711b5890dea4ce8e6ccf2a1a7fd@o4511632209346560.ingest.us.sentry.io/4512290791620608", apiDsn: "https://4524e8910e318110277babdfe818999b@o4511632209346560.ingest.us.sentry.io/4512290791489536" };
40
40
  }
41
41
  });
42
42
 
@@ -47025,11 +47025,64 @@ var events = [
47025
47025
  "memory_created",
47026
47026
  "memory_recalled",
47027
47027
  "chat_completed",
47028
- "$ai_generation"
47028
+ "$ai_generation",
47029
+ "ai_cache"
47029
47030
  ];
47030
47031
  function projectProperties(input = {}) {
47031
47032
  const output = {};
47032
47033
  const enums = {
47034
+ failure_code: [
47035
+ "auth_unavailable",
47036
+ "provider_authentication",
47037
+ "provider_rate_limited",
47038
+ "provider_unavailable",
47039
+ "provider_timeout",
47040
+ "provider_invalid_response",
47041
+ "provider_empty_response",
47042
+ "provider_response_too_large",
47043
+ "inference_budget",
47044
+ "generation_invalid_response",
47045
+ "generation_incomplete",
47046
+ "generation_invalid_citation",
47047
+ "generation_invalid_reference",
47048
+ "generation_invalid_proposal",
47049
+ "generation_invalid_organization",
47050
+ "generation_invalid_lifecycle",
47051
+ "generation_invalid_web_citation",
47052
+ "generation_invalid_cursor",
47053
+ "generation_missing_document_evidence",
47054
+ "embedding_invalid_response",
47055
+ "embedding_profile_mismatch",
47056
+ "invalid_embedding",
47057
+ "decision_invalid_response"
47058
+ ],
47059
+ failure_stage: ["response_json", "response_schema"],
47060
+ validation_field: [
47061
+ "message",
47062
+ "statements",
47063
+ "proposals",
47064
+ "organization",
47065
+ "lifecycle",
47066
+ "webStatements",
47067
+ "documentStatements",
47068
+ "title",
47069
+ "tags",
47070
+ "query",
47071
+ "intent",
47072
+ "references",
47073
+ "research",
47074
+ "organizeAfter"
47075
+ ],
47076
+ cache_feature: [
47077
+ "query_embedding",
47078
+ "document_embedding",
47079
+ "organization",
47080
+ "classification",
47081
+ "planning",
47082
+ "answer",
47083
+ "research"
47084
+ ],
47085
+ cache_status: ["fresh", "cached", "coalesced"],
47033
47086
  operation: operations,
47034
47087
  outcome: ["success", "unavailable", "error", "cancelled"],
47035
47088
  command: [
@@ -47054,6 +47107,7 @@ function projectProperties(input = {}) {
47054
47107
  output[key] = input[key];
47055
47108
  for (const key of [
47056
47109
  "duration_ms",
47110
+ "requests_avoided",
47057
47111
  "result_count",
47058
47112
  "input_tokens",
47059
47113
  "output_tokens"
@@ -47464,11 +47518,22 @@ var Reporter = class {
47464
47518
  operation(operation, started, outcome2, properties = {}, cause, identity = this.config.identity) {
47465
47519
  if (!operations.includes(operation) || !Number.isFinite(started) || !opaqueIdentity(identity))
47466
47520
  return;
47521
+ let diagnostics = {};
47522
+ try {
47523
+ if (cause && typeof cause === "object")
47524
+ diagnostics = projectProperties({
47525
+ failure_code: "code" in cause ? cause.code : void 0,
47526
+ failure_stage: "stage" in cause ? cause.stage : void 0,
47527
+ validation_field: "field" in cause ? cause.field : void 0
47528
+ });
47529
+ } catch {
47530
+ }
47467
47531
  const ended = performance2.now();
47468
47532
  this.enqueue({
47469
47533
  event: "operation_completed",
47470
47534
  properties: projectProperties({
47471
47535
  ...properties,
47536
+ ...diagnostics,
47472
47537
  operation,
47473
47538
  outcome: outcome2,
47474
47539
  duration_ms: ended - started
@@ -47479,7 +47544,7 @@ var Reporter = class {
47479
47544
  error: outcome2 === "error" ? safeError(
47480
47545
  {
47481
47546
  type: void 0,
47482
- tags: { operation, outcome: outcome2 },
47547
+ tags: { ...diagnostics, operation, outcome: outcome2 },
47483
47548
  exception: {
47484
47549
  values: [
47485
47550
  {