@bike4mind/cli 0.2.62 → 0.2.63-feat-telemetry-user-opt-in.21811

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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-JW3JRHH7.js";
4
+ } from "./chunk-RHC4ZO7D.js";
5
5
 
6
6
  // ../../b4m-core/packages/services/dist/src/notebookCurationService/artifactExtractor.js
7
7
  var ARTIFACT_TAG_REGEX = /<artifact\s+(.*?)>([\s\S]*?)<\/artifact>/gi;
@@ -22,7 +22,7 @@ import {
22
22
  isGPTImageModel,
23
23
  isModelDeprecated,
24
24
  settingsMap
25
- } from "./chunk-JW3JRHH7.js";
25
+ } from "./chunk-RHC4ZO7D.js";
26
26
 
27
27
  // ../../b4m-core/packages/utils/dist/src/storage/S3Storage.js
28
28
  import { S3Client, PutObjectCommand, DeleteObjectCommand, GetObjectCommand, HeadObjectCommand } from "@aws-sdk/client-s3";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  BadRequestError,
4
4
  secureParameters
5
- } from "./chunk-EO2Y5GFY.js";
5
+ } from "./chunk-7A54TZXA.js";
6
6
  import {
7
7
  CompletionApiUsageTransaction,
8
8
  GenericCreditDeductTransaction,
@@ -13,7 +13,7 @@ import {
13
13
  ToolUsageTransaction,
14
14
  TransferCreditTransaction,
15
15
  VideoGenerationUsageTransaction
16
- } from "./chunk-JW3JRHH7.js";
16
+ } from "./chunk-RHC4ZO7D.js";
17
17
 
18
18
  // ../../b4m-core/packages/services/dist/src/creditService/subtractCredits.js
19
19
  import { z } from "zod";
@@ -7,11 +7,11 @@ import {
7
7
  getSettingsMap,
8
8
  getSettingsValue,
9
9
  secureParameters
10
- } from "./chunk-EO2Y5GFY.js";
10
+ } from "./chunk-7A54TZXA.js";
11
11
  import {
12
12
  KnowledgeType,
13
13
  SupportedFabFileMimeTypes
14
- } from "./chunk-JW3JRHH7.js";
14
+ } from "./chunk-RHC4ZO7D.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/fabFileService/create.js
17
17
  import { z } from "zod";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ChatModels
4
- } from "./chunk-JW3JRHH7.js";
4
+ } from "./chunk-RHC4ZO7D.js";
5
5
  import {
6
6
  DEFAULT_SANDBOX_CONFIG
7
7
  } from "./chunk-4BIBE3J7.js";
@@ -6,12 +6,12 @@ import {
6
6
  getSettingsByNames,
7
7
  obfuscateApiKey,
8
8
  secureParameters
9
- } from "./chunk-EO2Y5GFY.js";
9
+ } from "./chunk-7A54TZXA.js";
10
10
  import {
11
11
  ApiKeyType,
12
12
  MementoTier,
13
13
  isSupportedEmbeddingModel
14
- } from "./chunk-JW3JRHH7.js";
14
+ } from "./chunk-RHC4ZO7D.js";
15
15
 
16
16
  // ../../b4m-core/packages/services/dist/src/apiKeyService/get.js
17
17
  import { z } from "zod";
@@ -3,7 +3,7 @@
3
3
  // package.json
