@aixle/insights 0.2.8-staging → 0.2.10-staging

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/README.md CHANGED
@@ -251,7 +251,7 @@ rm -f ~/.aixle-insights/credentials.json
251
251
  |---|---|
252
252
  | `AIXLE_INSIGHTS_API_URL` (deprecated: `DB90_API_URL`) | API origin for ingestion + MCP exchange (defaults to `http://localhost:3000`; `init --host` overrides). |
253
253
  | `KEYCLOAK_ISSUER` / `AIXLE_INSIGHTS_KEYCLOAK_ISSUER` (deprecated: `DB90_KEYCLOAK_ISSUER`) | Realm issuer URLs (`KEYCLOAK_ISSUER` is preferred on servers + CI). |
254
- | `KEYCLOAK_CLIENT_ID` / `AIXLE_INSIGHTS_KEYCLOAK_CLIENT_ID` (deprecated: `DB90_KEYCLOAK_CLIENT_ID`) | Defaults to `aixle-insights-web`; must allow device authorization in Keycloak. |
254
+ | `KEYCLOAK_CLIENT_ID` / `AIXLE_INSIGHTS_KEYCLOAK_CLIENT_ID` (deprecated: `DB90_KEYCLOAK_CLIENT_ID`) | Defaults to `db90-web`; must allow device authorization in Keycloak. |
255
255
  | `AIXLE_INSIGHTS_ORGANIZATION_ID` (deprecated: `DB90_ORGANIZATION_ID`) | Optional UUID scoping `init` to that org membership (header `X-Organization-ID`). |
256
256
  | `AIXLE_INSIGHTS_HOME` | Override the local state directory (defaults to `~/.aixle-insights/`). |
257
257
  | `AIXLE_INSIGHTS_MCP_DISABLE_KEYTAR` (deprecated: `DB90_MCP_DISABLE_KEYTAR`) | Set to skip the OS keychain entirely and use the `credentials.json` fallback. Useful on headless Linux/CI/Docker where Secret Service is absent. |
@@ -199,5 +199,5 @@ export function defaultKeycloakClientId() {
199
199
  deprecated: "DB90_KEYCLOAK_CLIENT_ID",
200
200
  onDeprecatedUse: warnDeprecatedEnvVar,
201
201
  }) ||
202
- "aixle-insights-web");
202
+ "db90-web");
203
203
  }
@@ -59,7 +59,6 @@ export interface ClaudeTranscriptTurn {
59
59
  toolUses: ClaudeCollectedToolUse[];
60
60
  navToolCalls: number;
61
61
  totalToolCalls: number;
62
- messageIds: string[];
63
62
  /**
64
63
  * Fingerprint of the turn's content (prompt + assistant text + tool-use set).
65
64
  * A turn keeps the same turnId as Claude appends more tool_use blocks to it,
@@ -67,6 +66,8 @@ export interface ClaudeTranscriptTurn {
67
66
  * instead of skipping the turn forever on its unchanged id (DB90DV-259).
68
67
  */
69
68
  contentHash: string;
69
+ messageIds: string[];
70
+ requestIds: string[];
70
71
  }
71
72
  /** Payload shape for the parent chat turn (carries full token cost). */
72
73
  export interface ClaudePayload extends IngestPayload {
@@ -99,6 +100,7 @@ export interface ClaudePayload extends IngestPayload {
99
100
  nav_tool_calls: number;
100
101
  total_tool_calls: number;
101
102
  message_ids?: string[];
103
+ request_ids?: string[];
102
104
  };
103
105
  }
104
106
  /** Payload shape for derivative tool-use children (cost_usd: 0, no tokens). */
@@ -206,8 +206,9 @@ function newTurn(sessionId, turnIndex, filePath, fileSize, occurredAt, promptId)
206
206
  toolUses: [],
207
207
  navToolCalls: 0,
208
208
  totalToolCalls: 0,
209
- messageIds: [],
210
209
  contentHash: "",
210
+ messageIds: [],
211
+ requestIds: [],
211
212
  persisted: false,
212
213
  };
213
214
  }
@@ -227,7 +228,7 @@ function computeTurnContentHash(turn) {
227
228
  turn.promptText,
228
229
  turn.assistantText,
229
230
  toolFingerprint,
230
- ].join("");
231
+ ].join(" ");
231
232
  return createHash("sha256").update(material).digest("hex").slice(0, 32);
232
233
  }
233
234
  function appendText(existing, addition) {
@@ -394,6 +395,9 @@ export async function parseTranscriptFile(filePath, verbose = false) {
394
395
  if (entry.message.id && !currentTurn.messageIds.includes(entry.message.id)) {
395
396
  currentTurn.messageIds.push(entry.message.id);
396
397
  }
398
+ if (entry.requestId && !currentTurn.requestIds.includes(entry.requestId)) {
399
+ currentTurn.requestIds.push(entry.requestId);
400
+ }
397
401
  currentTurn.occurredAt = timestamp > currentTurn.occurredAt ? timestamp : currentTurn.occurredAt;
398
402
  const text = extractContentText(entry.message.content).join("\n\n").trim();
399
403
  currentTurn.assistantText = appendText(currentTurn.assistantText, text);
@@ -449,6 +453,7 @@ export function mapTranscriptTurn(turn, options) {
449
453
  nav_tool_calls: turn.navToolCalls,
450
454
  total_tool_calls: turn.totalToolCalls,
451
455
  message_ids: turn.messageIds.length > 0 ? turn.messageIds : undefined,
456
+ request_ids: turn.requestIds.length > 0 ? turn.requestIds : undefined,
452
457
  },
453
458
  };
454
459
  if (turn.model)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aixle/insights",
3
- "version": "0.2.8-staging",
3
+ "version": "0.2.10-staging",
4
4
  "description": "stdio MCP server for AI coding-assistant telemetry — Claude transcript sync + Cursor SQLite ingest.",
5
5
  "type": "module",
6
6
  "bin": {