4
4
  var package_default = {
5
5
  name: "@bike4mind/cli",
6
- version: "0.2.62",
6
+ version: "0.2.63-feat-telemetry-user-opt-in.21811+2bfc7f8a1",
7
7
  type: "module",
8
8
  description: "Interactive CLI tool for Bike4Mind with ReAct agents",
9
9
  license: "UNLICENSED",
@@ -118,11 +118,11 @@ var package_default = {
118
118
  zustand: "^4.5.4"
119
119
  },
120
120
  devDependencies: {
121
- "@bike4mind/agents": "0.4.0",
122
- "@bike4mind/common": "2.75.0",
123
- "@bike4mind/mcp": "1.33.20",
124
- "@bike4mind/services": "2.68.2",
125
- "@bike4mind/utils": "2.16.1",
121
+ "@bike4mind/agents": "0.4.1-feat-telemetry-user-opt-in.21811+2bfc7f8a1",
122
+ "@bike4mind/common": "2.75.1-feat-telemetry-user-opt-in.21811+2bfc7f8a1",
123
+ "@bike4mind/mcp": "1.33.21-feat-telemetry-user-opt-in.21811+2bfc7f8a1",
124
+ "@bike4mind/services": "2.68.3-feat-telemetry-user-opt-in.21811+2bfc7f8a1",
125
+ "@bike4mind/utils": "2.16.2-feat-telemetry-user-opt-in.21811+2bfc7f8a1",
126
126
  "@types/better-sqlite3": "^7.6.13",
127
127
  "@types/jsonwebtoken": "^9.0.4",
128
128
  "@types/node": "^22.9.0",
@@ -139,7 +139,7 @@ var package_default = {
139
139
  optionalDependencies: {
140
140
  "@vscode/ripgrep": "^1.17.1"
141
141
  },
142
- gitHead: "faae6cba90cc104961ee4dbef74dbe51d599b9dc"
142
+ gitHead: "2bfc7f8a119d68d2790333d8d8c39113c6903a21"
143
143
  };
144
144
 
145
145
  // src/utils/updateChecker.ts
@@ -4,7 +4,7 @@ import {
4
4
  getOpenWeatherKey,
5
5
  getSerperKey,
6
6
  getWolframAlphaKey
7
- } from "./chunk-2J4HB7EB.js";
7
+ } from "./chunk-EYEA7L4Y.js";
8
8
  import {
9
9
  assertPathAllowed,
10
10
  isPathAllowed
@@ -20,14 +20,14 @@ import {
20
20
  OpenAIBackend,
21
21
  OpenAIImageService,
22
22
  XAIImageService
23
- } from "./chunk-EO2Y5GFY.js";
23
+ } from "./chunk-7A54TZXA.js";
24
24
  import {
25
25
  Logger
26
26
  } from "./chunk-PFBYGCOW.js";
27
27
  import {
28
28
  ConfigStore,
29
29
  logger
30
- } from "./chunk-J6ZBI6TI.js";
30
+ } from "./chunk-CX4G5LRK.js";
31
31
  import {
32
32
  ALERT_THRESHOLDS,
33
33
  AiEvents,
@@ -88,7 +88,7 @@ import {
88
88
  getViewById,
89
89
  resolveNavigationIntents,
90
90
  sanitizeTelemetryError
91
- } from "./chunk-JW3JRHH7.js";
91
+ } from "./chunk-RHC4ZO7D.js";
92
92
 
93
93
  // src/utils/fileSearch.ts
94
94
  import * as fs from "fs";
@@ -4763,6 +4763,7 @@ var DEFAULT_CONFIG = {
4763
4763
  };
4764
4764
 
4765
4765
  // ../../b4m-core/packages/services/dist/src/llm/ChatCompletionProcess.js
4766
+ import { createHmac } from "crypto";
4766
4767
  import { Mutex } from "async-mutex";
4767
4768
 
4768
4769
  // ../../b4m-core/packages/services/dist/src/llm/tools/implementation/diceroll/index.js
@@ -4995,7 +4995,7 @@ import { z as z25 } from "zod";
4995
4995
 
4996
4996
  // ../../b4m-core/packages/common/dist/src/schemas/contextTelemetry.js
4997
4997
  import { z as z24 } from "zod";
4998
- var CONTEXT_TELEMETRY_SCHEMA_VERSION = "1.0";
4998
+ var CONTEXT_TELEMETRY_SCHEMA_VERSION = "1.1";
4999
4999
  var AnonymousSessionIdSchema = z24.object({
5000
5000
  /** SHA256(userId|orgId|dailySalt|date) - cannot be reversed */
5001
5001
  hash: z24.string(),
@@ -5188,12 +5188,27 @@ var RequestMetadataSchema = z24.object({
5188
5188
  mementoCount: z24.number(),
5189
5189
  enabledFeatures: z24.array(z24.string())
5190
5190
  });
5191
+ var ContextWindowTelemetryWithOptionalSourceSchema = z24.object({
5192
+ /** gen_ai.usage.input_tokens */
5193
+ inputTokens: z24.number(),
5194
+ /** gen_ai.usage.output_tokens */
5195
+ outputTokens: z24.number(),
5196
+ contextWindowLimit: z24.number(),
5197
+ utilizationPercentage: z24.number(),
5198
+ reservedOutputTokens: z24.number(),
5199
+ overflowDetected: z24.boolean(),
5200
+ overflowAmount: z24.number().optional(),
5201
+ /** Token breakdown by source (enhanced only) */
5202
+ tokensBySource: TokensBySourceSchema.optional()
5203
+ });
5191
5204
  var ContextTelemetrySchema = z24.object({
5192
- schemaVersion: z24.literal(CONTEXT_TELEMETRY_SCHEMA_VERSION),
5205
+ schemaVersion: z24.enum(["1.0", "1.1"]),
5193
5206
  /** ISO 8601 */
5194
5207
  timestamp: z24.string(),
5195
5208
  /** Self-monitoring: time to capture telemetry */
5196
5209
  captureOverheadMs: z24.number(),
5210
+ /** Capture level: basic or enhanced */
5211
+ captureLevel: z24.enum(["basic", "enhanced"]).optional(),
5197
5212
  // Privacy: TRUE ANONYMIZATION (no PII link)
5198
5213
  anonymousSessionId: AnonymousSessionIdSchema,
5199
5214
  // OpenTelemetry span context for distributed tracing
@@ -5202,28 +5217,28 @@ var ContextTelemetrySchema = z24.object({
5202
5217
  operation: OperationSchema,
5203
5218
  // Model info
5204
5219
  model: ModelTelemetrySchema,
5205
- // System prompts (per-prompt detail for debugging)
5206
- systemPrompts: SystemPromptsTelemetrySchema,
5207
- // Feature contributions (per-feature detail for debugging)
5208
- features: FeaturesTelemetrySchema,
5209
- // Context window metrics
5210
- contextWindow: ContextWindowTelemetrySchema,
5211
- // Cache metrics
5220
+ // System prompts (enhanced only can fingerprint feature usage)
5221
+ systemPrompts: SystemPromptsTelemetrySchema.optional(),
5222
+ // Feature contributions (enhanced only can fingerprint user behavior)
5223
+ features: FeaturesTelemetrySchema.optional(),
5224
+ // Context window metrics (basic: headline metrics; basic+enhanced: tokensBySource)
5225
+ contextWindow: ContextWindowTelemetryWithOptionalSourceSchema,
5226
+ // Cache metrics (basic + enhanced)
5212
5227
  cache: CacheTelemetrySchema.optional(),
5213
5228
  // Cost tracking
5214
5229
  costs: CostsTelemetrySchema,
5215
- // Truncation tracking
5216
- truncation: TruncationTelemetrySchema,
5217
- // Tool execution metrics
5230
+ // Truncation tracking (basic + enhanced)
5231
+ truncation: TruncationTelemetrySchema.optional(),
5232
+ // Tool execution metrics (basic: operational metrics without lastError; enhanced: full)
5218
5233
  tools: z24.array(ToolTelemetrySchema).optional(),
5219
- // Sub-agent metrics
5234
+ // Sub-agent metrics (basic + enhanced)
5220
5235
  subagents: z24.array(SubagentTelemetrySchema).optional(),
5221
5236
  // Performance metrics
5222
5237
  performance: PerformanceTelemetrySchema,
5223
5238
  // Anomaly detection
5224
5239
  anomalies: AnomaliesTelemetrySchema,
5225
- // Request metadata
5226
- requestMetadata: RequestMetadataSchema,
5240
+ // Request metadata (enhanced only — enabledFeatures can fingerprint users)
5241
+ requestMetadata: RequestMetadataSchema.optional(),
5227
5242
  // Capture errors (for partial telemetry)
5228
5243
  captureErrors: z24.array(z24.string()).optional()
5229
5244
  });
@@ -12158,6 +12173,7 @@ export {
12158
12173
  PrimaryAnomalySchema,
12159
12174
  AnomaliesTelemetrySchema,
12160
12175
  RequestMetadataSchema,
12176
+ ContextWindowTelemetryWithOptionalSourceSchema,
12161
12177
  ContextTelemetrySchema,
12162
12178
  ANOMALY_WEIGHTS,
12163
12179
  ANOMALY_THRESHOLDS,
@@ -3,7 +3,7 @@ import {
3
3
  fetchLatestVersion,
4
4
  forceCheckForUpdate,
5
5
  package_default
6
- } from "../chunk-VJLPCIK2.js";
6
+ } from "../chunk-LKWJ3L7A.js";
7
7
 
8
8
  // src/commands/doctorCommand.ts
9
9
  import { execSync } from "child_process";
@@ -36,21 +36,21 @@ import {
36
36
  isReadOnlyTool,
37
37
  loadContextFiles,
38
38
  setWebSocketToolExecutor
39
- } from "../chunk-MNBT2VFX.js";
39
+ } from "../chunk-MNHK2V64.js";
40
40
  import "../chunk-BDQBOLYG.js";
41
- import "../chunk-2J4HB7EB.js";
41
+ import "../chunk-EYEA7L4Y.js";
42
42
  import "../chunk-GQGOWACU.js";
43
43
  import "../chunk-LTLJRF6I.js";
44
- import "../chunk-PJFESKK6.js";
45
- import "../chunk-Y7K4HI6L.js";
46
- import "../chunk-EO2Y5GFY.js";
44
+ import "../chunk-AIW6AQJN.js";
45
+ import "../chunk-BQVQSA4U.js";
46
+ import "../chunk-7A54TZXA.js";
47
47
  import "../chunk-PFBYGCOW.js";
48
48
  import "../chunk-BPFEGDC7.js";
49
49
  import {
50
50
  ConfigStore,
51
51
  logger
52
- } from "../chunk-J6ZBI6TI.js";
53
- import "../chunk-JW3JRHH7.js";
52
+ } from "../chunk-CX4G5LRK.js";
53
+ import "../chunk-RHC4ZO7D.js";
54
54
  import {
55
55
  DEFAULT_SANDBOX_CONFIG
56
56
  } from "../chunk-4BIBE3J7.js";
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  ConfigStore
4
- } from "../chunk-J6ZBI6TI.js";
5
- import "../chunk-JW3JRHH7.js";
4
+ } from "../chunk-CX4G5LRK.js";
5
+ import "../chunk-RHC4ZO7D.js";
6
6
  import "../chunk-4BIBE3J7.js";
7
7
 
8
8
  // src/commands/mcpCommand.ts
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  forceCheckForUpdate,
4
4
  package_default
5
- } from "../chunk-VJLPCIK2.js";
5
+ } from "../chunk-LKWJ3L7A.js";
6
6
 
7
7
  // src/commands/updateCommand.ts
8
8
  import { execSync } from "child_process";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  createFabFile,
4
4
  createFabFileSchema
5
- } from "./chunk-Y7K4HI6L.js";
6
- import "./chunk-EO2Y5GFY.js";
5
+ } from "./chunk-BQVQSA4U.js";
6
+ import "./chunk-7A54TZXA.js";
7
7
  import "./chunk-PFBYGCOW.js";
8
- import "./chunk-JW3JRHH7.js";
8
+ import "./chunk-RHC4ZO7D.js";
9
9
  export {
10
10
  createFabFile,
11
11
  createFabFileSchema
package/dist/index.js CHANGED
@@ -48,26 +48,26 @@ import {
48
48
  setWebSocketToolExecutor,
49
49
  substituteArguments,
50
50
  warmFileCache
51
- } from "./chunk-MNBT2VFX.js";
51
+ } from "./chunk-MNHK2V64.js";
52
52
  import "./chunk-BDQBOLYG.js";
53
- import "./chunk-2J4HB7EB.js";
53
+ import "./chunk-EYEA7L4Y.js";
54
54
  import "./chunk-GQGOWACU.js";
55
55
  import "./chunk-LTLJRF6I.js";
56
- import "./chunk-PJFESKK6.js";
57
- import "./chunk-Y7K4HI6L.js";
56
+ import "./chunk-AIW6AQJN.js";
57
+ import "./chunk-BQVQSA4U.js";
58
58
  import {
59
59
  OllamaBackend
60
- } from "./chunk-EO2Y5GFY.js";
60
+ } from "./chunk-7A54TZXA.js";
61
61
  import "./chunk-PFBYGCOW.js";
62
62
  import "./chunk-BPFEGDC7.js";
63
63
  import {
64
64
  ConfigStore,
65
65
  logger
66
- } from "./chunk-J6ZBI6TI.js";
66
+ } from "./chunk-CX4G5LRK.js";
67
67
  import {
68
68
  checkForUpdate,
69
69
  package_default
70
- } from "./chunk-VJLPCIK2.js";
70
+ } from "./chunk-LKWJ3L7A.js";
71
71
  import {
72
72
  selectActiveBackgroundAgents,
73
73
  useCliStore
@@ -77,7 +77,7 @@ import {
77
77
  ChatModels,
78
78
  validateJupyterKernelName,
79
79
  validateNotebookPath
80
- } from "./chunk-JW3JRHH7.js";
80
+ } from "./chunk-RHC4ZO7D.js";
81
81
  import "./chunk-4BIBE3J7.js";
82
82
 
83
83
  // src/index.tsx
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-JW3JRHH7.js";
4
+ } from "./chunk-RHC4ZO7D.js";
5
5
 
6
6
  // ../../b4m-core/packages/services/dist/src/notebookCurationService/llmMarkdownGenerator.js
7
7
  var DEFAULT_OPTIONS = {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  CurationArtifactType
4
- } from "./chunk-JW3JRHH7.js";
4
+ } from "./chunk-RHC4ZO7D.js";
5
5
 
6
6
  // ../../b4m-core/packages/services/dist/src/notebookCurationService/markdownGenerator.js
7
7
  var DEFAULT_OPTIONS = {
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  findMostSimilarMemento,
4
4
  getRelevantMementos
5
- } from "./chunk-2J4HB7EB.js";
6
- import "./chunk-EO2Y5GFY.js";
5
+ } from "./chunk-EYEA7L4Y.js";
6
+ import "./chunk-7A54TZXA.js";
7
7
  import "./chunk-PFBYGCOW.js";
8
- import "./chunk-JW3JRHH7.js";
8
+ import "./chunk-RHC4ZO7D.js";
9
9
  export {
10
10
  findMostSimilarMemento,
11
11
  getRelevantMementos
@@ -75,6 +75,7 @@ import {
75
75
  ContextTelemetryAlertsSchema,
76
76
  ContextTelemetrySchema,
77
77
  ContextWindowTelemetrySchema,
78
+ ContextWindowTelemetryWithOptionalSourceSchema,
78
79
  CostsTelemetrySchema,
79
80
  CreateDataLakeRequestInput,
80
81
  CreateFabFileRequestInput,
@@ -547,7 +548,7 @@ import {
547
548
  validateReactArtifactV2,
548
549
  validateSvgArtifactV2,
549
550
  wikiMarkupToAdf
550
- } from "./chunk-JW3JRHH7.js";
551
+ } from "./chunk-RHC4ZO7D.js";
551
552
  export {
552
553
  ALERT_THRESHOLDS,
553
554
  ALLOWED_JUPYTER_KERNELS,
@@ -625,6 +626,7 @@ export {
625
626
  ContextTelemetryAlertsSchema,
626
627
  ContextTelemetrySchema,
627
628
  ContextWindowTelemetrySchema,
629
+ ContextWindowTelemetryWithOptionalSourceSchema,
628
630
  CostsTelemetrySchema,
629
631
  CreateDataLakeRequestInput,
630
632
  CreateFabFileRequestInput,
@@ -146,7 +146,7 @@ import {
146
146
  validateUrlForFetch,
147
147
  warmUpSettingsCache,
148
148
  withRetry
149
- } from "./chunk-EO2Y5GFY.js";
149
+ } from "./chunk-7A54TZXA.js";
150
150
  import {
151
151
  Logger,
152
152
  NotificationDeduplicator,
@@ -159,7 +159,7 @@ import {
159
159
  buildRateLimitLogEntry,
160
160
  isNearLimit,
161
161
  parseRateLimitHeaders
162
- } from "./chunk-JW3JRHH7.js";
162
+ } from "./chunk-RHC4ZO7D.js";
163
163
  export {
164
164
  AIVideoService,
165
165
  AWSBackend,
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  SubtractCreditsSchema,
4
4
  subtractCredits
5
- } from "./chunk-PJFESKK6.js";
6
- import "./chunk-EO2Y5GFY.js";
5
+ } from "./chunk-AIW6AQJN.js";
6
+ import "./chunk-7A54TZXA.js";
7
7
  import "./chunk-PFBYGCOW.js";
8
- import "./chunk-JW3JRHH7.js";
8
+ import "./chunk-RHC4ZO7D.js";
9
9
  export {
10
10
  SubtractCreditsSchema,
11
11
  subtractCredits
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bike4mind/cli",
3
- "version": "0.2.62",
3
+ "version": "0.2.63-feat-telemetry-user-opt-in.21811+2bfc7f8a1",
4
4
  "type": "module",
5
5
  "description": "Interactive CLI tool for Bike4Mind with ReAct agents",
6
6
  "license": "UNLICENSED",
@@ -115,11 +115,11 @@
115
115
  "zustand": "^4.5.4"
116
116
  },
117
117
  "devDependencies": {
118
- "@bike4mind/agents": "0.4.0",
119
- "@bike4mind/common": "2.75.0",
120
- "@bike4mind/mcp": "1.33.20",
121
- "@bike4mind/services": "2.68.2",
122
- "@bike4mind/utils": "2.16.1",
118
+ "@bike4mind/agents": "0.4.1-feat-telemetry-user-opt-in.21811+2bfc7f8a1",
119
+ "@bike4mind/common": "2.75.1-feat-telemetry-user-opt-in.21811+2bfc7f8a1",
120
+ "@bike4mind/mcp": "1.33.21-feat-telemetry-user-opt-in.21811+2bfc7f8a1",
121
+ "@bike4mind/services": "2.68.3-feat-telemetry-user-opt-in.21811+2bfc7f8a1",
122
+ "@bike4mind/utils": "2.16.2-feat-telemetry-user-opt-in.21811+2bfc7f8a1",
123
123
  "@types/better-sqlite3": "^7.6.13",
124
124
  "@types/jsonwebtoken": "^9.0.4",
125
125
  "@types/node": "^22.9.0",
@@ -136,5 +136,5 @@
136
136
  "optionalDependencies": {
137
137
  "@vscode/ripgrep": "^1.17.1"
138
138
  },
139
- "gitHead": "faae6cba90cc104961ee4dbef74dbe51d599b9dc"
139
+ "gitHead": "2bfc7f8a119d68d2790333d8d8c39113c6903a21"
140
140
  }